diff options
Diffstat (limited to 'src/gui')
577 files changed, 14173 insertions, 14170 deletions
diff --git a/src/gui/application/LircClient.cpp b/src/gui/application/LircClient.cpp index ae731d7..7664b9e 100644 --- a/src/gui/application/LircClient.cpp +++ b/src/gui/application/LircClient.cpp @@ -32,8 +32,8 @@ #include "misc/Debug.h" #include "base/Exception.h" -#include <qobject.h> -#include <qsocketnotifier.h> +#include <tqobject.h> +#include <tqsocketnotifier.h> #include <fcntl.h> #include <cstdlib> @@ -41,7 +41,7 @@ namespace Rosegarden { LircClient::LircClient(void) - : QObject() + : TQObject() { int socketFlags; @@ -61,8 +61,8 @@ LircClient::LircClient(void) fcntl(socketFlags, F_SETFL, socketFlags | O_NONBLOCK); } - m_socketNotifier = new QSocketNotifier(m_socket, QSocketNotifier::Read, 0); - connect(m_socketNotifier, SIGNAL(activated(int)), this, SLOT(readButton()) ); + m_socketNotifier = new TQSocketNotifier(m_socket, TQSocketNotifier::Read, 0); + connect(m_socketNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(readButton()) ); RG_DEBUG << "LircClient::LircClient: connected to socket: " << m_socket << endl; } diff --git a/src/gui/application/LircClient.h b/src/gui/application/LircClient.h index b80d3d7..3f69ce1 100644 --- a/src/gui/application/LircClient.h +++ b/src/gui/application/LircClient.h @@ -31,10 +31,10 @@ #ifdef HAVE_LIRC -#include <qobject.h> +#include <tqobject.h> #include <lirc/lirc_client.h> -class QSocketNotifier; +class TQSocketNotifier; namespace Rosegarden @@ -57,7 +57,7 @@ signals: private: int m_socket; - QSocketNotifier *m_socketNotifier; + TQSocketNotifier *m_socketNotifier; struct lirc_config *m_config; char *m_command; }; diff --git a/src/gui/application/LircCommander.cpp b/src/gui/application/LircCommander.cpp index 53562ca..e323539 100644 --- a/src/gui/application/LircCommander.cpp +++ b/src/gui/application/LircCommander.cpp @@ -36,44 +36,44 @@ #include "RosegardenGUIApp.h" #include "RosegardenGUIView.h" -#include <qobject.h> +#include <tqobject.h> namespace Rosegarden { LircCommander::LircCommander(LircClient *lirc, RosegardenGUIApp *rgGUIApp) - : QObject() + : TQObject() { m_lirc = lirc; m_rgGUIApp = rgGUIApp; - connect(m_lirc, SIGNAL(buttonPressed(char *)), - this, SLOT(slotExecute(char *)) ); - - connect(this, SIGNAL(play()), - m_rgGUIApp, SLOT(slotPlay()) ); - connect(this, SIGNAL(stop()), - m_rgGUIApp, SLOT(slotStop()) ); - connect(this, SIGNAL(record()), - m_rgGUIApp, SLOT(slotRecord()) ); - connect(this, SIGNAL(rewind()), - m_rgGUIApp, SLOT(slotRewind()) ); - connect(this, SIGNAL(rewindToBeginning()), - m_rgGUIApp, SLOT(slotRewindToBeginning()) ); - connect(this, SIGNAL(fastForward()), - m_rgGUIApp, SLOT(slotFastforward()) ); - connect(this, SIGNAL(fastForwardToEnd()), - m_rgGUIApp, SLOT(slotFastForwardToEnd()) ); - connect(this, SIGNAL(toggleRecord()), - m_rgGUIApp, SLOT(slotToggleRecord()) ); - connect(this, SIGNAL(trackDown()), - m_rgGUIApp, SLOT(slotTrackDown()) ); - connect(this, SIGNAL(trackUp()), - m_rgGUIApp, SLOT(slotTrackUp()) ); - connect(this, SIGNAL(trackMute()), - m_rgGUIApp, SLOT(slotToggleMutedCurrentTrack()) ); - connect(this, SIGNAL(trackRecord()), - m_rgGUIApp, SLOT(slotToggleRecordCurrentTrack()) ); + connect(m_lirc, TQT_SIGNAL(buttonPressed(char *)), + this, TQT_SLOT(slotExecute(char *)) ); + + connect(this, TQT_SIGNAL(play()), + m_rgGUIApp, TQT_SLOT(slotPlay()) ); + connect(this, TQT_SIGNAL(stop()), + m_rgGUIApp, TQT_SLOT(slotStop()) ); + connect(this, TQT_SIGNAL(record()), + m_rgGUIApp, TQT_SLOT(slotRecord()) ); + connect(this, TQT_SIGNAL(rewind()), + m_rgGUIApp, TQT_SLOT(slotRewind()) ); + connect(this, TQT_SIGNAL(rewindToBeginning()), + m_rgGUIApp, TQT_SLOT(slotRewindToBeginning()) ); + connect(this, TQT_SIGNAL(fastForward()), + m_rgGUIApp, TQT_SLOT(slotFastforward()) ); + connect(this, TQT_SIGNAL(fastForwardToEnd()), + m_rgGUIApp, TQT_SLOT(slotFastForwardToEnd()) ); + connect(this, TQT_SIGNAL(toggleRecord()), + m_rgGUIApp, TQT_SLOT(slotToggleRecord()) ); + connect(this, TQT_SIGNAL(trackDown()), + m_rgGUIApp, TQT_SLOT(slotTrackDown()) ); + connect(this, TQT_SIGNAL(trackUp()), + m_rgGUIApp, TQT_SLOT(slotTrackUp()) ); + connect(this, TQT_SIGNAL(trackMute()), + m_rgGUIApp, TQT_SLOT(slotToggleMutedCurrentTrack()) ); + connect(this, TQT_SIGNAL(trackRecord()), + m_rgGUIApp, TQT_SLOT(slotToggleRecordCurrentTrack()) ); } LircCommander::command LircCommander::commands[] = diff --git a/src/gui/application/LircCommander.h b/src/gui/application/LircCommander.h index 84a857e..60d356f 100644 --- a/src/gui/application/LircCommander.h +++ b/src/gui/application/LircCommander.h @@ -30,7 +30,7 @@ #ifdef HAVE_LIRC -#include <qobject.h> +#include <tqobject.h> #include "base/Track.h" diff --git a/src/gui/application/RosegardenApplication.cpp b/src/gui/application/RosegardenApplication.cpp index 6e85aab..b6282c3 100644 --- a/src/gui/application/RosegardenApplication.cpp +++ b/src/gui/application/RosegardenApplication.cpp @@ -37,10 +37,10 @@ #include <kmessagebox.h> #include <kprocess.h> #include <kuniqueapplication.h> -#include <qcstring.h> -#include <qeventloop.h> -#include <qsessionmanager.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqeventloop.h> +#include <tqsessionmanager.h> +#include <tqstring.h> #include <dcopclient.h> #include <kconfig.h> #include <kstatusbar.h> @@ -72,7 +72,7 @@ bool RosegardenApplication::isSequencerRegistered() return dcopClient()->isApplicationRegistered(ROSEGARDEN_SEQUENCER_APP_NAME); } -bool RosegardenApplication::sequencerSend(QCString dcopCall, QByteArray params) +bool RosegardenApplication::sequencerSend(TQCString dcopCall, TQByteArray params) { if (noSequencerMode()) return false; @@ -82,8 +82,8 @@ bool RosegardenApplication::sequencerSend(QCString dcopCall, QByteArray params) dcopCall, params); } -bool RosegardenApplication::sequencerCall(QCString dcopCall, QCString& replyType, QByteArray& replyData, - QByteArray params, bool useEventLoop) +bool RosegardenApplication::sequencerCall(TQCString dcopCall, TQCString& replyType, TQByteArray& replyData, + TQByteArray params, bool useEventLoop) { if (noSequencerMode()) return false; @@ -95,9 +95,9 @@ bool RosegardenApplication::sequencerCall(QCString dcopCall, QCString& replyType void RosegardenApplication::sfxLoadExited(KProcess *proc) { if (!proc->normalExit()) { - QString configGroup = config()->group(); + TQString configGroup = config()->group(); config()->setGroup(SequencerOptionsConfigGroup); - QString soundFontPath = config()->readEntry("soundfontpath", ""); + TQString soundFontPath = config()->readEntry("soundfontpath", ""); config()->setGroup(configGroup); KMessageBox::error(mainWidget(), @@ -108,13 +108,13 @@ void RosegardenApplication::sfxLoadExited(KProcess *proc) } -void RosegardenApplication::slotSetStatusMessage(QString msg) +void RosegardenApplication::slotSetStatusMessage(TQString msg) { KMainWindow* mainWindow = dynamic_cast<KMainWindow*>(mainWidget()); if (mainWindow) { if (msg.isEmpty()) msg = KTmpStatusMsg::getDefaultMsg(); - mainWindow->statusBar()->changeItem(QString(" %1").arg(msg), KTmpStatusMsg::getDefaultId()); + mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), KTmpStatusMsg::getDefaultId()); } } @@ -122,8 +122,8 @@ void RosegardenApplication::slotSetStatusMessage(QString msg) void RosegardenApplication::refreshGUI(int maxTime) { - eventLoop()->processEvents(QEventLoop::ExcludeUserInput | - QEventLoop::ExcludeSocketNotifiers, + eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | + TQEventLoop::ExcludeSocketNotifiers, maxTime); } @@ -138,7 +138,7 @@ RosegardenApplication* RosegardenApplication::rgApp() return dynamic_cast<RosegardenApplication*>(kApplication()); } -QByteArray RosegardenApplication::Empty; +TQByteArray RosegardenApplication::Empty; } diff --git a/src/gui/application/RosegardenApplication.h b/src/gui/application/RosegardenApplication.h index 4541308..ff3b2ba 100644 --- a/src/gui/application/RosegardenApplication.h +++ b/src/gui/application/RosegardenApplication.h @@ -27,8 +27,8 @@ #define _RG_ROSEGARDENAPPLICATION_H_ #include <kuniqueapplication.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> class QSessionManager; @@ -62,13 +62,13 @@ public: void refreshGUI(int maxTime); bool isSequencerRegistered(); - bool sequencerSend(QCString dcopCall, QByteArray params = Empty); - bool sequencerCall(QCString dcopCall, QCString& replyType, - QByteArray& replyData, QByteArray params = Empty, bool useEventLoop = false); + bool sequencerSend(TQCString dcopCall, TQByteArray params = Empty); + bool sequencerCall(TQCString dcopCall, TQCString& replyType, + TQByteArray& replyData, TQByteArray params = Empty, bool useEventLoop = false); static RosegardenApplication* rgApp(); - static QByteArray Empty; + static TQByteArray Empty; void setNoSequencerMode(bool m=true) { m_noSequencerMode = m; } bool noSequencerMode() { return m_noSequencerMode; } @@ -81,7 +81,7 @@ signals: public slots: void sfxLoadExited(KProcess *proc); - void slotSetStatusMessage(QString txt); + void slotSetStatusMessage(TQString txt); protected: //--------------- Data members --------------------------------- diff --git a/src/gui/application/RosegardenGUIApp.cpp b/src/gui/application/RosegardenGUIApp.cpp index 608ad58..2d0e23a 100644 --- a/src/gui/application/RosegardenGUIApp.cpp +++ b/src/gui/application/RosegardenGUIApp.cpp @@ -199,31 +199,31 @@ #include <ktoolbar.h> #include <kurl.h> #include <kxmlguiclient.h> -#include <qaccel.h> -#include <qcanvas.h> -#include <qcstring.h> -#include <qcursor.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qiconset.h> -#include <qinputdialog.h> -#include <qlabel.h> -#include <qobject.h> -#include <qobjectlist.h> -#include <qpixmap.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qslider.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextcodec.h> -#include <qtimer.h> -#include <qvaluevector.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcanvas.h> +#include <tqcstring.h> +#include <tqcursor.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqiconset.h> +#include <tqinputdialog.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextcodec.h> +#include <tqtimer.h> +#include <tqvaluevector.h> +#include <tqwidget.h> #ifdef HAVE_LIBJACK #include <jack/jack.h> @@ -235,7 +235,7 @@ namespace Rosegarden RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, bool useExistingSequencer, - QObject *startupStatusMessageReceiver) + TQObject *startupStatusMessageReceiver) : DCOPObject("RosegardenIface"), RosegardenIface(this), KDockMainWindow(0), m_actionsSetup(false), m_fileRecent(0), @@ -258,7 +258,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_storedLoopEnd(0), m_useSequencer(useSequencer), m_dockVisible(true), - m_autoSaveTimer(new QTimer(this)), + m_autoSaveTimer(new TQTimer(this)), m_clipboard(new Clipboard), m_playList(0), m_deviceManager(0), @@ -272,8 +272,8 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, #ifdef HAVE_LIBLO m_pluginGUIManager(new AudioPluginOSCGUIManager(this)), #endif - m_playTimer(new QTimer(this)), - m_stopTimer(new QTimer(this)), + m_playTimer(new TQTimer(this)), + m_stopTimer(new TQTimer(this)), m_startupTester(0), #ifdef HAVE_LIRC m_lircClient(0), @@ -287,9 +287,9 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, if (startupStatusMessageReceiver) { - QObject::connect(this, SIGNAL(startupStatusMessage(QString)), + TQObject::connect(this, TQT_SIGNAL(startupStatusMessage(TQString)), startupStatusMessageReceiver, - SLOT(slotShowStatusMessage(QString))); + TQT_SLOT(slotShowStatusMessage(TQString))); } // Try to start the sequencer @@ -341,7 +341,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, iFaceDelayedInit(this); initZoomToolbar(); - QPixmap dummyPixmap; // any icon will do + TQPixmap dummyPixmap; // any icon will do m_mainDockWidget = createDockWidget("Rosegarden MainDockWidget", dummyPixmap, 0L, "main_dock_widget"); // allow others to dock to the left and right sides only m_mainDockWidget->setDockSite(KDockWidget::DockLeft | KDockWidget::DockRight); @@ -356,14 +356,14 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, KDockWidget::DockLeft, // dock site 20); // relation target/this (in percent) - connect(m_dockLeft, SIGNAL(iMBeingClosed()), - this, SLOT(slotParametersClosed())); - connect(m_dockLeft, SIGNAL(hasUndocked()), - this, SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), + this, TQT_SLOT(slotParametersClosed())); // Apparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. - connect(m_mainDockWidget, SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), + this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); stateChanged("parametersbox_closed", KXMLGUIClient::StateReverse); @@ -393,35 +393,35 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_dockLeft->update(); connect(m_instrumentParameterBox, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), this, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_instrumentParameterBox, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); // relay this through our own signal so that others can use it too connect(m_instrumentParameterBox, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_instrumentParameterBox, - SLOT(slotInstrumentParametersChanged(InstrumentId))); + TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_instrumentParameterBox, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(this, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_instrumentParameterBox, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); // Load the initial document (this includes doc's own autoload) // @@ -441,8 +441,8 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, } if (m_view) { - connect(m_seqManager, SIGNAL(controllerDeviceEventReceived(MappedEvent *)), - m_view, SLOT(slotControllerDeviceEventReceived(MappedEvent *))); + connect(m_seqManager, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *)), + m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) { @@ -496,7 +496,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, stateChanged("have_project_packager", KXMLGUIClient::StateReverse); stateChanged("have_lilypondview", KXMLGUIClient::StateReverse); - QTimer::singleShot(1000, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(1000, this, TQT_SLOT(slotTestStartupTester())); } RosegardenGUIApp::~RosegardenGUIApp() @@ -541,101 +541,101 @@ void RosegardenGUIApp::setupActions() { // setup File menu // New Window ? - KStdAction::openNew (this, SLOT(slotFileNew()), actionCollection()); - KStdAction::open (this, SLOT(slotFileOpen()), actionCollection()); + KStdAction::openNew (this, TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open (this, TQT_SLOT(slotFileOpen()), actionCollection()); m_fileRecent = KStdAction::openRecent(this, - SLOT(slotFileOpenRecent(const KURL&)), + TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - KStdAction::save (this, SLOT(slotFileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::revert(this, SLOT(slotRevertToSaved()), actionCollection()); - KStdAction::close (this, SLOT(slotFileClose()), actionCollection()); - KStdAction::print (this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview (this, SLOT(slotFilePrintPreview()), actionCollection()); + KStdAction::save (this, TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::revert(this, TQT_SLOT(slotRevertToSaved()), actionCollection()); + KStdAction::close (this, TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::print (this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview (this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); new KAction(i18n("Import Rosegarden &Project file..."), 0, 0, this, - SLOT(slotImportProject()), actionCollection(), + TQT_SLOT(slotImportProject()), actionCollection(), "file_import_project"); new KAction(i18n("Import &MIDI file..."), 0, 0, this, - SLOT(slotImportMIDI()), actionCollection(), + TQT_SLOT(slotImportMIDI()), actionCollection(), "file_import_midi"); new KAction(i18n("Import &Rosegarden 2.1 file..."), 0, 0, this, - SLOT(slotImportRG21()), actionCollection(), + TQT_SLOT(slotImportRG21()), actionCollection(), "file_import_rg21"); new KAction(i18n("Import &Hydrogen file..."), 0, 0, this, - SLOT(slotImportHydrogen()), actionCollection(), + TQT_SLOT(slotImportHydrogen()), actionCollection(), "file_import_hydrogen"); new KAction(i18n("Merge &File..."), 0, 0, this, - SLOT(slotMerge()), actionCollection(), + TQT_SLOT(slotMerge()), actionCollection(), "file_merge"); new KAction(i18n("Merge &MIDI file..."), 0, 0, this, - SLOT(slotMergeMIDI()), actionCollection(), + TQT_SLOT(slotMergeMIDI()), actionCollection(), "file_merge_midi"); new KAction(i18n("Merge &Rosegarden 2.1 file..."), 0, 0, this, - SLOT(slotMergeRG21()), actionCollection(), + TQT_SLOT(slotMergeRG21()), actionCollection(), "file_merge_rg21"); new KAction(i18n("Merge &Hydrogen file..."), 0, 0, this, - SLOT(slotMergeHydrogen()), actionCollection(), + TQT_SLOT(slotMergeHydrogen()), actionCollection(), "file_merge_hydrogen"); new KAction(i18n("Export Rosegarden &Project file..."), 0, 0, this, - SLOT(slotExportProject()), actionCollection(), + TQT_SLOT(slotExportProject()), actionCollection(), "file_export_project"); new KAction(i18n("Export &MIDI file..."), 0, 0, this, - SLOT(slotExportMIDI()), actionCollection(), + TQT_SLOT(slotExportMIDI()), actionCollection(), "file_export_midi"); new KAction(i18n("Export &LilyPond file..."), 0, 0, this, - SLOT(slotExportLilyPond()), actionCollection(), + TQT_SLOT(slotExportLilyPond()), actionCollection(), "file_export_lilypond"); new KAction(i18n("Export Music&XML file..."), 0, 0, this, - SLOT(slotExportMusicXml()), actionCollection(), + TQT_SLOT(slotExportMusicXml()), actionCollection(), "file_export_musicxml"); new KAction(i18n("Export &Csound score file..."), 0, 0, this, - SLOT(slotExportCsound()), actionCollection(), + TQT_SLOT(slotExportCsound()), actionCollection(), "file_export_csound"); new KAction(i18n("Export M&up file..."), 0, 0, this, - SLOT(slotExportMup()), actionCollection(), + TQT_SLOT(slotExportMup()), actionCollection(), "file_export_mup"); new KAction(i18n("Print &with LilyPond..."), 0, 0, this, - SLOT(slotPrintLilyPond()), actionCollection(), + TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, - SLOT(slotPreviewLilyPond()), actionCollection(), + TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); new KAction(i18n("Play&list"), 0, 0, this, - SLOT(slotPlayList()), actionCollection(), + TQT_SLOT(slotPlayList()), actionCollection(), "file_show_playlist"); - KStdAction::quit (this, SLOT(slotQuit()), actionCollection()); + KStdAction::quit (this, TQT_SLOT(slotQuit()), actionCollection()); // help menu new KAction(i18n("Rosegarden &Tutorial"), 0, 0, this, - SLOT(slotTutorial()), actionCollection(), + TQT_SLOT(slotTutorial()), actionCollection(), "tutorial"); new KAction(i18n("&Bug Reporting Guidelines"), 0, 0, this, - SLOT(slotBugGuidelines()), actionCollection(), + TQT_SLOT(slotBugGuidelines()), actionCollection(), "guidelines"); // setup edit menu - KStdAction::cut (this, SLOT(slotEditCut()), actionCollection()); - KStdAction::copy (this, SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, SLOT(slotEditPaste()), actionCollection()); + KStdAction::cut (this, TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); // // undo/redo actions are special in that they are connected to @@ -659,202 +659,202 @@ void RosegardenGUIApp::setupActions() // setup Settings menu // - m_viewToolBar = KStdAction::showToolbar (this, SLOT(slotToggleToolBar()), actionCollection(), + m_viewToolBar = KStdAction::showToolbar (this, TQT_SLOT(slotToggleToolBar()), actionCollection(), "show_stock_toolbar"); m_viewToolsToolBar = new KToggleAction(i18n("Show T&ools Toolbar"), 0, this, - SLOT(slotToggleToolsToolBar()), actionCollection(), + TQT_SLOT(slotToggleToolsToolBar()), actionCollection(), "show_tools_toolbar"); m_viewTracksToolBar = new KToggleAction(i18n("Show Trac&ks Toolbar"), 0, this, - SLOT(slotToggleTracksToolBar()), actionCollection(), + TQT_SLOT(slotToggleTracksToolBar()), actionCollection(), "show_tracks_toolbar"); m_viewEditorsToolBar = new KToggleAction(i18n("Show &Editors Toolbar"), 0, this, - SLOT(slotToggleEditorsToolBar()), actionCollection(), + TQT_SLOT(slotToggleEditorsToolBar()), actionCollection(), "show_editors_toolbar"); m_viewTransportToolBar = new KToggleAction(i18n("Show Trans&port Toolbar"), 0, this, - SLOT(slotToggleTransportToolBar()), actionCollection(), + TQT_SLOT(slotToggleTransportToolBar()), actionCollection(), "show_transport_toolbar"); m_viewZoomToolBar = new KToggleAction(i18n("Show &Zoom Toolbar"), 0, this, - SLOT(slotToggleZoomToolBar()), actionCollection(), + TQT_SLOT(slotToggleZoomToolBar()), actionCollection(), "show_zoom_toolbar"); - m_viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotToggleStatusBar()), + m_viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), actionCollection(), "show_status_bar"); m_viewTransport = new KToggleAction(i18n("Show Tra&nsport"), Key_T, this, - SLOT(slotToggleTransport()), + TQT_SLOT(slotToggleTransport()), actionCollection(), "show_transport"); m_viewTrackLabels = new KToggleAction(i18n("Show Track &Labels"), 0, this, - SLOT(slotToggleTrackLabels()), + TQT_SLOT(slotToggleTrackLabels()), actionCollection(), "show_tracklabels"); m_viewRulers = new KToggleAction(i18n("Show Playback Position R&uler"), 0, this, - SLOT(slotToggleRulers()), + TQT_SLOT(slotToggleRulers()), actionCollection(), "show_rulers"); m_viewTempoRuler = new KToggleAction(i18n("Show Te&mpo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); m_viewChordNameRuler = new KToggleAction(i18n("Show Cho&rd Name Ruler"), 0, this, - SLOT(slotToggleChordNameRuler()), + TQT_SLOT(slotToggleChordNameRuler()), actionCollection(), "show_chord_name_ruler"); m_viewPreviews = new KToggleAction(i18n("Show Segment Pre&views"), 0, this, - SLOT(slotTogglePreviews()), + TQT_SLOT(slotTogglePreviews()), actionCollection(), "show_previews"); new KAction(i18n("Show Special &Parameters"), Key_P, this, - SLOT(slotDockParametersBack()), + TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_segment_parameters"); - KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() ); + KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() ); // Standard Actions // KStdAction::saveOptions(this, - SLOT(slotSaveOptions()), + TQT_SLOT(slotSaveOptions()), actionCollection()); KStdAction::preferences(this, - SLOT(slotConfigure()), + TQT_SLOT(slotConfigure()), actionCollection()); KStdAction::keyBindings(this, - SLOT(slotEditKeys()), + TQT_SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, - SLOT(slotEditToolbars()), + TQT_SLOT(slotEditToolbars()), actionCollection()); KRadioAction *action = 0; // Create the select icon // - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); // TODO : add some shortcuts here action = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotPointerSelected()), + this, TQT_SLOT(slotPointerSelected()), actionCollection(), "select"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, SLOT(slotDrawSelected()), + this, TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, SLOT(slotMoveSelected()), + this, TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Resize"), icon, Key_F6, - this, SLOT(slotResizeSelected()), + this, TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/split.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Split"), icon, Key_F7, - this, SLOT(slotSplitSelected()), + this, TQT_SLOT(slotSplitSelected()), actionCollection(), "split"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/join.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Join"), icon, 0, - this, SLOT(slotJoinSelected()), + this, TQT_SLOT(slotJoinSelected()), actionCollection(), "join"); action->setExclusiveGroup("segmenttools"); new KAction(i18n("&Harmonize"), 0, this, - SLOT(slotHarmonizeSelection()), actionCollection(), + TQT_SLOT(slotHarmonizeSelection()), actionCollection(), "harmonize_selection"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, - this, SLOT(slotEditTimeSignature()), + this, TQT_SLOT(slotEditTimeSignature()), actionCollection(), "add_time_signature"); new KAction(i18n("Open Tempo and Time Signature Editor"), 0, this, - SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); + TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); // // Edit menu // new KAction(i18n("Cut Range"), Key_X + CTRL + SHIFT, this, - SLOT(slotCutRange()), actionCollection(), + TQT_SLOT(slotCutRange()), actionCollection(), "cut_range"); new KAction(i18n("Copy Range"), Key_C + CTRL + SHIFT, this, - SLOT(slotCopyRange()), actionCollection(), + TQT_SLOT(slotCopyRange()), actionCollection(), "copy_range"); new KAction(i18n("Paste Range"), Key_V + CTRL + SHIFT, this, - SLOT(slotPasteRange()), actionCollection(), + TQT_SLOT(slotPasteRange()), actionCollection(), "paste_range"); /* new KAction(i18n("Delete Range"), Key_Delete + SHIFT, this, - SLOT(slotDeleteRange()), actionCollection(), + TQT_SLOT(slotDeleteRange()), actionCollection(), "delete_range"); */ new KAction(i18n("Insert Range..."), Key_Insert + SHIFT, this, - SLOT(slotInsertRange()), actionCollection(), + TQT_SLOT(slotInsertRange()), actionCollection(), "insert_range"); new KAction(i18n("De&lete"), Key_Delete, this, - SLOT(slotDeleteSelectedSegments()), actionCollection(), + TQT_SLOT(slotDeleteSelectedSegments()), actionCollection(), "delete"); new KAction(i18n("Select &All Segments"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); pixmap.load(pixmapDir + "/toolbar/event-insert-tempo.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, - this, SLOT(slotEditTempo()), + this, TQT_SLOT(slotEditTempo()), actionCollection(), "add_tempo"); new KAction(ChangeCompositionLengthCommand::getGlobalName(), 0, - this, SLOT(slotChangeCompositionLength()), + this, TQT_SLOT(slotChangeCompositionLength()), actionCollection(), "change_composition_length"); new KAction(i18n("Edit Mar&kers..."), Key_K + CTRL, this, - SLOT(slotEditMarkers()), + TQT_SLOT(slotEditMarkers()), actionCollection(), "edit_markers"); new KAction(i18n("Edit Document P&roperties..."), 0, this, - SLOT(slotEditDocumentProperties()), + TQT_SLOT(slotEditDocumentProperties()), actionCollection(), "edit_doc_properties"); @@ -862,267 +862,267 @@ void RosegardenGUIApp::setupActions() // Segments menu // new KAction(i18n("Open in &Default Editor"), Key_Return, this, - SLOT(slotEdit()), actionCollection(), + TQT_SLOT(slotEdit()), actionCollection(), "edit_default"); pixmap.load(pixmapDir + "/toolbar/matrix.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in Matri&x Editor"), icon, Key_M, this, - SLOT(slotEditInMatrix()), actionCollection(), + TQT_SLOT(slotEditInMatrix()), actionCollection(), "edit_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Percussion Matrix Editor"), icon, Key_D, this, - SLOT(slotEditInPercussionMatrix()), actionCollection(), + TQT_SLOT(slotEditInPercussionMatrix()), actionCollection(), "edit_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Notation Editor"), icon, Key_N, this, - SLOT(slotEditAsNotation()), actionCollection(), + TQT_SLOT(slotEditAsNotation()), actionCollection(), "edit_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Event List Editor"), icon, Key_E, this, - SLOT(slotEditInEventList()), actionCollection(), + TQT_SLOT(slotEditInEventList()), actionCollection(), "edit_event_list"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Quantize..."), icon, Key_Equal, this, - SLOT(slotQuantizeSelection()), actionCollection(), + TQT_SLOT(slotQuantizeSelection()), actionCollection(), "quantize_selection"); new KAction(SegmentLabelCommand::getGlobalName(), 0, - this, SLOT(slotRelabelSegments()), + this, TQT_SLOT(slotRelabelSegments()), actionCollection(), "relabel_segment"); new KAction(SegmentTransposeCommand::getGlobalName(), 0, - this, SLOT(slotTransposeSegments()), + this, TQT_SLOT(slotTransposeSegments()), actionCollection(), "transpose"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, - SLOT(slotRepeatQuantizeSelection()), actionCollection(), + TQT_SLOT(slotRepeatQuantizeSelection()), actionCollection(), "repeat_quantize"); new KAction(SegmentRescaleCommand::getGlobalName(), 0, this, - SLOT(slotRescaleSelection()), actionCollection(), + TQT_SLOT(slotRescaleSelection()), actionCollection(), "rescale"); new KAction(SegmentAutoSplitCommand::getGlobalName(), 0, this, - SLOT(slotAutoSplitSelection()), actionCollection(), + TQT_SLOT(slotAutoSplitSelection()), actionCollection(), "auto_split"); new KAction(SegmentSplitByPitchCommand::getGlobalName(), 0, this, - SLOT(slotSplitSelectionByPitch()), actionCollection(), + TQT_SLOT(slotSplitSelectionByPitch()), actionCollection(), "split_by_pitch"); new KAction(SegmentSplitByRecordingSrcCommand::getGlobalName(), 0, this, - SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), + TQT_SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), "split_by_recording"); new KAction(i18n("Split at Time..."), 0, this, - SLOT(slotSplitSelectionAtTime()), actionCollection(), + TQT_SLOT(slotSplitSelectionAtTime()), actionCollection(), "split_at_time"); new KAction(i18n("Jog &Left"), Key_Left + ALT, this, - SLOT(slotJogLeft()), actionCollection(), + TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); new KAction(i18n("Jog &Right"), Key_Right + ALT, this, - SLOT(slotJogRight()), actionCollection(), + TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); new KAction(i18n("Set Start Time..."), 0, this, - SLOT(slotSetSegmentStartTimes()), actionCollection(), + TQT_SLOT(slotSetSegmentStartTimes()), actionCollection(), "set_segment_start"); new KAction(i18n("Set Duration..."), 0, this, - SLOT(slotSetSegmentDurations()), actionCollection(), + TQT_SLOT(slotSetSegmentDurations()), actionCollection(), "set_segment_duration"); new KAction(SegmentJoinCommand::getGlobalName(), Key_J + CTRL, - this, SLOT(slotJoinSegments()), + this, TQT_SLOT(slotJoinSegments()), actionCollection(), "join_segments"); new KAction(i18n("Turn Re&peats into Copies"), 0, - this, SLOT(slotRepeatingSegments()), + this, TQT_SLOT(slotRepeatingSegments()), actionCollection(), "repeats_to_real_copies"); new KAction(i18n("Manage Tri&ggered Segments"), 0, - this, SLOT(slotManageTriggerSegments()), + this, TQT_SLOT(slotManageTriggerSegments()), actionCollection(), "manage_trigger_segments"); new KAction(i18n("Set Tempos from &Beat Segment"), 0, this, - SLOT(slotGrooveQuantize()), actionCollection(), + TQT_SLOT(slotGrooveQuantize()), actionCollection(), "groove_quantize"); new KAction(i18n("Set &Tempo to Audio Segment Duration"), 0, this, - SLOT(slotTempoToSegmentLength()), actionCollection(), + TQT_SLOT(slotTempoToSegmentLength()), actionCollection(), "set_tempo_to_segment_length"); pixmap.load(pixmapDir + "/toolbar/manage-audio-segments.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage A&udio Files"), icon, Key_U + CTRL, - this, SLOT(slotAudioManager()), + this, TQT_SLOT(slotAudioManager()), actionCollection(), "audio_manager"); m_viewSegmentLabels = new KToggleAction(i18n("Show Segment Labels"), 0, this, - SLOT(slotToggleSegmentLabels()), actionCollection(), + TQT_SLOT(slotToggleSegmentLabels()), actionCollection(), "show_segment_labels"); // // Tracks menu // pixmap.load(pixmapDir + "/toolbar/add_tracks.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Add &Track"), icon, CTRL + Key_T, - this, SLOT(slotAddTrack()), + this, TQT_SLOT(slotAddTrack()), actionCollection(), "add_track"); new KAction(i18n("&Add Tracks..."), 0, - this, SLOT(slotAddTracks()), + this, TQT_SLOT(slotAddTracks()), actionCollection(), "add_tracks"); pixmap.load(pixmapDir + "/toolbar/delete_track.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("D&elete Track"), icon, CTRL + Key_D, - this, SLOT(slotDeleteTrack()), + this, TQT_SLOT(slotDeleteTrack()), actionCollection(), "delete_track"); pixmap.load(pixmapDir + "/toolbar/move_track_down.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Down"), icon, SHIFT + Key_Down, - this, SLOT(slotMoveTrackDown()), + this, TQT_SLOT(slotMoveTrackDown()), actionCollection(), "move_track_down"); pixmap.load(pixmapDir + "/toolbar/move_track_up.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Up"), icon, SHIFT + Key_Up, - this, SLOT(slotMoveTrackUp()), + this, TQT_SLOT(slotMoveTrackUp()), actionCollection(), "move_track_up"); new KAction(i18n("Select &Next Track"), Key_Down, - this, SLOT(slotTrackDown()), + this, TQT_SLOT(slotTrackDown()), actionCollection(), "select_next_track"); new KAction(i18n("Select &Previous Track"), Key_Up, - this, SLOT(slotTrackUp()), + this, TQT_SLOT(slotTrackUp()), actionCollection(), "select_previous_track"); new KAction(i18n("Mute or Unmute Track"), Key_U, - this, SLOT(slotToggleMutedCurrentTrack()), + this, TQT_SLOT(slotToggleMutedCurrentTrack()), actionCollection(), "toggle_mute_track"); new KAction(i18n("Arm or Un-arm Track for Record"), Key_R, - this, SLOT(slotToggleRecordCurrentTrack()), + this, TQT_SLOT(slotToggleRecordCurrentTrack()), actionCollection(), "toggle_arm_track"); pixmap.load(pixmapDir + "/toolbar/mute-all.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Mute all Tracks"), icon, 0, - this, SLOT(slotMuteAllTracks()), + this, TQT_SLOT(slotMuteAllTracks()), actionCollection(), "mute_all_tracks"); pixmap.load(pixmapDir + "/toolbar/un-mute-all.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Unmute all Tracks"), icon, 0, - this, SLOT(slotUnmuteAllTracks()), + this, TQT_SLOT(slotUnmuteAllTracks()), actionCollection(), "unmute_all_tracks"); new KAction(i18n("&Remap Instruments..."), 0, this, - SLOT(slotRemapInstruments()), + TQT_SLOT(slotRemapInstruments()), actionCollection(), "remap_instruments"); // // Studio menu // pixmap.load(pixmapDir + "/toolbar/mixer.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Audio Mixer"), icon, 0, this, - SLOT(slotOpenAudioMixer()), + TQT_SLOT(slotOpenAudioMixer()), actionCollection(), "audio_mixer"); pixmap.load(pixmapDir + "/toolbar/midimixer.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Midi Mi&xer"), icon, 0, this, - SLOT(slotOpenMidiMixer()), + TQT_SLOT(slotOpenMidiMixer()), actionCollection(), "midi_mixer"); pixmap.load(pixmapDir + "/toolbar/manage-midi-devices.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage MIDI &Devices"), icon, 0, this, - SLOT(slotManageMIDIDevices()), + TQT_SLOT(slotManageMIDIDevices()), actionCollection(), "manage_devices"); pixmap.load(pixmapDir + "/toolbar/manage-synth-plugins.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage S&ynth Plugins"), icon, 0, this, - SLOT(slotManageSynths()), + TQT_SLOT(slotManageSynths()), actionCollection(), "manage_synths"); new KAction(i18n("Modify MIDI &Filters"), "filter", 0, this, - SLOT(slotModifyMIDIFilters()), + TQT_SLOT(slotModifyMIDIFilters()), actionCollection(), "modify_midi_filters"); m_enableMIDIrouting = new KToggleAction(i18n("MIDI Thru Routing"), 0, this, - SLOT(slotEnableMIDIThruRouting()), + TQT_SLOT(slotEnableMIDIThruRouting()), actionCollection(), "enable_midi_routing"); pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage &Metronome"), 0, this, - SLOT(slotManageMetronome()), + TQT_SLOT(slotManageMetronome()), actionCollection(), "manage_metronome"); new KAction(i18n("&Save Current Document as Default Studio"), 0, this, - SLOT(slotSaveDefaultStudio()), + TQT_SLOT(slotSaveDefaultStudio()), actionCollection(), "save_default_studio"); new KAction(i18n("&Import Default Studio"), 0, this, - SLOT(slotImportDefaultStudio()), + TQT_SLOT(slotImportDefaultStudio()), actionCollection(), "load_default_studio"); new KAction(i18n("Im&port Studio from File..."), 0, this, - SLOT(slotImportStudio()), + TQT_SLOT(slotImportStudio()), actionCollection(), "load_studio"); new KAction(i18n("&Reset MIDI Network"), 0, this, - SLOT(slotResetMidiNetwork()), + TQT_SLOT(slotResetMidiNetwork()), actionCollection(), "reset_midi_network"); m_setQuickMarkerAction = new KAction(i18n("Set Quick Marker at Playback Position"), 0, CTRL + Key_1, this, - SLOT(slotSetQuickMarker()), actionCollection(), + TQT_SLOT(slotSetQuickMarker()), actionCollection(), "set_quick_marker"); m_jumpToQuickMarkerAction = new KAction(i18n("Jump to Quick Marker"), 0, Key_1, this, - SLOT(slotJumpToQuickMarker()), actionCollection(), + TQT_SLOT(slotJumpToQuickMarker()), actionCollection(), "jump_to_quick_marker"); // // Marker Ruler popup menu // // new KAction(i18n("Insert Marker"), 0, 0, this, -// SLOT(slotInsertMarkerHere()), actionCollection(), +// TQT_SLOT(slotInsertMarkerHere()), actionCollection(), // "insert_marker_here"); // // new KAction(i18n("Insert Marker at Playback Position"), 0, 0, this, -// SLOT(slotInsertMarkerAtPointer()), actionCollection(), +// TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), // "insert_marker_at_pointer"); // // new KAction(i18n("Delete Marker"), 0, 0, this, -// SLOT(slotDeleteMarker()), actionCollection(), +// TQT_SLOT(slotDeleteMarker()), actionCollection(), // "delete_marker"); @@ -1138,9 +1138,9 @@ void RosegardenGUIApp::setupActions() // 0 (insert) and keypad Enter for Play and Stop // pixmap.load(pixmapDir + "/toolbar/transport-play.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_playTransport = new KAction(i18n("&Play"), icon, Key_Enter, this, - SLOT(slotPlay()), actionCollection(), + TQT_SLOT(slotPlay()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = m_playTransport->shortcut(); @@ -1149,69 +1149,69 @@ void RosegardenGUIApp::setupActions() m_playTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-stop.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_stopTransport = new KAction(i18n("&Stop"), icon, Key_Insert, this, - SLOT(slotStop()), actionCollection(), + TQT_SLOT(slotStop()), actionCollection(), "stop"); m_stopTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-ffwd.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_ffwdTransport = new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SLOT(slotFastforward()), actionCollection(), + TQT_SLOT(slotFastforward()), actionCollection(), "fast_forward"); m_ffwdTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_rewindTransport = new KAction(i18n("Re&wind"), icon, Key_End, this, - SLOT(slotRewind()), actionCollection(), + TQT_SLOT(slotRewind()), actionCollection(), "rewind"); m_rewindTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_recordTransport = new KAction(i18n("P&unch in Record"), icon, Key_Space, this, - SLOT(slotToggleRecord()), actionCollection(), + TQT_SLOT(slotToggleRecord()), actionCollection(), "recordtoggle"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_recordTransport = new KAction(i18n("&Record"), icon, 0, this, - SLOT(slotRecord()), actionCollection(), + TQT_SLOT(slotRecord()), actionCollection(), "record"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind-end.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_rewindEndTransport = new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SLOT(slotRewindToBeginning()), actionCollection(), + TQT_SLOT(slotRewindToBeginning()), actionCollection(), "rewindtobeginning"); m_rewindEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-ffwd-end.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_ffwdEndTransport = new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SLOT(slotFastForwardToEnd()), actionCollection(), + TQT_SLOT(slotFastForwardToEnd()), actionCollection(), "fastforwardtoend"); m_ffwdEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-tracking.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(true); pixmap.load(pixmapDir + "/toolbar/transport-panic.png"); - icon = QIconSet(pixmap); - new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, this, SLOT(slotPanic()), + icon = TQIconSet(pixmap); + new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, this, TQT_SLOT(slotPanic()), actionCollection(), "panic"); // DEBUG FACILITY new KAction(i18n("Segment Debug Dump "), 0, this, - SLOT(slotDebugDump()), actionCollection(), + TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump_segments"); // create main gui @@ -1224,11 +1224,11 @@ void RosegardenGUIApp::setupActions() // //toolBar("Transport Toolbar")->hide(); - QPopupMenu* setTrackInstrumentMenu = dynamic_cast<QPopupMenu*>(factory()->container("set_track_instrument", this)); + TQPopupMenu* setTrackInstrumentMenu = dynamic_cast<TQPopupMenu*>(factory()->container("set_track_instrument", this)); if (setTrackInstrumentMenu) { - connect(setTrackInstrumentMenu, SIGNAL(aboutToShow()), - this, SLOT(slotPopulateTrackInstrumentPopup())); + connect(setTrackInstrumentMenu, TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotPopulateTrackInstrumentPopup())); } else { RG_DEBUG << "RosegardenGUIApp::setupActions() : couldn't find set_track_instrument menu - check rosegardenui.rcn\n"; } @@ -1238,21 +1238,21 @@ void RosegardenGUIApp::setupActions() void RosegardenGUIApp::setRewFFwdToAutoRepeat() { - QWidget* transportToolbar = factory()->container("Transport Toolbar", this); + TQWidget* transportToolbar = factory()->container("Transport Toolbar", this); if (transportToolbar) { - QObjectList *l = transportToolbar->queryList(); - QObjectListIt it(*l); // iterate over the buttons - QObject *obj; + TQObjectList *l = transportToolbar->queryList(); + TQObjectListIt it(*l); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... ++it; // RG_DEBUG << "obj name : " << obj->name() << endl; - QString objName = obj->name(); + TQString objName = obj->name(); if (objName.endsWith("rewind") || objName.endsWith("fast_forward")) { - QButton* btn = dynamic_cast<QButton*>(obj); + TQButton* btn = dynamic_cast<TQButton*>(obj); if (!btn) { RG_DEBUG << "Very strange - found widgets in transport_toolbar which aren't buttons\n"; @@ -1280,7 +1280,7 @@ void RosegardenGUIApp::initZoomToolbar() return ; } - new QLabel(i18n(" Zoom: "), zoomToolbar, "kde toolbar widget"); + new TQLabel(i18n(" Zoom: "), zoomToolbar, "kde toolbar widget"); std::vector<double> zoomSizes; // in units-per-pixel double defaultBarWidth44 = 100.0; @@ -1293,18 +1293,18 @@ void RosegardenGUIApp::initZoomToolbar() } // zoom labels - QString minZoom = QString("%1%").arg(factors[0] * 100.0); - QString maxZoom = QString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); + TQString minZoom = TQString("%1%").arg(factors[0] * 100.0); + TQString maxZoom = TQString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); m_zoomSlider = new ZoomSlider<double> - (zoomSizes, -1, QSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); m_zoomSlider->setTracking(true); - m_zoomSlider->setFocusPolicy(QWidget::NoFocus); - m_zoomLabel = new QLabel(minZoom, zoomToolbar, "kde toolbar widget"); + m_zoomSlider->setFocusPolicy(TQWidget::NoFocus); + m_zoomLabel = new TQLabel(minZoom, zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); - connect(m_zoomSlider, SIGNAL(valueChanged(int)), - this, SLOT(slotChangeZoom(int))); + connect(m_zoomSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotChangeZoom(int))); // set initial zoom - we might want to make this a config option // m_zoomSlider->setToDefault(); @@ -1353,18 +1353,18 @@ void RosegardenGUIApp::initView() // Connect up this signal so that we can force tool mode // changes from the view - connect(m_swapView, SIGNAL(activateTool(QString)), - this, SLOT(slotActivateTool(QString))); + connect(m_swapView, TQT_SIGNAL(activateTool(TQString)), + this, TQT_SLOT(slotActivateTool(TQString))); connect(m_swapView, - SIGNAL(segmentsSelected(const SegmentSelection &)), - SIGNAL(segmentsSelected(const SegmentSelection &))); + TQT_SIGNAL(segmentsSelected(const SegmentSelection &)), + TQT_SIGNAL(segmentsSelected(const SegmentSelection &))); connect(m_swapView, - SIGNAL(addAudioFile(AudioFileId)), - SLOT(slotAddAudioFile(AudioFileId))); + TQT_SIGNAL(addAudioFile(AudioFileId)), + TQT_SLOT(slotAddAudioFile(AudioFileId))); - connect(m_swapView, SIGNAL(toggleSolo(bool)), SLOT(slotToggleSolo(bool))); + connect(m_swapView, TQT_SIGNAL(toggleSolo(bool)), TQT_SLOT(slotToggleSolo(bool))); m_doc->attachView(m_swapView); @@ -1414,11 +1414,11 @@ void RosegardenGUIApp::initView() RosegardenGUIView *oldView = m_view; m_view = m_swapView; - connect(m_view, SIGNAL(stateChange(QString, bool)), - this, SLOT (slotStateChanged(QString, bool))); + connect(m_view, TQT_SIGNAL(stateChange(TQString, bool)), + this, TQT_SLOT (slotStateChanged(TQString, bool))); - connect(m_view, SIGNAL(instrumentParametersChanged(InstrumentId)), - this, SIGNAL(instrumentParametersChanged(InstrumentId))); + connect(m_view, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + this, TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); // We only check for the SequenceManager to make sure // we're not on the first pass though - we don't want @@ -1440,15 +1440,15 @@ void RosegardenGUIApp::initView() if (isUsingSequencer()) m_seqManager->setLoop(0, 0); stateChanged("have_range", KXMLGUIClient::StateReverse); - } catch (QString s) { + } catch (TQString s) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); KMessageBox::error(this, s); CurrentProgressDialog::thaw(); } - connect(m_seqManager, SIGNAL(controllerDeviceEventReceived(MappedEvent *)), - m_view, SLOT(slotControllerDeviceEventReceived(MappedEvent *))); + connect(m_seqManager, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *)), + m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } // delete m_playList; @@ -1490,9 +1490,9 @@ void RosegardenGUIApp::initView() m_view->show(); connect(m_view->getTrackEditor()->getSegmentCanvas(), - SIGNAL(showContextHelp(const QString &)), + TQT_SIGNAL(showContextHelp(const TQString &)), this, - SLOT(slotShowToolHelp(const QString &))); + TQT_SLOT(slotShowToolHelp(const TQString &))); // We have to do this to make sure that the 2nd call ("select") // actually has any effect. Activating the same radio action @@ -1542,7 +1542,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) // Caption // - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + newDocument->getTitle()); // // reset AudioManagerDialog @@ -1590,45 +1590,45 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) // connect needed signals // - connect(m_segmentParameterBox, SIGNAL(documentModified()), - m_doc, SLOT(slotDocumentModified())); + connect(m_segmentParameterBox, TQT_SIGNAL(documentModified()), + m_doc, TQT_SLOT(slotDocumentModified())); - connect(m_doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); - connect(m_doc, SIGNAL(documentModified(bool)), - this, SLOT(slotDocumentModified(bool))); + connect(m_doc, TQT_SIGNAL(documentModified(bool)), + this, TQT_SLOT(slotDocumentModified(bool))); - connect(m_doc, SIGNAL(loopChanged(timeT, timeT)), - this, SLOT(slotSetLoop(timeT, timeT))); + connect(m_doc, TQT_SIGNAL(loopChanged(timeT, timeT)), + this, TQT_SLOT(slotSetLoop(timeT, timeT))); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - SLOT(update())); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - SLOT(slotTestClipboard())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + TQT_SLOT(update())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + TQT_SLOT(slotTestClipboard())); // connect and start the autosave timer - connect(m_autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave())); + connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoSave())); m_autoSaveTimer->start(m_doc->getAutoSavePeriod() * 1000); // Connect the playback timer // - connect(m_playTimer, SIGNAL(timeout()), this, SLOT(slotUpdatePlaybackPosition())); - connect(m_stopTimer, SIGNAL(timeout()), this, SLOT(slotUpdateMonitoring())); + connect(m_playTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdatePlaybackPosition())); + connect(m_stopTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateMonitoring())); // finally recreate the main view // initView(); if (getView() && getView()->getTrackEditor()) { - connect(m_doc, SIGNAL(makeTrackVisible(int)), - getView()->getTrackEditor(), SLOT(slotScrollToTrack(int))); + connect(m_doc, TQT_SIGNAL(makeTrackVisible(int)), + getView()->getTrackEditor(), TQT_SLOT(slotScrollToTrack(int))); } - connect(m_doc, SIGNAL(devicesResyncd()), - this, SLOT(slotDocumentDevicesResyncd())); + connect(m_doc, TQT_SIGNAL(devicesResyncd()), + this, TQT_SLOT(slotDocumentDevicesResyncd())); m_doc->syncDevices(); m_doc->clearModifiedStatus(); @@ -1670,7 +1670,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) } void -RosegardenGUIApp::openFile(QString filePath, ImportType type) +RosegardenGUIApp::openFile(TQString filePath, ImportType type) { RG_DEBUG << "RosegardenGUIApp::openFile " << filePath << endl; @@ -1690,10 +1690,10 @@ RosegardenGUIApp::openFile(QString filePath, ImportType type) kapp->config()->setGroup(GeneralOptionsConfigGroup); if (kapp->config()->readBoolEntry("alwaysusedefaultstudio", false)) { - QString autoloadFile = + TQString autoloadFile = KGlobal::dirs()->findResource("appdata", "autoload.rg"); - QFileInfo autoloadFileInfo(autoloadFile); + TQFileInfo autoloadFileInfo(autoloadFile); if (autoloadFileInfo.isReadable()) { RG_DEBUG << "Importing default studio from " << autoloadFile << endl; @@ -1702,15 +1702,15 @@ RosegardenGUIApp::openFile(QString filePath, ImportType type) } } - QFileInfo fInfo(filePath); + TQFileInfo fInfo(filePath); m_fileRecent->addURL(fInfo.absFilePath()); } } RosegardenGUIDoc* -RosegardenGUIApp::createDocument(QString filePath, ImportType importType) +RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) { - QFileInfo info(filePath); + TQFileInfo info(filePath); RosegardenGUIDoc *doc = 0; if (!info.exists()) { @@ -1726,11 +1726,11 @@ RosegardenGUIApp::createDocument(QString filePath, ImportType importType) return 0; } - QFile file(filePath); + TQFile file(filePath); if (!file.open(IO_ReadOnly)) { KStartupLogo::hideIfStillThere(); - QString errStr = + TQString errStr = i18n("You do not have read permission for \"%1\"").arg(filePath); KMessageBox::sorry(this, errStr); @@ -1777,16 +1777,16 @@ RosegardenGUIApp::createDocument(QString filePath, ImportType importType) } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromRGFile(QString filePath) +RosegardenGUIApp::createDocumentFromRGFile(TQString filePath) { // Check for an autosaved file to recover - QString effectiveFilePath = filePath; + TQString effectiveFilePath = filePath; bool canRecover = false; - QString autoSaveFileName = kapp->checkRecoverFile(filePath, canRecover); + TQString autoSaveFileName = kapp->checkRecoverFile(filePath, canRecover); if (canRecover) { // First check if the auto-save file is more recent than the doc - QFileInfo docFileInfo(filePath), autoSaveFileInfo(autoSaveFileName); + TQFileInfo docFileInfo(filePath), autoSaveFileInfo(autoSaveFileName); if (docFileInfo.lastModified() < autoSaveFileInfo.lastModified()) { @@ -1808,7 +1808,7 @@ RosegardenGUIApp::createDocumentFromRGFile(QString filePath) // user doesn't want the autosave, so delete it // so it won't bother us again if we reload canRecover = false; - QFile::remove + TQFile::remove (autoSaveFileName); } @@ -1830,7 +1830,7 @@ RosegardenGUIApp::createDocumentFromRGFile(QString filePath) // the autosaved doc) // newDoc->slotDocumentModified(); - QFileInfo info(filePath); + TQFileInfo info(filePath); newDoc->setAbsFilePath(info.absFilePath()); newDoc->setTitle(info.fileName()); } else { @@ -1850,8 +1850,8 @@ void RosegardenGUIApp::slotSaveOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(QString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); #endif kapp->config()->setGroup(GeneralOptionsConfigGroup); @@ -1893,13 +1893,13 @@ void RosegardenGUIApp::setupFileDialogSpeedbar() unsigned int n = config->readUnsignedNumEntry("Number of Entries", 0); - config->writeEntry(QString("Description_%1").arg(n), i18n("Example Files")); - config->writeEntry(QString("IconGroup_%1").arg(n), 4); - config->writeEntry(QString("Icon_%1").arg(n), "folder"); - config->writeEntry(QString("URL_%1").arg(n), + config->writeEntry(TQString("Description_%1").arg(n), i18n("Example Files")); + config->writeEntry(TQString("IconGroup_%1").arg(n), 4); + config->writeEntry(TQString("Icon_%1").arg(n), "folder"); + config->writeEntry(TQString("URL_%1").arg(n), KGlobal::dirs()->findResource("appdata", "examples/")); - RG_DEBUG << "wrote url " << config->readEntry(QString("URL_%1").arg(n)) << endl; + RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").arg(n)) << endl; config->writeEntry("Examples Set", true); config->writeEntry("Number of Entries", n + 1); @@ -1936,7 +1936,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 3 : transport flap extended = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : transport flap extended = %1").arg(opt)); #endif if (opt) @@ -1948,7 +1948,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 3 : show track labels = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : show track labels = %1").arg(opt)); #endif m_viewTrackLabels->setChecked(opt); @@ -2000,19 +2000,19 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) if (m_doc->getTitle() != i18n("Untitled") && !m_doc->isModified()) { // saving to tempfile not necessary } else { - QString filename = m_doc->getAbsFilePath(); + TQString filename = m_doc->getAbsFilePath(); cfg->writeEntry("filename", filename); cfg->writeEntry("modified", m_doc->isModified()); - QString tempname = kapp->tempSaveName(filename); - QString errMsg; + TQString tempname = kapp->tempSaveName(filename); + TQString errMsg; bool res = m_doc->saveDocument(tempname, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(tempname).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(tempname))); } } @@ -2020,19 +2020,19 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) void RosegardenGUIApp::readGlobalProperties(KConfig* _cfg) { - QString filename = _cfg->readEntry("filename", ""); + TQString filename = _cfg->readEntry("filename", ""); bool modified = _cfg->readBoolEntry("modified", false); if (modified) { bool canRecover; - QString tempname = kapp->checkRecoverFile(filename, canRecover); + TQString tempname = kapp->checkRecoverFile(filename, canRecover); if (canRecover) { slotEnableTransport(false); m_doc->openDocument(tempname); slotEnableTransport(true); m_doc->slotDocumentModified(); - QFileInfo info(filename); + TQFileInfo info(filename); m_doc->setAbsFilePath(info.absFilePath()); m_doc->setTitle(info.fileName()); } @@ -2044,11 +2044,11 @@ void RosegardenGUIApp::readGlobalProperties(KConfig* _cfg) } } - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + m_doc->getTitle()); } -void RosegardenGUIApp::showEvent(QShowEvent* e) +void RosegardenGUIApp::showEvent(TQShowEvent* e) { RG_DEBUG << "RosegardenGUIApp::showEvent()\n"; @@ -2061,11 +2061,11 @@ bool RosegardenGUIApp::queryClose() RG_DEBUG << "RosegardenGUIApp::queryClose" << endl; #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(QString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); #endif - QString errMsg; + TQString errMsg; bool canClose = m_doc->saveIfModified(); @@ -2077,8 +2077,8 @@ bool RosegardenGUIApp::queryClose() // 'off' // - disconnect(m_transport, SIGNAL(closed()), - this, SLOT(slotCloseTransport())); + disconnect(m_transport, TQT_SIGNAL(closed()), + this, TQT_SLOT(slotCloseTransport())); } */ @@ -2124,7 +2124,7 @@ void RosegardenGUIApp::slotFileNew() } } -void RosegardenGUIApp::slotOpenDroppedURL(QString url) +void RosegardenGUIApp::slotOpenDroppedURL(TQString url) { ProgressDialog::processEvents(); // or else we get a crash because the // track editor is erased too soon - it is the originator of the signal @@ -2136,9 +2136,9 @@ void RosegardenGUIApp::slotOpenDroppedURL(QString url) openURL(KURL(url)); } -void RosegardenGUIApp::openURL(QString url) +void RosegardenGUIApp::openURL(TQString url) { - RG_DEBUG << "RosegardenGUIApp::openURL: QString " << url << endl; + RG_DEBUG << "RosegardenGUIApp::openURL: TQString " << url << endl; openURL(KURL(url)); } @@ -2146,18 +2146,18 @@ void RosegardenGUIApp::openURL(const KURL& url) { SetWaitCursor waitCursor; - QString netFile = url.prettyURL(); + TQString netFile = url.prettyURL(); RG_DEBUG << "RosegardenGUIApp::openURL: KURL " << netFile << endl; if (!url.isValid()) { - QString string; + TQString string; string = i18n( "Malformed URL\n%1").arg(netFile); KMessageBox::sorry(this, string); return ; } - QString target, caption(url.path()); + TQString target, caption(url.path()); if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); @@ -2180,7 +2180,7 @@ void RosegardenGUIApp::slotFileOpen() kapp->config()->setGroup(GeneralOptionsConfigGroup); - QString lastOpenedVersion = + TQString lastOpenedVersion = kapp->config()->readEntry("Last File Opened Version", "none"); if (lastOpenedVersion != VERSION) { @@ -2188,11 +2188,11 @@ void RosegardenGUIApp::slotFileOpen() // We haven't opened any files with this version of the // program before. Default to the examples directory. - QString examplesDir = KGlobal::dirs()->findResource("appdata", "examples/"); + TQString examplesDir = KGlobal::dirs()->findResource("appdata", "examples/"); kapp->config()->setGroup("Recent Dirs"); - QString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); + TQString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); kapp->config()->writeEntry - ("ROSEGARDEN", QString("file:%1,%2").arg(examplesDir).arg(recentString)); + ("ROSEGARDEN", TQString("file:%1,%2").arg(examplesDir).arg(recentString)); } KURL url = KFileDialog::getOpenURL @@ -2223,7 +2223,7 @@ void RosegardenGUIApp::slotMerge() } - QString target; + TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); @@ -2267,28 +2267,28 @@ void RosegardenGUIApp::slotFileSave() } else { SetWaitCursor waitCursor; - QString errMsg, docFilePath = m_doc->getAbsFilePath(); + TQString errMsg, docFilePath = m_doc->getAbsFilePath(); bool res = m_doc->saveDocument(docFilePath, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(docFilePath).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(docFilePath))); } } } QString -RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, - QString label) +RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension, + TQString label) { // extract first extension listed in descriptiveExtension, for instance, // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // - QString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); + TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; @@ -2297,7 +2297,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension, this, label, true); saveFileDialog.setOperationMode(KFileDialog::Saving); if (m_doc) { - QString saveFileName = m_doc->getAbsFilePath(); + TQString saveFileName = m_doc->getAbsFilePath(); // Show filename without the old extension int dotLoc = saveFileName.findRev('.'); if (dotLoc >= int(saveFileName.length() - 4)) { @@ -2306,7 +2306,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, saveFileDialog.setSelection(saveFileName); } saveFileDialog.exec(); - QString name = saveFileDialog.selectedFile(); + TQString name = saveFileDialog.selectedFile(); // RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : KFileDialog::getSaveFileName returned " // << name << endl; @@ -2318,7 +2318,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, // Append extension if we don't have one // if (!extension.isEmpty()) { - static QRegExp rgFile("\\..{1,4}$"); + static TQRegExp rgFile("\\..{1,4}$"); if (rgFile.match(name) == -1) { name += extension; } @@ -2336,7 +2336,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, return ""; } - QFileInfo info(name); + TQFileInfo info(name); if (info.isDir()) { KMessageBox::sorry(this, i18n("You have specified a directory")); @@ -2361,31 +2361,31 @@ bool RosegardenGUIApp::slotFileSaveAs() KTmpStatusMsg msg(i18n("Saving file with a new filename..."), this); - QString newName = getValidWriteFile("*.rg|" + i18n("Rosegarden files") + + TQString newName = getValidWriteFile("*.rg|" + i18n("Rosegarden files") + "\n*|" + i18n("All files"), i18n("Save as...")); if (newName.isEmpty()) return false; SetWaitCursor waitCursor; - QFileInfo saveAsInfo(newName); + TQFileInfo saveAsInfo(newName); m_doc->setTitle(saveAsInfo.fileName()); m_doc->setAbsFilePath(saveAsInfo.absFilePath()); - QString errMsg; + TQString errMsg; bool res = m_doc->saveDocument(newName, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(newName).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(newName))); } else { m_fileRecent->addURL(newName); - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + m_doc->getTitle()); // update the edit view's captions too emit compositionStateUpdate(); @@ -2555,7 +2555,7 @@ void RosegardenGUIApp::slotInsertRange() std::pair<timeT, timeT> r = m_doc->getComposition().getBarRangeForTime(t0); TimeDialog dialog(m_view, i18n("Duration of empty range to insert"), &m_doc->getComposition(), t0, r.second - r.first, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->getCommandHistory()->addCommand (new InsertRangeCommand(&m_doc->getComposition(), t0, dialog.getTime())); m_doc->setLoop(0, 0); @@ -2580,7 +2580,7 @@ void RosegardenGUIApp::slotQuantizeSelection() //!!! this should all be in rosegardenguiview QuantizeDialog dialog(m_view); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2684,7 +2684,7 @@ void RosegardenGUIApp::slotRescaleSelection() RescaleDialog dialog(m_view, &m_doc->getComposition(), startTime, endTime - startTime, false, false); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; std::vector<AudioSegmentRescaleCommand *> asrcs; @@ -2739,10 +2739,10 @@ void RosegardenGUIApp::slotRescaleSelection() asrcs[i]->disconnectProgressDialog(progressDlg); } - connect(&m_doc->getAudioFileManager(), SIGNAL(setProgress(int)), - progressDlg->progressBar(), SLOT(setValue(int))); - connect(progressDlg, SIGNAL(cancelClicked()), - &m_doc->getAudioFileManager(), SLOT(slotStopPreview())); + connect(&m_doc->getAudioFileManager(), TQT_SIGNAL(setProgress(int)), + progressDlg->progressBar(), TQT_SLOT(setValue(int))); + connect(progressDlg, TQT_SIGNAL(cancelClicked()), + &m_doc->getAudioFileManager(), TQT_SLOT(slotStopPreview())); for (size_t i = 0; i < asrcs.size(); ++i) { int fid = asrcs[i]->getNewAudioFileId(); @@ -2757,7 +2757,7 @@ void RosegardenGUIApp::slotRescaleSelection() } bool -RosegardenGUIApp::testAudioPath(QString op) +RosegardenGUIApp::testAudioPath(TQString op) { try { m_doc->getAudioFileManager().testAudioPath(); @@ -2793,7 +2793,7 @@ void RosegardenGUIApp::slotAutoSplitSelection() if ((*i)->getType() == Segment::Audio) { AudioSplitDialog aSD(this, (*i), m_doc); - if (aSD.exec() == QDialog::Accepted) { + if (aSD.exec() == TQDialog::Accepted) { // split to threshold // command->addCommand( @@ -2856,33 +2856,33 @@ void RosegardenGUIApp::createAndSetupTransport() m_transport->getAccelerators()->connectItem (m_transport->getAccelerators()->insertItem(Key_T), this, - SLOT(slotHideTransport())); + TQT_SLOT(slotHideTransport())); // Ensure that the checkbox is unchecked if the dialog // is closed - connect(m_transport, SIGNAL(closed()), - SLOT(slotCloseTransport())); + connect(m_transport, TQT_SIGNAL(closed()), + TQT_SLOT(slotCloseTransport())); // Handle loop setting and unsetting from the transport loop button // - connect(m_transport, SIGNAL(setLoop()), SLOT(slotSetLoop())); - connect(m_transport, SIGNAL(unsetLoop()), SLOT(slotUnsetLoop())); - connect(m_transport, SIGNAL(panic()), SLOT(slotPanic())); + connect(m_transport, TQT_SIGNAL(setLoop()), TQT_SLOT(slotSetLoop())); + connect(m_transport, TQT_SIGNAL(unsetLoop()), TQT_SLOT(slotUnsetLoop())); + connect(m_transport, TQT_SIGNAL(panic()), TQT_SLOT(slotPanic())); - connect(m_transport, SIGNAL(editTempo(QWidget*)), - SLOT(slotEditTempo(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTempo(TQWidget*)), + TQT_SLOT(slotEditTempo(TQWidget*))); - connect(m_transport, SIGNAL(editTimeSignature(QWidget*)), - SLOT(slotEditTimeSignature(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTimeSignature(TQWidget*)), + TQT_SLOT(slotEditTimeSignature(TQWidget*))); - connect(m_transport, SIGNAL(editTransportTime(QWidget*)), - SLOT(slotEditTransportTime(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTransportTime(TQWidget*)), + TQT_SLOT(slotEditTransportTime(TQWidget*))); // Handle set loop start/stop time buttons. // - connect(m_transport, SIGNAL(setLoopStartTime()), SLOT(slotSetLoopStart())); - connect(m_transport, SIGNAL(setLoopStopTime()), SLOT(slotSetLoopStop())); + connect(m_transport, TQT_SIGNAL(setLoopStartTime()), TQT_SLOT(slotSetLoopStart())); + connect(m_transport, TQT_SIGNAL(setLoopStopTime()), TQT_SLOT(slotSetLoopStop())); if (m_seqManager != 0) m_seqManager->setTransport(m_transport); @@ -2895,7 +2895,7 @@ void RosegardenGUIApp::slotSplitSelectionByPitch() return ; SplitByPitchDialog dialog(m_view); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2935,7 +2935,7 @@ RosegardenGUIApp::slotSplitSelectionByRecordedSrc() return ; SplitByRecordingSrcDialog dialog(m_view, m_doc); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2974,7 +2974,7 @@ RosegardenGUIApp::slotSplitSelectionAtTime() timeT now = m_doc->getComposition().getPosition(); - QString title = i18n("Split Segment at Time", + TQString title = i18n("Split Segment at Time", "Split %n Segments at Time", selection.size()); @@ -2984,7 +2984,7 @@ RosegardenGUIApp::slotSplitSelectionAtTime() KMacroCommand *command = new KMacroCommand( title ); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { for (SegmentSelection::iterator i = selection.begin(); i != selection.end(); ++i) { @@ -3014,7 +3014,7 @@ RosegardenGUIApp::slotSetSegmentStartTimes() &m_doc->getComposition(), someTime, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { bool plural = (selection.size() > 1); @@ -3059,7 +3059,7 @@ RosegardenGUIApp::slotSetSegmentDurations() someDuration, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { bool plural = (selection.size() > 1); @@ -3105,7 +3105,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength() slotTempoToSegmentLength(this); } -void RosegardenGUIApp::slotTempoToSegmentLength(QWidget* parent) +void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) { RG_DEBUG << "RosegardenGUIApp::slotTempoToSegmentLength" << endl; @@ -3136,7 +3136,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength(QWidget* parent) // Get user to tell us how many beats or bars the segment contains BeatsBarsDialog dialog(parent); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { beats = dialog.getQuantity(); // beats (or bars) if (dialog.getMode() == 1) // bars (multiply by time sig) beats *= timeSig.getBeatsPerBar(); @@ -3382,7 +3382,7 @@ void RosegardenGUIApp::slotToggleStatusBar() statusBar()->show(); } -void RosegardenGUIApp::slotStatusMsg(QString text) +void RosegardenGUIApp::slotStatusMsg(TQString text) { /////////////////////////////////////////////////////////////////// // change status message permanently @@ -3390,7 +3390,7 @@ void RosegardenGUIApp::slotStatusMsg(QString text) statusBar()->changeItem(text, EditViewBase::ID_STATUS_MSG); } -void RosegardenGUIApp::slotStatusHelpMsg(QString text) +void RosegardenGUIApp::slotStatusHelpMsg(TQString text) { /////////////////////////////////////////////////////////////////// // change status message of whole statusbar temporary (text, msec) @@ -3529,7 +3529,7 @@ void RosegardenGUIApp::slotAddTracks() AddTracksDialog dialog(this, pos); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_view->slotAddTracks(dialog.getTracks(), id, dialog.getInsertPosition()); } @@ -3694,7 +3694,7 @@ void RosegardenGUIApp::slotImportProject() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); importProject(tmpfile); @@ -3702,7 +3702,7 @@ void RosegardenGUIApp::slotImportProject() KIO::NetAccess::removeTempFile(tmpfile); } -void RosegardenGUIApp::importProject(QString filePath) +void RosegardenGUIApp::importProject(TQString filePath) { KProcess *proc = new KProcess; *proc << "rosegarden-project-package"; @@ -3722,9 +3722,9 @@ void RosegardenGUIApp::importProject(QString filePath) delete proc; - QString rgFile = filePath; - rgFile.replace(QRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(QRegExp(".rgp$"), ".rg"); + TQString rgFile = filePath; + rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.replace(TQRegExp(".rgp$"), ".rg"); openURL(rgFile); } @@ -3741,7 +3741,7 @@ void RosegardenGUIApp::slotImportMIDI() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportMIDI); // does everything including setting the document @@ -3758,17 +3758,17 @@ void RosegardenGUIApp::slotMergeMIDI() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportMIDI); KIO::NetAccess::removeTempFile( tmpfile ); } -QTextCodec * +TQTextCodec * RosegardenGUIApp::guessTextCodec(std::string text) { - QTextCodec *codec = 0; + TQTextCodec *codec = 0; for (int c = 0; c < text.length(); ++c) { if (text[c] & 0x80) { @@ -3784,7 +3784,7 @@ RosegardenGUIApp::guessTextCodec(std::string text) CurrentProgressDialog::thaw(); if (codecName != "") { - codec = QTextCodec::codecForName(codecName.c_str()); + codec = TQTextCodec::codecForName(codecName.c_str()); } break; } @@ -3797,7 +3797,7 @@ void RosegardenGUIApp::fixTextEncodings(Composition *c) { - QTextCodec *codec = 0; + TQTextCodec *codec = 0; for (Composition::iterator i = c->begin(); i != c->end(); ++i) { @@ -3849,7 +3849,7 @@ RosegardenGUIApp::fixTextEncodings(Composition *c) } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromMIDIFile(QString file) +RosegardenGUIApp::createDocumentFromMIDIFile(TQString file) { //if (!merge && !m_doc->saveIfModified()) return; @@ -3857,7 +3857,7 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) // RosegardenGUIDoc *newDoc = new RosegardenGUIDoc(this, m_pluginManager); - std::string fname(QFile::encodeName(file)); + std::string fname(TQFile::encodeName(file)); MidiFile midiFile(fname, &newDoc->getStudio()); @@ -3870,11 +3870,11 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) CurrentProgressDialog::set (&progressDlg); - connect(&midiFile, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&midiFile, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&midiFile, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&midiFile, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!midiFile.open()) { CurrentProgressDialog::freeze(); @@ -3894,8 +3894,8 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) // Set the caption // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); // Clean up for notation purposes (after reinitialise, because that // sets the composition's end marker time which is needed here) @@ -3962,8 +3962,8 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) (segment, startTime, endTime, "Notation Options", true); subCommand->setProgressTotal(progressPer + 1); - QObject::connect(subCommand, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + TQObject::connect(subCommand, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); command->addCommand(subCommand); } @@ -3994,7 +3994,7 @@ void RosegardenGUIApp::slotImportRG21() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportRG21); @@ -4011,7 +4011,7 @@ void RosegardenGUIApp::slotMergeRG21() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportRG21); @@ -4019,7 +4019,7 @@ void RosegardenGUIApp::slotMergeRG21() } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromRG21File(QString file) +RosegardenGUIApp::createDocumentFromRG21File(TQString file) { KStartupLogo::hideIfStillThere(); ProgressDialog progressDlg( @@ -4036,11 +4036,11 @@ RosegardenGUIApp::createDocumentFromRG21File(QString file) // TODO: make RG21Loader to actually emit these signals // - connect(&rg21Loader, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&rg21Loader, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&rg21Loader, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&rg21Loader, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); // "your starter for 40%" - helps the "freeze" work // @@ -4060,8 +4060,8 @@ RosegardenGUIApp::createDocumentFromRG21File(QString file) // Set the caption and add recent // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); return newDoc; @@ -4081,7 +4081,7 @@ RosegardenGUIApp::slotImportHydrogen() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportHydrogen); @@ -4098,7 +4098,7 @@ void RosegardenGUIApp::slotMergeHydrogen() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportHydrogen); @@ -4106,7 +4106,7 @@ void RosegardenGUIApp::slotMergeHydrogen() } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) +RosegardenGUIApp::createDocumentFromHydrogenFile(TQString file) { KStartupLogo::hideIfStillThere(); ProgressDialog progressDlg( @@ -4123,11 +4123,11 @@ RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) // TODO: make RG21Loader to actually emit these signals // - connect(&hydrogenLoader, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&hydrogenLoader, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&hydrogenLoader, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&hydrogenLoader, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); // "your starter for 40%" - helps the "freeze" work // @@ -4147,15 +4147,15 @@ RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) // Set the caption and add recent // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); return newDoc; } void -RosegardenGUIApp::mergeFile(QString filePath, ImportType type) +RosegardenGUIApp::mergeFile(TQString filePath, ImportType type) { RosegardenGUIDoc *doc = createDocument(filePath, type); @@ -4197,7 +4197,7 @@ RosegardenGUIApp::mergeFile(QString filePath, ImportType type) } FileMergeDialog dialog(this, filePath, timingsDiffer); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->mergeDocument(doc, dialog.getMergeOptions()); } @@ -4385,7 +4385,7 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t) if (!m_originatingJump) { m_seqManager->sendSequencerJump(comp.getElapsedRealTime(t)); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } } @@ -4501,22 +4501,22 @@ void RosegardenGUIApp::slotTestStartupTester() if (!m_startupTester) { m_startupTester = new StartupTester(); - connect(m_startupTester, SIGNAL(newerVersionAvailable(QString)), - this, SLOT(slotNewerVersionAvailable(QString))); + connect(m_startupTester, TQT_SIGNAL(newerVersionAvailable(TQString)), + this, TQT_SLOT(slotNewerVersionAvailable(TQString))); m_startupTester->start(); - QTimer::singleShot(100, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); return ; } if (!m_startupTester->isReady()) { - QTimer::singleShot(100, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); return ; } - QStringList missingFeatures; - QStringList allMissing; + TQStringList missingFeatures; + TQStringList allMissing; - QStringList missing; + TQStringList missing; bool have = m_startupTester->haveProjectPackager(&missing); stateChanged("have_project_packager", @@ -4582,7 +4582,7 @@ void RosegardenGUIApp::slotTestStartupTester() #endif if (missingFeatures.count() > 0) { - QString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); + TQString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); message += i18n("<ul>"); for (int i = 0; i < missingFeatures.count(); ++i) { message += i18n("<li>%1</li>").arg(missingFeatures[i]); @@ -4634,7 +4634,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) // User mode should clear down sequencer processes. // if (kapp->dcopClient()->isApplicationRegistered( - QCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { + TQCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - " << "existing DCOP registered sequencer found\n"; @@ -4659,7 +4659,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) sleep(1); if (kapp->dcopClient()->isApplicationRegistered( - QCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { + TQCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - " << "failed to kill existing sequencer\n"; @@ -4694,7 +4694,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) // KConfig *config = kapp->config(); config->setGroup(SequencerOptionsConfigGroup); - QString options = config->readEntry("commandlineoptions"); + TQString options = config->readEntry("commandlineoptions"); if (!options.isEmpty()) { (*m_sequencerProcess) << options; RG_DEBUG << "sequencer options \"" << options << "\"" << endl; @@ -4739,8 +4739,8 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) stateChanged("sequencer_running"); slotEnableTransport(true); - connect(m_sequencerProcess, SIGNAL(processExited(KProcess*)), - this, SLOT(slotSequencerExited(KProcess*))); + connect(m_sequencerProcess, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotSequencerExited(KProcess*))); } catch (Exception e) { m_sequencerProcess = 0; @@ -4784,7 +4784,7 @@ bool RosegardenGUIApp::launchJack() if (!startJack) return true; // we don't do anything - QString jackPath = config->readEntry("jackcommand", ""); + TQString jackPath = config->readEntry("jackcommand", ""); emit startupStatusMessage(i18n("Clearing down jackd...")); @@ -4806,8 +4806,8 @@ bool RosegardenGUIApp::launchJack() RG_DEBUG << "starting jack \"" << jackPath << "\"" << endl; - QStringList splitCommand; - splitCommand = QStringList::split(" ", jackPath); + TQStringList splitCommand; + splitCommand = TQStringList::split(" ", jackPath); RG_DEBUG << "RosegardenGUIApp::launchJack() : splitCommand length : " << splitCommand.size() << endl; @@ -4855,7 +4855,7 @@ void RosegardenGUIApp::slotExportProject() { KTmpStatusMsg msg(i18n("Exporting Rosegarden Project file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.rgp|" + i18n("Rosegarden Project files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -4863,13 +4863,13 @@ void RosegardenGUIApp::slotExportProject() if (fileName.isEmpty()) return ; - QString rgFile = fileName; - rgFile.replace(QRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(QRegExp(".rgp$"), ".rg"); + TQString rgFile = fileName; + rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.replace(TQRegExp(".rgp$"), ".rg"); CurrentProgressDialog::freeze(); - QString errMsg; + TQString errMsg; if (!m_doc->saveDocument(rgFile, errMsg, true)) { // pretend it's autosave KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").arg(errMsg)); @@ -4899,7 +4899,7 @@ void RosegardenGUIApp::slotExportMIDI() { KTmpStatusMsg msg(i18n("Exporting MIDI file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.mid *.midi|" + i18n("Standard MIDI files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -4910,22 +4910,22 @@ void RosegardenGUIApp::slotExportMIDI() exportMIDIFile(fileName); } -void RosegardenGUIApp::exportMIDIFile(QString file) +void RosegardenGUIApp::exportMIDIFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting MIDI file..."), 100, this); - std::string fname(QFile::encodeName(file)); + std::string fname(TQFile::encodeName(file)); MidiFile midiFile(fname, &m_doc->getStudio()); - connect(&midiFile, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&midiFile, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&midiFile, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&midiFile, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); midiFile.convertToMidi(m_doc->getComposition()); @@ -4939,7 +4939,7 @@ void RosegardenGUIApp::slotExportCsound() { KTmpStatusMsg msg(i18n("Exporting Csound score file..."), this); - QString fileName = getValidWriteFile(QString("*|") + i18n("All files"), + TQString fileName = getValidWriteFile(TQString("*|") + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) return ; @@ -4947,19 +4947,19 @@ void RosegardenGUIApp::slotExportCsound() exportCsoundFile(fileName); } -void RosegardenGUIApp::exportCsoundFile(QString file) +void RosegardenGUIApp::exportCsoundFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting Csound score file..."), 100, this); - CsoundExporter e(this, &m_doc->getComposition(), std::string(QFile::encodeName(file))); + CsoundExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -4971,7 +4971,7 @@ void RosegardenGUIApp::slotExportMup() { KTmpStatusMsg msg(i18n("Exporting Mup file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.mup|" + i18n("Mup files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) @@ -4980,19 +4980,19 @@ void RosegardenGUIApp::slotExportMup() exportMupFile(fileName); } -void RosegardenGUIApp::exportMupFile(QString file) +void RosegardenGUIApp::exportMupFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting Mup file..."), 100, this); - MupExporter e(this, &m_doc->getComposition(), std::string(QFile::encodeName(file))); + MupExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5004,8 +5004,8 @@ void RosegardenGUIApp::slotExportLilyPond() { KTmpStatusMsg msg(i18n("Exporting LilyPond file..."), this); - QString fileName = getValidWriteFile - (QString("*.ly|") + i18n("LilyPond files") + + TQString fileName = getValidWriteFile + (TQString("*.ly|") + i18n("LilyPond files") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -5021,7 +5021,7 @@ std::map<KProcess *, KTempFile *> RosegardenGUIApp::m_lilyTempFileMap; void RosegardenGUIApp::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5036,8 +5036,8 @@ void RosegardenGUIApp::slotPrintLilyPond() *proc << "--graphical"; *proc << "--print"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5045,7 +5045,7 @@ void RosegardenGUIApp::slotPrintLilyPond() void RosegardenGUIApp::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5060,8 +5060,8 @@ void RosegardenGUIApp::slotPreviewLilyPond() *proc << "--graphical"; *proc << "--pdf"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5073,16 +5073,16 @@ void RosegardenGUIApp::slotLilyPondViewProcessExited(KProcess *p) delete p; } -bool RosegardenGUIApp::exportLilyPondFile(QString file, bool forPreview) +bool RosegardenGUIApp::exportLilyPondFile(TQString file, bool forPreview) { - QString caption = "", heading = ""; + TQString caption = "", heading = ""; if (forPreview) { caption = i18n("LilyPond Preview Options"); heading = i18n("LilyPond preview options"); } LilyPondOptionsDialog dialog(this, m_doc, caption, heading); - if (dialog.exec() != QDialog::Accepted) { + if (dialog.exec() != TQDialog::Accepted) { return false; } @@ -5090,13 +5090,13 @@ bool RosegardenGUIApp::exportLilyPondFile(QString file, bool forPreview) 100, this); - LilyPondExporter e(this, m_doc, std::string(QFile::encodeName(file))); + LilyPondExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5111,8 +5111,8 @@ void RosegardenGUIApp::slotExportMusicXml() { KTmpStatusMsg msg(i18n("Exporting MusicXML file..."), this); - QString fileName = getValidWriteFile - (QString("*.xml|") + i18n("XML files") + + TQString fileName = getValidWriteFile + (TQString("*.xml|") + i18n("XML files") + "\n*|" + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) @@ -5121,19 +5121,19 @@ void RosegardenGUIApp::slotExportMusicXml() exportMusicXmlFile(fileName); } -void RosegardenGUIApp::exportMusicXmlFile(QString file) +void RosegardenGUIApp::exportMusicXmlFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting MusicXML file..."), 100, this); - MusicXmlExporter e(this, m_doc, std::string(QFile::encodeName(file))); + MusicXmlExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5156,7 +5156,7 @@ RosegardenGUIApp::slotDeleteTransport() } void -RosegardenGUIApp::slotActivateTool(QString toolName) +RosegardenGUIApp::slotActivateTool(TQString toolName) { if (toolName == SegmentSelector::ToolName) { actionCollection()->action("select")->activate(); @@ -5273,7 +5273,7 @@ RosegardenGUIApp::slotRecord() // try { m_seqManager->record(false); - } catch (QString s) { + } catch (TQString s) { // We should already be stopped by this point so just unset // the buttons after clicking the dialog. // @@ -5308,8 +5308,8 @@ RosegardenGUIApp::slotRecord() plugAccelerators(m_seqManager->getCountdownDialog(), m_seqManager->getCountdownDialog()->getAccelerators()); - connect(m_seqManager->getCountdownDialog(), SIGNAL(stopped()), - this, SLOT(slotStop())); + connect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), + this, TQT_SLOT(slotStop())); // Start the playback timer - this fetches the current sequencer position &c // @@ -5329,7 +5329,7 @@ RosegardenGUIApp::slotToggleRecord() try { m_seqManager->record(true); - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } catch (AudioFileManager::BadAudioPathException e) { if (KMessageBox::warningContinueCancel @@ -5361,7 +5361,7 @@ RosegardenGUIApp::slotSetLoop(timeT lhs, timeT rhs) getTransport()->LoopButton()->setOn(false); stateChanged("have_range", KXMLGUIClient::StateReverse); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } } @@ -5429,7 +5429,7 @@ void RosegardenGUIApp::slotPlay() m_playTimer->stop(); m_stopTimer->start(100); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); m_playTimer->stop(); m_stopTimer->start(100); @@ -5459,10 +5459,10 @@ void RosegardenGUIApp::slotStop() { if (m_seqManager && m_seqManager->getCountdownDialog()) { - disconnect(m_seqManager->getCountdownDialog(), SIGNAL(stopped()), - this, SLOT(slotStop())); - disconnect(m_seqManager->getCountdownDialog(), SIGNAL(completed()), - this, SLOT(slotStop())); + disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), + this, TQT_SLOT(slotStop())); + disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(completed()), + this, TQT_SLOT(slotStop())); } try { @@ -5645,10 +5645,10 @@ void RosegardenGUIApp::slotConfigure() ConfigureDialog *configDlg = new ConfigureDialog(m_doc, kapp->config(), this); - connect(configDlg, SIGNAL(updateAutoSaveInterval(unsigned int)), - this, SLOT(slotUpdateAutoSaveInterval(unsigned int))); - connect(configDlg, SIGNAL(updateSidebarStyle(unsigned int)), - this, SLOT(slotUpdateSidebarStyle(unsigned int))); + connect(configDlg, TQT_SIGNAL(updateAutoSaveInterval(unsigned int)), + this, TQT_SLOT(slotUpdateAutoSaveInterval(unsigned int))); + connect(configDlg, TQT_SIGNAL(updateSidebarStyle(unsigned int)), + this, TQT_SLOT(slotUpdateSidebarStyle(unsigned int))); configDlg->show(); } @@ -5683,8 +5683,8 @@ void RosegardenGUIApp::slotEditToolbars() { KEditToolbar dlg(actionCollection(), "rosegardenui.rc"); - connect(&dlg, SIGNAL(newToolbarConfig()), - SLOT(slotUpdateToolbars())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + TQT_SLOT(slotUpdateToolbars())); dlg.exec(); } @@ -5705,23 +5705,23 @@ void RosegardenGUIApp::slotEditTempo(timeT atTime) slotEditTempo(this, atTime); } -void RosegardenGUIApp::slotEditTempo(QWidget *parent) +void RosegardenGUIApp::slotEditTempo(TQWidget *parent) { slotEditTempo(parent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTempo(QWidget *parent, timeT atTime) +void RosegardenGUIApp::slotEditTempo(TQWidget *parent, timeT atTime) { RG_DEBUG << "RosegardenGUIApp::slotEditTempo\n"; TempoDialog tempoDialog(parent, m_doc); connect(&tempoDialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -5740,12 +5740,12 @@ void RosegardenGUIApp::slotEditTimeSignature(timeT atTime) slotEditTimeSignature(this, atTime); } -void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent) +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent) { slotEditTimeSignature(parent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent, +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent, timeT time) { Composition &composition(m_doc->getComposition()); @@ -5754,7 +5754,7 @@ void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent, TimeSignatureDialog dialog(parent, &composition, time, sig); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { time = dialog.getTime(); @@ -5775,13 +5775,13 @@ void RosegardenGUIApp::slotEditTransportTime() slotEditTransportTime(this); } -void RosegardenGUIApp::slotEditTransportTime(QWidget *parent) +void RosegardenGUIApp::slotEditTransportTime(TQWidget *parent) { TimeDialog dialog(parent, i18n("Move playback pointer to time"), &m_doc->getComposition(), m_doc->getComposition().getPosition(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->slotSetPointerPosition(dialog.getTime()); } } @@ -5953,7 +5953,7 @@ RosegardenGUIApp::slotAddMarker(timeT time) } void -RosegardenGUIApp::slotDeleteMarker(int id, timeT time, QString name, QString description) +RosegardenGUIApp::slotDeleteMarker(int id, timeT time, TQString name, TQString description) { RemoveMarkerCommand *command = new RemoveMarkerCommand(&m_doc->getComposition(), @@ -5980,7 +5980,7 @@ RosegardenGUIApp::slotDocumentModified(bool m) } void -RosegardenGUIApp::slotStateChanged(QString s, +RosegardenGUIApp::slotStateChanged(TQString s, bool noReverse) { // RG_DEBUG << "RosegardenGUIApp::slotStateChanged " << s << "," << noReverse << endl; @@ -6005,32 +6005,32 @@ RosegardenGUIApp::slotTestClipboard() } void -RosegardenGUIApp::plugAccelerators(QWidget *widget, QAccel *acc) +RosegardenGUIApp::plugAccelerators(TQWidget *widget, TQAccel *acc) { acc->connectItem(acc->insertItem(Key_Enter), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); // Alternative shortcut for Play acc->connectItem(acc->insertItem(Key_Return + CTRL), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); acc->connectItem(acc->insertItem(Key_Insert), this, - SLOT(slotStop())); + TQT_SLOT(slotStop())); acc->connectItem(acc->insertItem(Key_PageDown), this, - SLOT(slotFastforward())); + TQT_SLOT(slotFastforward())); acc->connectItem(acc->insertItem(Key_End), this, - SLOT(slotRewind())); + TQT_SLOT(slotRewind())); acc->connectItem(acc->insertItem(Key_Space), this, - SLOT(slotToggleRecord())); + TQT_SLOT(slotToggleRecord())); TransportDialog *transport = dynamic_cast<TransportDialog*>(widget); @@ -6038,69 +6038,69 @@ RosegardenGUIApp::plugAccelerators(QWidget *widget, QAccel *acc) if (transport) { acc->connectItem(acc->insertItem(m_jumpToQuickMarkerAction->shortcut()), this, - SLOT(slotJumpToQuickMarker())); + TQT_SLOT(slotJumpToQuickMarker())); acc->connectItem(acc->insertItem(m_setQuickMarkerAction->shortcut()), this, - SLOT(slotSetQuickMarker())); + TQT_SLOT(slotSetQuickMarker())); connect(transport->PlayButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); connect(transport->StopButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotStop())); + TQT_SLOT(slotStop())); connect(transport->FfwdButton(), - SIGNAL(clicked()), - SLOT(slotFastforward())); + TQT_SIGNAL(clicked()), + TQT_SLOT(slotFastforward())); connect(transport->RewindButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRewind())); + TQT_SLOT(slotRewind())); connect(transport->RecordButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRecord())); + TQT_SLOT(slotRecord())); connect(transport->RewindEndButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRewindToBeginning())); + TQT_SLOT(slotRewindToBeginning())); connect(transport->FfwdEndButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotFastForwardToEnd())); + TQT_SLOT(slotFastForwardToEnd())); connect(transport->MetronomeButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotToggleMetronome())); + TQT_SLOT(slotToggleMetronome())); connect(transport->SoloButton(), - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), this, - SLOT(slotToggleSolo(bool))); + TQT_SLOT(slotToggleSolo(bool))); connect(transport->TimeDisplayButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRefreshTimeDisplay())); + TQT_SLOT(slotRefreshTimeDisplay())); connect(transport->ToEndButton(), - SIGNAL(clicked()), - SLOT(slotRefreshTimeDisplay())); + TQT_SIGNAL(clicked()), + TQT_SLOT(slotRefreshTimeDisplay())); } } void -RosegardenGUIApp::setCursor(const QCursor& cursor) +RosegardenGUIApp::setCursor(const TQCursor& cursor) { KDockMainWindow::setCursor(cursor); @@ -6119,7 +6119,7 @@ RosegardenGUIApp::setCursor(const QCursor& cursor) // toolbars... // - QPtrListIterator<KToolBar> tbIter = toolBarIterator(); + TQPtrListIterator<KToolBar> tbIter = toolBarIterator(); KToolBar* tb = 0; while ((tb = tbIter.current()) != 0) { tb->setCursor(cursor); @@ -6150,10 +6150,10 @@ RosegardenGUIApp::createNewAudioFile() } } -QValueVector<QString> -RosegardenGUIApp::createRecordAudioFiles(const QValueVector<InstrumentId> &recordInstruments) +TQValueVector<TQString> +RosegardenGUIApp::createRecordAudioFiles(const TQValueVector<InstrumentId> &recordInstruments) { - QValueVector<QString> qv; + TQValueVector<TQString> qv; for (unsigned int i = 0; i < recordInstruments.size(); ++i) { AudioFile *aF = 0; try { @@ -6180,10 +6180,10 @@ RosegardenGUIApp::createRecordAudioFiles(const QValueVector<InstrumentId> &recor QString RosegardenGUIApp::getAudioFilePath() { - return QString(m_doc->getAudioFileManager().getAudioPath().c_str()); + return TQString(m_doc->getAudioFileManager().getAudioPath().c_str()); } -QValueVector<InstrumentId> +TQValueVector<InstrumentId> RosegardenGUIApp::getArmedInstruments() { std::set @@ -6203,7 +6203,7 @@ RosegardenGUIApp::getArmedInstruments() } } - QValueVector<InstrumentId> iv; + TQValueVector<InstrumentId> iv; for (std::set <InstrumentId>::iterator ii = iid.begin(); ii != iid.end(); ++ii) { @@ -6213,7 +6213,7 @@ RosegardenGUIApp::getArmedInstruments() } void -RosegardenGUIApp::showError(QString error) +RosegardenGUIApp::showError(TQString error) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); @@ -6245,20 +6245,20 @@ RosegardenGUIApp::slotAudioManager() new AudioManagerDialog(this, m_doc); connect(m_audioManagerDialog, - SIGNAL(playAudioFile(AudioFileId, + TQT_SIGNAL(playAudioFile(AudioFileId, const RealTime &, const RealTime&)), - SLOT(slotPlayAudioFile(AudioFileId, + TQT_SLOT(slotPlayAudioFile(AudioFileId, const RealTime &, const RealTime &))); connect(m_audioManagerDialog, - SIGNAL(addAudioFile(AudioFileId)), - SLOT(slotAddAudioFile(AudioFileId))); + TQT_SIGNAL(addAudioFile(AudioFileId)), + TQT_SLOT(slotAddAudioFile(AudioFileId))); connect(m_audioManagerDialog, - SIGNAL(deleteAudioFile(AudioFileId)), - SLOT(slotDeleteAudioFile(AudioFileId))); + TQT_SIGNAL(deleteAudioFile(AudioFileId)), + TQT_SLOT(slotDeleteAudioFile(AudioFileId))); // // Sync segment selection between audio man. dialog and main window @@ -6266,46 +6266,46 @@ RosegardenGUIApp::slotAudioManager() // from dialog to us... connect(m_audioManagerDialog, - SIGNAL(segmentsSelected(const SegmentSelection&)), + TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), m_view, - SLOT(slotPropagateSegmentSelection(const SegmentSelection&))); + TQT_SLOT(slotPropagateSegmentSelection(const SegmentSelection&))); // and from us to dialog - connect(this, SIGNAL(segmentsSelected(const SegmentSelection&)), + connect(this, TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), m_audioManagerDialog, - SLOT(slotSegmentSelection(const SegmentSelection&))); + TQT_SLOT(slotSegmentSelection(const SegmentSelection&))); connect(m_audioManagerDialog, - SIGNAL(deleteSegments(const SegmentSelection&)), - SLOT(slotDeleteSegments(const SegmentSelection&))); + TQT_SIGNAL(deleteSegments(const SegmentSelection&)), + TQT_SLOT(slotDeleteSegments(const SegmentSelection&))); connect(m_audioManagerDialog, - SIGNAL(insertAudioSegment(AudioFileId, + TQT_SIGNAL(insertAudioSegment(AudioFileId, const RealTime&, const RealTime&)), m_view, - SLOT(slotAddAudioSegmentDefaultPosition(AudioFileId, + TQT_SLOT(slotAddAudioSegmentDefaultPosition(AudioFileId, const RealTime&, const RealTime&))); connect(m_audioManagerDialog, - SIGNAL(cancelPlayingAudioFile(AudioFileId)), - SLOT(slotCancelAudioPlayingFile(AudioFileId))); + TQT_SIGNAL(cancelPlayingAudioFile(AudioFileId)), + TQT_SLOT(slotCancelAudioPlayingFile(AudioFileId))); connect(m_audioManagerDialog, - SIGNAL(deleteAllAudioFiles()), - SLOT(slotDeleteAllAudioFiles())); + TQT_SIGNAL(deleteAllAudioFiles()), + TQT_SLOT(slotDeleteAllAudioFiles())); // Make sure we know when the audio man. dialog is closing // connect(m_audioManagerDialog, - SIGNAL(closing()), - SLOT(slotAudioManagerClosed())); + TQT_SIGNAL(closing()), + TQT_SLOT(slotAudioManagerClosed())); // And that it goes away when the current document is changing // - connect(this, SIGNAL(documentAboutToChange()), - m_audioManagerDialog, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_audioManagerDialog, TQT_SLOT(close())); m_audioManagerDialog->setAudioSubsystemStatus( m_seqManager->getSoundDriverStatus() & AUDIO_OK); @@ -6345,18 +6345,18 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) if (aF == 0) return ; - QCString replyType; - QByteArray replyData; - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQCString replyType; + TQByteArray replyData; + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // We have to pass the filename as a QString // - streamOut << QString(strtoqstr(aF->getFilename())); + streamOut << TQString(strtoqstr(aF->getFilename())); streamOut << (int)aF->getId(); - if (rgapp->sequencerCall("addAudioFile(QString, int)", replyType, replyData, data)) { - QDataStream streamIn(replyData, IO_ReadOnly); + if (rgapp->sequencerCall("addAudioFile(TQString, int)", replyType, replyData, data)) { + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; if (!result) { @@ -6371,17 +6371,17 @@ RosegardenGUIApp::slotDeleteAudioFile(unsigned int id) if (m_doc->getAudioFileManager().removeFile(id) == false) return ; - QCString replyType; - QByteArray replyData; - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQCString replyType; + TQByteArray replyData; + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // file id // streamOut << (int)id; if (rgapp->sequencerCall("removeAudioFile(int)", replyType, replyData, data)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; if (!result) { @@ -6420,9 +6420,9 @@ RosegardenGUIApp::slotDeleteAllAudioFiles() // Clear at the sequencer // - QCString replyType; - QByteArray replyData; - QByteArray data; + TQCString replyType; + TQByteArray replyData; + TQByteArray data; rgapp->sequencerCall("clearAllAudioFiles()", replyType, replyData, data); } @@ -6440,7 +6440,7 @@ RosegardenGUIApp::slotRelabelSegments() return ; SegmentSelection selection(m_view->getSelection()); - QString editLabel; + TQString editLabel; if (selection.size() == 0) return ; @@ -6452,7 +6452,7 @@ RosegardenGUIApp::slotRelabelSegments() KTmpStatusMsg msg(i18n("Relabelling selection..."), this); // Generate label - QString label = strtoqstr((*selection.begin())->getLabel()); + TQString label = strtoqstr((*selection.begin())->getLabel()); for (SegmentSelection::iterator i = selection.begin(); i != selection.end(); ++i) { @@ -6462,7 +6462,7 @@ RosegardenGUIApp::slotRelabelSegments() bool ok = false; - QString newLabel = KInputDialog::getText(editLabel, + TQString newLabel = KInputDialog::getText(editLabel, i18n("Enter new label"), label, &ok, @@ -6498,7 +6498,7 @@ RosegardenGUIApp::slotChangeCompositionLength() { CompositionLengthDialog dialog(this, &m_doc->getComposition()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ChangeCompositionLengthCommand *command = new ChangeCompositionLengthCommand( &m_doc->getComposition(), @@ -6522,26 +6522,26 @@ RosegardenGUIApp::slotManageMIDIDevices() m_deviceManager = new DeviceManagerDialog(this, m_doc); - connect(m_deviceManager, SIGNAL(closing()), - this, SLOT(slotDeviceManagerClosed())); + connect(m_deviceManager, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotDeviceManagerClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_deviceManager, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_deviceManager, TQT_SLOT(close())); // Cheating way of updating the track/instrument list // - connect(m_deviceManager, SIGNAL(deviceNamesChanged()), - m_view, SLOT(slotSynchroniseWithComposition())); + connect(m_deviceManager, TQT_SIGNAL(deviceNamesChanged()), + m_view, TQT_SLOT(slotSynchroniseWithComposition())); - connect(m_deviceManager, SIGNAL(editBanks(DeviceId)), - this, SLOT(slotEditBanks(DeviceId))); + connect(m_deviceManager, TQT_SIGNAL(editBanks(DeviceId)), + this, TQT_SLOT(slotEditBanks(DeviceId))); - connect(m_deviceManager, SIGNAL(editControllers(DeviceId)), - this, SLOT(slotEditControlParameters(DeviceId))); + connect(m_deviceManager, TQT_SIGNAL(editControllers(DeviceId)), + this, TQT_SLOT(slotEditControlParameters(DeviceId))); if (m_midiMixer) { - connect(m_deviceManager, SIGNAL(deviceNamesChanged()), - m_midiMixer, SLOT(slotSynchronise())); + connect(m_deviceManager, TQT_SIGNAL(deviceNamesChanged()), + m_midiMixer, TQT_SLOT(slotSynchronise())); } @@ -6565,26 +6565,26 @@ RosegardenGUIApp::slotManageSynths() #endif ); - connect(m_synthManager, SIGNAL(closing()), - this, SLOT(slotSynthPluginManagerClosed())); + connect(m_synthManager, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotSynthPluginManagerClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_synthManager, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_synthManager, TQT_SLOT(close())); connect(m_synthManager, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), this, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(m_synthManager, - SIGNAL(showPluginDialog(QWidget *, InstrumentId, int)), + TQT_SIGNAL(showPluginDialog(TQWidget *, InstrumentId, int)), this, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_synthManager, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); m_synthManager->show(); } @@ -6601,66 +6601,66 @@ RosegardenGUIApp::slotOpenAudioMixer() m_audioMixer = new AudioMixerWindow(this, m_doc); - connect(m_audioMixer, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); + connect(m_audioMixer, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - m_audioMixer, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + m_audioMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); - connect(m_audioMixer, SIGNAL(closing()), - this, SLOT(slotAudioMixerClosed())); + connect(m_audioMixer, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotAudioMixerClosed())); - connect(m_audioMixer, SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), - this, SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + connect(m_audioMixer, TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), + this, TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(this, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_audioMixer, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(this, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_audioMixer, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); - - connect(this, SIGNAL(documentAboutToChange()), - m_audioMixer, SLOT(close())); - - connect(m_view, SIGNAL(checkTrackAssignments()), - m_audioMixer, SLOT(slotTrackAssignmentsChanged())); - - connect(m_audioMixer, SIGNAL(play()), - this, SLOT(slotPlay())); - connect(m_audioMixer, SIGNAL(stop()), - this, SLOT(slotStop())); - connect(m_audioMixer, SIGNAL(fastForwardPlayback()), - this, SLOT(slotFastforward())); - connect(m_audioMixer, SIGNAL(rewindPlayback()), - this, SLOT(slotRewind())); - connect(m_audioMixer, SIGNAL(fastForwardPlaybackToEnd()), - this, SLOT(slotFastForwardToEnd())); - connect(m_audioMixer, SIGNAL(rewindPlaybackToBeginning()), - this, SLOT(slotRewindToBeginning())); - connect(m_audioMixer, SIGNAL(record()), - this, SLOT(slotRecord())); - connect(m_audioMixer, SIGNAL(panic()), - this, SLOT(slotPanic())); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); + + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_audioMixer, TQT_SLOT(close())); + + connect(m_view, TQT_SIGNAL(checkTrackAssignments()), + m_audioMixer, TQT_SLOT(slotTrackAssignmentsChanged())); + + connect(m_audioMixer, TQT_SIGNAL(play()), + this, TQT_SLOT(slotPlay())); + connect(m_audioMixer, TQT_SIGNAL(stop()), + this, TQT_SLOT(slotStop())); + connect(m_audioMixer, TQT_SIGNAL(fastForwardPlayback()), + this, TQT_SLOT(slotFastforward())); + connect(m_audioMixer, TQT_SIGNAL(rewindPlayback()), + this, TQT_SLOT(slotRewind())); + connect(m_audioMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), + this, TQT_SLOT(slotFastForwardToEnd())); + connect(m_audioMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), + this, TQT_SLOT(slotRewindToBeginning())); + connect(m_audioMixer, TQT_SIGNAL(record()), + this, TQT_SLOT(slotRecord())); + connect(m_audioMixer, TQT_SIGNAL(panic()), + this, TQT_SLOT(slotPanic())); connect(m_audioMixer, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_audioMixer, - SLOT(slotUpdateInstrument(InstrumentId))); + TQT_SLOT(slotUpdateInstrument(InstrumentId))); if (m_synthManager) { connect(m_synthManager, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_audioMixer, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); } plugAccelerators(m_audioMixer, m_audioMixer->getAccelerators()); @@ -6680,44 +6680,44 @@ RosegardenGUIApp::slotOpenMidiMixer() m_midiMixer = new MidiMixerWindow(this, m_doc); - connect(m_midiMixer, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); - - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - m_midiMixer, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); - - connect(m_midiMixer, SIGNAL(closing()), - this, SLOT(slotMidiMixerClosed())); - - connect(this, SIGNAL(documentAboutToChange()), - m_midiMixer, SLOT(close())); - - connect(m_midiMixer, SIGNAL(play()), - this, SLOT(slotPlay())); - connect(m_midiMixer, SIGNAL(stop()), - this, SLOT(slotStop())); - connect(m_midiMixer, SIGNAL(fastForwardPlayback()), - this, SLOT(slotFastforward())); - connect(m_midiMixer, SIGNAL(rewindPlayback()), - this, SLOT(slotRewind())); - connect(m_midiMixer, SIGNAL(fastForwardPlaybackToEnd()), - this, SLOT(slotFastForwardToEnd())); - connect(m_midiMixer, SIGNAL(rewindPlaybackToBeginning()), - this, SLOT(slotRewindToBeginning())); - connect(m_midiMixer, SIGNAL(record()), - this, SLOT(slotRecord())); - connect(m_midiMixer, SIGNAL(panic()), - this, SLOT(slotPanic())); + connect(m_midiMixer, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); + + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + m_midiMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + + connect(m_midiMixer, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotMidiMixerClosed())); + + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_midiMixer, TQT_SLOT(close())); + + connect(m_midiMixer, TQT_SIGNAL(play()), + this, TQT_SLOT(slotPlay())); + connect(m_midiMixer, TQT_SIGNAL(stop()), + this, TQT_SLOT(slotStop())); + connect(m_midiMixer, TQT_SIGNAL(fastForwardPlayback()), + this, TQT_SLOT(slotFastforward())); + connect(m_midiMixer, TQT_SIGNAL(rewindPlayback()), + this, TQT_SLOT(slotRewind())); + connect(m_midiMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), + this, TQT_SLOT(slotFastForwardToEnd())); + connect(m_midiMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), + this, TQT_SLOT(slotRewindToBeginning())); + connect(m_midiMixer, TQT_SIGNAL(record()), + this, TQT_SLOT(slotRecord())); + connect(m_midiMixer, TQT_SIGNAL(panic()), + this, TQT_SLOT(slotPanic())); connect(m_midiMixer, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_midiMixer, - SLOT(slotUpdateInstrument(InstrumentId))); + TQT_SLOT(slotUpdateInstrument(InstrumentId))); plugAccelerators(m_midiMixer, m_midiMixer->getAccelerators()); @@ -6744,14 +6744,14 @@ RosegardenGUIApp::slotEditControlParameters(DeviceId device) RG_DEBUG << "inserting control editor dialog, have " << m_controlEditors.size() << " now" << endl; - connect(controlEditor, SIGNAL(closing()), - SLOT(slotControlEditorClosed())); + connect(controlEditor, TQT_SIGNAL(closing()), + TQT_SLOT(slotControlEditorClosed())); - connect(this, SIGNAL(documentAboutToChange()), - controlEditor, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + controlEditor, TQT_SLOT(close())); - connect(m_doc, SIGNAL(devicesResyncd()), - controlEditor, SLOT(slotUpdate())); + connect(m_doc, TQT_SIGNAL(devicesResyncd()), + controlEditor, TQT_SLOT(slotUpdate())); controlEditor->show(); } @@ -6776,16 +6776,16 @@ RosegardenGUIApp::slotEditBanks(DeviceId device) m_bankEditor = new BankEditorDialog(this, m_doc, device); - connect(m_bankEditor, SIGNAL(closing()), - this, SLOT(slotBankEditorClosed())); + connect(m_bankEditor, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotBankEditorClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_bankEditor, SLOT(slotFileClose())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_bankEditor, TQT_SLOT(slotFileClose())); // Cheating way of updating the track/instrument list // - connect(m_bankEditor, SIGNAL(deviceNamesChanged()), - m_view, SLOT(slotSynchroniseWithComposition())); + connect(m_bankEditor, TQT_SIGNAL(deviceNamesChanged()), + m_view, TQT_SLOT(slotSynchroniseWithComposition())); m_bankEditor->show(); } @@ -6802,11 +6802,11 @@ RosegardenGUIApp::slotManageTriggerSegments() m_triggerSegmentManager = new TriggerSegmentManager(this, m_doc); - connect(m_triggerSegmentManager, SIGNAL(closing()), - SLOT(slotTriggerManagerClosed())); + connect(m_triggerSegmentManager, TQT_SIGNAL(closing()), + TQT_SLOT(slotTriggerManagerClosed())); - connect(m_triggerSegmentManager, SIGNAL(editTriggerSegment(int)), - m_view, SLOT(slotEditTriggerSegment(int))); + connect(m_triggerSegmentManager, TQT_SIGNAL(editTriggerSegment(int)), + m_view, TQT_SLOT(slotEditTriggerSegment(int))); m_triggerSegmentManager->show(); } @@ -6831,11 +6831,11 @@ RosegardenGUIApp::slotEditMarkers() m_markerEditor = new MarkerEditor(this, m_doc); - connect(m_markerEditor, SIGNAL(closing()), - SLOT(slotMarkerEditorClosed())); + connect(m_markerEditor, TQT_SIGNAL(closing()), + TQT_SLOT(slotMarkerEditorClosed())); - connect(m_markerEditor, SIGNAL(jumpToMarker(timeT)), - m_doc, SLOT(slotSetPointerPosition(timeT))); + connect(m_markerEditor, TQT_SIGNAL(jumpToMarker(timeT)), + m_doc, TQT_SLOT(slotSetPointerPosition(timeT))); plugAccelerators(m_markerEditor, m_markerEditor->getAccelerators()); @@ -6862,24 +6862,24 @@ RosegardenGUIApp::slotEditTempos(timeT t) m_tempoView = new TempoView(m_doc, getView(), t); - connect(m_tempoView, SIGNAL(closing()), - SLOT(slotTempoViewClosed())); + connect(m_tempoView, TQT_SIGNAL(closing()), + TQT_SLOT(slotTempoViewClosed())); - connect(m_tempoView, SIGNAL(windowActivated()), - getView(), SLOT(slotActiveMainWindowChanged())); + connect(m_tempoView, TQT_SIGNAL(windowActivated()), + getView(), TQT_SLOT(slotActiveMainWindowChanged())); connect(m_tempoView, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); - connect(m_tempoView, SIGNAL(saveFile()), this, SLOT(slotFileSave())); + connect(m_tempoView, TQT_SIGNAL(saveFile()), this, TQT_SLOT(slotFileSave())); plugAccelerators(m_tempoView, m_tempoView->getAccelerators()); @@ -6897,7 +6897,7 @@ RosegardenGUIApp::slotTempoViewClosed() void RosegardenGUIApp::slotControlEditorClosed() { - const QObject *s = sender(); + const TQObject *s = sender(); RG_DEBUG << "RosegardenGUIApp::slotControlEditorClosed" << endl; @@ -6915,7 +6915,7 @@ RosegardenGUIApp::slotControlEditorClosed() } void -RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, +RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, InstrumentId instrumentId, int index) { @@ -6962,12 +6962,12 @@ RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, container, index); - connect(dialog, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); + connect(dialog, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); /* This feature isn't provided by the plugin dialog - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - dialog, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + dialog, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); */ // Plug the new dialog into the standard keyboard accelerators so @@ -6976,46 +6976,46 @@ RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, plugAccelerators(dialog, dialog->getAccelerators()); connect(dialog, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), this, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(dialog, - SIGNAL(pluginPortChanged(InstrumentId, int, int)), + TQT_SIGNAL(pluginPortChanged(InstrumentId, int, int)), this, - SLOT(slotPluginPortChanged(InstrumentId, int, int))); + TQT_SLOT(slotPluginPortChanged(InstrumentId, int, int))); connect(dialog, - SIGNAL(pluginProgramChanged(InstrumentId, int)), + TQT_SIGNAL(pluginProgramChanged(InstrumentId, int)), this, - SLOT(slotPluginProgramChanged(InstrumentId, int))); + TQT_SLOT(slotPluginProgramChanged(InstrumentId, int))); connect(dialog, - SIGNAL(changePluginConfiguration(InstrumentId, int, bool, QString, QString)), + TQT_SIGNAL(changePluginConfiguration(InstrumentId, int, bool, TQString, TQString)), this, - SLOT(slotChangePluginConfiguration(InstrumentId, int, bool, QString, QString))); + TQT_SLOT(slotChangePluginConfiguration(InstrumentId, int, bool, TQString, TQString))); connect(dialog, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); connect(dialog, - SIGNAL(stopPluginGUI(InstrumentId, int)), + TQT_SIGNAL(stopPluginGUI(InstrumentId, int)), this, - SLOT(slotStopPluginGUI(InstrumentId, int))); + TQT_SLOT(slotStopPluginGUI(InstrumentId, int))); connect(dialog, - SIGNAL(bypassed(InstrumentId, int, bool)), + TQT_SIGNAL(bypassed(InstrumentId, int, bool)), this, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); connect(dialog, - SIGNAL(destroyed(InstrumentId, int)), + TQT_SIGNAL(destroyed(InstrumentId, int)), this, - SLOT(slotPluginDialogDestroyed(InstrumentId, int))); + TQT_SLOT(slotPluginDialogDestroyed(InstrumentId, int))); - connect(this, SIGNAL(documentAboutToChange()), dialog, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), dialog, TQT_SLOT(close())); m_pluginDialogs[key] = dialog; m_pluginDialogs[key]->show(); @@ -7028,7 +7028,7 @@ void RosegardenGUIApp::slotPluginSelected(InstrumentId instrumentId, int index, int plugin) { - const QObject *s = sender(); + const TQObject *s = sender(); bool fromSynthMgr = (s == m_synthManager); @@ -7276,7 +7276,7 @@ RosegardenGUIApp::slotPluginPortChanged(InstrumentId instrumentId, void RosegardenGUIApp::slotChangePluginProgram(InstrumentId instrumentId, int pluginIndex, - QString program) + TQString program) { PluginContainer *container = 0; @@ -7345,7 +7345,7 @@ RosegardenGUIApp::slotPluginProgramChanged(InstrumentId instrumentId, return ; } - QString program = strtoqstr(inst->getProgram()); + TQString program = strtoqstr(inst->getProgram()); RG_DEBUG << "RosegardenGUIApp::slotPluginProgramChanged - " << "setting plugin program (" @@ -7381,8 +7381,8 @@ void RosegardenGUIApp::slotChangePluginConfiguration(InstrumentId instrumentId, int index, bool global, - QString key, - QString value) + TQString key, + TQString value) { PluginContainer *container = 0; @@ -7537,17 +7537,17 @@ RosegardenGUIApp::slotPlayList() { if (!m_playList) { m_playList = new PlayListDialog(i18n("Play List"), this); - connect(m_playList, SIGNAL(closing()), - SLOT(slotPlayListClosed())); - connect(m_playList->getPlayList(), SIGNAL(play(QString)), - SLOT(slotPlayListPlay(QString))); + connect(m_playList, TQT_SIGNAL(closing()), + TQT_SLOT(slotPlayListClosed())); + connect(m_playList->getPlayList(), TQT_SIGNAL(play(TQString)), + TQT_SLOT(slotPlayListPlay(TQString))); } m_playList->show(); } void -RosegardenGUIApp::slotPlayListPlay(QString url) +RosegardenGUIApp::slotPlayListPlay(TQString url) { slotStop(); openURL(url); @@ -7564,7 +7564,7 @@ RosegardenGUIApp::slotPlayListClosed() void RosegardenGUIApp::slotTutorial() { - QString exe = KStandardDirs::findExe( "x-www-browser" ); + TQString exe = KStandardDirs::findExe( "x-www-browser" ); if( exe ) { @@ -7578,7 +7578,7 @@ RosegardenGUIApp::slotTutorial() } else { - QString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/en/chapter-0.html"); + TQString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/en/chapter-0.html"); kapp->invokeBrowser(tutorialURL); } } @@ -7586,7 +7586,7 @@ RosegardenGUIApp::slotTutorial() void RosegardenGUIApp::slotBugGuidelines() { - QString exe = KStandardDirs::findExe( "x-www-browser" ); + TQString exe = KStandardDirs::findExe( "x-www-browser" ); if( exe ) { @@ -7600,7 +7600,7 @@ RosegardenGUIApp::slotBugGuidelines() } else { - QString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/bug-guidelines.html"); + TQString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/bug-guidelines.html"); kapp->invokeBrowser(tutorialURL); } } @@ -7684,10 +7684,10 @@ RosegardenGUIApp::slotPanic() (&progressDlg); ProgressDialog::processEvents(); - connect(m_seqManager, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(m_seqManager, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(m_seqManager, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(m_seqManager, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); m_seqManager->panic(); @@ -7708,7 +7708,7 @@ RosegardenGUIApp::slotPopulateTrackInstrumentPopup() Instrument* instrument = m_doc->getStudio().getInstrumentById(track->getInstrument()); - QPopupMenu* popup = dynamic_cast<QPopupMenu*>(factory()->container("set_track_instrument", this)); + TQPopupMenu* popup = dynamic_cast<TQPopupMenu*>(factory()->container("set_track_instrument", this)); m_view->getTrackEditor()->getTrackButtons()->populateInstrumentPopup(instrument, popup); } @@ -7719,11 +7719,11 @@ RosegardenGUIApp::slotRemapInstruments() RG_DEBUG << "RosegardenGUIApp::slotRemapInstruments\n"; RemapInstrumentDialog dialog(this, m_doc); - connect(&dialog, SIGNAL(applyClicked()), + connect(&dialog, TQT_SIGNAL(applyClicked()), m_view->getTrackEditor()->getTrackButtons(), - SLOT(slotSynchroniseWithComposition())); + TQT_SLOT(slotSynchroniseWithComposition())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotRemapInstruments - accepted\n"; } @@ -7742,20 +7742,20 @@ RosegardenGUIApp::slotSaveDefaultStudio() KTmpStatusMsg msg(i18n("Saving current document as default studio..."), this); - QString autoloadFile = ::locateLocal("appdata", "autoload.rg"); + TQString autoloadFile = ::locateLocal("appdata", "autoload.rg"); RG_DEBUG << "RosegardenGUIApp::slotSaveDefaultStudio : saving studio in " << autoloadFile << endl; SetWaitCursor waitCursor; - QString errMsg; + TQString errMsg; bool res = m_doc->saveDocument(autoloadFile, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not auto-save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2") .arg(autoloadFile).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not auto-save document at %1") + KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1") .arg(autoloadFile))); } @@ -7770,10 +7770,10 @@ RosegardenGUIApp::slotImportDefaultStudio() if (reply != KMessageBox::Yes) return ; - QString autoloadFile = + TQString autoloadFile = KGlobal::dirs()->findResource("appdata", "autoload.rg"); - QFileInfo autoloadFileInfo(autoloadFile); + TQFileInfo autoloadFileInfo(autoloadFile); if (!autoloadFileInfo.isReadable()) { RG_DEBUG << "RosegardenGUIDoc::slotImportDefaultStudio - " @@ -7789,8 +7789,8 @@ RosegardenGUIApp::slotImportStudio() { RG_DEBUG << "RosegardenGUIApp::slotImportStudio()\n"; - QString studioDir = KGlobal::dirs()->findResource("appdata", "library/"); - QDir dir(studioDir); + TQString studioDir = KGlobal::dirs()->findResource("appdata", "library/"); + TQDir dir(studioDir); if (!dir.exists()) { studioDir = ":ROSEGARDENDEVICE"; } else { @@ -7805,7 +7805,7 @@ RosegardenGUIApp::slotImportStudio() if (url.isEmpty()) return ; - QString target; + TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1") .arg(url.prettyURL())); @@ -7816,7 +7816,7 @@ RosegardenGUIApp::slotImportStudio() } void -RosegardenGUIApp::slotImportStudioFromFile(const QString &file) +RosegardenGUIApp::slotImportStudioFromFile(const TQString &file) { RosegardenGUIDoc *doc = new RosegardenGUIDoc(this, 0, true); // skipAutoload @@ -7921,7 +7921,7 @@ RosegardenGUIApp::slotModifyMIDIFilters() MidiFilterDialog dialog(this, m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotModifyMIDIFilters - accepted" << endl; } } @@ -7933,7 +7933,7 @@ RosegardenGUIApp::slotManageMetronome() ManageMetronomeDialog dialog(this, m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotManageMetronome - accepted" << endl; } } @@ -7977,9 +7977,9 @@ RosegardenGUIApp::slotShowTip() KTipDialog::showTip(this, locate("data", "rosegarden/tips"), true); } -void RosegardenGUIApp::slotShowToolHelp(const QString &s) +void RosegardenGUIApp::slotShowToolHelp(const TQString &s) { - QString msg = s; + TQString msg = s; if (msg != "") msg = " " + msg; slotStatusMsg(msg); } @@ -8012,12 +8012,12 @@ RosegardenGUIApp::awaitDialogClearance() while (haveDialog) { - const QObjectList *c = children(); + const TQObjectList *c = children(); if (!c) return; haveDialog = false; - for (QObjectList::const_iterator i = c->begin(); i != c->end(); ++i) { - QDialog *dialog = dynamic_cast<QDialog *>(*i); + for (TQObjectList::const_iterator i = c->begin(); i != c->end(); ++i) { + TQDialog *dialog = dynamic_cast<TQDialog *>(*i); if (dialog && dialog->isVisible()) { haveDialog = true; break; @@ -8034,7 +8034,7 @@ RosegardenGUIApp::awaitDialogClearance() } void -RosegardenGUIApp::slotNewerVersionAvailable(QString v) +RosegardenGUIApp::slotNewerVersionAvailable(TQString v) { if (m_firstRun) return; KStartupLogo::hideIfStillThere(); @@ -8044,7 +8044,7 @@ RosegardenGUIApp::slotNewerVersionAvailable(QString v) (this, i18n("<h3>Newer version available</h3><p>A newer version of Rosegarden may be available.<br>Please consult the <a href=\"http://www.rosegardenmusic.com/getting/\">Rosegarden website</a> for more information.</p>"), i18n("Newer version available"), - QString("version-%1-available-show").arg(v), + TQString("version-%1-available-show").arg(v), KMessageBox::AllowLink); CurrentProgressDialog::thaw(); } diff --git a/src/gui/application/RosegardenGUIApp.cpp.orig b/src/gui/application/RosegardenGUIApp.cpp.orig index fa98530..889f4f7 100644 --- a/src/gui/application/RosegardenGUIApp.cpp.orig +++ b/src/gui/application/RosegardenGUIApp.cpp.orig @@ -199,31 +199,31 @@ #include <ktoolbar.h> #include <kurl.h> #include <kxmlguiclient.h> -#include <qaccel.h> -#include <qcanvas.h> -#include <qcstring.h> -#include <qcursor.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qdir.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qiconset.h> -#include <qinputdialog.h> -#include <qlabel.h> -#include <qobject.h> -#include <qobjectlist.h> -#include <qpixmap.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qslider.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtextcodec.h> -#include <qtimer.h> -#include <qvaluevector.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcanvas.h> +#include <tqcstring.h> +#include <tqcursor.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqiconset.h> +#include <tqinputdialog.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtextcodec.h> +#include <tqtimer.h> +#include <tqvaluevector.h> +#include <tqwidget.h> #ifdef HAVE_LIBJACK #include <jack/jack.h> @@ -235,7 +235,7 @@ namespace Rosegarden RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, bool useExistingSequencer, - QObject *startupStatusMessageReceiver) + TQObject *startupStatusMessageReceiver) : DCOPObject("RosegardenIface"), RosegardenIface(this), KDockMainWindow(0), m_actionsSetup(false), m_fileRecent(0), @@ -258,7 +258,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_storedLoopEnd(0), m_useSequencer(useSequencer), m_dockVisible(true), - m_autoSaveTimer(new QTimer(this)), + m_autoSaveTimer(new TQTimer(this)), m_clipboard(new Clipboard), m_playList(0), m_deviceManager(0), @@ -272,8 +272,8 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, #ifdef HAVE_LIBLO m_pluginGUIManager(new AudioPluginOSCGUIManager(this)), #endif - m_playTimer(new QTimer(this)), - m_stopTimer(new QTimer(this)), + m_playTimer(new TQTimer(this)), + m_stopTimer(new TQTimer(this)), m_startupTester(0), #ifdef HAVE_LIRC m_lircClient(0), @@ -287,9 +287,9 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, if (startupStatusMessageReceiver) { - QObject::connect(this, SIGNAL(startupStatusMessage(QString)), + TQObject::connect(this, TQT_SIGNAL(startupStatusMessage(TQString)), startupStatusMessageReceiver, - SLOT(slotShowStatusMessage(QString))); + TQT_SLOT(slotShowStatusMessage(TQString))); } // Try to start the sequencer @@ -341,7 +341,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, iFaceDelayedInit(this); initZoomToolbar(); - QPixmap dummyPixmap; // any icon will do + TQPixmap dummyPixmap; // any icon will do m_mainDockWidget = createDockWidget("Rosegarden MainDockWidget", dummyPixmap, 0L, "main_dock_widget"); // allow others to dock to the left and right sides only m_mainDockWidget->setDockSite(KDockWidget::DockLeft | KDockWidget::DockRight); @@ -356,14 +356,14 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, KDockWidget::DockLeft, // dock site 20); // relation target/this (in percent) - connect(m_dockLeft, SIGNAL(iMBeingClosed()), - this, SLOT(slotParametersClosed())); - connect(m_dockLeft, SIGNAL(hasUndocked()), - this, SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), + this, TQT_SLOT(slotParametersClosed())); // Apparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. - connect(m_mainDockWidget, SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), + this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); stateChanged("parametersbox_closed", KXMLGUIClient::StateReverse); @@ -393,35 +393,35 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_dockLeft->update(); connect(m_instrumentParameterBox, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), this, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_instrumentParameterBox, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); // relay this through our own signal so that others can use it too connect(m_instrumentParameterBox, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_instrumentParameterBox, - SLOT(slotInstrumentParametersChanged(InstrumentId))); + TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_instrumentParameterBox, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(this, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_instrumentParameterBox, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); // Load the initial document (this includes doc's own autoload) // @@ -441,8 +441,8 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, } if (m_view) { - connect(m_seqManager, SIGNAL(controllerDeviceEventReceived(MappedEvent *)), - m_view, SLOT(slotControllerDeviceEventReceived(MappedEvent *))); + connect(m_seqManager, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *)), + m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) { @@ -496,7 +496,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, stateChanged("have_project_packager", KXMLGUIClient::StateReverse); stateChanged("have_lilypondview", KXMLGUIClient::StateReverse); - QTimer::singleShot(1000, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(1000, this, TQT_SLOT(slotTestStartupTester())); } RosegardenGUIApp::~RosegardenGUIApp() @@ -541,101 +541,101 @@ void RosegardenGUIApp::setupActions() { // setup File menu // New Window ? - KStdAction::openNew (this, SLOT(slotFileNew()), actionCollection()); - KStdAction::open (this, SLOT(slotFileOpen()), actionCollection()); + KStdAction::openNew (this, TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open (this, TQT_SLOT(slotFileOpen()), actionCollection()); m_fileRecent = KStdAction::openRecent(this, - SLOT(slotFileOpenRecent(const KURL&)), + TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - KStdAction::save (this, SLOT(slotFileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::revert(this, SLOT(slotRevertToSaved()), actionCollection()); - KStdAction::close (this, SLOT(slotFileClose()), actionCollection()); - KStdAction::print (this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview (this, SLOT(slotFilePrintPreview()), actionCollection()); + KStdAction::save (this, TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::revert(this, TQT_SLOT(slotRevertToSaved()), actionCollection()); + KStdAction::close (this, TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::print (this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview (this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); new KAction(i18n("Import Rosegarden &Project file..."), 0, 0, this, - SLOT(slotImportProject()), actionCollection(), + TQT_SLOT(slotImportProject()), actionCollection(), "file_import_project"); new KAction(i18n("Import &MIDI file..."), 0, 0, this, - SLOT(slotImportMIDI()), actionCollection(), + TQT_SLOT(slotImportMIDI()), actionCollection(), "file_import_midi"); new KAction(i18n("Import &Rosegarden 2.1 file..."), 0, 0, this, - SLOT(slotImportRG21()), actionCollection(), + TQT_SLOT(slotImportRG21()), actionCollection(), "file_import_rg21"); new KAction(i18n("Import &Hydrogen file..."), 0, 0, this, - SLOT(slotImportHydrogen()), actionCollection(), + TQT_SLOT(slotImportHydrogen()), actionCollection(), "file_import_hydrogen"); new KAction(i18n("Merge &File..."), 0, 0, this, - SLOT(slotMerge()), actionCollection(), + TQT_SLOT(slotMerge()), actionCollection(), "file_merge"); new KAction(i18n("Merge &MIDI file..."), 0, 0, this, - SLOT(slotMergeMIDI()), actionCollection(), + TQT_SLOT(slotMergeMIDI()), actionCollection(), "file_merge_midi"); new KAction(i18n("Merge &Rosegarden 2.1 file..."), 0, 0, this, - SLOT(slotMergeRG21()), actionCollection(), + TQT_SLOT(slotMergeRG21()), actionCollection(), "file_merge_rg21"); new KAction(i18n("Merge &Hydrogen file..."), 0, 0, this, - SLOT(slotMergeHydrogen()), actionCollection(), + TQT_SLOT(slotMergeHydrogen()), actionCollection(), "file_merge_hydrogen"); new KAction(i18n("Export Rosegarden &Project file..."), 0, 0, this, - SLOT(slotExportProject()), actionCollection(), + TQT_SLOT(slotExportProject()), actionCollection(), "file_export_project"); new KAction(i18n("Export &MIDI file..."), 0, 0, this, - SLOT(slotExportMIDI()), actionCollection(), + TQT_SLOT(slotExportMIDI()), actionCollection(), "file_export_midi"); new KAction(i18n("Export &LilyPond file..."), 0, 0, this, - SLOT(slotExportLilyPond()), actionCollection(), + TQT_SLOT(slotExportLilyPond()), actionCollection(), "file_export_lilypond"); new KAction(i18n("Export Music&XML file..."), 0, 0, this, - SLOT(slotExportMusicXml()), actionCollection(), + TQT_SLOT(slotExportMusicXml()), actionCollection(), "file_export_musicxml"); new KAction(i18n("Export &Csound score file..."), 0, 0, this, - SLOT(slotExportCsound()), actionCollection(), + TQT_SLOT(slotExportCsound()), actionCollection(), "file_export_csound"); new KAction(i18n("Export M&up file..."), 0, 0, this, - SLOT(slotExportMup()), actionCollection(), + TQT_SLOT(slotExportMup()), actionCollection(), "file_export_mup"); new KAction(i18n("Print &with LilyPond..."), 0, 0, this, - SLOT(slotPrintLilyPond()), actionCollection(), + TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, - SLOT(slotPreviewLilyPond()), actionCollection(), + TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); new KAction(i18n("Play&list"), 0, 0, this, - SLOT(slotPlayList()), actionCollection(), + TQT_SLOT(slotPlayList()), actionCollection(), "file_show_playlist"); - KStdAction::quit (this, SLOT(slotQuit()), actionCollection()); + KStdAction::quit (this, TQT_SLOT(slotQuit()), actionCollection()); // help menu new KAction(i18n("Rosegarden &Tutorial"), 0, 0, this, - SLOT(slotTutorial()), actionCollection(), + TQT_SLOT(slotTutorial()), actionCollection(), "tutorial"); new KAction(i18n("&Bug Reporting Guidelines"), 0, 0, this, - SLOT(slotBugGuidelines()), actionCollection(), + TQT_SLOT(slotBugGuidelines()), actionCollection(), "guidelines"); // setup edit menu - KStdAction::cut (this, SLOT(slotEditCut()), actionCollection()); - KStdAction::copy (this, SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, SLOT(slotEditPaste()), actionCollection()); + KStdAction::cut (this, TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); // // undo/redo actions are special in that they are connected to @@ -659,202 +659,202 @@ void RosegardenGUIApp::setupActions() // setup Settings menu // - m_viewToolBar = KStdAction::showToolbar (this, SLOT(slotToggleToolBar()), actionCollection(), + m_viewToolBar = KStdAction::showToolbar (this, TQT_SLOT(slotToggleToolBar()), actionCollection(), "show_stock_toolbar"); m_viewToolsToolBar = new KToggleAction(i18n("Show T&ools Toolbar"), 0, this, - SLOT(slotToggleToolsToolBar()), actionCollection(), + TQT_SLOT(slotToggleToolsToolBar()), actionCollection(), "show_tools_toolbar"); m_viewTracksToolBar = new KToggleAction(i18n("Show Trac&ks Toolbar"), 0, this, - SLOT(slotToggleTracksToolBar()), actionCollection(), + TQT_SLOT(slotToggleTracksToolBar()), actionCollection(), "show_tracks_toolbar"); m_viewEditorsToolBar = new KToggleAction(i18n("Show &Editors Toolbar"), 0, this, - SLOT(slotToggleEditorsToolBar()), actionCollection(), + TQT_SLOT(slotToggleEditorsToolBar()), actionCollection(), "show_editors_toolbar"); m_viewTransportToolBar = new KToggleAction(i18n("Show Trans&port Toolbar"), 0, this, - SLOT(slotToggleTransportToolBar()), actionCollection(), + TQT_SLOT(slotToggleTransportToolBar()), actionCollection(), "show_transport_toolbar"); m_viewZoomToolBar = new KToggleAction(i18n("Show &Zoom Toolbar"), 0, this, - SLOT(slotToggleZoomToolBar()), actionCollection(), + TQT_SLOT(slotToggleZoomToolBar()), actionCollection(), "show_zoom_toolbar"); - m_viewStatusBar = KStdAction::showStatusbar(this, SLOT(slotToggleStatusBar()), + m_viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), actionCollection(), "show_status_bar"); m_viewTransport = new KToggleAction(i18n("Show Tra&nsport"), Key_T, this, - SLOT(slotToggleTransport()), + TQT_SLOT(slotToggleTransport()), actionCollection(), "show_transport"); m_viewTrackLabels = new KToggleAction(i18n("Show Track &Labels"), 0, this, - SLOT(slotToggleTrackLabels()), + TQT_SLOT(slotToggleTrackLabels()), actionCollection(), "show_tracklabels"); m_viewRulers = new KToggleAction(i18n("Show Playback Position R&uler"), 0, this, - SLOT(slotToggleRulers()), + TQT_SLOT(slotToggleRulers()), actionCollection(), "show_rulers"); m_viewTempoRuler = new KToggleAction(i18n("Show Te&mpo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); m_viewChordNameRuler = new KToggleAction(i18n("Show Cho&rd Name Ruler"), 0, this, - SLOT(slotToggleChordNameRuler()), + TQT_SLOT(slotToggleChordNameRuler()), actionCollection(), "show_chord_name_ruler"); m_viewPreviews = new KToggleAction(i18n("Show Segment Pre&views"), 0, this, - SLOT(slotTogglePreviews()), + TQT_SLOT(slotTogglePreviews()), actionCollection(), "show_previews"); new KAction(i18n("Show Special &Parameters"), Key_P, this, - SLOT(slotDockParametersBack()), + TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_segment_parameters"); - KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() ); + KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() ); // Standard Actions // KStdAction::saveOptions(this, - SLOT(slotSaveOptions()), + TQT_SLOT(slotSaveOptions()), actionCollection()); KStdAction::preferences(this, - SLOT(slotConfigure()), + TQT_SLOT(slotConfigure()), actionCollection()); KStdAction::keyBindings(this, - SLOT(slotEditKeys()), + TQT_SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, - SLOT(slotEditToolbars()), + TQT_SLOT(slotEditToolbars()), actionCollection()); KRadioAction *action = 0; // Create the select icon // - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); // TODO : add some shortcuts here action = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotPointerSelected()), + this, TQT_SLOT(slotPointerSelected()), actionCollection(), "select"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, SLOT(slotDrawSelected()), + this, TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, SLOT(slotMoveSelected()), + this, TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Resize"), icon, Key_F6, - this, SLOT(slotResizeSelected()), + this, TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/split.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Split"), icon, Key_F7, - this, SLOT(slotSplitSelected()), + this, TQT_SLOT(slotSplitSelected()), actionCollection(), "split"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/join.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Join"), icon, 0, - this, SLOT(slotJoinSelected()), + this, TQT_SLOT(slotJoinSelected()), actionCollection(), "join"); action->setExclusiveGroup("segmenttools"); new KAction(i18n("&Harmonize"), 0, this, - SLOT(slotHarmonizeSelection()), actionCollection(), + TQT_SLOT(slotHarmonizeSelection()), actionCollection(), "harmonize_selection"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, - this, SLOT(slotEditTimeSignature()), + this, TQT_SLOT(slotEditTimeSignature()), actionCollection(), "add_time_signature"); new KAction(i18n("Open Tempo and Time Signature Editor"), 0, this, - SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); + TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); // // Edit menu // new KAction(i18n("Cut Range"), Key_X + CTRL + SHIFT, this, - SLOT(slotCutRange()), actionCollection(), + TQT_SLOT(slotCutRange()), actionCollection(), "cut_range"); new KAction(i18n("Copy Range"), Key_C + CTRL + SHIFT, this, - SLOT(slotCopyRange()), actionCollection(), + TQT_SLOT(slotCopyRange()), actionCollection(), "copy_range"); new KAction(i18n("Paste Range"), Key_V + CTRL + SHIFT, this, - SLOT(slotPasteRange()), actionCollection(), + TQT_SLOT(slotPasteRange()), actionCollection(), "paste_range"); /* new KAction(i18n("Delete Range"), Key_Delete + SHIFT, this, - SLOT(slotDeleteRange()), actionCollection(), + TQT_SLOT(slotDeleteRange()), actionCollection(), "delete_range"); */ new KAction(i18n("Insert Range..."), Key_Insert + SHIFT, this, - SLOT(slotInsertRange()), actionCollection(), + TQT_SLOT(slotInsertRange()), actionCollection(), "insert_range"); new KAction(i18n("De&lete"), Key_Delete, this, - SLOT(slotDeleteSelectedSegments()), actionCollection(), + TQT_SLOT(slotDeleteSelectedSegments()), actionCollection(), "delete"); new KAction(i18n("Select &All Segments"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); pixmap.load(pixmapDir + "/toolbar/event-insert-tempo.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, - this, SLOT(slotEditTempo()), + this, TQT_SLOT(slotEditTempo()), actionCollection(), "add_tempo"); new KAction(ChangeCompositionLengthCommand::getGlobalName(), 0, - this, SLOT(slotChangeCompositionLength()), + this, TQT_SLOT(slotChangeCompositionLength()), actionCollection(), "change_composition_length"); new KAction(i18n("Edit Mar&kers..."), Key_K + CTRL, this, - SLOT(slotEditMarkers()), + TQT_SLOT(slotEditMarkers()), actionCollection(), "edit_markers"); new KAction(i18n("Edit Document P&roperties..."), 0, this, - SLOT(slotEditDocumentProperties()), + TQT_SLOT(slotEditDocumentProperties()), actionCollection(), "edit_doc_properties"); @@ -862,267 +862,267 @@ void RosegardenGUIApp::setupActions() // Segments menu // new KAction(i18n("Open in &Default Editor"), Key_Return, this, - SLOT(slotEdit()), actionCollection(), + TQT_SLOT(slotEdit()), actionCollection(), "edit_default"); pixmap.load(pixmapDir + "/toolbar/matrix.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in Matri&x Editor"), icon, Key_M, this, - SLOT(slotEditInMatrix()), actionCollection(), + TQT_SLOT(slotEditInMatrix()), actionCollection(), "edit_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Percussion Matrix Editor"), icon, Key_D, this, - SLOT(slotEditInPercussionMatrix()), actionCollection(), + TQT_SLOT(slotEditInPercussionMatrix()), actionCollection(), "edit_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Notation Editor"), icon, Key_N, this, - SLOT(slotEditAsNotation()), actionCollection(), + TQT_SLOT(slotEditAsNotation()), actionCollection(), "edit_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Event List Editor"), icon, Key_E, this, - SLOT(slotEditInEventList()), actionCollection(), + TQT_SLOT(slotEditInEventList()), actionCollection(), "edit_event_list"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Quantize..."), icon, Key_Equal, this, - SLOT(slotQuantizeSelection()), actionCollection(), + TQT_SLOT(slotQuantizeSelection()), actionCollection(), "quantize_selection"); new KAction(SegmentLabelCommand::getGlobalName(), 0, - this, SLOT(slotRelabelSegments()), + this, TQT_SLOT(slotRelabelSegments()), actionCollection(), "relabel_segment"); new KAction(SegmentTransposeCommand::getGlobalName(), 0, - this, SLOT(slotTransposeSegments()), + this, TQT_SLOT(slotTransposeSegments()), actionCollection(), "transpose"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, - SLOT(slotRepeatQuantizeSelection()), actionCollection(), + TQT_SLOT(slotRepeatQuantizeSelection()), actionCollection(), "repeat_quantize"); new KAction(SegmentRescaleCommand::getGlobalName(), 0, this, - SLOT(slotRescaleSelection()), actionCollection(), + TQT_SLOT(slotRescaleSelection()), actionCollection(), "rescale"); new KAction(SegmentAutoSplitCommand::getGlobalName(), 0, this, - SLOT(slotAutoSplitSelection()), actionCollection(), + TQT_SLOT(slotAutoSplitSelection()), actionCollection(), "auto_split"); new KAction(SegmentSplitByPitchCommand::getGlobalName(), 0, this, - SLOT(slotSplitSelectionByPitch()), actionCollection(), + TQT_SLOT(slotSplitSelectionByPitch()), actionCollection(), "split_by_pitch"); new KAction(SegmentSplitByRecordingSrcCommand::getGlobalName(), 0, this, - SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), + TQT_SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), "split_by_recording"); new KAction(i18n("Split at Time..."), 0, this, - SLOT(slotSplitSelectionAtTime()), actionCollection(), + TQT_SLOT(slotSplitSelectionAtTime()), actionCollection(), "split_at_time"); new KAction(i18n("Jog &Left"), Key_Left + ALT, this, - SLOT(slotJogLeft()), actionCollection(), + TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); new KAction(i18n("Jog &Right"), Key_Right + ALT, this, - SLOT(slotJogRight()), actionCollection(), + TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); new KAction(i18n("Set Start Time..."), 0, this, - SLOT(slotSetSegmentStartTimes()), actionCollection(), + TQT_SLOT(slotSetSegmentStartTimes()), actionCollection(), "set_segment_start"); new KAction(i18n("Set Duration..."), 0, this, - SLOT(slotSetSegmentDurations()), actionCollection(), + TQT_SLOT(slotSetSegmentDurations()), actionCollection(), "set_segment_duration"); new KAction(SegmentJoinCommand::getGlobalName(), Key_J + CTRL, - this, SLOT(slotJoinSegments()), + this, TQT_SLOT(slotJoinSegments()), actionCollection(), "join_segments"); new KAction(i18n("Turn Re&peats into Copies"), 0, - this, SLOT(slotRepeatingSegments()), + this, TQT_SLOT(slotRepeatingSegments()), actionCollection(), "repeats_to_real_copies"); new KAction(i18n("Manage Tri&ggered Segments"), 0, - this, SLOT(slotManageTriggerSegments()), + this, TQT_SLOT(slotManageTriggerSegments()), actionCollection(), "manage_trigger_segments"); new KAction(i18n("Set Tempos from &Beat Segment"), 0, this, - SLOT(slotGrooveQuantize()), actionCollection(), + TQT_SLOT(slotGrooveQuantize()), actionCollection(), "groove_quantize"); new KAction(i18n("Set &Tempo to Audio Segment Duration"), 0, this, - SLOT(slotTempoToSegmentLength()), actionCollection(), + TQT_SLOT(slotTempoToSegmentLength()), actionCollection(), "set_tempo_to_segment_length"); pixmap.load(pixmapDir + "/toolbar/manage-audio-segments.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage A&udio Files"), icon, Key_U + CTRL, - this, SLOT(slotAudioManager()), + this, TQT_SLOT(slotAudioManager()), actionCollection(), "audio_manager"); m_viewSegmentLabels = new KToggleAction(i18n("Show Segment Labels"), 0, this, - SLOT(slotToggleSegmentLabels()), actionCollection(), + TQT_SLOT(slotToggleSegmentLabels()), actionCollection(), "show_segment_labels"); // // Tracks menu // pixmap.load(pixmapDir + "/toolbar/add_tracks.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Add &Track"), icon, CTRL + Key_T, - this, SLOT(slotAddTrack()), + this, TQT_SLOT(slotAddTrack()), actionCollection(), "add_track"); new KAction(i18n("&Add Tracks..."), 0, - this, SLOT(slotAddTracks()), + this, TQT_SLOT(slotAddTracks()), actionCollection(), "add_tracks"); pixmap.load(pixmapDir + "/toolbar/delete_track.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("D&elete Track"), icon, CTRL + Key_D, - this, SLOT(slotDeleteTrack()), + this, TQT_SLOT(slotDeleteTrack()), actionCollection(), "delete_track"); pixmap.load(pixmapDir + "/toolbar/move_track_down.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Down"), icon, SHIFT + Key_Down, - this, SLOT(slotMoveTrackDown()), + this, TQT_SLOT(slotMoveTrackDown()), actionCollection(), "move_track_down"); pixmap.load(pixmapDir + "/toolbar/move_track_up.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Up"), icon, SHIFT + Key_Up, - this, SLOT(slotMoveTrackUp()), + this, TQT_SLOT(slotMoveTrackUp()), actionCollection(), "move_track_up"); new KAction(i18n("Select &Next Track"), Key_Down, - this, SLOT(slotTrackDown()), + this, TQT_SLOT(slotTrackDown()), actionCollection(), "select_next_track"); new KAction(i18n("Select &Previous Track"), Key_Up, - this, SLOT(slotTrackUp()), + this, TQT_SLOT(slotTrackUp()), actionCollection(), "select_previous_track"); new KAction(i18n("Mute or Unmute Track"), Key_U, - this, SLOT(slotToggleMutedCurrentTrack()), + this, TQT_SLOT(slotToggleMutedCurrentTrack()), actionCollection(), "toggle_mute_track"); new KAction(i18n("Arm or Un-arm Track for Record"), Key_R, - this, SLOT(slotToggleRecordCurrentTrack()), + this, TQT_SLOT(slotToggleRecordCurrentTrack()), actionCollection(), "toggle_arm_track"); pixmap.load(pixmapDir + "/toolbar/mute-all.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Mute all Tracks"), icon, 0, - this, SLOT(slotMuteAllTracks()), + this, TQT_SLOT(slotMuteAllTracks()), actionCollection(), "mute_all_tracks"); pixmap.load(pixmapDir + "/toolbar/un-mute-all.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Unmute all Tracks"), icon, 0, - this, SLOT(slotUnmuteAllTracks()), + this, TQT_SLOT(slotUnmuteAllTracks()), actionCollection(), "unmute_all_tracks"); new KAction(i18n("&Remap Instruments..."), 0, this, - SLOT(slotRemapInstruments()), + TQT_SLOT(slotRemapInstruments()), actionCollection(), "remap_instruments"); // // Studio menu // pixmap.load(pixmapDir + "/toolbar/mixer.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Audio Mixer"), icon, 0, this, - SLOT(slotOpenAudioMixer()), + TQT_SLOT(slotOpenAudioMixer()), actionCollection(), "audio_mixer"); pixmap.load(pixmapDir + "/toolbar/midimixer.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Midi Mi&xer"), icon, 0, this, - SLOT(slotOpenMidiMixer()), + TQT_SLOT(slotOpenMidiMixer()), actionCollection(), "midi_mixer"); pixmap.load(pixmapDir + "/toolbar/manage-midi-devices.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage MIDI &Devices"), icon, 0, this, - SLOT(slotManageMIDIDevices()), + TQT_SLOT(slotManageMIDIDevices()), actionCollection(), "manage_devices"); pixmap.load(pixmapDir + "/toolbar/manage-synth-plugins.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage S&ynth Plugins"), icon, 0, this, - SLOT(slotManageSynths()), + TQT_SLOT(slotManageSynths()), actionCollection(), "manage_synths"); new KAction(i18n("Modify MIDI &Filters"), "filter", 0, this, - SLOT(slotModifyMIDIFilters()), + TQT_SLOT(slotModifyMIDIFilters()), actionCollection(), "modify_midi_filters"); m_enableMIDIrouting = new KToggleAction(i18n("MIDI Thru Routing"), 0, this, - SLOT(slotEnableMIDIThruRouting()), + TQT_SLOT(slotEnableMIDIThruRouting()), actionCollection(), "enable_midi_routing"); pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Manage &Metronome"), 0, this, - SLOT(slotManageMetronome()), + TQT_SLOT(slotManageMetronome()), actionCollection(), "manage_metronome"); new KAction(i18n("&Save Current Document as Default Studio"), 0, this, - SLOT(slotSaveDefaultStudio()), + TQT_SLOT(slotSaveDefaultStudio()), actionCollection(), "save_default_studio"); new KAction(i18n("&Import Default Studio"), 0, this, - SLOT(slotImportDefaultStudio()), + TQT_SLOT(slotImportDefaultStudio()), actionCollection(), "load_default_studio"); new KAction(i18n("Im&port Studio from File..."), 0, this, - SLOT(slotImportStudio()), + TQT_SLOT(slotImportStudio()), actionCollection(), "load_studio"); new KAction(i18n("&Reset MIDI Network"), 0, this, - SLOT(slotResetMidiNetwork()), + TQT_SLOT(slotResetMidiNetwork()), actionCollection(), "reset_midi_network"); m_setQuickMarkerAction = new KAction(i18n("Set Quick Marker at Playback Position"), 0, CTRL + Key_1, this, - SLOT(slotSetQuickMarker()), actionCollection(), + TQT_SLOT(slotSetQuickMarker()), actionCollection(), "set_quick_marker"); m_jumpToQuickMarkerAction = new KAction(i18n("Jump to Quick Marker"), 0, Key_1, this, - SLOT(slotJumpToQuickMarker()), actionCollection(), + TQT_SLOT(slotJumpToQuickMarker()), actionCollection(), "jump_to_quick_marker"); // // Marker Ruler popup menu // // new KAction(i18n("Insert Marker"), 0, 0, this, -// SLOT(slotInsertMarkerHere()), actionCollection(), +// TQT_SLOT(slotInsertMarkerHere()), actionCollection(), // "insert_marker_here"); // // new KAction(i18n("Insert Marker at Playback Position"), 0, 0, this, -// SLOT(slotInsertMarkerAtPointer()), actionCollection(), +// TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), // "insert_marker_at_pointer"); // // new KAction(i18n("Delete Marker"), 0, 0, this, -// SLOT(slotDeleteMarker()), actionCollection(), +// TQT_SLOT(slotDeleteMarker()), actionCollection(), // "delete_marker"); @@ -1138,9 +1138,9 @@ void RosegardenGUIApp::setupActions() // 0 (insert) and keypad Enter for Play and Stop // pixmap.load(pixmapDir + "/toolbar/transport-play.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_playTransport = new KAction(i18n("&Play"), icon, Key_Enter, this, - SLOT(slotPlay()), actionCollection(), + TQT_SLOT(slotPlay()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = m_playTransport->shortcut(); @@ -1149,69 +1149,69 @@ void RosegardenGUIApp::setupActions() m_playTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-stop.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_stopTransport = new KAction(i18n("&Stop"), icon, Key_Insert, this, - SLOT(slotStop()), actionCollection(), + TQT_SLOT(slotStop()), actionCollection(), "stop"); m_stopTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-ffwd.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_ffwdTransport = new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SLOT(slotFastforward()), actionCollection(), + TQT_SLOT(slotFastforward()), actionCollection(), "fast_forward"); m_ffwdTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_rewindTransport = new KAction(i18n("Re&wind"), icon, Key_End, this, - SLOT(slotRewind()), actionCollection(), + TQT_SLOT(slotRewind()), actionCollection(), "rewind"); m_rewindTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_recordTransport = new KAction(i18n("P&unch in Record"), icon, Key_Space, this, - SLOT(slotToggleRecord()), actionCollection(), + TQT_SLOT(slotToggleRecord()), actionCollection(), "recordtoggle"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_recordTransport = new KAction(i18n("&Record"), icon, 0, this, - SLOT(slotRecord()), actionCollection(), + TQT_SLOT(slotRecord()), actionCollection(), "record"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind-end.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_rewindEndTransport = new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SLOT(slotRewindToBeginning()), actionCollection(), + TQT_SLOT(slotRewindToBeginning()), actionCollection(), "rewindtobeginning"); m_rewindEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-ffwd-end.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); m_ffwdEndTransport = new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SLOT(slotFastForwardToEnd()), actionCollection(), + TQT_SLOT(slotFastForwardToEnd()), actionCollection(), "fastforwardtoend"); m_ffwdEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-tracking.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(true); pixmap.load(pixmapDir + "/toolbar/transport-panic.png"); - icon = QIconSet(pixmap); - new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, this, SLOT(slotPanic()), + icon = TQIconSet(pixmap); + new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, this, TQT_SLOT(slotPanic()), actionCollection(), "panic"); // DEBUG FACILITY new KAction(i18n("Segment Debug Dump "), 0, this, - SLOT(slotDebugDump()), actionCollection(), + TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump_segments"); // create main gui @@ -1224,11 +1224,11 @@ void RosegardenGUIApp::setupActions() // //toolBar("Transport Toolbar")->hide(); - QPopupMenu* setTrackInstrumentMenu = dynamic_cast<QPopupMenu*>(factory()->container("set_track_instrument", this)); + TQPopupMenu* setTrackInstrumentMenu = dynamic_cast<TQPopupMenu*>(factory()->container("set_track_instrument", this)); if (setTrackInstrumentMenu) { - connect(setTrackInstrumentMenu, SIGNAL(aboutToShow()), - this, SLOT(slotPopulateTrackInstrumentPopup())); + connect(setTrackInstrumentMenu, TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotPopulateTrackInstrumentPopup())); } else { RG_DEBUG << "RosegardenGUIApp::setupActions() : couldn't find set_track_instrument menu - check rosegardenui.rcn\n"; } @@ -1238,21 +1238,21 @@ void RosegardenGUIApp::setupActions() void RosegardenGUIApp::setRewFFwdToAutoRepeat() { - QWidget* transportToolbar = factory()->container("Transport Toolbar", this); + TQWidget* transportToolbar = factory()->container("Transport Toolbar", this); if (transportToolbar) { - QObjectList *l = transportToolbar->queryList(); - QObjectListIt it(*l); // iterate over the buttons - QObject *obj; + TQObjectList *l = transportToolbar->queryList(); + TQObjectListIt it(*l); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... ++it; // RG_DEBUG << "obj name : " << obj->name() << endl; - QString objName = obj->name(); + TQString objName = obj->name(); if (objName.endsWith("rewind") || objName.endsWith("fast_forward")) { - QButton* btn = dynamic_cast<QButton*>(obj); + TQButton* btn = dynamic_cast<TQButton*>(obj); if (!btn) { RG_DEBUG << "Very strange - found widgets in transport_toolbar which aren't buttons\n"; @@ -1280,7 +1280,7 @@ void RosegardenGUIApp::initZoomToolbar() return ; } - new QLabel(i18n(" Zoom: "), zoomToolbar, "kde toolbar widget"); + new TQLabel(i18n(" Zoom: "), zoomToolbar, "kde toolbar widget"); std::vector<double> zoomSizes; // in units-per-pixel double defaultBarWidth44 = 100.0; @@ -1293,18 +1293,18 @@ void RosegardenGUIApp::initZoomToolbar() } // zoom labels - QString minZoom = QString("%1%").arg(factors[0] * 100.0); - QString maxZoom = QString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); + TQString minZoom = TQString("%1%").arg(factors[0] * 100.0); + TQString maxZoom = TQString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); m_zoomSlider = new ZoomSlider<double> - (zoomSizes, -1, QSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); m_zoomSlider->setTracking(true); - m_zoomSlider->setFocusPolicy(QWidget::NoFocus); - m_zoomLabel = new QLabel(minZoom, zoomToolbar, "kde toolbar widget"); + m_zoomSlider->setFocusPolicy(TQWidget::NoFocus); + m_zoomLabel = new TQLabel(minZoom, zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); - connect(m_zoomSlider, SIGNAL(valueChanged(int)), - this, SLOT(slotChangeZoom(int))); + connect(m_zoomSlider, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotChangeZoom(int))); // set initial zoom - we might want to make this a config option // m_zoomSlider->setToDefault(); @@ -1353,18 +1353,18 @@ void RosegardenGUIApp::initView() // Connect up this signal so that we can force tool mode // changes from the view - connect(m_swapView, SIGNAL(activateTool(QString)), - this, SLOT(slotActivateTool(QString))); + connect(m_swapView, TQT_SIGNAL(activateTool(TQString)), + this, TQT_SLOT(slotActivateTool(TQString))); connect(m_swapView, - SIGNAL(segmentsSelected(const SegmentSelection &)), - SIGNAL(segmentsSelected(const SegmentSelection &))); + TQT_SIGNAL(segmentsSelected(const SegmentSelection &)), + TQT_SIGNAL(segmentsSelected(const SegmentSelection &))); connect(m_swapView, - SIGNAL(addAudioFile(AudioFileId)), - SLOT(slotAddAudioFile(AudioFileId))); + TQT_SIGNAL(addAudioFile(AudioFileId)), + TQT_SLOT(slotAddAudioFile(AudioFileId))); - connect(m_swapView, SIGNAL(toggleSolo(bool)), SLOT(slotToggleSolo(bool))); + connect(m_swapView, TQT_SIGNAL(toggleSolo(bool)), TQT_SLOT(slotToggleSolo(bool))); m_doc->attachView(m_swapView); @@ -1414,11 +1414,11 @@ void RosegardenGUIApp::initView() RosegardenGUIView *oldView = m_view; m_view = m_swapView; - connect(m_view, SIGNAL(stateChange(QString, bool)), - this, SLOT (slotStateChanged(QString, bool))); + connect(m_view, TQT_SIGNAL(stateChange(TQString, bool)), + this, TQT_SLOT (slotStateChanged(TQString, bool))); - connect(m_view, SIGNAL(instrumentParametersChanged(InstrumentId)), - this, SIGNAL(instrumentParametersChanged(InstrumentId))); + connect(m_view, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + this, TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); // We only check for the SequenceManager to make sure // we're not on the first pass though - we don't want @@ -1440,15 +1440,15 @@ void RosegardenGUIApp::initView() if (isUsingSequencer()) m_seqManager->setLoop(0, 0); stateChanged("have_range", KXMLGUIClient::StateReverse); - } catch (QString s) { + } catch (TQString s) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); KMessageBox::error(this, s); CurrentProgressDialog::thaw(); } - connect(m_seqManager, SIGNAL(controllerDeviceEventReceived(MappedEvent *)), - m_view, SLOT(slotControllerDeviceEventReceived(MappedEvent *))); + connect(m_seqManager, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *)), + m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } // delete m_playList; @@ -1490,9 +1490,9 @@ void RosegardenGUIApp::initView() m_view->show(); connect(m_view->getTrackEditor()->getSegmentCanvas(), - SIGNAL(showContextHelp(const QString &)), + TQT_SIGNAL(showContextHelp(const TQString &)), this, - SLOT(slotShowToolHelp(const QString &))); + TQT_SLOT(slotShowToolHelp(const TQString &))); // We have to do this to make sure that the 2nd call ("select") // actually has any effect. Activating the same radio action @@ -1542,7 +1542,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) // Caption // - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + newDocument->getTitle()); // // reset AudioManagerDialog @@ -1590,45 +1590,45 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) // connect needed signals // - connect(m_segmentParameterBox, SIGNAL(documentModified()), - m_doc, SLOT(slotDocumentModified())); + connect(m_segmentParameterBox, TQT_SIGNAL(documentModified()), + m_doc, TQT_SLOT(slotDocumentModified())); - connect(m_doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); - connect(m_doc, SIGNAL(documentModified(bool)), - this, SLOT(slotDocumentModified(bool))); + connect(m_doc, TQT_SIGNAL(documentModified(bool)), + this, TQT_SLOT(slotDocumentModified(bool))); - connect(m_doc, SIGNAL(loopChanged(timeT, timeT)), - this, SLOT(slotSetLoop(timeT, timeT))); + connect(m_doc, TQT_SIGNAL(loopChanged(timeT, timeT)), + this, TQT_SLOT(slotSetLoop(timeT, timeT))); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - SLOT(update())); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - SLOT(slotTestClipboard())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + TQT_SLOT(update())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + TQT_SLOT(slotTestClipboard())); // connect and start the autosave timer - connect(m_autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave())); + connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoSave())); m_autoSaveTimer->start(m_doc->getAutoSavePeriod() * 1000); // Connect the playback timer // - connect(m_playTimer, SIGNAL(timeout()), this, SLOT(slotUpdatePlaybackPosition())); - connect(m_stopTimer, SIGNAL(timeout()), this, SLOT(slotUpdateMonitoring())); + connect(m_playTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdatePlaybackPosition())); + connect(m_stopTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateMonitoring())); // finally recreate the main view // initView(); if (getView() && getView()->getTrackEditor()) { - connect(m_doc, SIGNAL(makeTrackVisible(int)), - getView()->getTrackEditor(), SLOT(slotScrollToTrack(int))); + connect(m_doc, TQT_SIGNAL(makeTrackVisible(int)), + getView()->getTrackEditor(), TQT_SLOT(slotScrollToTrack(int))); } - connect(m_doc, SIGNAL(devicesResyncd()), - this, SLOT(slotDocumentDevicesResyncd())); + connect(m_doc, TQT_SIGNAL(devicesResyncd()), + this, TQT_SLOT(slotDocumentDevicesResyncd())); m_doc->syncDevices(); m_doc->clearModifiedStatus(); @@ -1670,7 +1670,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) } void -RosegardenGUIApp::openFile(QString filePath, ImportType type) +RosegardenGUIApp::openFile(TQString filePath, ImportType type) { RG_DEBUG << "RosegardenGUIApp::openFile " << filePath << endl; @@ -1690,10 +1690,10 @@ RosegardenGUIApp::openFile(QString filePath, ImportType type) kapp->config()->setGroup(GeneralOptionsConfigGroup); if (kapp->config()->readBoolEntry("alwaysusedefaultstudio", false)) { - QString autoloadFile = + TQString autoloadFile = KGlobal::dirs()->findResource("appdata", "autoload.rg"); - QFileInfo autoloadFileInfo(autoloadFile); + TQFileInfo autoloadFileInfo(autoloadFile); if (autoloadFileInfo.isReadable()) { RG_DEBUG << "Importing default studio from " << autoloadFile << endl; @@ -1702,15 +1702,15 @@ RosegardenGUIApp::openFile(QString filePath, ImportType type) } } - QFileInfo fInfo(filePath); + TQFileInfo fInfo(filePath); m_fileRecent->addURL(fInfo.absFilePath()); } } RosegardenGUIDoc* -RosegardenGUIApp::createDocument(QString filePath, ImportType importType) +RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) { - QFileInfo info(filePath); + TQFileInfo info(filePath); RosegardenGUIDoc *doc = 0; if (!info.exists()) { @@ -1726,11 +1726,11 @@ RosegardenGUIApp::createDocument(QString filePath, ImportType importType) return 0; } - QFile file(filePath); + TQFile file(filePath); if (!file.open(IO_ReadOnly)) { KStartupLogo::hideIfStillThere(); - QString errStr = + TQString errStr = i18n("You do not have read permission for \"%1\"").arg(filePath); KMessageBox::sorry(this, errStr); @@ -1777,16 +1777,16 @@ RosegardenGUIApp::createDocument(QString filePath, ImportType importType) } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromRGFile(QString filePath) +RosegardenGUIApp::createDocumentFromRGFile(TQString filePath) { // Check for an autosaved file to recover - QString effectiveFilePath = filePath; + TQString effectiveFilePath = filePath; bool canRecover = false; - QString autoSaveFileName = kapp->checkRecoverFile(filePath, canRecover); + TQString autoSaveFileName = kapp->checkRecoverFile(filePath, canRecover); if (canRecover) { // First check if the auto-save file is more recent than the doc - QFileInfo docFileInfo(filePath), autoSaveFileInfo(autoSaveFileName); + TQFileInfo docFileInfo(filePath), autoSaveFileInfo(autoSaveFileName); if (docFileInfo.lastModified() < autoSaveFileInfo.lastModified()) { @@ -1808,7 +1808,7 @@ RosegardenGUIApp::createDocumentFromRGFile(QString filePath) // user doesn't want the autosave, so delete it // so it won't bother us again if we reload canRecover = false; - QFile::remove + TQFile::remove (autoSaveFileName); } @@ -1830,7 +1830,7 @@ RosegardenGUIApp::createDocumentFromRGFile(QString filePath) // the autosaved doc) // newDoc->slotDocumentModified(); - QFileInfo info(filePath); + TQFileInfo info(filePath); newDoc->setAbsFilePath(info.absFilePath()); newDoc->setTitle(info.fileName()); } else { @@ -1850,8 +1850,8 @@ void RosegardenGUIApp::slotSaveOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(QString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); #endif kapp->config()->setGroup(GeneralOptionsConfigGroup); @@ -1893,13 +1893,13 @@ void RosegardenGUIApp::setupFileDialogSpeedbar() unsigned int n = config->readUnsignedNumEntry("Number of Entries", 0); - config->writeEntry(QString("Description_%1").arg(n), i18n("Example Files")); - config->writeEntry(QString("IconGroup_%1").arg(n), 4); - config->writeEntry(QString("Icon_%1").arg(n), "folder"); - config->writeEntry(QString("URL_%1").arg(n), + config->writeEntry(TQString("Description_%1").arg(n), i18n("Example Files")); + config->writeEntry(TQString("IconGroup_%1").arg(n), 4); + config->writeEntry(TQString("Icon_%1").arg(n), "folder"); + config->writeEntry(TQString("URL_%1").arg(n), KGlobal::dirs()->findResource("appdata", "examples/")); - RG_DEBUG << "wrote url " << config->readEntry(QString("URL_%1").arg(n)) << endl; + RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").arg(n)) << endl; config->writeEntry("Examples Set", true); config->writeEntry("Number of Entries", n + 1); @@ -1936,7 +1936,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 3 : transport flap extended = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : transport flap extended = %1").arg(opt)); #endif if (opt) @@ -1948,7 +1948,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 3 : show track labels = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : show track labels = %1").arg(opt)); #endif m_viewTrackLabels->setChecked(opt); @@ -2000,19 +2000,19 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) if (m_doc->getTitle() != i18n("Untitled") && !m_doc->isModified()) { // saving to tempfile not necessary } else { - QString filename = m_doc->getAbsFilePath(); + TQString filename = m_doc->getAbsFilePath(); cfg->writeEntry("filename", filename); cfg->writeEntry("modified", m_doc->isModified()); - QString tempname = kapp->tempSaveName(filename); - QString errMsg; + TQString tempname = kapp->tempSaveName(filename); + TQString errMsg; bool res = m_doc->saveDocument(tempname, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(tempname).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(tempname))); } } @@ -2020,19 +2020,19 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) void RosegardenGUIApp::readGlobalProperties(KConfig* _cfg) { - QString filename = _cfg->readEntry("filename", ""); + TQString filename = _cfg->readEntry("filename", ""); bool modified = _cfg->readBoolEntry("modified", false); if (modified) { bool canRecover; - QString tempname = kapp->checkRecoverFile(filename, canRecover); + TQString tempname = kapp->checkRecoverFile(filename, canRecover); if (canRecover) { slotEnableTransport(false); m_doc->openDocument(tempname); slotEnableTransport(true); m_doc->slotDocumentModified(); - QFileInfo info(filename); + TQFileInfo info(filename); m_doc->setAbsFilePath(info.absFilePath()); m_doc->setTitle(info.fileName()); } @@ -2044,11 +2044,11 @@ void RosegardenGUIApp::readGlobalProperties(KConfig* _cfg) } } - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + m_doc->getTitle()); } -void RosegardenGUIApp::showEvent(QShowEvent* e) +void RosegardenGUIApp::showEvent(TQShowEvent* e) { RG_DEBUG << "RosegardenGUIApp::showEvent()\n"; @@ -2061,11 +2061,11 @@ bool RosegardenGUIApp::queryClose() RG_DEBUG << "RosegardenGUIApp::queryClose" << endl; #ifdef SETTING_LOG_DEBUG - _settingLog(QString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(QString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); #endif - QString errMsg; + TQString errMsg; bool canClose = m_doc->saveIfModified(); @@ -2077,8 +2077,8 @@ bool RosegardenGUIApp::queryClose() // 'off' // - disconnect(m_transport, SIGNAL(closed()), - this, SLOT(slotCloseTransport())); + disconnect(m_transport, TQT_SIGNAL(closed()), + this, TQT_SLOT(slotCloseTransport())); } */ @@ -2124,7 +2124,7 @@ void RosegardenGUIApp::slotFileNew() } } -void RosegardenGUIApp::slotOpenDroppedURL(QString url) +void RosegardenGUIApp::slotOpenDroppedURL(TQString url) { ProgressDialog::processEvents(); // or else we get a crash because the // track editor is erased too soon - it is the originator of the signal @@ -2136,9 +2136,9 @@ void RosegardenGUIApp::slotOpenDroppedURL(QString url) openURL(KURL(url)); } -void RosegardenGUIApp::openURL(QString url) +void RosegardenGUIApp::openURL(TQString url) { - RG_DEBUG << "RosegardenGUIApp::openURL: QString " << url << endl; + RG_DEBUG << "RosegardenGUIApp::openURL: TQString " << url << endl; openURL(KURL(url)); } @@ -2146,18 +2146,18 @@ void RosegardenGUIApp::openURL(const KURL& url) { SetWaitCursor waitCursor; - QString netFile = url.prettyURL(); + TQString netFile = url.prettyURL(); RG_DEBUG << "RosegardenGUIApp::openURL: KURL " << netFile << endl; if (!url.isValid()) { - QString string; + TQString string; string = i18n( "Malformed URL\n%1").arg(netFile); KMessageBox::sorry(this, string); return ; } - QString target, caption(url.path()); + TQString target, caption(url.path()); if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); @@ -2180,7 +2180,7 @@ void RosegardenGUIApp::slotFileOpen() kapp->config()->setGroup(GeneralOptionsConfigGroup); - QString lastOpenedVersion = + TQString lastOpenedVersion = kapp->config()->readEntry("Last File Opened Version", "none"); if (lastOpenedVersion != VERSION) { @@ -2188,11 +2188,11 @@ void RosegardenGUIApp::slotFileOpen() // We haven't opened any files with this version of the // program before. Default to the examples directory. - QString examplesDir = KGlobal::dirs()->findResource("appdata", "examples/"); + TQString examplesDir = KGlobal::dirs()->findResource("appdata", "examples/"); kapp->config()->setGroup("Recent Dirs"); - QString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); + TQString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); kapp->config()->writeEntry - ("ROSEGARDEN", QString("file:%1,%2").arg(examplesDir).arg(recentString)); + ("ROSEGARDEN", TQString("file:%1,%2").arg(examplesDir).arg(recentString)); } KURL url = KFileDialog::getOpenURL @@ -2223,7 +2223,7 @@ void RosegardenGUIApp::slotMerge() } - QString target; + TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); @@ -2267,28 +2267,28 @@ void RosegardenGUIApp::slotFileSave() } else { SetWaitCursor waitCursor; - QString errMsg, docFilePath = m_doc->getAbsFilePath(); + TQString errMsg, docFilePath = m_doc->getAbsFilePath(); bool res = m_doc->saveDocument(docFilePath, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(docFilePath).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(docFilePath))); } } } QString -RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, - QString label) +RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension, + TQString label) { // extract first extension listed in descriptiveExtension, for instance, // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // - QString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); + TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; @@ -2297,7 +2297,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension, this, label, true); saveFileDialog.setOperationMode(KFileDialog::Saving); if (m_doc) { - QString saveFileName = m_doc->getAbsFilePath(); + TQString saveFileName = m_doc->getAbsFilePath(); // Show filename without the old extension int dotLoc = saveFileName.findRev('.'); if (dotLoc >= int(saveFileName.length() - 4)) { @@ -2306,7 +2306,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, saveFileDialog.setSelection(saveFileName); } saveFileDialog.exec(); - QString name = saveFileDialog.selectedFile(); + TQString name = saveFileDialog.selectedFile(); // RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : KFileDialog::getSaveFileName returned " // << name << endl; @@ -2318,7 +2318,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, // Append extension if we don't have one // if (!extension.isEmpty()) { - static QRegExp rgFile("\\..{1,4}$"); + static TQRegExp rgFile("\\..{1,4}$"); if (rgFile.match(name) == -1) { name += extension; } @@ -2336,7 +2336,7 @@ RosegardenGUIApp::getValidWriteFile(QString descriptiveExtension, return ""; } - QFileInfo info(name); + TQFileInfo info(name); if (info.isDir()) { KMessageBox::sorry(this, i18n("You have specified a directory")); @@ -2361,31 +2361,31 @@ bool RosegardenGUIApp::slotFileSaveAs() KTmpStatusMsg msg(i18n("Saving file with a new filename..."), this); - QString newName = getValidWriteFile("*.rg|" + i18n("Rosegarden files") + + TQString newName = getValidWriteFile("*.rg|" + i18n("Rosegarden files") + "\n*|" + i18n("All files"), i18n("Save as...")); if (newName.isEmpty()) return false; SetWaitCursor waitCursor; - QFileInfo saveAsInfo(newName); + TQFileInfo saveAsInfo(newName); m_doc->setTitle(saveAsInfo.fileName()); m_doc->setAbsFilePath(saveAsInfo.absFilePath()); - QString errMsg; + TQString errMsg; bool res = m_doc->saveDocument(newName, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") .arg(newName).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not save document at %1") + KMessageBox::error(this, i18n(TQString("Could not save document at %1") .arg(newName))); } else { m_fileRecent->addURL(newName); - QString caption = kapp->caption(); + TQString caption = kapp->caption(); setCaption(caption + ": " + m_doc->getTitle()); // update the edit view's captions too emit compositionStateUpdate(); @@ -2555,7 +2555,7 @@ void RosegardenGUIApp::slotInsertRange() std::pair<timeT, timeT> r = m_doc->getComposition().getBarRangeForTime(t0); TimeDialog dialog(m_view, i18n("Duration of empty range to insert"), &m_doc->getComposition(), t0, r.second - r.first, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->getCommandHistory()->addCommand (new InsertRangeCommand(&m_doc->getComposition(), t0, dialog.getTime())); m_doc->setLoop(0, 0); @@ -2580,7 +2580,7 @@ void RosegardenGUIApp::slotQuantizeSelection() //!!! this should all be in rosegardenguiview QuantizeDialog dialog(m_view); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2684,7 +2684,7 @@ void RosegardenGUIApp::slotRescaleSelection() RescaleDialog dialog(m_view, &m_doc->getComposition(), startTime, endTime - startTime, false, false); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; std::vector<AudioSegmentRescaleCommand *> asrcs; @@ -2739,10 +2739,10 @@ void RosegardenGUIApp::slotRescaleSelection() asrcs[i]->disconnectProgressDialog(progressDlg); } - connect(&m_doc->getAudioFileManager(), SIGNAL(setProgress(int)), - progressDlg->progressBar(), SLOT(setValue(int))); - connect(progressDlg, SIGNAL(cancelClicked()), - &m_doc->getAudioFileManager(), SLOT(slotStopPreview())); + connect(&m_doc->getAudioFileManager(), TQT_SIGNAL(setProgress(int)), + progressDlg->progressBar(), TQT_SLOT(setValue(int))); + connect(progressDlg, TQT_SIGNAL(cancelClicked()), + &m_doc->getAudioFileManager(), TQT_SLOT(slotStopPreview())); for (size_t i = 0; i < asrcs.size(); ++i) { int fid = asrcs[i]->getNewAudioFileId(); @@ -2757,7 +2757,7 @@ void RosegardenGUIApp::slotRescaleSelection() } bool -RosegardenGUIApp::testAudioPath(QString op) +RosegardenGUIApp::testAudioPath(TQString op) { try { m_doc->getAudioFileManager().testAudioPath(); @@ -2793,7 +2793,7 @@ void RosegardenGUIApp::slotAutoSplitSelection() if ((*i)->getType() == Segment::Audio) { AudioSplitDialog aSD(this, (*i), m_doc); - if (aSD.exec() == QDialog::Accepted) { + if (aSD.exec() == TQDialog::Accepted) { // split to threshold // command->addCommand( @@ -2856,33 +2856,33 @@ void RosegardenGUIApp::createAndSetupTransport() m_transport->getAccelerators()->connectItem (m_transport->getAccelerators()->insertItem(Key_T), this, - SLOT(slotHideTransport())); + TQT_SLOT(slotHideTransport())); // Ensure that the checkbox is unchecked if the dialog // is closed - connect(m_transport, SIGNAL(closed()), - SLOT(slotCloseTransport())); + connect(m_transport, TQT_SIGNAL(closed()), + TQT_SLOT(slotCloseTransport())); // Handle loop setting and unsetting from the transport loop button // - connect(m_transport, SIGNAL(setLoop()), SLOT(slotSetLoop())); - connect(m_transport, SIGNAL(unsetLoop()), SLOT(slotUnsetLoop())); - connect(m_transport, SIGNAL(panic()), SLOT(slotPanic())); + connect(m_transport, TQT_SIGNAL(setLoop()), TQT_SLOT(slotSetLoop())); + connect(m_transport, TQT_SIGNAL(unsetLoop()), TQT_SLOT(slotUnsetLoop())); + connect(m_transport, TQT_SIGNAL(panic()), TQT_SLOT(slotPanic())); - connect(m_transport, SIGNAL(editTempo(QWidget*)), - SLOT(slotEditTempo(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTempo(TQWidget*)), + TQT_SLOT(slotEditTempo(TQWidget*))); - connect(m_transport, SIGNAL(editTimeSignature(QWidget*)), - SLOT(slotEditTimeSignature(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTimeSignature(TQWidget*)), + TQT_SLOT(slotEditTimeSignature(TQWidget*))); - connect(m_transport, SIGNAL(editTransportTime(QWidget*)), - SLOT(slotEditTransportTime(QWidget*))); + connect(m_transport, TQT_SIGNAL(editTransportTime(TQWidget*)), + TQT_SLOT(slotEditTransportTime(TQWidget*))); // Handle set loop start/stop time buttons. // - connect(m_transport, SIGNAL(setLoopStartTime()), SLOT(slotSetLoopStart())); - connect(m_transport, SIGNAL(setLoopStopTime()), SLOT(slotSetLoopStop())); + connect(m_transport, TQT_SIGNAL(setLoopStartTime()), TQT_SLOT(slotSetLoopStart())); + connect(m_transport, TQT_SIGNAL(setLoopStopTime()), TQT_SLOT(slotSetLoopStop())); if (m_seqManager != 0) m_seqManager->setTransport(m_transport); @@ -2895,7 +2895,7 @@ void RosegardenGUIApp::slotSplitSelectionByPitch() return ; SplitByPitchDialog dialog(m_view); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2935,7 +2935,7 @@ RosegardenGUIApp::slotSplitSelectionByRecordedSrc() return ; SplitByRecordingSrcDialog dialog(m_view, m_doc); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; SegmentSelection selection = m_view->getSelection(); @@ -2974,7 +2974,7 @@ RosegardenGUIApp::slotSplitSelectionAtTime() timeT now = m_doc->getComposition().getPosition(); - QString title = i18n("Split Segment at Time", + TQString title = i18n("Split Segment at Time", "Split %n Segments at Time", selection.size()); @@ -2984,7 +2984,7 @@ RosegardenGUIApp::slotSplitSelectionAtTime() KMacroCommand *command = new KMacroCommand( title ); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { for (SegmentSelection::iterator i = selection.begin(); i != selection.end(); ++i) { @@ -3014,7 +3014,7 @@ RosegardenGUIApp::slotSetSegmentStartTimes() &m_doc->getComposition(), someTime, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { bool plural = (selection.size() > 1); @@ -3059,7 +3059,7 @@ RosegardenGUIApp::slotSetSegmentDurations() someDuration, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { bool plural = (selection.size() > 1); @@ -3105,7 +3105,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength() slotTempoToSegmentLength(this); } -void RosegardenGUIApp::slotTempoToSegmentLength(QWidget* parent) +void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) { RG_DEBUG << "RosegardenGUIApp::slotTempoToSegmentLength" << endl; @@ -3136,7 +3136,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength(QWidget* parent) // Get user to tell us how many beats or bars the segment contains BeatsBarsDialog dialog(parent); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { beats = dialog.getQuantity(); // beats (or bars) if (dialog.getMode() == 1) // bars (multiply by time sig) beats *= timeSig.getBeatsPerBar(); @@ -3382,7 +3382,7 @@ void RosegardenGUIApp::slotToggleStatusBar() statusBar()->show(); } -void RosegardenGUIApp::slotStatusMsg(QString text) +void RosegardenGUIApp::slotStatusMsg(TQString text) { /////////////////////////////////////////////////////////////////// // change status message permanently @@ -3390,7 +3390,7 @@ void RosegardenGUIApp::slotStatusMsg(QString text) statusBar()->changeItem(text, EditViewBase::ID_STATUS_MSG); } -void RosegardenGUIApp::slotStatusHelpMsg(QString text) +void RosegardenGUIApp::slotStatusHelpMsg(TQString text) { /////////////////////////////////////////////////////////////////// // change status message of whole statusbar temporary (text, msec) @@ -3529,7 +3529,7 @@ void RosegardenGUIApp::slotAddTracks() AddTracksDialog dialog(this, pos); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_view->slotAddTracks(dialog.getTracks(), id, dialog.getInsertPosition()); } @@ -3694,7 +3694,7 @@ void RosegardenGUIApp::slotImportProject() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); importProject(tmpfile); @@ -3702,7 +3702,7 @@ void RosegardenGUIApp::slotImportProject() KIO::NetAccess::removeTempFile(tmpfile); } -void RosegardenGUIApp::importProject(QString filePath) +void RosegardenGUIApp::importProject(TQString filePath) { KProcess *proc = new KProcess; *proc << "rosegarden-project-package"; @@ -3722,9 +3722,9 @@ void RosegardenGUIApp::importProject(QString filePath) delete proc; - QString rgFile = filePath; - rgFile.replace(QRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(QRegExp(".rgp$"), ".rg"); + TQString rgFile = filePath; + rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.replace(TQRegExp(".rgp$"), ".rg"); openURL(rgFile); } @@ -3741,7 +3741,7 @@ void RosegardenGUIApp::slotImportMIDI() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportMIDI); // does everything including setting the document @@ -3758,17 +3758,17 @@ void RosegardenGUIApp::slotMergeMIDI() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportMIDI); KIO::NetAccess::removeTempFile( tmpfile ); } -QTextCodec * +TQTextCodec * RosegardenGUIApp::guessTextCodec(std::string text) { - QTextCodec *codec = 0; + TQTextCodec *codec = 0; for (int c = 0; c < text.length(); ++c) { if (text[c] & 0x80) { @@ -3784,7 +3784,7 @@ RosegardenGUIApp::guessTextCodec(std::string text) CurrentProgressDialog::thaw(); if (codecName != "") { - codec = QTextCodec::codecForName(codecName.c_str()); + codec = TQTextCodec::codecForName(codecName.c_str()); } break; } @@ -3797,7 +3797,7 @@ void RosegardenGUIApp::fixTextEncodings(Composition *c) { - QTextCodec *codec = 0; + TQTextCodec *codec = 0; for (Composition::iterator i = c->begin(); i != c->end(); ++i) { @@ -3849,7 +3849,7 @@ RosegardenGUIApp::fixTextEncodings(Composition *c) } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromMIDIFile(QString file) +RosegardenGUIApp::createDocumentFromMIDIFile(TQString file) { //if (!merge && !m_doc->saveIfModified()) return; @@ -3857,7 +3857,7 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) // RosegardenGUIDoc *newDoc = new RosegardenGUIDoc(this, m_pluginManager); - std::string fname(QFile::encodeName(file)); + std::string fname(TQFile::encodeName(file)); MidiFile midiFile(fname, &newDoc->getStudio()); @@ -3870,11 +3870,11 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) CurrentProgressDialog::set (&progressDlg); - connect(&midiFile, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&midiFile, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&midiFile, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&midiFile, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!midiFile.open()) { CurrentProgressDialog::freeze(); @@ -3894,8 +3894,8 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) // Set the caption // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); // Clean up for notation purposes (after reinitialise, because that // sets the composition's end marker time which is needed here) @@ -3962,8 +3962,8 @@ RosegardenGUIApp::createDocumentFromMIDIFile(QString file) (segment, startTime, endTime, "Notation Options", true); subCommand->setProgressTotal(progressPer + 1); - QObject::connect(subCommand, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + TQObject::connect(subCommand, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); command->addCommand(subCommand); } @@ -3994,7 +3994,7 @@ void RosegardenGUIApp::slotImportRG21() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportRG21); @@ -4011,7 +4011,7 @@ void RosegardenGUIApp::slotMergeRG21() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportRG21); @@ -4019,7 +4019,7 @@ void RosegardenGUIApp::slotMergeRG21() } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromRG21File(QString file) +RosegardenGUIApp::createDocumentFromRG21File(TQString file) { KStartupLogo::hideIfStillThere(); ProgressDialog progressDlg( @@ -4036,11 +4036,11 @@ RosegardenGUIApp::createDocumentFromRG21File(QString file) // TODO: make RG21Loader to actually emit these signals // - connect(&rg21Loader, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&rg21Loader, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&rg21Loader, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&rg21Loader, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); // "your starter for 40%" - helps the "freeze" work // @@ -4060,8 +4060,8 @@ RosegardenGUIApp::createDocumentFromRG21File(QString file) // Set the caption and add recent // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); return newDoc; @@ -4081,7 +4081,7 @@ RosegardenGUIApp::slotImportHydrogen() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportHydrogen); @@ -4098,7 +4098,7 @@ void RosegardenGUIApp::slotMergeHydrogen() return ; } - QString tmpfile; + TQString tmpfile; KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportHydrogen); @@ -4106,7 +4106,7 @@ void RosegardenGUIApp::slotMergeHydrogen() } RosegardenGUIDoc* -RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) +RosegardenGUIApp::createDocumentFromHydrogenFile(TQString file) { KStartupLogo::hideIfStillThere(); ProgressDialog progressDlg( @@ -4123,11 +4123,11 @@ RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) // TODO: make RG21Loader to actually emit these signals // - connect(&hydrogenLoader, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&hydrogenLoader, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&hydrogenLoader, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&hydrogenLoader, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); // "your starter for 40%" - helps the "freeze" work // @@ -4147,15 +4147,15 @@ RosegardenGUIApp::createDocumentFromHydrogenFile(QString file) // Set the caption and add recent // - newDoc->setTitle(QFileInfo(file).fileName()); - newDoc->setAbsFilePath(QFileInfo(file).absFilePath()); + newDoc->setTitle(TQFileInfo(file).fileName()); + newDoc->setAbsFilePath(TQFileInfo(file).absFilePath()); return newDoc; } void -RosegardenGUIApp::mergeFile(QString filePath, ImportType type) +RosegardenGUIApp::mergeFile(TQString filePath, ImportType type) { RosegardenGUIDoc *doc = createDocument(filePath, type); @@ -4197,7 +4197,7 @@ RosegardenGUIApp::mergeFile(QString filePath, ImportType type) } FileMergeDialog dialog(this, filePath, timingsDiffer); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->mergeDocument(doc, dialog.getMergeOptions()); } @@ -4385,7 +4385,7 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t) if (!m_originatingJump) { m_seqManager->sendSequencerJump(comp.getElapsedRealTime(t)); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } } @@ -4501,22 +4501,22 @@ void RosegardenGUIApp::slotTestStartupTester() if (!m_startupTester) { m_startupTester = new StartupTester(); - connect(m_startupTester, SIGNAL(newerVersionAvailable(QString)), - this, SLOT(slotNewerVersionAvailable(QString))); + connect(m_startupTester, TQT_SIGNAL(newerVersionAvailable(TQString)), + this, TQT_SLOT(slotNewerVersionAvailable(TQString))); m_startupTester->start(); - QTimer::singleShot(100, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); return ; } if (!m_startupTester->isReady()) { - QTimer::singleShot(100, this, SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); return ; } - QStringList missingFeatures; - QStringList allMissing; + TQStringList missingFeatures; + TQStringList allMissing; - QStringList missing; + TQStringList missing; bool have = m_startupTester->haveProjectPackager(&missing); stateChanged("have_project_packager", @@ -4582,7 +4582,7 @@ void RosegardenGUIApp::slotTestStartupTester() #endif if (missingFeatures.count() > 0) { - QString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); + TQString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); message += i18n("<ul>"); for (int i = 0; i < missingFeatures.count(); ++i) { message += i18n("<li>%1</li>").arg(missingFeatures[i]); @@ -4634,7 +4634,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) // User mode should clear down sequencer processes. // if (kapp->dcopClient()->isApplicationRegistered( - QCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { + TQCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - " << "existing DCOP registered sequencer found\n"; @@ -4659,7 +4659,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) sleep(1); if (kapp->dcopClient()->isApplicationRegistered( - QCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { + TQCString(ROSEGARDEN_SEQUENCER_APP_NAME))) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - " << "failed to kill existing sequencer\n"; @@ -4694,7 +4694,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) // KConfig *config = kapp->config(); config->setGroup(SequencerOptionsConfigGroup); - QString options = config->readEntry("commandlineoptions"); + TQString options = config->readEntry("commandlineoptions"); if (!options.isEmpty()) { (*m_sequencerProcess) << options; RG_DEBUG << "sequencer options \"" << options << "\"" << endl; @@ -4739,8 +4739,8 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) stateChanged("sequencer_running"); slotEnableTransport(true); - connect(m_sequencerProcess, SIGNAL(processExited(KProcess*)), - this, SLOT(slotSequencerExited(KProcess*))); + connect(m_sequencerProcess, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotSequencerExited(KProcess*))); } catch (Exception e) { m_sequencerProcess = 0; @@ -4784,7 +4784,7 @@ bool RosegardenGUIApp::launchJack() if (!startJack) return true; // we don't do anything - QString jackPath = config->readEntry("jackcommand", ""); + TQString jackPath = config->readEntry("jackcommand", ""); emit startupStatusMessage(i18n("Clearing down jackd...")); @@ -4806,8 +4806,8 @@ bool RosegardenGUIApp::launchJack() RG_DEBUG << "starting jack \"" << jackPath << "\"" << endl; - QStringList splitCommand; - splitCommand = QStringList::split(" ", jackPath); + TQStringList splitCommand; + splitCommand = TQStringList::split(" ", jackPath); RG_DEBUG << "RosegardenGUIApp::launchJack() : splitCommand length : " << splitCommand.size() << endl; @@ -4855,7 +4855,7 @@ void RosegardenGUIApp::slotExportProject() { KTmpStatusMsg msg(i18n("Exporting Rosegarden Project file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.rgp|" + i18n("Rosegarden Project files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -4863,13 +4863,13 @@ void RosegardenGUIApp::slotExportProject() if (fileName.isEmpty()) return ; - QString rgFile = fileName; - rgFile.replace(QRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(QRegExp(".rgp$"), ".rg"); + TQString rgFile = fileName; + rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.replace(TQRegExp(".rgp$"), ".rg"); CurrentProgressDialog::freeze(); - QString errMsg; + TQString errMsg; if (!m_doc->saveDocument(rgFile, errMsg, true)) { // pretend it's autosave KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").arg(errMsg)); @@ -4899,7 +4899,7 @@ void RosegardenGUIApp::slotExportMIDI() { KTmpStatusMsg msg(i18n("Exporting MIDI file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.mid *.midi|" + i18n("Standard MIDI files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -4910,22 +4910,22 @@ void RosegardenGUIApp::slotExportMIDI() exportMIDIFile(fileName); } -void RosegardenGUIApp::exportMIDIFile(QString file) +void RosegardenGUIApp::exportMIDIFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting MIDI file..."), 100, this); - std::string fname(QFile::encodeName(file)); + std::string fname(TQFile::encodeName(file)); MidiFile midiFile(fname, &m_doc->getStudio()); - connect(&midiFile, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&midiFile, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&midiFile, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&midiFile, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); midiFile.convertToMidi(m_doc->getComposition()); @@ -4939,7 +4939,7 @@ void RosegardenGUIApp::slotExportCsound() { KTmpStatusMsg msg(i18n("Exporting Csound score file..."), this); - QString fileName = getValidWriteFile(QString("*|") + i18n("All files"), + TQString fileName = getValidWriteFile(TQString("*|") + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) return ; @@ -4947,19 +4947,19 @@ void RosegardenGUIApp::slotExportCsound() exportCsoundFile(fileName); } -void RosegardenGUIApp::exportCsoundFile(QString file) +void RosegardenGUIApp::exportCsoundFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting Csound score file..."), 100, this); - CsoundExporter e(this, &m_doc->getComposition(), std::string(QFile::encodeName(file))); + CsoundExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -4971,7 +4971,7 @@ void RosegardenGUIApp::slotExportMup() { KTmpStatusMsg msg(i18n("Exporting Mup file..."), this); - QString fileName = getValidWriteFile + TQString fileName = getValidWriteFile ("*.mup|" + i18n("Mup files\n") + "\n*|" + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) @@ -4980,19 +4980,19 @@ void RosegardenGUIApp::slotExportMup() exportMupFile(fileName); } -void RosegardenGUIApp::exportMupFile(QString file) +void RosegardenGUIApp::exportMupFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting Mup file..."), 100, this); - MupExporter e(this, &m_doc->getComposition(), std::string(QFile::encodeName(file))); + MupExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5004,8 +5004,8 @@ void RosegardenGUIApp::slotExportLilyPond() { KTmpStatusMsg msg(i18n("Exporting LilyPond file..."), this); - QString fileName = getValidWriteFile - (QString("*.ly|") + i18n("LilyPond files") + + TQString fileName = getValidWriteFile + (TQString("*.ly|") + i18n("LilyPond files") + "\n*|" + i18n("All files"), i18n("Export as...")); @@ -5021,7 +5021,7 @@ std::map<KProcess *, KTempFile *> RosegardenGUIApp::m_lilyTempFileMap; void RosegardenGUIApp::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5036,8 +5036,8 @@ void RosegardenGUIApp::slotPrintLilyPond() *proc << "--graphical"; *proc << "--print"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5045,7 +5045,7 @@ void RosegardenGUIApp::slotPrintLilyPond() void RosegardenGUIApp::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5060,8 +5060,8 @@ void RosegardenGUIApp::slotPreviewLilyPond() *proc << "--graphical"; *proc << "--pdf"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5073,16 +5073,16 @@ void RosegardenGUIApp::slotLilyPondViewProcessExited(KProcess *p) delete p; } -bool RosegardenGUIApp::exportLilyPondFile(QString file, bool forPreview) +bool RosegardenGUIApp::exportLilyPondFile(TQString file, bool forPreview) { - QString caption = "", heading = ""; + TQString caption = "", heading = ""; if (forPreview) { caption = i18n("LilyPond Preview Options"); heading = i18n("LilyPond preview options"); } LilyPondOptionsDialog dialog(this, m_doc, caption, heading); - if (dialog.exec() != QDialog::Accepted) { + if (dialog.exec() != TQDialog::Accepted) { return false; } @@ -5090,13 +5090,13 @@ bool RosegardenGUIApp::exportLilyPondFile(QString file, bool forPreview) 100, this); - LilyPondExporter e(this, m_doc, std::string(QFile::encodeName(file))); + LilyPondExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5111,8 +5111,8 @@ void RosegardenGUIApp::slotExportMusicXml() { KTmpStatusMsg msg(i18n("Exporting MusicXML file..."), this); - QString fileName = getValidWriteFile - (QString("*.xml|") + i18n("XML files") + + TQString fileName = getValidWriteFile + (TQString("*.xml|") + i18n("XML files") + "\n*|" + i18n("All files"), i18n("Export as...")); if (fileName.isEmpty()) @@ -5121,19 +5121,19 @@ void RosegardenGUIApp::slotExportMusicXml() exportMusicXmlFile(fileName); } -void RosegardenGUIApp::exportMusicXmlFile(QString file) +void RosegardenGUIApp::exportMusicXmlFile(TQString file) { ProgressDialog progressDlg(i18n("Exporting MusicXML file..."), 100, this); - MusicXmlExporter e(this, m_doc, std::string(QFile::encodeName(file))); + MusicXmlExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { CurrentProgressDialog::freeze(); @@ -5156,7 +5156,7 @@ RosegardenGUIApp::slotDeleteTransport() } void -RosegardenGUIApp::slotActivateTool(QString toolName) +RosegardenGUIApp::slotActivateTool(TQString toolName) { if (toolName == SegmentSelector::ToolName) { actionCollection()->action("select")->activate(); @@ -5273,7 +5273,7 @@ RosegardenGUIApp::slotRecord() // try { m_seqManager->record(false); - } catch (QString s) { + } catch (TQString s) { // We should already be stopped by this point so just unset // the buttons after clicking the dialog. // @@ -5308,8 +5308,8 @@ RosegardenGUIApp::slotRecord() plugAccelerators(m_seqManager->getCountdownDialog(), m_seqManager->getCountdownDialog()->getAccelerators()); - connect(m_seqManager->getCountdownDialog(), SIGNAL(stopped()), - this, SLOT(slotStop())); + connect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), + this, TQT_SLOT(slotStop())); // Start the playback timer - this fetches the current sequencer position &c // @@ -5329,7 +5329,7 @@ RosegardenGUIApp::slotToggleRecord() try { m_seqManager->record(true); - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } catch (AudioFileManager::BadAudioPathException e) { if (KMessageBox::warningContinueCancel @@ -5361,7 +5361,7 @@ RosegardenGUIApp::slotSetLoop(timeT lhs, timeT rhs) getTransport()->LoopButton()->setOn(false); stateChanged("have_range", KXMLGUIClient::StateReverse); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); } } @@ -5429,7 +5429,7 @@ void RosegardenGUIApp::slotPlay() m_playTimer->stop(); m_stopTimer->start(100); } - } catch (QString s) { + } catch (TQString s) { KMessageBox::error(this, s); m_playTimer->stop(); m_stopTimer->start(100); @@ -5459,10 +5459,10 @@ void RosegardenGUIApp::slotStop() { if (m_seqManager && m_seqManager->getCountdownDialog()) { - disconnect(m_seqManager->getCountdownDialog(), SIGNAL(stopped()), - this, SLOT(slotStop())); - disconnect(m_seqManager->getCountdownDialog(), SIGNAL(completed()), - this, SLOT(slotStop())); + disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), + this, TQT_SLOT(slotStop())); + disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(completed()), + this, TQT_SLOT(slotStop())); } try { @@ -5645,10 +5645,10 @@ void RosegardenGUIApp::slotConfigure() ConfigureDialog *configDlg = new ConfigureDialog(m_doc, kapp->config(), this); - connect(configDlg, SIGNAL(updateAutoSaveInterval(unsigned int)), - this, SLOT(slotUpdateAutoSaveInterval(unsigned int))); - connect(configDlg, SIGNAL(updateSidebarStyle(unsigned int)), - this, SLOT(slotUpdateSidebarStyle(unsigned int))); + connect(configDlg, TQT_SIGNAL(updateAutoSaveInterval(unsigned int)), + this, TQT_SLOT(slotUpdateAutoSaveInterval(unsigned int))); + connect(configDlg, TQT_SIGNAL(updateSidebarStyle(unsigned int)), + this, TQT_SLOT(slotUpdateSidebarStyle(unsigned int))); configDlg->show(); } @@ -5683,8 +5683,8 @@ void RosegardenGUIApp::slotEditToolbars() { KEditToolbar dlg(actionCollection(), "rosegardenui.rc"); - connect(&dlg, SIGNAL(newToolbarConfig()), - SLOT(slotUpdateToolbars())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + TQT_SLOT(slotUpdateToolbars())); dlg.exec(); } @@ -5705,23 +5705,23 @@ void RosegardenGUIApp::slotEditTempo(timeT atTime) slotEditTempo(this, atTime); } -void RosegardenGUIApp::slotEditTempo(QWidget *parent) +void RosegardenGUIApp::slotEditTempo(TQWidget *parent) { slotEditTempo(parent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTempo(QWidget *parent, timeT atTime) +void RosegardenGUIApp::slotEditTempo(TQWidget *parent, timeT atTime) { RG_DEBUG << "RosegardenGUIApp::slotEditTempo\n"; TempoDialog tempoDialog(parent, m_doc); connect(&tempoDialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -5740,12 +5740,12 @@ void RosegardenGUIApp::slotEditTimeSignature(timeT atTime) slotEditTimeSignature(this, atTime); } -void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent) +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent) { slotEditTimeSignature(parent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent, +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent, timeT time) { Composition &composition(m_doc->getComposition()); @@ -5754,7 +5754,7 @@ void RosegardenGUIApp::slotEditTimeSignature(QWidget *parent, TimeSignatureDialog dialog(parent, &composition, time, sig); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { time = dialog.getTime(); @@ -5775,13 +5775,13 @@ void RosegardenGUIApp::slotEditTransportTime() slotEditTransportTime(this); } -void RosegardenGUIApp::slotEditTransportTime(QWidget *parent) +void RosegardenGUIApp::slotEditTransportTime(TQWidget *parent) { TimeDialog dialog(parent, i18n("Move playback pointer to time"), &m_doc->getComposition(), m_doc->getComposition().getPosition(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_doc->slotSetPointerPosition(dialog.getTime()); } } @@ -5953,7 +5953,7 @@ RosegardenGUIApp::slotAddMarker(timeT time) } void -RosegardenGUIApp::slotDeleteMarker(int id, timeT time, QString name, QString description) +RosegardenGUIApp::slotDeleteMarker(int id, timeT time, TQString name, TQString description) { RemoveMarkerCommand *command = new RemoveMarkerCommand(&m_doc->getComposition(), @@ -5980,7 +5980,7 @@ RosegardenGUIApp::slotDocumentModified(bool m) } void -RosegardenGUIApp::slotStateChanged(QString s, +RosegardenGUIApp::slotStateChanged(TQString s, bool noReverse) { // RG_DEBUG << "RosegardenGUIApp::slotStateChanged " << s << "," << noReverse << endl; @@ -6005,32 +6005,32 @@ RosegardenGUIApp::slotTestClipboard() } void -RosegardenGUIApp::plugAccelerators(QWidget *widget, QAccel *acc) +RosegardenGUIApp::plugAccelerators(TQWidget *widget, TQAccel *acc) { acc->connectItem(acc->insertItem(Key_Enter), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); // Alternative shortcut for Play acc->connectItem(acc->insertItem(Key_Return + CTRL), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); acc->connectItem(acc->insertItem(Key_Insert), this, - SLOT(slotStop())); + TQT_SLOT(slotStop())); acc->connectItem(acc->insertItem(Key_PageDown), this, - SLOT(slotFastforward())); + TQT_SLOT(slotFastforward())); acc->connectItem(acc->insertItem(Key_End), this, - SLOT(slotRewind())); + TQT_SLOT(slotRewind())); acc->connectItem(acc->insertItem(Key_Space), this, - SLOT(slotToggleRecord())); + TQT_SLOT(slotToggleRecord())); TransportDialog *transport = dynamic_cast<TransportDialog*>(widget); @@ -6038,69 +6038,69 @@ RosegardenGUIApp::plugAccelerators(QWidget *widget, QAccel *acc) if (transport) { acc->connectItem(acc->insertItem(m_jumpToQuickMarkerAction->shortcut()), this, - SLOT(slotJumpToQuickMarker())); + TQT_SLOT(slotJumpToQuickMarker())); acc->connectItem(acc->insertItem(m_setQuickMarkerAction->shortcut()), this, - SLOT(slotSetQuickMarker())); + TQT_SLOT(slotSetQuickMarker())); connect(transport->PlayButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotPlay())); + TQT_SLOT(slotPlay())); connect(transport->StopButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotStop())); + TQT_SLOT(slotStop())); connect(transport->FfwdButton(), - SIGNAL(clicked()), - SLOT(slotFastforward())); + TQT_SIGNAL(clicked()), + TQT_SLOT(slotFastforward())); connect(transport->RewindButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRewind())); + TQT_SLOT(slotRewind())); connect(transport->RecordButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRecord())); + TQT_SLOT(slotRecord())); connect(transport->RewindEndButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRewindToBeginning())); + TQT_SLOT(slotRewindToBeginning())); connect(transport->FfwdEndButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotFastForwardToEnd())); + TQT_SLOT(slotFastForwardToEnd())); connect(transport->MetronomeButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotToggleMetronome())); + TQT_SLOT(slotToggleMetronome())); connect(transport->SoloButton(), - SIGNAL(toggled(bool)), + TQT_SIGNAL(toggled(bool)), this, - SLOT(slotToggleSolo(bool))); + TQT_SLOT(slotToggleSolo(bool))); connect(transport->TimeDisplayButton(), - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotRefreshTimeDisplay())); + TQT_SLOT(slotRefreshTimeDisplay())); connect(transport->ToEndButton(), - SIGNAL(clicked()), - SLOT(slotRefreshTimeDisplay())); + TQT_SIGNAL(clicked()), + TQT_SLOT(slotRefreshTimeDisplay())); } } void -RosegardenGUIApp::setCursor(const QCursor& cursor) +RosegardenGUIApp::setCursor(const TQCursor& cursor) { KDockMainWindow::setCursor(cursor); @@ -6119,7 +6119,7 @@ RosegardenGUIApp::setCursor(const QCursor& cursor) // toolbars... // - QPtrListIterator<KToolBar> tbIter = toolBarIterator(); + TQPtrListIterator<KToolBar> tbIter = toolBarIterator(); KToolBar* tb = 0; while ((tb = tbIter.current()) != 0) { tb->setCursor(cursor); @@ -6150,10 +6150,10 @@ RosegardenGUIApp::createNewAudioFile() } } -QValueVector<QString> -RosegardenGUIApp::createRecordAudioFiles(const QValueVector<InstrumentId> &recordInstruments) +TQValueVector<TQString> +RosegardenGUIApp::createRecordAudioFiles(const TQValueVector<InstrumentId> &recordInstruments) { - QValueVector<QString> qv; + TQValueVector<TQString> qv; for (unsigned int i = 0; i < recordInstruments.size(); ++i) { AudioFile *aF = 0; try { @@ -6180,10 +6180,10 @@ RosegardenGUIApp::createRecordAudioFiles(const QValueVector<InstrumentId> &recor QString RosegardenGUIApp::getAudioFilePath() { - return QString(m_doc->getAudioFileManager().getAudioPath().c_str()); + return TQString(m_doc->getAudioFileManager().getAudioPath().c_str()); } -QValueVector<InstrumentId> +TQValueVector<InstrumentId> RosegardenGUIApp::getArmedInstruments() { std::set @@ -6203,7 +6203,7 @@ RosegardenGUIApp::getArmedInstruments() } } - QValueVector<InstrumentId> iv; + TQValueVector<InstrumentId> iv; for (std::set <InstrumentId>::iterator ii = iid.begin(); ii != iid.end(); ++ii) { @@ -6213,7 +6213,7 @@ RosegardenGUIApp::getArmedInstruments() } void -RosegardenGUIApp::showError(QString error) +RosegardenGUIApp::showError(TQString error) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); @@ -6245,20 +6245,20 @@ RosegardenGUIApp::slotAudioManager() new AudioManagerDialog(this, m_doc); connect(m_audioManagerDialog, - SIGNAL(playAudioFile(AudioFileId, + TQT_SIGNAL(playAudioFile(AudioFileId, const RealTime &, const RealTime&)), - SLOT(slotPlayAudioFile(AudioFileId, + TQT_SLOT(slotPlayAudioFile(AudioFileId, const RealTime &, const RealTime &))); connect(m_audioManagerDialog, - SIGNAL(addAudioFile(AudioFileId)), - SLOT(slotAddAudioFile(AudioFileId))); + TQT_SIGNAL(addAudioFile(AudioFileId)), + TQT_SLOT(slotAddAudioFile(AudioFileId))); connect(m_audioManagerDialog, - SIGNAL(deleteAudioFile(AudioFileId)), - SLOT(slotDeleteAudioFile(AudioFileId))); + TQT_SIGNAL(deleteAudioFile(AudioFileId)), + TQT_SLOT(slotDeleteAudioFile(AudioFileId))); // // Sync segment selection between audio man. dialog and main window @@ -6266,46 +6266,46 @@ RosegardenGUIApp::slotAudioManager() // from dialog to us... connect(m_audioManagerDialog, - SIGNAL(segmentsSelected(const SegmentSelection&)), + TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), m_view, - SLOT(slotPropagateSegmentSelection(const SegmentSelection&))); + TQT_SLOT(slotPropagateSegmentSelection(const SegmentSelection&))); // and from us to dialog - connect(this, SIGNAL(segmentsSelected(const SegmentSelection&)), + connect(this, TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), m_audioManagerDialog, - SLOT(slotSegmentSelection(const SegmentSelection&))); + TQT_SLOT(slotSegmentSelection(const SegmentSelection&))); connect(m_audioManagerDialog, - SIGNAL(deleteSegments(const SegmentSelection&)), - SLOT(slotDeleteSegments(const SegmentSelection&))); + TQT_SIGNAL(deleteSegments(const SegmentSelection&)), + TQT_SLOT(slotDeleteSegments(const SegmentSelection&))); connect(m_audioManagerDialog, - SIGNAL(insertAudioSegment(AudioFileId, + TQT_SIGNAL(insertAudioSegment(AudioFileId, const RealTime&, const RealTime&)), m_view, - SLOT(slotAddAudioSegmentDefaultPosition(AudioFileId, + TQT_SLOT(slotAddAudioSegmentDefaultPosition(AudioFileId, const RealTime&, const RealTime&))); connect(m_audioManagerDialog, - SIGNAL(cancelPlayingAudioFile(AudioFileId)), - SLOT(slotCancelAudioPlayingFile(AudioFileId))); + TQT_SIGNAL(cancelPlayingAudioFile(AudioFileId)), + TQT_SLOT(slotCancelAudioPlayingFile(AudioFileId))); connect(m_audioManagerDialog, - SIGNAL(deleteAllAudioFiles()), - SLOT(slotDeleteAllAudioFiles())); + TQT_SIGNAL(deleteAllAudioFiles()), + TQT_SLOT(slotDeleteAllAudioFiles())); // Make sure we know when the audio man. dialog is closing // connect(m_audioManagerDialog, - SIGNAL(closing()), - SLOT(slotAudioManagerClosed())); + TQT_SIGNAL(closing()), + TQT_SLOT(slotAudioManagerClosed())); // And that it goes away when the current document is changing // - connect(this, SIGNAL(documentAboutToChange()), - m_audioManagerDialog, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_audioManagerDialog, TQT_SLOT(close())); m_audioManagerDialog->setAudioSubsystemStatus( m_seqManager->getSoundDriverStatus() & AUDIO_OK); @@ -6345,18 +6345,18 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) if (aF == 0) return ; - QCString replyType; - QByteArray replyData; - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQCString replyType; + TQByteArray replyData; + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // We have to pass the filename as a QString // - streamOut << QString(strtoqstr(aF->getFilename())); + streamOut << TQString(strtoqstr(aF->getFilename())); streamOut << (int)aF->getId(); - if (rgapp->sequencerCall("addAudioFile(QString, int)", replyType, replyData, data)) { - QDataStream streamIn(replyData, IO_ReadOnly); + if (rgapp->sequencerCall("addAudioFile(TQString, int)", replyType, replyData, data)) { + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; if (!result) { @@ -6371,17 +6371,17 @@ RosegardenGUIApp::slotDeleteAudioFile(unsigned int id) if (m_doc->getAudioFileManager().removeFile(id) == false) return ; - QCString replyType; - QByteArray replyData; - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQCString replyType; + TQByteArray replyData; + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // file id // streamOut << (int)id; if (rgapp->sequencerCall("removeAudioFile(int)", replyType, replyData, data)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; if (!result) { @@ -6420,9 +6420,9 @@ RosegardenGUIApp::slotDeleteAllAudioFiles() // Clear at the sequencer // - QCString replyType; - QByteArray replyData; - QByteArray data; + TQCString replyType; + TQByteArray replyData; + TQByteArray data; rgapp->sequencerCall("clearAllAudioFiles()", replyType, replyData, data); } @@ -6440,7 +6440,7 @@ RosegardenGUIApp::slotRelabelSegments() return ; SegmentSelection selection(m_view->getSelection()); - QString editLabel; + TQString editLabel; if (selection.size() == 0) return ; @@ -6452,7 +6452,7 @@ RosegardenGUIApp::slotRelabelSegments() KTmpStatusMsg msg(i18n("Relabelling selection..."), this); // Generate label - QString label = strtoqstr((*selection.begin())->getLabel()); + TQString label = strtoqstr((*selection.begin())->getLabel()); for (SegmentSelection::iterator i = selection.begin(); i != selection.end(); ++i) { @@ -6462,7 +6462,7 @@ RosegardenGUIApp::slotRelabelSegments() bool ok = false; - QString newLabel = KInputDialog::getText(editLabel, + TQString newLabel = KInputDialog::getText(editLabel, i18n("Enter new label"), label, &ok, @@ -6498,7 +6498,7 @@ RosegardenGUIApp::slotChangeCompositionLength() { CompositionLengthDialog dialog(this, &m_doc->getComposition()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ChangeCompositionLengthCommand *command = new ChangeCompositionLengthCommand( &m_doc->getComposition(), @@ -6522,26 +6522,26 @@ RosegardenGUIApp::slotManageMIDIDevices() m_deviceManager = new DeviceManagerDialog(this, m_doc); - connect(m_deviceManager, SIGNAL(closing()), - this, SLOT(slotDeviceManagerClosed())); + connect(m_deviceManager, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotDeviceManagerClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_deviceManager, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_deviceManager, TQT_SLOT(close())); // Cheating way of updating the track/instrument list // - connect(m_deviceManager, SIGNAL(deviceNamesChanged()), - m_view, SLOT(slotSynchroniseWithComposition())); + connect(m_deviceManager, TQT_SIGNAL(deviceNamesChanged()), + m_view, TQT_SLOT(slotSynchroniseWithComposition())); - connect(m_deviceManager, SIGNAL(editBanks(DeviceId)), - this, SLOT(slotEditBanks(DeviceId))); + connect(m_deviceManager, TQT_SIGNAL(editBanks(DeviceId)), + this, TQT_SLOT(slotEditBanks(DeviceId))); - connect(m_deviceManager, SIGNAL(editControllers(DeviceId)), - this, SLOT(slotEditControlParameters(DeviceId))); + connect(m_deviceManager, TQT_SIGNAL(editControllers(DeviceId)), + this, TQT_SLOT(slotEditControlParameters(DeviceId))); if (m_midiMixer) { - connect(m_deviceManager, SIGNAL(deviceNamesChanged()), - m_midiMixer, SLOT(slotSynchronise())); + connect(m_deviceManager, TQT_SIGNAL(deviceNamesChanged()), + m_midiMixer, TQT_SLOT(slotSynchronise())); } @@ -6565,26 +6565,26 @@ RosegardenGUIApp::slotManageSynths() #endif ); - connect(m_synthManager, SIGNAL(closing()), - this, SLOT(slotSynthPluginManagerClosed())); + connect(m_synthManager, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotSynthPluginManagerClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_synthManager, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_synthManager, TQT_SLOT(close())); connect(m_synthManager, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), this, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(m_synthManager, - SIGNAL(showPluginDialog(QWidget *, InstrumentId, int)), + TQT_SIGNAL(showPluginDialog(TQWidget *, InstrumentId, int)), this, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_synthManager, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); m_synthManager->show(); } @@ -6601,66 +6601,66 @@ RosegardenGUIApp::slotOpenAudioMixer() m_audioMixer = new AudioMixerWindow(this, m_doc); - connect(m_audioMixer, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); + connect(m_audioMixer, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - m_audioMixer, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + m_audioMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); - connect(m_audioMixer, SIGNAL(closing()), - this, SLOT(slotAudioMixerClosed())); + connect(m_audioMixer, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotAudioMixerClosed())); - connect(m_audioMixer, SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), - this, SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + connect(m_audioMixer, TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), + this, TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(this, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_audioMixer, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(this, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_audioMixer, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); - - connect(this, SIGNAL(documentAboutToChange()), - m_audioMixer, SLOT(close())); - - connect(m_view, SIGNAL(checkTrackAssignments()), - m_audioMixer, SLOT(slotTrackAssignmentsChanged())); - - connect(m_audioMixer, SIGNAL(play()), - this, SLOT(slotPlay())); - connect(m_audioMixer, SIGNAL(stop()), - this, SLOT(slotStop())); - connect(m_audioMixer, SIGNAL(fastForwardPlayback()), - this, SLOT(slotFastforward())); - connect(m_audioMixer, SIGNAL(rewindPlayback()), - this, SLOT(slotRewind())); - connect(m_audioMixer, SIGNAL(fastForwardPlaybackToEnd()), - this, SLOT(slotFastForwardToEnd())); - connect(m_audioMixer, SIGNAL(rewindPlaybackToBeginning()), - this, SLOT(slotRewindToBeginning())); - connect(m_audioMixer, SIGNAL(record()), - this, SLOT(slotRecord())); - connect(m_audioMixer, SIGNAL(panic()), - this, SLOT(slotPanic())); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); + + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_audioMixer, TQT_SLOT(close())); + + connect(m_view, TQT_SIGNAL(checkTrackAssignments()), + m_audioMixer, TQT_SLOT(slotTrackAssignmentsChanged())); + + connect(m_audioMixer, TQT_SIGNAL(play()), + this, TQT_SLOT(slotPlay())); + connect(m_audioMixer, TQT_SIGNAL(stop()), + this, TQT_SLOT(slotStop())); + connect(m_audioMixer, TQT_SIGNAL(fastForwardPlayback()), + this, TQT_SLOT(slotFastforward())); + connect(m_audioMixer, TQT_SIGNAL(rewindPlayback()), + this, TQT_SLOT(slotRewind())); + connect(m_audioMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), + this, TQT_SLOT(slotFastForwardToEnd())); + connect(m_audioMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), + this, TQT_SLOT(slotRewindToBeginning())); + connect(m_audioMixer, TQT_SIGNAL(record()), + this, TQT_SLOT(slotRecord())); + connect(m_audioMixer, TQT_SIGNAL(panic()), + this, TQT_SLOT(slotPanic())); connect(m_audioMixer, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_audioMixer, - SLOT(slotUpdateInstrument(InstrumentId))); + TQT_SLOT(slotUpdateInstrument(InstrumentId))); if (m_synthManager) { connect(m_synthManager, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_audioMixer, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); } plugAccelerators(m_audioMixer, m_audioMixer->getAccelerators()); @@ -6680,44 +6680,44 @@ RosegardenGUIApp::slotOpenMidiMixer() m_midiMixer = new MidiMixerWindow(this, m_doc); - connect(m_midiMixer, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); - - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - m_midiMixer, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); - - connect(m_midiMixer, SIGNAL(closing()), - this, SLOT(slotMidiMixerClosed())); - - connect(this, SIGNAL(documentAboutToChange()), - m_midiMixer, SLOT(close())); - - connect(m_midiMixer, SIGNAL(play()), - this, SLOT(slotPlay())); - connect(m_midiMixer, SIGNAL(stop()), - this, SLOT(slotStop())); - connect(m_midiMixer, SIGNAL(fastForwardPlayback()), - this, SLOT(slotFastforward())); - connect(m_midiMixer, SIGNAL(rewindPlayback()), - this, SLOT(slotRewind())); - connect(m_midiMixer, SIGNAL(fastForwardPlaybackToEnd()), - this, SLOT(slotFastForwardToEnd())); - connect(m_midiMixer, SIGNAL(rewindPlaybackToBeginning()), - this, SLOT(slotRewindToBeginning())); - connect(m_midiMixer, SIGNAL(record()), - this, SLOT(slotRecord())); - connect(m_midiMixer, SIGNAL(panic()), - this, SLOT(slotPanic())); + connect(m_midiMixer, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); + + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + m_midiMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + + connect(m_midiMixer, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotMidiMixerClosed())); + + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_midiMixer, TQT_SLOT(close())); + + connect(m_midiMixer, TQT_SIGNAL(play()), + this, TQT_SLOT(slotPlay())); + connect(m_midiMixer, TQT_SIGNAL(stop()), + this, TQT_SLOT(slotStop())); + connect(m_midiMixer, TQT_SIGNAL(fastForwardPlayback()), + this, TQT_SLOT(slotFastforward())); + connect(m_midiMixer, TQT_SIGNAL(rewindPlayback()), + this, TQT_SLOT(slotRewind())); + connect(m_midiMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), + this, TQT_SLOT(slotFastForwardToEnd())); + connect(m_midiMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), + this, TQT_SLOT(slotRewindToBeginning())); + connect(m_midiMixer, TQT_SIGNAL(record()), + this, TQT_SLOT(slotRecord())); + connect(m_midiMixer, TQT_SIGNAL(panic()), + this, TQT_SLOT(slotPanic())); connect(m_midiMixer, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(this, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_midiMixer, - SLOT(slotUpdateInstrument(InstrumentId))); + TQT_SLOT(slotUpdateInstrument(InstrumentId))); plugAccelerators(m_midiMixer, m_midiMixer->getAccelerators()); @@ -6744,14 +6744,14 @@ RosegardenGUIApp::slotEditControlParameters(DeviceId device) RG_DEBUG << "inserting control editor dialog, have " << m_controlEditors.size() << " now" << endl; - connect(controlEditor, SIGNAL(closing()), - SLOT(slotControlEditorClosed())); + connect(controlEditor, TQT_SIGNAL(closing()), + TQT_SLOT(slotControlEditorClosed())); - connect(this, SIGNAL(documentAboutToChange()), - controlEditor, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + controlEditor, TQT_SLOT(close())); - connect(m_doc, SIGNAL(devicesResyncd()), - controlEditor, SLOT(slotUpdate())); + connect(m_doc, TQT_SIGNAL(devicesResyncd()), + controlEditor, TQT_SLOT(slotUpdate())); controlEditor->show(); } @@ -6776,16 +6776,16 @@ RosegardenGUIApp::slotEditBanks(DeviceId device) m_bankEditor = new BankEditorDialog(this, m_doc, device); - connect(m_bankEditor, SIGNAL(closing()), - this, SLOT(slotBankEditorClosed())); + connect(m_bankEditor, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotBankEditorClosed())); - connect(this, SIGNAL(documentAboutToChange()), - m_bankEditor, SLOT(slotFileClose())); + connect(this, TQT_SIGNAL(documentAboutToChange()), + m_bankEditor, TQT_SLOT(slotFileClose())); // Cheating way of updating the track/instrument list // - connect(m_bankEditor, SIGNAL(deviceNamesChanged()), - m_view, SLOT(slotSynchroniseWithComposition())); + connect(m_bankEditor, TQT_SIGNAL(deviceNamesChanged()), + m_view, TQT_SLOT(slotSynchroniseWithComposition())); m_bankEditor->show(); } @@ -6802,11 +6802,11 @@ RosegardenGUIApp::slotManageTriggerSegments() m_triggerSegmentManager = new TriggerSegmentManager(this, m_doc); - connect(m_triggerSegmentManager, SIGNAL(closing()), - SLOT(slotTriggerManagerClosed())); + connect(m_triggerSegmentManager, TQT_SIGNAL(closing()), + TQT_SLOT(slotTriggerManagerClosed())); - connect(m_triggerSegmentManager, SIGNAL(editTriggerSegment(int)), - m_view, SLOT(slotEditTriggerSegment(int))); + connect(m_triggerSegmentManager, TQT_SIGNAL(editTriggerSegment(int)), + m_view, TQT_SLOT(slotEditTriggerSegment(int))); m_triggerSegmentManager->show(); } @@ -6831,11 +6831,11 @@ RosegardenGUIApp::slotEditMarkers() m_markerEditor = new MarkerEditor(this, m_doc); - connect(m_markerEditor, SIGNAL(closing()), - SLOT(slotMarkerEditorClosed())); + connect(m_markerEditor, TQT_SIGNAL(closing()), + TQT_SLOT(slotMarkerEditorClosed())); - connect(m_markerEditor, SIGNAL(jumpToMarker(timeT)), - m_doc, SLOT(slotSetPointerPosition(timeT))); + connect(m_markerEditor, TQT_SIGNAL(jumpToMarker(timeT)), + m_doc, TQT_SLOT(slotSetPointerPosition(timeT))); plugAccelerators(m_markerEditor, m_markerEditor->getAccelerators()); @@ -6862,24 +6862,24 @@ RosegardenGUIApp::slotEditTempos(timeT t) m_tempoView = new TempoView(m_doc, getView(), t); - connect(m_tempoView, SIGNAL(closing()), - SLOT(slotTempoViewClosed())); + connect(m_tempoView, TQT_SIGNAL(closing()), + TQT_SLOT(slotTempoViewClosed())); - connect(m_tempoView, SIGNAL(windowActivated()), - getView(), SLOT(slotActiveMainWindowChanged())); + connect(m_tempoView, TQT_SIGNAL(windowActivated()), + getView(), TQT_SLOT(slotActiveMainWindowChanged())); connect(m_tempoView, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); - connect(m_tempoView, SIGNAL(saveFile()), this, SLOT(slotFileSave())); + connect(m_tempoView, TQT_SIGNAL(saveFile()), this, TQT_SLOT(slotFileSave())); plugAccelerators(m_tempoView, m_tempoView->getAccelerators()); @@ -6897,7 +6897,7 @@ RosegardenGUIApp::slotTempoViewClosed() void RosegardenGUIApp::slotControlEditorClosed() { - const QObject *s = sender(); + const TQObject *s = sender(); RG_DEBUG << "RosegardenGUIApp::slotControlEditorClosed" << endl; @@ -6915,7 +6915,7 @@ RosegardenGUIApp::slotControlEditorClosed() } void -RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, +RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, InstrumentId instrumentId, int index) { @@ -6962,12 +6962,12 @@ RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, container, index); - connect(dialog, SIGNAL(windowActivated()), - m_view, SLOT(slotActiveMainWindowChanged())); + connect(dialog, TQT_SIGNAL(windowActivated()), + m_view, TQT_SLOT(slotActiveMainWindowChanged())); /* This feature isn't provided by the plugin dialog - connect(m_view, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - dialog, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + connect(m_view, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + dialog, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); */ // Plug the new dialog into the standard keyboard accelerators so @@ -6976,46 +6976,46 @@ RosegardenGUIApp::slotShowPluginDialog(QWidget *parent, plugAccelerators(dialog, dialog->getAccelerators()); connect(dialog, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), this, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(dialog, - SIGNAL(pluginPortChanged(InstrumentId, int, int)), + TQT_SIGNAL(pluginPortChanged(InstrumentId, int, int)), this, - SLOT(slotPluginPortChanged(InstrumentId, int, int))); + TQT_SLOT(slotPluginPortChanged(InstrumentId, int, int))); connect(dialog, - SIGNAL(pluginProgramChanged(InstrumentId, int)), + TQT_SIGNAL(pluginProgramChanged(InstrumentId, int)), this, - SLOT(slotPluginProgramChanged(InstrumentId, int))); + TQT_SLOT(slotPluginProgramChanged(InstrumentId, int))); connect(dialog, - SIGNAL(changePluginConfiguration(InstrumentId, int, bool, QString, QString)), + TQT_SIGNAL(changePluginConfiguration(InstrumentId, int, bool, TQString, TQString)), this, - SLOT(slotChangePluginConfiguration(InstrumentId, int, bool, QString, QString))); + TQT_SLOT(slotChangePluginConfiguration(InstrumentId, int, bool, TQString, TQString))); connect(dialog, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); connect(dialog, - SIGNAL(stopPluginGUI(InstrumentId, int)), + TQT_SIGNAL(stopPluginGUI(InstrumentId, int)), this, - SLOT(slotStopPluginGUI(InstrumentId, int))); + TQT_SLOT(slotStopPluginGUI(InstrumentId, int))); connect(dialog, - SIGNAL(bypassed(InstrumentId, int, bool)), + TQT_SIGNAL(bypassed(InstrumentId, int, bool)), this, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); connect(dialog, - SIGNAL(destroyed(InstrumentId, int)), + TQT_SIGNAL(destroyed(InstrumentId, int)), this, - SLOT(slotPluginDialogDestroyed(InstrumentId, int))); + TQT_SLOT(slotPluginDialogDestroyed(InstrumentId, int))); - connect(this, SIGNAL(documentAboutToChange()), dialog, SLOT(close())); + connect(this, TQT_SIGNAL(documentAboutToChange()), dialog, TQT_SLOT(close())); m_pluginDialogs[key] = dialog; m_pluginDialogs[key]->show(); @@ -7028,7 +7028,7 @@ void RosegardenGUIApp::slotPluginSelected(InstrumentId instrumentId, int index, int plugin) { - const QObject *s = sender(); + const TQObject *s = sender(); bool fromSynthMgr = (s == m_synthManager); @@ -7276,7 +7276,7 @@ RosegardenGUIApp::slotPluginPortChanged(InstrumentId instrumentId, void RosegardenGUIApp::slotChangePluginProgram(InstrumentId instrumentId, int pluginIndex, - QString program) + TQString program) { PluginContainer *container = 0; @@ -7345,7 +7345,7 @@ RosegardenGUIApp::slotPluginProgramChanged(InstrumentId instrumentId, return ; } - QString program = strtoqstr(inst->getProgram()); + TQString program = strtoqstr(inst->getProgram()); RG_DEBUG << "RosegardenGUIApp::slotPluginProgramChanged - " << "setting plugin program (" @@ -7381,8 +7381,8 @@ void RosegardenGUIApp::slotChangePluginConfiguration(InstrumentId instrumentId, int index, bool global, - QString key, - QString value) + TQString key, + TQString value) { PluginContainer *container = 0; @@ -7537,17 +7537,17 @@ RosegardenGUIApp::slotPlayList() { if (!m_playList) { m_playList = new PlayListDialog(i18n("Play List"), this); - connect(m_playList, SIGNAL(closing()), - SLOT(slotPlayListClosed())); - connect(m_playList->getPlayList(), SIGNAL(play(QString)), - SLOT(slotPlayListPlay(QString))); + connect(m_playList, TQT_SIGNAL(closing()), + TQT_SLOT(slotPlayListClosed())); + connect(m_playList->getPlayList(), TQT_SIGNAL(play(TQString)), + TQT_SLOT(slotPlayListPlay(TQString))); } m_playList->show(); } void -RosegardenGUIApp::slotPlayListPlay(QString url) +RosegardenGUIApp::slotPlayListPlay(TQString url) { slotStop(); openURL(url); @@ -7564,14 +7564,14 @@ RosegardenGUIApp::slotPlayListClosed() void RosegardenGUIApp::slotTutorial() { - QString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/en/chapter-0.html"); + TQString tutorialURL = i18n("http://rosegarden.sourceforge.net/tutorial/en/chapter-0.html"); kapp->invokeBrowser(tutorialURL); } void RosegardenGUIApp::slotBugGuidelines() { - QString glURL = i18n("http://rosegarden.sourceforge.net/tutorial/bug-guidelines.html"); + TQString glURL = i18n("http://rosegarden.sourceforge.net/tutorial/bug-guidelines.html"); kapp->invokeBrowser(glURL); } @@ -7654,10 +7654,10 @@ RosegardenGUIApp::slotPanic() (&progressDlg); ProgressDialog::processEvents(); - connect(m_seqManager, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(m_seqManager, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(m_seqManager, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(m_seqManager, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); m_seqManager->panic(); @@ -7678,7 +7678,7 @@ RosegardenGUIApp::slotPopulateTrackInstrumentPopup() Instrument* instrument = m_doc->getStudio().getInstrumentById(track->getInstrument()); - QPopupMenu* popup = dynamic_cast<QPopupMenu*>(factory()->container("set_track_instrument", this)); + TQPopupMenu* popup = dynamic_cast<TQPopupMenu*>(factory()->container("set_track_instrument", this)); m_view->getTrackEditor()->getTrackButtons()->populateInstrumentPopup(instrument, popup); } @@ -7689,11 +7689,11 @@ RosegardenGUIApp::slotRemapInstruments() RG_DEBUG << "RosegardenGUIApp::slotRemapInstruments\n"; RemapInstrumentDialog dialog(this, m_doc); - connect(&dialog, SIGNAL(applyClicked()), + connect(&dialog, TQT_SIGNAL(applyClicked()), m_view->getTrackEditor()->getTrackButtons(), - SLOT(slotSynchroniseWithComposition())); + TQT_SLOT(slotSynchroniseWithComposition())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotRemapInstruments - accepted\n"; } @@ -7712,20 +7712,20 @@ RosegardenGUIApp::slotSaveDefaultStudio() KTmpStatusMsg msg(i18n("Saving current document as default studio..."), this); - QString autoloadFile = ::locateLocal("appdata", "autoload.rg"); + TQString autoloadFile = ::locateLocal("appdata", "autoload.rg"); RG_DEBUG << "RosegardenGUIApp::slotSaveDefaultStudio : saving studio in " << autoloadFile << endl; SetWaitCursor waitCursor; - QString errMsg; + TQString errMsg; bool res = m_doc->saveDocument(autoloadFile, errMsg); if (!res) { if (errMsg) - KMessageBox::error(this, i18n(QString("Could not auto-save document at %1\nError was : %2") + KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2") .arg(autoloadFile).arg(errMsg))); else - KMessageBox::error(this, i18n(QString("Could not auto-save document at %1") + KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1") .arg(autoloadFile))); } @@ -7740,10 +7740,10 @@ RosegardenGUIApp::slotImportDefaultStudio() if (reply != KMessageBox::Yes) return ; - QString autoloadFile = + TQString autoloadFile = KGlobal::dirs()->findResource("appdata", "autoload.rg"); - QFileInfo autoloadFileInfo(autoloadFile); + TQFileInfo autoloadFileInfo(autoloadFile); if (!autoloadFileInfo.isReadable()) { RG_DEBUG << "RosegardenGUIDoc::slotImportDefaultStudio - " @@ -7759,8 +7759,8 @@ RosegardenGUIApp::slotImportStudio() { RG_DEBUG << "RosegardenGUIApp::slotImportStudio()\n"; - QString studioDir = KGlobal::dirs()->findResource("appdata", "library/"); - QDir dir(studioDir); + TQString studioDir = KGlobal::dirs()->findResource("appdata", "library/"); + TQDir dir(studioDir); if (!dir.exists()) { studioDir = ":ROSEGARDENDEVICE"; } else { @@ -7775,7 +7775,7 @@ RosegardenGUIApp::slotImportStudio() if (url.isEmpty()) return ; - QString target; + TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1") .arg(url.prettyURL())); @@ -7786,7 +7786,7 @@ RosegardenGUIApp::slotImportStudio() } void -RosegardenGUIApp::slotImportStudioFromFile(const QString &file) +RosegardenGUIApp::slotImportStudioFromFile(const TQString &file) { RosegardenGUIDoc *doc = new RosegardenGUIDoc(this, 0, true); // skipAutoload @@ -7891,7 +7891,7 @@ RosegardenGUIApp::slotModifyMIDIFilters() MidiFilterDialog dialog(this, m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotModifyMIDIFilters - accepted" << endl; } } @@ -7903,7 +7903,7 @@ RosegardenGUIApp::slotManageMetronome() ManageMetronomeDialog dialog(this, m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotManageMetronome - accepted" << endl; } } @@ -7947,9 +7947,9 @@ RosegardenGUIApp::slotShowTip() KTipDialog::showTip(this, locate("data", "rosegarden/tips"), true); } -void RosegardenGUIApp::slotShowToolHelp(const QString &s) +void RosegardenGUIApp::slotShowToolHelp(const TQString &s) { - QString msg = s; + TQString msg = s; if (msg != "") msg = " " + msg; slotStatusMsg(msg); } @@ -7982,12 +7982,12 @@ RosegardenGUIApp::awaitDialogClearance() while (haveDialog) { - const QObjectList *c = children(); + const TQObjectList *c = children(); if (!c) return; haveDialog = false; - for (QObjectList::const_iterator i = c->begin(); i != c->end(); ++i) { - QDialog *dialog = dynamic_cast<QDialog *>(*i); + for (TQObjectList::const_iterator i = c->begin(); i != c->end(); ++i) { + TQDialog *dialog = dynamic_cast<TQDialog *>(*i); if (dialog && dialog->isVisible()) { haveDialog = true; break; @@ -8004,7 +8004,7 @@ RosegardenGUIApp::awaitDialogClearance() } void -RosegardenGUIApp::slotNewerVersionAvailable(QString v) +RosegardenGUIApp::slotNewerVersionAvailable(TQString v) { if (m_firstRun) return; KStartupLogo::hideIfStillThere(); @@ -8014,7 +8014,7 @@ RosegardenGUIApp::slotNewerVersionAvailable(QString v) (this, i18n("<h3>Newer version available</h3><p>A newer version of Rosegarden may be available.<br>Please consult the <a href=\"http://www.rosegardenmusic.com/getting/\">Rosegarden website</a> for more information.</p>"), i18n("Newer version available"), - QString("version-%1-available-show").arg(v), + TQString("version-%1-available-show").arg(v), KMessageBox::AllowLink); CurrentProgressDialog::thaw(); } diff --git a/src/gui/application/RosegardenGUIApp.h b/src/gui/application/RosegardenGUIApp.h index 502d195..8ae0eaa 100644 --- a/src/gui/application/RosegardenGUIApp.h +++ b/src/gui/application/RosegardenGUIApp.h @@ -36,18 +36,18 @@ #include "sound/AudioFile.h" #include "sound/Midi.h" #include <kdockwidget.h> -#include <qstring.h> -#include <qvaluevector.h> - - -class QWidget; -class QTimer; -class QTextCodec; -class QShowEvent; -class QObject; -class QLabel; -class QCursor; -class QAccel; +#include <tqstring.h> +#include <tqvaluevector.h> + + +class TQWidget; +class TQTimer; +class TQTextCodec; +class TQShowEvent; +class TQObject; +class TQLabel; +class TQCursor; +class TQAccel; class KURL; class KTempFile; class KToggleAction; @@ -123,7 +123,7 @@ public: */ RosegardenGUIApp(bool useSequencer = true, bool useExistingSequencer = false, - QObject *startupStatusMessageReceiver = 0); + TQObject *startupStatusMessageReceiver = 0); virtual ~RosegardenGUIApp(); @@ -148,32 +148,32 @@ public: /** * open a Rosegarden file */ - virtual void openFile(QString filePath) { openFile(filePath, ImportCheckType); } + virtual void openFile(TQString filePath) { openFile(filePath, ImportCheckType); } /** * open a file, explicitly specifying its type */ - void openFile(QString filePath, ImportType type); + void openFile(TQString filePath, ImportType type); /** * decode and open a project file */ - void importProject(QString filePath); + void importProject(TQString filePath); /** * open a URL */ - virtual void openURL(QString url); + virtual void openURL(TQString url); /** * merge a file with the existing document */ - virtual void mergeFile(QString filePath) { mergeFile(filePath, ImportCheckType); } + virtual void mergeFile(TQString filePath) { mergeFile(filePath, ImportCheckType); } /** * merge a file, explicitly specifying its type */ - void mergeFile(QString filePath, ImportType type); + void mergeFile(TQString filePath, ImportType type); /** * open a URL @@ -183,27 +183,27 @@ public: /** * export a MIDI file */ - void exportMIDIFile(QString url); + void exportMIDIFile(TQString url); /** * export a Csound scorefile */ - void exportCsoundFile(QString url); + void exportCsoundFile(TQString url); /** * export a Mup file */ - void exportMupFile(QString url); + void exportMupFile(TQString url); /** * export a LilyPond file */ - bool exportLilyPondFile(QString url, bool forPreview = false); + bool exportLilyPondFile(TQString url, bool forPreview = false); /** * export a MusicXml file */ - void exportMusicXmlFile(QString url); + void exportMusicXmlFile(TQString url); /** * Get the sequence manager object @@ -320,17 +320,17 @@ public: /** * Plug a widget into our common accelerators */ - void plugAccelerators(QWidget *widget, QAccel *accel); + void plugAccelerators(TQWidget *widget, TQAccel *accel); /** * Override from QWidget * Toolbars and docks need special treatment */ - virtual void setCursor(const QCursor&); + virtual void setCursor(const TQCursor&); bool isTrackEditorPlayTracking() const; - bool testAudioPath(QString op); // and open the dialog to set it if unset + bool testAudioPath(TQString op); // and open the dialog to set it if unset bool haveAudioImporter() const { return m_haveAudioImporter; } protected: @@ -342,27 +342,27 @@ protected: /** * Create document from a file */ - RosegardenGUIDoc* createDocument(QString filePath, ImportType type = ImportRG4); + RosegardenGUIDoc* createDocument(TQString filePath, ImportType type = ImportRG4); /** * Create a document from RG file */ - RosegardenGUIDoc* createDocumentFromRGFile(QString filePath); + RosegardenGUIDoc* createDocumentFromRGFile(TQString filePath); /** * Create document from MIDI file */ - RosegardenGUIDoc* createDocumentFromMIDIFile(QString filePath); + RosegardenGUIDoc* createDocumentFromMIDIFile(TQString filePath); /** * Create document from RG21 file */ - RosegardenGUIDoc* createDocumentFromRG21File(QString filePath); + RosegardenGUIDoc* createDocumentFromRG21File(TQString filePath); /** * Create document from Hydrogen drum machine file */ - RosegardenGUIDoc* createDocumentFromHydrogenFile(QString filePath); + RosegardenGUIDoc* createDocumentFromHydrogenFile(TQString filePath); /**/ /**/ @@ -377,7 +377,7 @@ protected: static const void* SequencerExternal; /// Raise the transport along - virtual void showEvent(QShowEvent*); + virtual void showEvent(TQShowEvent*); /** * read general Options again and initialize all variables like @@ -456,22 +456,22 @@ protected: /** * Create a new audio file for the sequencer and return the - * path to it as a QString. + * path to it as a TQString. */ - QString createNewAudioFile(); - QValueVector<QString> createRecordAudioFiles(const QValueVector<InstrumentId> &); + TQString createNewAudioFile(); + TQValueVector<TQString> createRecordAudioFiles(const TQValueVector<InstrumentId> &); - QString getAudioFilePath(); + TQString getAudioFilePath(); //!!!mtr - QValueVector<InstrumentId> getArmedInstruments(); + TQValueVector<InstrumentId> getArmedInstruments(); /** * Show a sequencer error to the user. This is for errors from * the framework code; the playback code uses mapped compositions * to send these things back asynchronously. */ - void showError(QString error); + void showError(TQString error); /* * Return AudioManagerDialog @@ -483,7 +483,7 @@ protected: * good and that (if it exists) the user agrees to overwrite. * Return a null string if the write should not go ahead. */ - QString getValidWriteFile(QString extension, QString label); + TQString getValidWriteFile(TQString extension, TQString label); /** * Find any non-ASCII strings in a composition that has been @@ -495,7 +495,7 @@ protected: * necessary). */ void fixTextEncodings(Composition *); - QTextCodec *guessTextCodec(std::string); + TQTextCodec *guessTextCodec(std::string); /** * Set the current document @@ -513,7 +513,7 @@ protected: void createAndSetupTransport(); signals: - void startupStatusMessage(QString message); + void startupStatusMessage(TQString message); /// emitted just before the document is changed void documentAboutToChange(); @@ -543,7 +543,7 @@ public slots: * * @param url : a string containing a url (protocol://foo/bar/file.rg) */ - virtual void slotOpenDroppedURL(QString url); + virtual void slotOpenDroppedURL(TQString url); /** * Open the document properties dialog on the Audio page @@ -812,7 +812,7 @@ public slots: * Tempo to Segment length */ void slotTempoToSegmentLength(); - void slotTempoToSegmentLength(QWidget* parent); + void slotTempoToSegmentLength(TQWidget* parent); /** * toggle segment labels @@ -855,22 +855,22 @@ public slots: */ void slotEditTempo(); void slotEditTempo(timeT atTime); - void slotEditTempo(QWidget *parent); - void slotEditTempo(QWidget *parent, timeT atTime); + void slotEditTempo(TQWidget *parent); + void slotEditTempo(TQWidget *parent, timeT atTime); /** * Edit the time signature - called from a Transport signal */ void slotEditTimeSignature(); void slotEditTimeSignature(timeT atTime); - void slotEditTimeSignature(QWidget *parent); - void slotEditTimeSignature(QWidget *parent, timeT atTime); + void slotEditTimeSignature(TQWidget *parent); + void slotEditTimeSignature(TQWidget *parent, timeT atTime); /** * Edit the playback pointer position - called from a Transport signal */ void slotEditTransportTime(); - void slotEditTransportTime(QWidget *parent); + void slotEditTransportTime(TQWidget *parent); /** * Change the length of the composition @@ -956,7 +956,7 @@ public slots: /** * Import Studio from File */ - void slotImportStudioFromFile(const QString &file); + void slotImportStudioFromFile(const TQString &file); /** * Send MIDI_RESET to all MIDI devices @@ -1014,7 +1014,7 @@ public slots: * * @param text the text that is displayed in the statusbar */ - void slotStatusMsg(QString text); + void slotStatusMsg(TQString text); /** * changes the status message of the whole statusbar for two @@ -1024,7 +1024,7 @@ public slots: * * @param text the text that is displayed in the statusbar */ - void slotStatusHelpMsg(QString text); + void slotStatusHelpMsg(TQString text); /** * enables/disables the transport window @@ -1146,7 +1146,7 @@ public slots: /** * Put the GUI into a given Tool edit mode */ - void slotActivateTool(QString toolName); + void slotActivateTool(TQString toolName); /** * Toggles either the play or record metronome according @@ -1302,8 +1302,8 @@ public slots: */ void slotDeleteMarker(int id, timeT time, - QString name, - QString description); + TQString name, + TQString description); /** * Document modified @@ -1320,7 +1320,7 @@ public slots: * Hopefully we'll be able to get rid of this eventually, * I should slip this in KMainWindow for KDE 4. */ - void slotStateChanged(QString, bool noReverse); + void slotStateChanged(TQString, bool noReverse); /** * A command has happened; check the clipboard in case we @@ -1339,7 +1339,7 @@ public slots: * Stop current playback, close current document, * open specified document and play it. */ - void slotPlayListPlay(QString url); + void slotPlayListPlay(TQString url); /** * Call up the online tutorial @@ -1464,7 +1464,7 @@ public slots: * Create a plugin dialog for a given instrument and slot, or * raise an exising one. */ - void slotShowPluginDialog(QWidget *parent, + void slotShowPluginDialog(TQWidget *parent, InstrumentId instrument, int index); @@ -1489,7 +1489,7 @@ public slots: * An external GUI has requested a program change. */ void slotChangePluginProgram(InstrumentId instrument, - int index, QString program); + int index, TQString program); /** * Our internal GUI has made a program change -- the @@ -1506,7 +1506,7 @@ public slots: * internally.) */ void slotChangePluginConfiguration(InstrumentId, int index, - bool global, QString key, QString value); + bool global, TQString key, TQString value); void slotPluginDialogDestroyed(InstrumentId instrument, int index); void slotPluginBypassed(InstrumentId, @@ -1534,9 +1534,9 @@ public slots: */ void slotEnableMIDIThruRouting(); - void slotShowToolHelp(const QString &); + void slotShowToolHelp(const TQString &); - void slotNewerVersionAvailable(QString); + void slotNewerVersionAvailable(TQString); void slotSetQuickMarker(); @@ -1607,7 +1607,7 @@ private: #endif // HAVE_LIBJACK ZoomSlider<double> *m_zoomSlider; - QLabel *m_zoomLabel; + TQLabel *m_zoomLabel; ProgressBar *m_progressBar; @@ -1637,7 +1637,7 @@ private: AudioPluginManager *m_pluginManager; - QTimer* m_autoSaveTimer; + TQTimer* m_autoSaveTimer; Clipboard *m_clipboard; @@ -1666,8 +1666,8 @@ private: // Used to fetch the current sequencer position from the mmapped sequencer information file // - QTimer *m_playTimer; - QTimer *m_stopTimer; + TQTimer *m_playTimer; + TQTimer *m_stopTimer; StartupTester *m_startupTester; diff --git a/src/gui/application/RosegardenGUIView.cpp b/src/gui/application/RosegardenGUIView.cpp index c61b51e..9eb7969 100644 --- a/src/gui/application/RosegardenGUIView.cpp +++ b/src/gui/application/RosegardenGUIView.cpp @@ -83,20 +83,20 @@ #include <kconfig.h> #include <kmessagebox.h> #include <kprocess.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qfileinfo.h> -#include <qobject.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqfileinfo.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -// Use this to define the basic unit of the main QCanvas size. +// Use this to define the basic unit of the main TQCanvas size. // // This apparently arbitrary figure is what we think is an // appropriate width in pixels for a 4/4 bar. Beware of making it @@ -106,7 +106,7 @@ namespace Rosegarden // static double barWidth44 = 100.0; -const QWidget *RosegardenGUIView::m_lastActiveMainWindow = 0; +const TQWidget *RosegardenGUIView::m_lastActiveMainWindow = 0; // This is the maximum number of matrix, event view or percussion // matrix editors to open in a single operation (not the maximum that @@ -118,9 +118,9 @@ RosegardenGUIView::RosegardenGUIView(bool showTrackLabels, SegmentParameterBox* segmentParameterBox, InstrumentParameterBox* instrumentParameterBox, TrackParameterBox* trackParameterBox, - QWidget *parent, + TQWidget *parent, const char* /*name*/) - : QVBox(parent), + : TQVBox(parent), m_rulerScale(0), m_trackEditor(0), m_segmentParameterBox(segmentParameterBox), @@ -141,91 +141,91 @@ RosegardenGUIView::RosegardenGUIView(bool showTrackLabels, m_rulerScale, showTrackLabels, unitsPerPixel, this /*hbox*/); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editSegment(Segment*)), - SLOT(slotEditSegment(Segment*))); + TQT_SIGNAL(editSegment(Segment*)), + TQT_SLOT(slotEditSegment(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editSegmentNotation(Segment*)), - SLOT(slotEditSegmentNotation(Segment*))); + TQT_SIGNAL(editSegmentNotation(Segment*)), + TQT_SLOT(slotEditSegmentNotation(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editSegmentMatrix(Segment*)), - SLOT(slotEditSegmentMatrix(Segment*))); + TQT_SIGNAL(editSegmentMatrix(Segment*)), + TQT_SLOT(slotEditSegmentMatrix(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editSegmentAudio(Segment*)), - SLOT(slotEditSegmentAudio(Segment*))); + TQT_SIGNAL(editSegmentAudio(Segment*)), + TQT_SLOT(slotEditSegmentAudio(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(audioSegmentAutoSplit(Segment*)), - SLOT(slotSegmentAutoSplit(Segment*))); + TQT_SIGNAL(audioSegmentAutoSplit(Segment*)), + TQT_SLOT(slotSegmentAutoSplit(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editSegmentEventList(Segment*)), - SLOT(slotEditSegmentEventList(Segment*))); + TQT_SIGNAL(editSegmentEventList(Segment*)), + TQT_SLOT(slotEditSegmentEventList(Segment*))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(editRepeat(Segment*, timeT)), - SLOT(slotEditRepeat(Segment*, timeT))); + TQT_SIGNAL(editRepeat(Segment*, timeT)), + TQT_SLOT(slotEditRepeat(Segment*, timeT))); connect(m_trackEditor->getSegmentCanvas(), - SIGNAL(setPointerPosition(timeT)), - doc, SLOT(slotSetPointerPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + doc, TQT_SLOT(slotSetPointerPosition(timeT))); connect(m_trackEditor, - SIGNAL(droppedDocument(QString)), + TQT_SIGNAL(droppedDocument(TQString)), parent, - SLOT(slotOpenDroppedURL(QString))); + TQT_SLOT(slotOpenDroppedURL(TQString))); connect(m_trackEditor, - SIGNAL(droppedAudio(QString)), + TQT_SIGNAL(droppedAudio(TQString)), this, - SLOT(slotDroppedAudio(QString))); + TQT_SLOT(slotDroppedAudio(TQString))); connect(m_trackEditor, - SIGNAL(droppedNewAudio(QString)), + TQT_SIGNAL(droppedNewAudio(TQString)), this, - SLOT(slotDroppedNewAudio(QString))); + TQT_SLOT(slotDroppedNewAudio(TQString))); connect(m_instrumentParameterBox, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), this, - SLOT(slotChangeInstrumentLabel(InstrumentId, QString))); + TQT_SLOT(slotChangeInstrumentLabel(InstrumentId, TQString))); connect(m_instrumentParameterBox, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), m_trackParameterBox, - SLOT(slotInstrumentLabelChanged(InstrumentId, QString))); + TQT_SLOT(slotInstrumentLabelChanged(InstrumentId, TQString))); connect(m_trackEditor->getTrackButtons(), - SIGNAL(nameChanged()), + TQT_SIGNAL(nameChanged()), m_trackParameterBox, - SLOT(slotSelectedTrackNameChanged())); + TQT_SLOT(slotSelectedTrackNameChanged())); connect(m_trackEditor->getTrackButtons(), - SIGNAL(instrumentSelected(int)), + TQT_SIGNAL(instrumentSelected(int)), m_trackParameterBox, - SLOT(slotUpdateControls(int))); + TQT_SLOT(slotUpdateControls(int))); connect(m_trackParameterBox, - SIGNAL(instrumentSelected(TrackId, int)), + TQT_SIGNAL(instrumentSelected(TrackId, int)), m_trackEditor->getTrackButtons(), - SLOT(slotTrackInstrumentSelection(TrackId, int))); + TQT_SLOT(slotTrackInstrumentSelection(TrackId, int))); - connect(this, SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), - this, SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); + connect(this, TQT_SIGNAL(controllerDeviceEventReceived(MappedEvent *, const void *)), + this, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); if (doc) { /* signal no longer exists - connect(doc, SIGNAL(recordingSegmentUpdated(Segment *, + connect(doc, TQT_SIGNAL(recordingSegmentUpdated(Segment *, timeT)), - this, SLOT(slotUpdateRecordingSegment(Segment *, + this, TQT_SLOT(slotUpdateRecordingSegment(Segment *, timeT))); */ - QObject::connect - (getCommandHistory(), SIGNAL(commandExecuted()), - m_trackEditor->getSegmentCanvas(), SLOT(slotUpdateSegmentsDrawBuffer())); + TQObject::connect + (getCommandHistory(), TQT_SIGNAL(commandExecuted()), + m_trackEditor->getSegmentCanvas(), TQT_SLOT(slotUpdateSegmentsDrawBuffer())); } } @@ -274,7 +274,7 @@ void RosegardenGUIView::print(Composition* p, bool previewOnly) delete notationView; } -void RosegardenGUIView::selectTool(const QString toolName) +void RosegardenGUIView::selectTool(const TQString toolName) { m_trackEditor->getSegmentCanvas()->slotSetTool(toolName); } @@ -298,10 +298,10 @@ void RosegardenGUIView::updateSelectionContents() /* hjj: WHAT DO DO WITH THIS ? void -RosegardenGUIView::slotEditMetadata(QString name) +RosegardenGUIView::slotEditMetadata(TQString name) { - const QWidget *ww = dynamic_cast<const QWidget *>(sender()); - QWidget *w = const_cast<QWidget *>(ww); + const TQWidget *ww = dynamic_cast<const TQWidget *>(sender()); + TQWidget *w = const_cast<TQWidget *>(ww); DocumentConfigureDialog *configDlg = new DocumentConfigureDialog(getDocument(), w ? w : this); @@ -457,77 +457,77 @@ RosegardenGUIView::createNotationView(std::vector<Segment *> segmentsToEdit) // For tempo changes (ugh -- it'd be nicer to make a tempo change // command that could interpret all this stuff from the dialog) // - connect(notationView, SIGNAL(changeTempo(timeT, + connect(notationView, TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), - RosegardenGUIApp::self(), SLOT(slotChangeTempo(timeT, + RosegardenGUIApp::self(), TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); - connect(notationView, SIGNAL(windowActivated()), - this, SLOT(slotActiveMainWindowChanged())); - - connect(notationView, SIGNAL(selectTrack(int)), - this, SLOT(slotSelectTrackSegments(int))); - - connect(notationView, SIGNAL(play()), - RosegardenGUIApp::self(), SLOT(slotPlay())); - connect(notationView, SIGNAL(stop()), - RosegardenGUIApp::self(), SLOT(slotStop())); - connect(notationView, SIGNAL(fastForwardPlayback()), - RosegardenGUIApp::self(), SLOT(slotFastforward())); - connect(notationView, SIGNAL(rewindPlayback()), - RosegardenGUIApp::self(), SLOT(slotRewind())); - connect(notationView, SIGNAL(fastForwardPlaybackToEnd()), - RosegardenGUIApp::self(), SLOT(slotFastForwardToEnd())); - connect(notationView, SIGNAL(rewindPlaybackToBeginning()), - RosegardenGUIApp::self(), SLOT(slotRewindToBeginning())); - connect(notationView, SIGNAL(panic()), - RosegardenGUIApp::self(), SLOT(slotPanic())); - - connect(notationView, SIGNAL(saveFile()), - RosegardenGUIApp::self(), SLOT(slotFileSave())); - connect(notationView, SIGNAL(jumpPlaybackTo(timeT)), - getDocument(), SLOT(slotSetPointerPosition(timeT))); - connect(notationView, SIGNAL(openInNotation(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); - connect(notationView, SIGNAL(openInMatrix(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); - connect(notationView, SIGNAL(openInPercussionMatrix(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsPercussionMatrix(std::vector<Segment *>))); - connect(notationView, SIGNAL(openInEventList(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); + connect(notationView, TQT_SIGNAL(windowActivated()), + this, TQT_SLOT(slotActiveMainWindowChanged())); + + connect(notationView, TQT_SIGNAL(selectTrack(int)), + this, TQT_SLOT(slotSelectTrackSegments(int))); + + connect(notationView, TQT_SIGNAL(play()), + RosegardenGUIApp::self(), TQT_SLOT(slotPlay())); + connect(notationView, TQT_SIGNAL(stop()), + RosegardenGUIApp::self(), TQT_SLOT(slotStop())); + connect(notationView, TQT_SIGNAL(fastForwardPlayback()), + RosegardenGUIApp::self(), TQT_SLOT(slotFastforward())); + connect(notationView, TQT_SIGNAL(rewindPlayback()), + RosegardenGUIApp::self(), TQT_SLOT(slotRewind())); + connect(notationView, TQT_SIGNAL(fastForwardPlaybackToEnd()), + RosegardenGUIApp::self(), TQT_SLOT(slotFastForwardToEnd())); + connect(notationView, TQT_SIGNAL(rewindPlaybackToBeginning()), + RosegardenGUIApp::self(), TQT_SLOT(slotRewindToBeginning())); + connect(notationView, TQT_SIGNAL(panic()), + RosegardenGUIApp::self(), TQT_SLOT(slotPanic())); + + connect(notationView, TQT_SIGNAL(saveFile()), + RosegardenGUIApp::self(), TQT_SLOT(slotFileSave())); + connect(notationView, TQT_SIGNAL(jumpPlaybackTo(timeT)), + getDocument(), TQT_SLOT(slotSetPointerPosition(timeT))); + connect(notationView, TQT_SIGNAL(openInNotation(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); + connect(notationView, TQT_SIGNAL(openInMatrix(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); + connect(notationView, TQT_SIGNAL(openInPercussionMatrix(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsPercussionMatrix(std::vector<Segment *>))); + connect(notationView, TQT_SIGNAL(openInEventList(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); /* hjj: WHAT DO DO WITH THIS ? - connect(notationView, SIGNAL(editMetadata(QString)), - this, SLOT(slotEditMetadata(QString))); + connect(notationView, TQT_SIGNAL(editMetadata(TQString)), + this, TQT_SLOT(slotEditMetadata(TQString))); */ - connect(notationView, SIGNAL(editTriggerSegment(int)), - this, SLOT(slotEditTriggerSegment(int))); - connect(notationView, SIGNAL(staffLabelChanged(TrackId, QString)), - this, SLOT(slotChangeTrackLabel(TrackId, QString))); - connect(notationView, SIGNAL(toggleSolo(bool)), - RosegardenGUIApp::self(), SLOT(slotToggleSolo(bool))); - connect(notationView, SIGNAL(editTimeSignature(timeT)), - RosegardenGUIApp::self(), SLOT(slotEditTempos(timeT))); + connect(notationView, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SLOT(slotEditTriggerSegment(int))); + connect(notationView, TQT_SIGNAL(staffLabelChanged(TrackId, TQString)), + this, TQT_SLOT(slotChangeTrackLabel(TrackId, TQString))); + connect(notationView, TQT_SIGNAL(toggleSolo(bool)), + RosegardenGUIApp::self(), TQT_SLOT(slotToggleSolo(bool))); + connect(notationView, TQT_SIGNAL(editTimeSignature(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotEditTempos(timeT))); SequenceManager *sM = getDocument()->getSequenceManager(); - connect(sM, SIGNAL(insertableNoteOnReceived(int, int)), - notationView, SLOT(slotInsertableNoteOnReceived(int, int))); - connect(sM, SIGNAL(insertableNoteOffReceived(int, int)), - notationView, SLOT(slotInsertableNoteOffReceived(int, int))); + connect(sM, TQT_SIGNAL(insertableNoteOnReceived(int, int)), + notationView, TQT_SLOT(slotInsertableNoteOnReceived(int, int))); + connect(sM, TQT_SIGNAL(insertableNoteOffReceived(int, int)), + notationView, TQT_SLOT(slotInsertableNoteOffReceived(int, int))); - connect(notationView, SIGNAL(stepByStepTargetRequested(QObject *)), - this, SIGNAL(stepByStepTargetRequested(QObject *))); - connect(this, SIGNAL(stepByStepTargetRequested(QObject *)), - notationView, SLOT(slotStepByStepTargetRequested(QObject *))); - connect(RosegardenGUIApp::self(), SIGNAL(compositionStateUpdate()), - notationView, SLOT(slotCompositionStateUpdate())); - connect(this, SIGNAL(compositionStateUpdate()), - notationView, SLOT(slotCompositionStateUpdate())); + connect(notationView, TQT_SIGNAL(stepByStepTargetRequested(TQObject *)), + this, TQT_SIGNAL(stepByStepTargetRequested(TQObject *))); + connect(this, TQT_SIGNAL(stepByStepTargetRequested(TQObject *)), + notationView, TQT_SLOT(slotStepByStepTargetRequested(TQObject *))); + connect(RosegardenGUIApp::self(), TQT_SIGNAL(compositionStateUpdate()), + notationView, TQT_SLOT(slotCompositionStateUpdate())); + connect(this, TQT_SIGNAL(compositionStateUpdate()), + notationView, TQT_SLOT(slotCompositionStateUpdate())); // Encourage the notation view window to open to the same // interval as the current segment view @@ -659,73 +659,73 @@ RosegardenGUIView::createMatrixView(std::vector<Segment *> segmentsToEdit, bool // For tempo changes (ugh -- it'd be nicer to make a tempo change // command that could interpret all this stuff from the dialog) // - connect(matrixView, SIGNAL(changeTempo(timeT, + connect(matrixView, TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), - RosegardenGUIApp::self(), SLOT(slotChangeTempo(timeT, + RosegardenGUIApp::self(), TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); - connect(matrixView, SIGNAL(windowActivated()), - this, SLOT(slotActiveMainWindowChanged())); - - connect(matrixView, SIGNAL(selectTrack(int)), - this, SLOT(slotSelectTrackSegments(int))); - - connect(matrixView, SIGNAL(play()), - RosegardenGUIApp::self(), SLOT(slotPlay())); - connect(matrixView, SIGNAL(stop()), - RosegardenGUIApp::self(), SLOT(slotStop())); - connect(matrixView, SIGNAL(fastForwardPlayback()), - RosegardenGUIApp::self(), SLOT(slotFastforward())); - connect(matrixView, SIGNAL(rewindPlayback()), - RosegardenGUIApp::self(), SLOT(slotRewind())); - connect(matrixView, SIGNAL(fastForwardPlaybackToEnd()), - RosegardenGUIApp::self(), SLOT(slotFastForwardToEnd())); - connect(matrixView, SIGNAL(rewindPlaybackToBeginning()), - RosegardenGUIApp::self(), SLOT(slotRewindToBeginning())); - connect(matrixView, SIGNAL(panic()), - RosegardenGUIApp::self(), SLOT(slotPanic())); - - connect(matrixView, SIGNAL(saveFile()), - RosegardenGUIApp::self(), SLOT(slotFileSave())); - connect(matrixView, SIGNAL(jumpPlaybackTo(timeT)), - getDocument(), SLOT(slotSetPointerPosition(timeT))); - connect(matrixView, SIGNAL(openInNotation(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); - connect(matrixView, SIGNAL(openInMatrix(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); - connect(matrixView, SIGNAL(openInEventList(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); - connect(matrixView, SIGNAL(editTriggerSegment(int)), - this, SLOT(slotEditTriggerSegment(int))); - connect(matrixView, SIGNAL(toggleSolo(bool)), - RosegardenGUIApp::self(), SLOT(slotToggleSolo(bool))); - connect(matrixView, SIGNAL(editTimeSignature(timeT)), - RosegardenGUIApp::self(), SLOT(slotEditTempos(timeT))); + connect(matrixView, TQT_SIGNAL(windowActivated()), + this, TQT_SLOT(slotActiveMainWindowChanged())); + + connect(matrixView, TQT_SIGNAL(selectTrack(int)), + this, TQT_SLOT(slotSelectTrackSegments(int))); + + connect(matrixView, TQT_SIGNAL(play()), + RosegardenGUIApp::self(), TQT_SLOT(slotPlay())); + connect(matrixView, TQT_SIGNAL(stop()), + RosegardenGUIApp::self(), TQT_SLOT(slotStop())); + connect(matrixView, TQT_SIGNAL(fastForwardPlayback()), + RosegardenGUIApp::self(), TQT_SLOT(slotFastforward())); + connect(matrixView, TQT_SIGNAL(rewindPlayback()), + RosegardenGUIApp::self(), TQT_SLOT(slotRewind())); + connect(matrixView, TQT_SIGNAL(fastForwardPlaybackToEnd()), + RosegardenGUIApp::self(), TQT_SLOT(slotFastForwardToEnd())); + connect(matrixView, TQT_SIGNAL(rewindPlaybackToBeginning()), + RosegardenGUIApp::self(), TQT_SLOT(slotRewindToBeginning())); + connect(matrixView, TQT_SIGNAL(panic()), + RosegardenGUIApp::self(), TQT_SLOT(slotPanic())); + + connect(matrixView, TQT_SIGNAL(saveFile()), + RosegardenGUIApp::self(), TQT_SLOT(slotFileSave())); + connect(matrixView, TQT_SIGNAL(jumpPlaybackTo(timeT)), + getDocument(), TQT_SLOT(slotSetPointerPosition(timeT))); + connect(matrixView, TQT_SIGNAL(openInNotation(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); + connect(matrixView, TQT_SIGNAL(openInMatrix(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); + connect(matrixView, TQT_SIGNAL(openInEventList(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); + connect(matrixView, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SLOT(slotEditTriggerSegment(int))); + connect(matrixView, TQT_SIGNAL(toggleSolo(bool)), + RosegardenGUIApp::self(), TQT_SLOT(slotToggleSolo(bool))); + connect(matrixView, TQT_SIGNAL(editTimeSignature(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotEditTempos(timeT))); SequenceManager *sM = getDocument()->getSequenceManager(); - connect(sM, SIGNAL(insertableNoteOnReceived(int, int)), - matrixView, SLOT(slotInsertableNoteOnReceived(int, int))); - connect(sM, SIGNAL(insertableNoteOffReceived(int, int)), - matrixView, SLOT(slotInsertableNoteOffReceived(int, int))); - - connect(matrixView, SIGNAL(stepByStepTargetRequested(QObject *)), - this, SIGNAL(stepByStepTargetRequested(QObject *))); - connect(this, SIGNAL(stepByStepTargetRequested(QObject *)), - matrixView, SLOT(slotStepByStepTargetRequested(QObject *))); - connect(RosegardenGUIApp::self(), SIGNAL(compositionStateUpdate()), - matrixView, SLOT(slotCompositionStateUpdate())); - connect(this, SIGNAL(compositionStateUpdate()), - matrixView, SLOT(slotCompositionStateUpdate())); + connect(sM, TQT_SIGNAL(insertableNoteOnReceived(int, int)), + matrixView, TQT_SLOT(slotInsertableNoteOnReceived(int, int))); + connect(sM, TQT_SIGNAL(insertableNoteOffReceived(int, int)), + matrixView, TQT_SLOT(slotInsertableNoteOffReceived(int, int))); + + connect(matrixView, TQT_SIGNAL(stepByStepTargetRequested(TQObject *)), + this, TQT_SIGNAL(stepByStepTargetRequested(TQObject *))); + connect(this, TQT_SIGNAL(stepByStepTargetRequested(TQObject *)), + matrixView, TQT_SLOT(slotStepByStepTargetRequested(TQObject *))); + connect(RosegardenGUIApp::self(), TQT_SIGNAL(compositionStateUpdate()), + matrixView, TQT_SLOT(slotCompositionStateUpdate())); + connect(this, TQT_SIGNAL(compositionStateUpdate()), + matrixView, TQT_SLOT(slotCompositionStateUpdate())); connect(this, - SIGNAL(instrumentLevelsChanged(InstrumentId, + TQT_SIGNAL(instrumentLevelsChanged(InstrumentId, const LevelInfo &)), matrixView, - SLOT(slotInstrumentLevelsChanged(InstrumentId, + TQT_SLOT(slotInstrumentLevelsChanged(InstrumentId, const LevelInfo &))); // Encourage the matrix view window to open to the same @@ -817,7 +817,7 @@ void RosegardenGUIView::slotSegmentAutoSplit(Segment *segment) { AudioSplitDialog aSD(this, segment, getDocument()); - if (aSD.exec() == QDialog::Accepted) { + if (aSD.exec() == TQDialog::Accepted) { KCommand *command = new AudioSegmentAutoSplitCommand(getDocument(), segment, aSD.getThreshold()); @@ -833,13 +833,13 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment) KConfig* config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); - QString application = config->readEntry("externalaudioeditor", ""); + TQString application = config->readEntry("externalaudioeditor", ""); if (application == "") { application = AudioConfigurationPage::getBestAvailableAudioEditor(); } - QStringList splitCommand = QStringList::split(" ", application); + TQStringList splitCommand = TQStringList::split(" ", application); if (splitCommand.size() == 0) { @@ -853,7 +853,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment) return ; } - QFileInfo *appInfo = new QFileInfo(splitCommand[0]); + TQFileInfo *appInfo = new TQFileInfo(splitCommand[0]); if (appInfo->exists() == false || appInfo->isExecutable() == false) { std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - " << "can't execute \"" << splitCommand[0] << "\"" @@ -870,13 +870,13 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment) } // wait cursor - QApplication::setOverrideCursor(QCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); // Prepare the process // KProcess *process = new KProcess(); (*process) << splitCommand; - (*process) << QString(aF->getFilename().c_str()); + (*process) << TQString(aF->getFilename().c_str()); // Start it // @@ -886,7 +886,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment) } // restore cursor - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } @@ -1371,14 +1371,14 @@ RosegardenGUIView::slotAddCommandToHistory(KCommand *command) void RosegardenGUIView::slotChangeInstrumentLabel(InstrumentId id, - QString label) + TQString label) { m_trackEditor->getTrackButtons()->changeInstrumentLabel(id, label); } void RosegardenGUIView::slotChangeTrackLabel(TrackId id, - QString label) + TQString label) { m_trackEditor->getTrackButtons()->changeTrackLabel(id, label); } @@ -1505,11 +1505,11 @@ RosegardenGUIView::slotAddAudioSegmentDefaultPosition(AudioFileId audioFileId, } void -RosegardenGUIView::slotDroppedNewAudio(QString audioDesc) +RosegardenGUIView::slotDroppedNewAudio(TQString audioDesc) { - QTextIStream s(&audioDesc); + TQTextIStream s(&audioDesc); - QString url; + TQString url; int trackId; timeT time; url = s.readLine(); @@ -1545,31 +1545,31 @@ RosegardenGUIView::slotDroppedNewAudio(QString audioDesc) // Connect the progress dialog // - connect(&aFM, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(&aFM, SIGNAL(setOperationName(QString)), - &progressDlg, SLOT(slotSetOperationName(QString))); - connect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopImport())); + connect(&aFM, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(&aFM, TQT_SIGNAL(setOperationName(TQString)), + &progressDlg, TQT_SLOT(slotSetOperationName(TQString))); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopImport())); try { audioFileId = aFM.importURL(kurl, sampleRate); } catch (AudioFileManager::BadAudioPathException e) { CurrentProgressDialog::freeze(); - QString errorString = i18n("Can't add dropped file. ") + strtoqstr(e.getMessage()); + TQString errorString = i18n("Can't add dropped file. ") + strtoqstr(e.getMessage()); KMessageBox::sorry(this, errorString); return ; } catch (SoundFile::BadSoundFileException e) { CurrentProgressDialog::freeze(); - QString errorString = i18n("Can't add dropped file. ") + strtoqstr(e.getMessage()); + TQString errorString = i18n("Can't add dropped file. ") + strtoqstr(e.getMessage()); KMessageBox::sorry(this, errorString); return ; } - disconnect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopImport())); - connect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopPreview())); + disconnect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopImport())); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopPreview())); progressDlg.progressBar()->show(); progressDlg.slotSetOperationName(i18n("Generating audio preview...")); @@ -1577,14 +1577,14 @@ RosegardenGUIView::slotDroppedNewAudio(QString audioDesc) aFM.generatePreview(audioFileId); } catch (Exception e) { CurrentProgressDialog::freeze(); - QString message = strtoqstr(e.getMessage()) + "\n\n" + + TQString message = strtoqstr(e.getMessage()) + "\n\n" + i18n("Try copying this file to a directory where you have write permission and re-add it"); KMessageBox::information(this, message); //return false; } - disconnect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopPreview())); + disconnect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopPreview())); // add the file at the sequencer emit addAudioFile(audioFileId); @@ -1605,9 +1605,9 @@ RosegardenGUIView::slotDroppedNewAudio(QString audioDesc) } void -RosegardenGUIView::slotDroppedAudio(QString audioDesc) +RosegardenGUIView::slotDroppedAudio(TQString audioDesc) { - QTextIStream s(&audioDesc); + TQTextIStream s(&audioDesc); AudioFileId audioFileId; TrackId trackId; @@ -1748,9 +1748,9 @@ RosegardenGUIView::slotUpdateRecordingSegment(Segment *segment, return ; /* signal no longer exists - QObject::connect - (getDocument(), SIGNAL(recordingSegmentUpdated(Segment *, timeT)), - view, SLOT(slotUpdateRecordingSegment(Segment *, timeT))); + TQObject::connect + (getDocument(), TQT_SIGNAL(recordingSegmentUpdated(Segment *, timeT)), + view, TQT_SLOT(slotUpdateRecordingSegment(Segment *, timeT))); */ view->show(); @@ -1781,7 +1781,7 @@ RosegardenGUIView::windowActivationChange(bool) } void -RosegardenGUIView::slotActiveMainWindowChanged(const QWidget *w) +RosegardenGUIView::slotActiveMainWindowChanged(const TQWidget *w) { m_lastActiveMainWindow = w; } @@ -1789,7 +1789,7 @@ RosegardenGUIView::slotActiveMainWindowChanged(const QWidget *w) void RosegardenGUIView::slotActiveMainWindowChanged() { - const QWidget *w = dynamic_cast<const QWidget *>(sender()); + const TQWidget *w = dynamic_cast<const TQWidget *>(sender()); if (w) slotActiveMainWindowChanged(w); } @@ -2000,31 +2000,31 @@ RosegardenGUIView::createEventView(std::vector<Segment *> segmentsToEdit) segmentsToEdit, this); - connect(eventView, SIGNAL(windowActivated()), - this, SLOT(slotActiveMainWindowChanged())); - - connect(eventView, SIGNAL(selectTrack(int)), - this, SLOT(slotSelectTrackSegments(int))); - - connect(eventView, SIGNAL(saveFile()), - RosegardenGUIApp::self(), SLOT(slotFileSave())); - - connect(eventView, SIGNAL(openInNotation(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); - connect(eventView, SIGNAL(openInMatrix(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); - connect(eventView, SIGNAL(openInPercussionMatrix(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsPercussionMatrix(std::vector<Segment *>))); - connect(eventView, SIGNAL(openInEventList(std::vector<Segment *>)), - this, SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); - connect(eventView, SIGNAL(editTriggerSegment(int)), - this, SLOT(slotEditTriggerSegment(int))); - connect(this, SIGNAL(compositionStateUpdate()), - eventView, SLOT(slotCompositionStateUpdate())); - connect(RosegardenGUIApp::self(), SIGNAL(compositionStateUpdate()), - eventView, SLOT(slotCompositionStateUpdate())); - connect(eventView, SIGNAL(toggleSolo(bool)), - RosegardenGUIApp::self(), SLOT(slotToggleSolo(bool))); + connect(eventView, TQT_SIGNAL(windowActivated()), + this, TQT_SLOT(slotActiveMainWindowChanged())); + + connect(eventView, TQT_SIGNAL(selectTrack(int)), + this, TQT_SLOT(slotSelectTrackSegments(int))); + + connect(eventView, TQT_SIGNAL(saveFile()), + RosegardenGUIApp::self(), TQT_SLOT(slotFileSave())); + + connect(eventView, TQT_SIGNAL(openInNotation(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsNotation(std::vector<Segment *>))); + connect(eventView, TQT_SIGNAL(openInMatrix(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsMatrix(std::vector<Segment *>))); + connect(eventView, TQT_SIGNAL(openInPercussionMatrix(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsPercussionMatrix(std::vector<Segment *>))); + connect(eventView, TQT_SIGNAL(openInEventList(std::vector<Segment *>)), + this, TQT_SLOT(slotEditSegmentsEventList(std::vector<Segment *>))); + connect(eventView, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SLOT(slotEditTriggerSegment(int))); + connect(this, TQT_SIGNAL(compositionStateUpdate()), + eventView, TQT_SLOT(slotCompositionStateUpdate())); + connect(RosegardenGUIApp::self(), TQT_SIGNAL(compositionStateUpdate()), + eventView, TQT_SLOT(slotCompositionStateUpdate())); + connect(eventView, TQT_SIGNAL(toggleSolo(bool)), + RosegardenGUIApp::self(), TQT_SLOT(slotToggleSolo(bool))); // create keyboard accelerators on view // diff --git a/src/gui/application/RosegardenGUIView.h b/src/gui/application/RosegardenGUIView.h index b3727f3..1c2e3b1 100644 --- a/src/gui/application/RosegardenGUIView.h +++ b/src/gui/application/RosegardenGUIView.h @@ -32,12 +32,12 @@ #include "base/Track.h" #include "sound/AudioFile.h" #include "gui/editors/segment/TrackEditor.h" -#include <qstring.h> -#include <qvbox.h> +#include <tqstring.h> +#include <tqvbox.h> -class QWidget; -class QObject; +class TQWidget; +class TQObject; class LevelInfo; class KCommand; @@ -64,7 +64,7 @@ class LevelInfo; /** * The RosegardenGUIView class provides the view widget for the - * RosegardenGUIApp instance. The View instance inherits QWidget as a + * RosegardenGUIApp instance. The View instance inherits TQWidget as a * base class and represents the view object of a KTMainWindow. As * RosegardenGUIView is part of the docuement-view model, it needs a * reference to the document object connected with it by the @@ -86,7 +86,7 @@ public: SegmentParameterBox*, InstrumentParameterBox*, TrackParameterBox*, - QWidget *parent = 0, + TQWidget *parent = 0, const char *name=0); /** @@ -122,7 +122,7 @@ public: /** * Select a tool at the SegmentCanvas */ - void selectTool(QString toolName); + void selectTool(TQString toolName); /** * Show output levels @@ -143,7 +143,7 @@ public: SegmentSelection getSelection(); void updateSelectionContents(); - static bool isMainWindowLastActive(const QWidget *w) { + static bool isMainWindowLastActive(const TQWidget *w) { return w == m_lastActiveMainWindow; } @@ -162,7 +162,7 @@ public slots: void slotSegmentAutoSplit(Segment*); void slotEditRepeat(Segment*, timeT); /* hjj: WHAT DO DO WITH THIS ? - void slotEditMetadata(QString); + void slotEditMetadata(TQString); */ /** @@ -215,8 +215,8 @@ public slots: const RealTime &startTime, const RealTime &endTime); - void slotDroppedAudio(QString audioDesc); - void slotDroppedNewAudio(QString audioDesc); + void slotDroppedAudio(TQString audioDesc); + void slotDroppedNewAudio(TQString audioDesc); /* * Commands @@ -227,12 +227,12 @@ public slots: /* * Change the Instrument Label */ - void slotChangeInstrumentLabel(InstrumentId id, QString label); + void slotChangeInstrumentLabel(InstrumentId id, TQString label); /* * Change the Track Label */ - void slotChangeTrackLabel(TrackId id, QString label); + void slotChangeTrackLabel(TrackId id, TQString label); /* * Set the mute button on the track buttons and on the instrument @@ -269,7 +269,7 @@ public slots: * another application entirely but still receiving MIDI etc in * Rosegarden.) */ - void slotActiveMainWindowChanged(const QWidget *); + void slotActiveMainWindowChanged(const TQWidget *); void slotActiveMainWindowChanged(); // uses sender() /** @@ -280,9 +280,9 @@ public slots: void slotControllerDeviceEventReceived(MappedEvent *, const void *); signals: - void activateTool(QString toolName); + void activateTool(TQString toolName); - void stateChange(QString, bool); + void stateChange(TQString, bool); // Inform that we've got a SegmentSelection // @@ -301,10 +301,10 @@ signals: * This signal is used to dispatch a notification for a request to * set the step-by-step-editing target window to all candidate targets, * so that they can either know that their request has been granted - * (if they match the QObject passed) or else deactivate any step-by- + * (if they match the TQObject passed) or else deactivate any step-by- * step editing currently active in their own window (otherwise). */ - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); /* * Add an audio file at the sequencer - when we drop a new file @@ -338,7 +338,7 @@ protected: InstrumentParameterBox *m_instrumentParameterBox; TrackParameterBox *m_trackParameterBox; - static const QWidget *m_lastActiveMainWindow; + static const TQWidget *m_lastActiveMainWindow; }; diff --git a/src/gui/application/RosegardenIface.cpp b/src/gui/application/RosegardenIface.cpp index 7e07f14..95df1f5 100644 --- a/src/gui/application/RosegardenIface.cpp +++ b/src/gui/application/RosegardenIface.cpp @@ -35,9 +35,9 @@ #include <kaction.h> #include <kdcopactionproxy.h> #include <kmainwindow.h> -#include <qcstring.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqcstring.h> +#include <tqstring.h> +#include <tqvaluelist.h> #include <kapplication.h> #include <dcopclient.h> @@ -56,7 +56,7 @@ void RosegardenIface::iFaceDelayedInit(KMainWindow* mainWindow) this); } -DCOPRef RosegardenIface::action(const QCString &name) +DCOPRef RosegardenIface::action(const TQCString &name) { return DCOPRef(kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId(name)); @@ -65,16 +65,16 @@ DCOPRef RosegardenIface::action(const QCString &name) QCStringList RosegardenIface::actions() { QCStringList res; - QValueList<KAction *> lst = m_dcopActionProxy->actions(); - QValueList<KAction *>::ConstIterator it = lst.begin(); - QValueList<KAction *>::ConstIterator end = lst.end(); + TQValueList<KAction *> lst = m_dcopActionProxy->actions(); + TQValueList<KAction *>::ConstIterator it = lst.begin(); + TQValueList<KAction *>::ConstIterator end = lst.end(); for (; it != end; ++it ) res.append( (*it)->name() ); return res; } -QMap<QCString,DCOPRef> RosegardenIface::actionMap() +TQMap<TQCString,DCOPRef> RosegardenIface::actionMap() { return m_dcopActionProxy->actionMap(); } diff --git a/src/gui/application/RosegardenIface.h b/src/gui/application/RosegardenIface.h index baa8b4e..046033c 100644 --- a/src/gui/application/RosegardenIface.h +++ b/src/gui/application/RosegardenIface.h @@ -32,14 +32,14 @@ #include <dcopobject.h> #include <dcopref.h> -#include <qmap.h> -#include <qstring.h> -#include <qvaluevector.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include "base/Instrument.h" #include "sound/MappedComposition.h" -class QCString; +class TQCString; class KMainWindow; class KDCOPActionProxy; @@ -60,9 +60,9 @@ public: void iFaceDelayedInit(KMainWindow*); k_dcop: - virtual void openFile(QString file) = 0; - virtual void openURL(QString url) = 0; - virtual void mergeFile(QString file) = 0; + virtual void openFile(TQString file) = 0; + virtual void openURL(TQString url) = 0; + virtual void mergeFile(TQString file) = 0; virtual void fileNew() = 0; virtual void fileSave() = 0; virtual void fileClose() = 0; @@ -102,20 +102,20 @@ k_dcop: // gui does so and returns the path of the new file so that the // sequencer can use it. // - virtual QString createNewAudioFile() = 0; - virtual QValueVector<QString> createRecordAudioFiles - (const QValueVector<InstrumentId> &recordInstruments) = 0; - virtual QString getAudioFilePath() = 0; + virtual TQString createNewAudioFile() = 0; + virtual TQValueVector<TQString> createRecordAudioFiles + (const TQValueVector<InstrumentId> &recordInstruments) = 0; + virtual TQString getAudioFilePath() = 0; - virtual QValueVector<InstrumentId> getArmedInstruments() = 0; + virtual TQValueVector<InstrumentId> getArmedInstruments() = 0; - virtual void showError(QString error) = 0; + virtual void showError(TQString error) = 0; // Actions proxy // - DCOPRef action( const QCString &name ); + DCOPRef action( const TQCString &name ); QCStringList actions(); - QMap<QCString,DCOPRef> actionMap(); + TQMap<TQCString,DCOPRef> actionMap(); protected: //--------------- Data members --------------------------------- diff --git a/src/gui/application/SetWaitCursor.cpp b/src/gui/application/SetWaitCursor.cpp index 7fc0053..9d4472d 100644 --- a/src/gui/application/SetWaitCursor.cpp +++ b/src/gui/application/SetWaitCursor.cpp @@ -31,8 +31,8 @@ #include "RosegardenGUIApp.h" #include "RosegardenGUIView.h" #include <kcursor.h> -#include <qcursor.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqwidget.h> #include <kapplication.h> namespace Rosegarden @@ -65,8 +65,8 @@ SetWaitCursor::~SetWaitCursor() if (m_guiApp) { RG_DEBUG << "SetWaitCursor::SetWaitCursor() : restoring normal cursor\n"; - QWidget* viewport = 0; - QCursor currentSegmentCanvasCursor; + TQWidget* viewport = 0; + TQCursor currentSegmentCanvasCursor; if ((m_guiApp->getView() && m_guiApp->getView()->getTrackEditor() && diff --git a/src/gui/application/SetWaitCursor.h b/src/gui/application/SetWaitCursor.h index 38687c5..c7b8aa6 100644 --- a/src/gui/application/SetWaitCursor.h +++ b/src/gui/application/SetWaitCursor.h @@ -26,7 +26,7 @@ #ifndef _RG_SETWAITCURSOR_H_ #define _RG_SETWAITCURSOR_H_ -#include <qcursor.h> +#include <tqcursor.h> @@ -48,8 +48,8 @@ public: protected: RosegardenGUIApp* m_guiApp; - QCursor m_saveCursor; - QCursor m_saveSegmentCanvasCursor; + TQCursor m_saveCursor; + TQCursor m_saveSegmentCanvasCursor; }; diff --git a/src/gui/application/StartupTester.cpp b/src/gui/application/StartupTester.cpp index 15940b6..5e1813d 100644 --- a/src/gui/application/StartupTester.cpp +++ b/src/gui/application/StartupTester.cpp @@ -29,9 +29,9 @@ #include "gui/dialogs/LilyPondOptionsDialog.h" #include <kprocess.h> -#include <qmutex.h> -#include <qthread.h> -#include <qregexp.h> +#include <tqmutex.h> +#include <tqthread.h> +#include <tqregexp.h> namespace Rosegarden @@ -43,11 +43,11 @@ StartupTester::StartupTester() : m_haveLilyPondView(false), m_haveAudioFileImporter(false) { - QHttp *http = new QHttp(); - connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), - this, SLOT(slotHttpResponseHeaderReceived(const QHttpResponseHeader &))); - connect(http, SIGNAL(done(bool)), - this, SLOT(slotHttpDone(bool))); + TQHttp *http = new TQHttp(); + connect(http, TQT_SIGNAL(responseHeaderReceived(const TQHttpResponseHeader &)), + this, TQT_SLOT(slotHttpResponseHeaderReceived(const TQHttpResponseHeader &))); + connect(http, TQT_SIGNAL(done(bool)), + this, TQT_SLOT(slotHttpDone(bool))); m_versionHttpFailed = false; http->setHost("www.rosegardenmusic.com"); http->get("/latest-version.txt"); @@ -67,8 +67,8 @@ StartupTester::run() KProcess *proc = new KProcess(); m_stdoutBuffer = ""; - QObject::connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(stdoutReceived(KProcess *, char *, int))); + TQObject::connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(stdoutReceived(KProcess *, char *, int))); *proc << "rosegarden-audiofile-importer"; *proc << "--conftest"; proc->start(KProcess::Block, KProcess::All); @@ -85,8 +85,8 @@ StartupTester::run() proc = new KProcess; m_stdoutBuffer = ""; - QObject::connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(stdoutReceived(KProcess *, char *, int))); + TQObject::connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(stdoutReceived(KProcess *, char *, int))); *proc << "rosegarden-project-package"; *proc << "--conftest"; proc->start(KProcess::Block, KProcess::All); @@ -105,8 +105,8 @@ StartupTester::run() proc = new KProcess(); m_stdoutBuffer = ""; - QObject::connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(stdoutReceived(KProcess *, char *, int))); + TQObject::connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(stdoutReceived(KProcess *, char *, int))); *proc << "rosegarden-lilypondview"; *proc << "--conftest"; proc->start(KProcess::Block, KProcess::All); @@ -117,7 +117,7 @@ StartupTester::run() } else { RG_DEBUG << "StartupTester - lilypondview OK" << endl; m_haveLilyPondView = true; - QRegExp re("LilyPond version: ([^\n]*)"); + TQRegExp re("LilyPond version: ([^\n]*)"); if (re.search(m_stdoutBuffer) != -1) { LilyPondOptionsDialog::setDefaultLilyPondVersion(re.cap(1)); } @@ -147,54 +147,54 @@ StartupTester::isReady() void StartupTester::stdoutReceived(KProcess *, char *buffer, int len) { - m_stdoutBuffer += QString::fromLatin1(buffer, len); + m_stdoutBuffer += TQString::fromLatin1(buffer, len); } void -StartupTester::parseStdoutBuffer(QStringList &target) +StartupTester::parseStdoutBuffer(TQStringList &target) { - QRegExp re("Required: ([^\n]*)"); + TQRegExp re("Required: ([^\n]*)"); if (re.search(m_stdoutBuffer) != -1) { - target = QStringList::split(", ", re.cap(1)); + target = TQStringList::split(", ", re.cap(1)); } } bool -StartupTester::haveProjectPackager(QStringList *missing) +StartupTester::haveProjectPackager(TQStringList *missing) { while (!m_ready) usleep(10000); - QMutexLocker locker(&m_projectPackagerMutex); + TQMutexLocker locker(&m_projectPackagerMutex); if (missing) *missing = m_projectPackagerMissing; return m_haveProjectPackager; } bool -StartupTester::haveLilyPondView(QStringList *missing) +StartupTester::haveLilyPondView(TQStringList *missing) { while (!m_ready) usleep(10000); - QMutexLocker locker(&m_lilyPondViewMutex); + TQMutexLocker locker(&m_lilyPondViewMutex); if (missing) *missing = m_lilyPondViewMissing; return m_haveLilyPondView; } bool -StartupTester::haveAudioFileImporter(QStringList *missing) +StartupTester::haveAudioFileImporter(TQStringList *missing) { while (!m_ready) usleep(10000); - QMutexLocker locker(&m_audioFileImporterMutex); + TQMutexLocker locker(&m_audioFileImporterMutex); if (missing) *missing = m_audioFileImporterMissing; return m_haveAudioFileImporter; } bool -StartupTester::isVersionNewerThan(QString a, QString b) +StartupTester::isVersionNewerThan(TQString a, TQString b) { - QRegExp re("[._-]"); - QStringList alist = QStringList::split(re, a); - QStringList blist = QStringList::split(re, b); + TQRegExp re("[._-]"); + TQStringList alist = TQStringList::split(re, a); + TQStringList blist = TQStringList::split(re, b); int ae = alist.size(); int be = blist.size(); int e = std::max(ae, be); @@ -215,7 +215,7 @@ StartupTester::isVersionNewerThan(QString a, QString b) } void -StartupTester::slotHttpResponseHeaderReceived(const QHttpResponseHeader &h) +StartupTester::slotHttpResponseHeaderReceived(const TQHttpResponseHeader &h) { if (h.statusCode() / 100 != 2) m_versionHttpFailed = true; } @@ -223,17 +223,17 @@ StartupTester::slotHttpResponseHeaderReceived(const QHttpResponseHeader &h) void StartupTester::slotHttpDone(bool error) { - QHttp *http = const_cast<QHttp *>(dynamic_cast<const QHttp *>(sender())); + TQHttp *http = const_cast<TQHttp *>(dynamic_cast<const TQHttp *>(sender())); if (!http) return; http->deleteLater(); if (error) return; - QByteArray responseData = http->readAll(); - QString str = QString::fromUtf8(responseData.data()); - QStringList lines = QStringList::split('\n', str); + TQByteArray responseData = http->readAll(); + TQString str = TQString::fromUtf8(responseData.data()); + TQStringList lines = TQStringList::split('\n', str); if (lines.empty()) return; - QString latestVersion = lines[0]; + TQString latestVersion = lines[0]; std::cerr << "Comparing current version \"" << VERSION << "\" with latest version \"" << latestVersion << "\"" << std::endl; diff --git a/src/gui/application/StartupTester.h b/src/gui/application/StartupTester.h index 9c82e07..1249cbd 100644 --- a/src/gui/application/StartupTester.h +++ b/src/gui/application/StartupTester.h @@ -26,18 +26,18 @@ #ifndef _RG_STARTUPTESTER_H_ #define _RG_STARTUPTESTER_H_ -#include <qmutex.h> -#include <qthread.h> -#include <qstringlist.h> -#include <qobject.h> -#include <qhttp.h> +#include <tqmutex.h> +#include <tqthread.h> +#include <tqstringlist.h> +#include <tqobject.h> +#include <tqhttp.h> class KProcess; namespace Rosegarden { -class StartupTester : public QObject, public QThread +class StartupTester : public TQObject, public QThread { Q_OBJECT @@ -52,34 +52,34 @@ public: // If you call one of these methods before the startup test has // completed in the background, then it will block. - bool haveProjectPackager(QStringList *missingApplications); - bool haveLilyPondView(QStringList *missingApplications); - bool haveAudioFileImporter(QStringList *missingApplications); + bool haveProjectPackager(TQStringList *missingApplications); + bool haveLilyPondView(TQStringList *missingApplications); + bool haveAudioFileImporter(TQStringList *missingApplications); signals: - void newerVersionAvailable(QString); + void newerVersionAvailable(TQString); protected slots: void stdoutReceived(KProcess *, char *, int); - void slotHttpResponseHeaderReceived(const QHttpResponseHeader &); + void slotHttpResponseHeaderReceived(const TQHttpResponseHeader &); void slotHttpDone(bool); protected: bool m_ready; - QMutex m_projectPackagerMutex; - QMutex m_lilyPondViewMutex; - QMutex m_audioFileImporterMutex; + TQMutex m_projectPackagerMutex; + TQMutex m_lilyPondViewMutex; + TQMutex m_audioFileImporterMutex; bool m_haveProjectPackager; - QStringList m_projectPackagerMissing; + TQStringList m_projectPackagerMissing; bool m_haveLilyPondView; - QStringList m_lilyPondViewMissing; + TQStringList m_lilyPondViewMissing; bool m_haveAudioFileImporter; - QStringList m_audioFileImporterMissing; - QString m_stdoutBuffer; + TQStringList m_audioFileImporterMissing; + TQString m_stdoutBuffer; bool m_versionHttpFailed; - void parseStdoutBuffer(QStringList &target); - bool isVersionNewerThan(QString, QString); + void parseStdoutBuffer(TQStringList &target); + bool isVersionNewerThan(TQString, TQString); }; diff --git a/src/gui/application/main.cpp b/src/gui/application/main.cpp index d7b5779..8ee67e3 100644 --- a/src/gui/application/main.cpp +++ b/src/gui/application/main.cpp @@ -19,7 +19,7 @@ COPYING included with this distribution for more information. */ -#include <qtimer.h> +#include <tqtimer.h> #include <kapplication.h> #include <sys/time.h> #include "base/RealTime.h" @@ -35,10 +35,10 @@ #include <kprocess.h> #include <kglobalsettings.h> -#include <qstringlist.h> -#include <qregexp.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqstringlist.h> +#include <tqregexp.h> +#include <tqvbox.h> +#include <tqlabel.h> #include "document/ConfigGroups.h" #include "misc/Strings.h" @@ -214,7 +214,7 @@ components: - a canvas view. Although this isn't a part of the EditView's definition, both of the existing edit views (notation and matrix) - use one, because they both use a QCanvas to represent data. + use one, because they both use a TQCanvas to represent data. - LinedStaff, a staff with lines. Like the canvas view, this isn't part of the EditView definition, but both views use one. @@ -240,7 +240,7 @@ and Events (our basic music element). To help lift the ambiguity, "events" is for UI events, Events is for Event.] -# The canvas view gets the user events (see - NotationCanvasView::contentsMousePressEvent(QMouseEvent*) for an + NotationCanvasView::contentsMousePressEvent(TQMouseEvent*) for an example). It locates where the event occured in terms of musical element: which note or staff line the user clicked on, which pitch and time this corresponds to, that kind of stuff. (In the @@ -347,14 +347,14 @@ static int _x_errhandler( Display *dpy, XErrorEvent *err ) void testInstalledVersion() { - QString versionLocation = locate("appdata", "version.txt"); - QString installedVersion; + TQString versionLocation = locate("appdata", "version.txt"); + TQString installedVersion; if (versionLocation) { - QFile versionFile(versionLocation); + TQFile versionFile(versionLocation); if (versionFile.open(IO_ReadOnly)) { - QTextStream text(&versionFile); - QString s = text.readLine().stripWhiteSpace(); + TQTextStream text(&versionFile); + TQString s = text.readLine().stripWhiteSpace(); versionFile.close(); if (s) { if (s == VERSION) return; @@ -480,7 +480,7 @@ int main(int argc, char *argv[]) // Ensure quit on last window close // Register main DCOP interface // - QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); + TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), &app, TQT_SLOT(quit())); app.dcopClient()->registerAs(app.name(), false); app.dcopClient()->setDefaultObject(ROSEGARDEN_GUI_IFACE_NAME); @@ -498,7 +498,7 @@ int main(int argc, char *argv[]) KConfig *config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); - QString lastVersion = config->readEntry("lastversion", ""); + TQString lastVersion = config->readEntry("lastversion", ""); bool newVersion = (lastVersion != VERSION); if (newVersion) { std::cerr << "*** This is the first time running this Rosegarden version" << std::endl; @@ -514,25 +514,25 @@ int main(int argc, char *argv[]) // The config keys are "Height X" and "Width Y" where X and Y are // the sizes of the available desktop (i.e. the whole shebang if - // under Xinerama). These are obtained from QDesktopWidget. + // under Xinerama). These are obtained from TQDesktopWidget. config->setGroup("MainView"); int windowWidth = 0, windowHeight = 0; - QDesktopWidget *desktop = KApplication::desktop(); + TQDesktopWidget *desktop = KApplication::desktop(); if (desktop) { - QRect totalRect(desktop->screenGeometry()); - QRect desktopRect = KGlobalSettings::desktopGeometry(QPoint(0, 0)); - QSize startupSize; + TQRect totalRect(desktop->screenGeometry()); + TQRect desktopRect = KGlobalSettings::desktopGeometry(TQPoint(0, 0)); + TQSize startupSize; if (desktopRect.height() <= 800) { - startupSize = QSize((desktopRect.width() * 6) / 7, + startupSize = TQSize((desktopRect.width() * 6) / 7, (desktopRect.height() * 6) / 7); } else { - startupSize = QSize((desktopRect.width() * 4) / 5, + startupSize = TQSize((desktopRect.width() * 4) / 5, (desktopRect.height() * 4) / 5); } - QString widthKey = QString("Width %1").arg(totalRect.width()); - QString heightKey = QString("Height %1").arg(totalRect.height()); + TQString widthKey = TQString("Width %1").arg(totalRect.width()); + TQString heightKey = TQString("Height %1").arg(totalRect.height()); windowWidth = config->readUnsignedNumEntry (widthKey, startupSize.width()); windowHeight = config->readUnsignedNumEntry @@ -612,11 +612,11 @@ int main(int argc, char *argv[]) if (startLogo) { startLogo->raise(); startLogo->setHideEnabled(true); - QApplication::flushX(); + TQApplication::flushX(); } if (args->count()) { - rosegardengui->openFile(QFile::decodeName(args->arg(0)), RosegardenGUIApp::ImportCheckType); + rosegardengui->openFile(TQFile::decodeName(args->arg(0)), RosegardenGUIApp::ImportCheckType); } else { // rosegardengui->openDocumentFile(); } @@ -625,15 +625,15 @@ int main(int argc, char *argv[]) } - QObject::connect(&app, SIGNAL(aboutToSaveState()), - rosegardengui, SLOT(slotDeleteTransport())); + TQObject::connect(&app, TQT_SIGNAL(aboutToSaveState()), + rosegardengui, TQT_SLOT(slotDeleteTransport())); // Now that we've started up, raise start logo // if (startLogo) { startLogo->raise(); startLogo->setHideEnabled(true); - QApplication::flushX(); + TQApplication::flushX(); } // Check for sequencer and launch if needed @@ -642,7 +642,7 @@ int main(int argc, char *argv[]) rosegardengui->launchSequencer(args->isSet("existingsequencer")); } catch (std::string e) { RG_DEBUG << "RosegardenGUI - " << e << endl; - } catch (QString e) { + } catch (TQString e) { RG_DEBUG << "RosegardenGUI - " << e << endl; } catch (Exception e) { RG_DEBUG << "RosegardenGUI - " << e.getMessage() << endl; @@ -654,16 +654,16 @@ int main(int argc, char *argv[]) // See if the config wants us to load a soundfont // if (config->readBoolEntry("sfxloadenabled", false)) { - QString sfxLoadPath = config->readEntry("sfxloadpath", "/bin/sfxload"); - QString soundFontPath = config->readEntry("soundfontpath", ""); - QFileInfo sfxLoadInfo(sfxLoadPath), soundFontInfo(soundFontPath); + TQString sfxLoadPath = config->readEntry("sfxloadpath", "/bin/sfxload"); + TQString soundFontPath = config->readEntry("soundfontpath", ""); + TQFileInfo sfxLoadInfo(sfxLoadPath), soundFontInfo(soundFontPath); if (sfxLoadInfo.isExecutable() && soundFontInfo.isReadable()) { KProcess* sfxLoadProcess = new KProcess; (*sfxLoadProcess) << sfxLoadPath << soundFontPath; RG_DEBUG << "Starting sfxload : " << sfxLoadPath << " " << soundFontPath << endl; - QObject::connect(sfxLoadProcess, SIGNAL(processExited(KProcess*)), - &app, SLOT(sfxLoadExited(KProcess*))); + TQObject::connect(sfxLoadProcess, TQT_SIGNAL(processExited(KProcess*)), + &app, TQT_SLOT(sfxLoadExited(KProcess*))); sfxLoadProcess->start(); } else { @@ -695,7 +695,7 @@ int main(int argc, char *argv[]) if (visibleFor < RealTime(2, 0)) { int waitTime = visibleFor.sec * 1000 + visibleFor.msec(); - QTimer::singleShot(2500 - waitTime, startLogo, SLOT(close())); + TQTimer::singleShot(2500 - waitTime, startLogo, TQT_SLOT(close())); } else { startLogo->close(); } @@ -719,15 +719,15 @@ int main(int argc, char *argv[]) true, i18n("Welcome!"), KDialogBase::Ok, KDialogBase::Ok, false); - QVBox *mw = dialog->makeVBoxMainWidget(); - QHBox *hb = new QHBox(mw); - QLabel *image = new QLabel(hb); + TQVBox *mw = dialog->makeVBoxMainWidget(); + TQHBox *hb = new TQHBox(mw); + TQLabel *image = new TQLabel(hb); image->setAlignment(Qt::AlignTop); - QString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png"); + TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png"); if (iconFile) { - image->setPixmap(QPixmap(iconFile)); + image->setPixmap(TQPixmap(iconFile)); } - QLabel *label = new QLabel(hb); + TQLabel *label = new TQLabel(hb); label->setText(i18n("<h2>Welcome to Rosegarden!</h2><p>Welcome to the Rosegarden audio and MIDI sequencer and musical notation editor.</p><ul><li>If you have not already done so, you may wish to install some DSSI synth plugins, or a separate synth program such as QSynth. Rosegarden does not synthesize sounds from MIDI on its own, so without these you will hear nothing.</li><br><br><li>Rosegarden uses the JACK audio server for recording and playback of audio, and for playback from DSSI synth plugins. These features will only be available if the JACK server is running.</li><br><br><li>Rosegarden has comprehensive documentation: see the Help menu for the handbook, tutorials, and other information!</li></ul><p>Rosegarden was brought to you by a team of volunteers across the world. To learn more, go to <a href=\"http://www.rosegardenmusic.com/\">http://www.rosegardenmusic.com/</a>.</p>")); dialog->showButtonOK(true); rosegardengui->awaitDialogClearance(); diff --git a/src/gui/configuration/AudioConfigurationPage.cpp b/src/gui/configuration/AudioConfigurationPage.cpp index 28aff71..6361576 100644 --- a/src/gui/configuration/AudioConfigurationPage.cpp +++ b/src/gui/configuration/AudioConfigurationPage.cpp @@ -41,23 +41,23 @@ #include <kcombobox.h> #include <kconfig.h> #include <kfiledialog.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qobject.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qslider.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqobject.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqslider.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <kmessagebox.h> @@ -67,7 +67,7 @@ namespace Rosegarden AudioConfigurationPage::AudioConfigurationPage( RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name): TabbedConfigurationPage(cfg, parent, name), m_externalAudioEditorPath(0) @@ -77,10 +77,10 @@ AudioConfigurationPage::AudioConfigurationPage( m_cfg->setGroup(SequencerOptionsConfigGroup); - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, 7, 2, 10, 5); + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 7, 2, 10, 5); - QLabel *label = 0; + TQLabel *label = 0; int row = 0; @@ -89,7 +89,7 @@ AudioConfigurationPage::AudioConfigurationPage( layout->setRowSpacing(row, 15); ++row; - layout->addWidget(new QLabel(i18n("Audio preview scale"), + layout->addWidget(new TQLabel(i18n("Audio preview scale"), frame), row, 0); m_previewStyle = new KComboBox(frame); @@ -102,7 +102,7 @@ AudioConfigurationPage::AudioConfigurationPage( #ifdef HAVE_LIBJACK m_cfg->setGroup(SequencerOptionsConfigGroup); - label = new QLabel(i18n("Record audio files as"), frame); + label = new TQLabel(i18n("Record audio files as"), frame); m_audioRecFormat = new KComboBox(frame); m_audioRecFormat->insertItem(i18n("16-bit PCM WAV format (smaller files)")); m_audioRecFormat->insertItem(i18n("32-bit float WAV format (higher quality)")); @@ -114,14 +114,14 @@ AudioConfigurationPage::AudioConfigurationPage( m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addWidget(new QLabel(i18n("External audio editor"), frame), + layout->addWidget(new TQLabel(i18n("External audio editor"), frame), row, 0); - QString defaultAudioEditor = getBestAvailableAudioEditor(); + TQString defaultAudioEditor = getBestAvailableAudioEditor(); std::cerr << "defaultAudioEditor = " << defaultAudioEditor << std::endl; - QString externalAudioEditor = m_cfg->readEntry("externalaudioeditor", + TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor", defaultAudioEditor); if (externalAudioEditor == "") { @@ -129,32 +129,32 @@ AudioConfigurationPage::AudioConfigurationPage( m_cfg->writeEntry("externalaudioeditor", externalAudioEditor); } - m_externalAudioEditorPath = new QLineEdit(externalAudioEditor, frame); + m_externalAudioEditorPath = new TQLineEdit(externalAudioEditor, frame); // m_externalAudioEditorPath->setMinimumWidth(150); layout->addWidget(m_externalAudioEditorPath, row, 1); - QPushButton *changePathButton = - new QPushButton(i18n("Choose..."), frame); + TQPushButton *changePathButton = + new TQPushButton(i18n("Choose..."), frame); layout->addWidget(changePathButton, row, 2); - connect(changePathButton, SIGNAL(clicked()), SLOT(slotFileDialog())); + connect(changePathButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFileDialog())); ++row; m_cfg->setGroup(SequencerOptionsConfigGroup); - layout->addWidget(new QLabel(i18n("Create JACK outputs"), frame), + layout->addWidget(new TQLabel(i18n("Create JACK outputs"), frame), row, 0); // ++row; #ifdef HAVE_LIBJACK - m_createFaderOuts = new QCheckBox(i18n("for individual audio instruments"), frame); + m_createFaderOuts = new TQCheckBox(i18n("for individual audio instruments"), frame); m_createFaderOuts->setChecked(m_cfg->readBoolEntry("audiofaderouts", false)); // layout->addWidget(label, row, 0, Qt::AlignRight); layout->addWidget(m_createFaderOuts, row, 1); ++row; - m_createSubmasterOuts = new QCheckBox(i18n("for submasters"), frame); + m_createSubmasterOuts = new TQCheckBox(i18n("for submasters"), frame); m_createSubmasterOuts->setChecked(m_cfg->readBoolEntry("audiosubmasterouts", false)); @@ -173,15 +173,15 @@ AudioConfigurationPage::AudioConfigurationPage( #define OFFER_JACK_START_OPTION 1 #ifdef OFFER_JACK_START_OPTION - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 8, 4, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 8, 4, 10, 5); row = 0; layout->setRowSpacing(row, 15); ++row; - label = new QLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame); + label = new TQLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame); label->setAlignment(Qt::WordBreak); layout->addMultiCellWidget(label, row, row, 0, 3); @@ -190,21 +190,21 @@ AudioConfigurationPage::AudioConfigurationPage( // JACK control things // bool startJack = m_cfg->readBoolEntry("jackstart", false); - m_startJack = new QCheckBox(frame); + m_startJack = new TQCheckBox(frame); m_startJack->setChecked(startJack); - layout->addWidget(new QLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0); + layout->addWidget(new TQLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0); layout->addWidget(m_startJack, row, 1); ++row; - layout->addWidget(new QLabel(i18n("JACK command"), frame), + layout->addWidget(new TQLabel(i18n("JACK command"), frame), row, 0); - QString jackPath = m_cfg->readEntry("jackcommand", + TQString jackPath = m_cfg->readEntry("jackcommand", // "/usr/local/bin/jackd -d alsa -d hw -r 44100 -p 2048 -n 2"); "/usr/bin/qjackctl -s"); - m_jackPath = new QLineEdit(jackPath, frame); + m_jackPath = new TQLineEdit(jackPath, frame); layout->addMultiCellWidget(m_jackPath, row, row, 1, 3); ++row; @@ -221,7 +221,7 @@ AudioConfigurationPage::AudioConfigurationPage( void AudioConfigurationPage::slotFileDialog() { - QString path = KFileDialog::getOpenFileName(QString::null, QString::null, this, i18n("External audio editor path")); + TQString path = KFileDialog::getOpenFileName(TQString::null, TQString::null, this, i18n("External audio editor path")); m_externalAudioEditorPath->setText(path); } @@ -250,14 +250,14 @@ AudioConfigurationPage::apply() int previewstyle = m_previewStyle->currentItem(); m_cfg->writeEntry("audiopreviewstyle", previewstyle); - QString externalAudioEditor = getExternalAudioEditor(); + TQString externalAudioEditor = getExternalAudioEditor(); - QStringList extlist = QStringList::split(" ", externalAudioEditor); - QString extpath = ""; + TQStringList extlist = TQStringList::split(" ", externalAudioEditor); + TQString extpath = ""; if (extlist.size() > 0) extpath = extlist[0]; if (extpath != "") { - QFileInfo info(extpath); + TQFileInfo info(extpath); if (!info.exists() || !info.isExecutable()) { KMessageBox::error(0, i18n("External audio editor \"%1\" not found or not executable").arg(extpath)); m_cfg->writeEntry("externalaudioeditor", ""); @@ -272,17 +272,17 @@ AudioConfigurationPage::apply() QString AudioConfigurationPage::getBestAvailableAudioEditor() { - static QString result = ""; + static TQString result = ""; static bool haveResult = false; if (haveResult) return result; - QString path; + TQString path; const char *cpath = getenv("PATH"); if (cpath) path = cpath; else path = "/usr/bin:/bin"; - QStringList pathList = QStringList::split(":", path); + TQStringList pathList = TQStringList::split(":", path); const char *candidates[] = { "mhwaveedit", @@ -294,19 +294,19 @@ AudioConfigurationPage::getBestAvailableAudioEditor() i < sizeof(candidates)/sizeof(candidates[0]) && result == ""; i++) { - QString n(candidates[i]); + TQString n(candidates[i]); for (int j = 0; j < pathList.size() && result == ""; j++) { - QDir dir(pathList[j]); - QString fp(dir.filePath(n)); - QFileInfo fi(fp); + TQDir dir(pathList[j]); + TQString fp(dir.filePath(n)); + TQFileInfo fi(fp); if (fi.exists() && fi.isExecutable()) { if (n == "rezound") { - result = QString("%1 --audio-method=jack").arg(fp); + result = TQString("%1 --audio-method=jack").arg(fp); } else { result = fp; } diff --git a/src/gui/configuration/AudioConfigurationPage.h b/src/gui/configuration/AudioConfigurationPage.h index bd71df6..2b678aa 100644 --- a/src/gui/configuration/AudioConfigurationPage.h +++ b/src/gui/configuration/AudioConfigurationPage.h @@ -26,17 +26,17 @@ #define _RG_AUDIOCONFIGURATIONPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -#include <qlineedit.h> - -class QWidget; -class QSpinBox; -class QSlider; -class QPushButton; -class QLabel; -class QComboBox; -class QCheckBox; +#include <tqlineedit.h> + +class TQWidget; +class TQSpinBox; +class TQSlider; +class TQPushButton; +class TQLabel; +class TQComboBox; +class TQCheckBox; class KConfig; class KComboBox; @@ -53,33 +53,33 @@ class AudioConfigurationPage : public TabbedConfigurationPage public: AudioConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("Audio"); } - static QString title() { return i18n("Audio Settings"); } - static QString iconName() { return "configure-audio"; } + static TQString iconLabel() { return i18n("Audio"); } + static TQString title() { return i18n("Audio Settings"); } + static TQString iconName() { return "configure-audio"; } #ifdef HAVE_LIBJACK - QString getJackPath() { return m_jackPath->text(); } + TQString getJackPath() { return m_jackPath->text(); } #endif // HAVE_LIBJACK - static QString getBestAvailableAudioEditor(); + static TQString getBestAvailableAudioEditor(); protected slots: void slotFileDialog(); protected: - QString getExternalAudioEditor() { return m_externalAudioEditorPath->text(); } + TQString getExternalAudioEditor() { return m_externalAudioEditorPath->text(); } //--------------- Data members --------------------------------- #ifdef HAVE_LIBJACK - QCheckBox *m_startJack; - QLineEdit *m_jackPath; + TQCheckBox *m_startJack; + TQLineEdit *m_jackPath; #endif // HAVE_LIBJACK @@ -88,15 +88,15 @@ protected: // this decides how many audio input destinations // we have. // - QCheckBox *m_createFaderOuts; - QCheckBox *m_createSubmasterOuts; + TQCheckBox *m_createFaderOuts; + TQCheckBox *m_createSubmasterOuts; - QComboBox *m_audioRecFormat; + TQComboBox *m_audioRecFormat; #endif // HAVE_LIBJACK - QLineEdit* m_externalAudioEditorPath; - QComboBox* m_previewStyle; + TQLineEdit* m_externalAudioEditorPath; + TQComboBox* m_previewStyle; }; diff --git a/src/gui/configuration/AudioPropertiesPage.cpp b/src/gui/configuration/AudioPropertiesPage.cpp index 65d574e..9d0191e 100644 --- a/src/gui/configuration/AudioPropertiesPage.cpp +++ b/src/gui/configuration/AudioPropertiesPage.cpp @@ -36,46 +36,46 @@ #include <kdiskfreesp.h> #include <kfiledialog.h> #include <kfile.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { AudioPropertiesPage::AudioPropertiesPage(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(doc, parent, name) { AudioFileManager &afm = doc->getAudioFileManager(); - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new QLabel(i18n("Audio file path:"), frame), 0, 0); - m_path = new QLabel(QString(afm.getAudioPath().c_str()), frame); + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + layout->addWidget(new TQLabel(i18n("Audio file path:"), frame), 0, 0); + m_path = new TQLabel(TQString(afm.getAudioPath().c_str()), frame); layout->addWidget(m_path, 0, 1); m_changePathButton = - new QPushButton(i18n("Choose..."), frame); + new TQPushButton(i18n("Choose..."), frame); layout->addWidget(m_changePathButton, 0, 2); - m_diskSpace = new QLabel(frame); - layout->addWidget(new QLabel(i18n("Disk space remaining:"), frame), 1, 0); + m_diskSpace = new TQLabel(frame); + layout->addWidget(new TQLabel(i18n("Disk space remaining:"), frame), 1, 0); layout->addWidget(m_diskSpace, 1, 1); - m_minutesAtStereo = new QLabel(frame); + m_minutesAtStereo = new TQLabel(frame); layout->addWidget( - new QLabel(i18n("Equivalent minutes of 16-bit stereo:"), + new TQLabel(i18n("Equivalent minutes of 16-bit stereo:"), frame), 2, 0); layout->addWidget(m_minutesAtStereo, 2, 1, AlignCenter); @@ -84,8 +84,8 @@ AudioPropertiesPage::AudioPropertiesPage(RosegardenGUIDoc *doc, calculateStats(); - connect(m_changePathButton, SIGNAL(released()), - SLOT(slotFileDialog())); + connect(m_changePathButton, TQT_SIGNAL(released()), + TQT_SLOT(slotFileDialog())); addTab(frame, i18n("Modify audio path")); } @@ -95,17 +95,17 @@ AudioPropertiesPage::calculateStats() { // This stolen from KDE libs kfile/kpropertiesdialog.cpp // - QString mountPoint = KIO::findPathMountPoint(m_path->text()); + TQString mountPoint = KIO::findPathMountPoint(m_path->text()); KDiskFreeSp * job = new KDiskFreeSp; - connect(job, SIGNAL(foundMountPoint(const QString&, unsigned long, unsigned long, + connect(job, TQT_SIGNAL(foundMountPoint(const TQString&, unsigned long, unsigned long, unsigned long)), - this, SLOT(slotFoundMountPoint(const QString&, unsigned long, unsigned long, + this, TQT_SLOT(slotFoundMountPoint(const TQString&, unsigned long, unsigned long, unsigned long))); job->readDF(mountPoint); } void -AudioPropertiesPage::slotFoundMountPoint(const QString&, +AudioPropertiesPage::slotFoundMountPoint(const TQString&, unsigned long kBSize, unsigned long /*kBUsed*/, unsigned long kBAvail ) @@ -119,12 +119,12 @@ AudioPropertiesPage::slotFoundMountPoint(const QString&, AudioPluginManager *apm = m_doc->getPluginManager(); int sampleRate = 48000; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; sampleRate = result; @@ -136,11 +136,11 @@ AudioPropertiesPage::slotFoundMountPoint(const QString&, // float stereoMins = ( float(kBAvail) * 1024.0 ) / ( float(sampleRate) * 2.0 * 2.0 * 60.0 ); - QString minsStr; + TQString minsStr; minsStr.sprintf("%8.1f", stereoMins); m_minutesAtStereo-> - setText(QString("%1 %2 %3Hz").arg(minsStr) + setText(TQString("%1 %2 %3Hz").arg(minsStr) .arg(i18n("minutes at")) .arg(sampleRate)); } @@ -150,18 +150,18 @@ AudioPropertiesPage::slotFileDialog() { AudioFileManager &afm = m_doc->getAudioFileManager(); - KFileDialog *fileDialog = new KFileDialog(QString(afm.getAudioPath().c_str()), - QString::null, + KFileDialog *fileDialog = new KFileDialog(TQString(afm.getAudioPath().c_str()), + TQString::null, this, "file dialog", true); fileDialog->setMode(KFile::Directory); - connect(fileDialog, SIGNAL(fileSelected(const QString&)), - SLOT(slotFileSelected(const QString&))); + connect(fileDialog, TQT_SIGNAL(fileSelected(const TQString&)), + TQT_SLOT(slotFileSelected(const TQString&))); - connect(fileDialog, SIGNAL(destroyed()), - SLOT(slotDirectoryDialogClosed())); + connect(fileDialog, TQT_SIGNAL(destroyed()), + TQT_SLOT(slotDirectoryDialogClosed())); - if (fileDialog->exec() == QDialog::Accepted) { + if (fileDialog->exec() == TQDialog::Accepted) { m_path->setText(fileDialog->selectedFile()); calculateStats(); } @@ -172,7 +172,7 @@ void AudioPropertiesPage::apply() { AudioFileManager &afm = m_doc->getAudioFileManager(); - QString newDir = m_path->text(); + TQString newDir = m_path->text(); if (!newDir.isNull()) { afm.setAudioPath(qstrtostr(newDir)); diff --git a/src/gui/configuration/AudioPropertiesPage.h b/src/gui/configuration/AudioPropertiesPage.h index f21fecc..0c9d15f 100644 --- a/src/gui/configuration/AudioPropertiesPage.h +++ b/src/gui/configuration/AudioPropertiesPage.h @@ -27,13 +27,13 @@ #define _RG_AUDIOPROPERTIESPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; -class QPushButton; -class QLabel; +class TQWidget; +class TQPushButton; +class TQLabel; namespace Rosegarden @@ -52,12 +52,12 @@ class AudioPropertiesPage : public TabbedConfigurationPage Q_OBJECT public: AudioPropertiesPage(RosegardenGUIDoc *doc, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("Audio"); } - static QString title() { return i18n("Audio Settings"); } - static QString iconName() { return "configure-audio"; } + static TQString iconLabel() { return i18n("Audio"); } + static TQString title() { return i18n("Audio Settings"); } + static TQString iconName() { return "configure-audio"; } protected slots: void slotFileDialog(); @@ -67,7 +67,7 @@ protected slots: // void calculateStats(); - void slotFoundMountPoint(const QString&, + void slotFoundMountPoint(const TQString&, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); @@ -76,11 +76,11 @@ protected: //--------------- Data members --------------------------------- - QLabel *m_path; - QLabel *m_diskSpace; - QLabel *m_minutesAtStereo; + TQLabel *m_path; + TQLabel *m_diskSpace; + TQLabel *m_minutesAtStereo; - QPushButton *m_changePathButton; + TQPushButton *m_changePathButton; }; diff --git a/src/gui/configuration/ColourConfigurationPage.cpp b/src/gui/configuration/ColourConfigurationPage.cpp index f87cf20..975e00d 100644 --- a/src/gui/configuration/ColourConfigurationPage.cpp +++ b/src/gui/configuration/ColourConfigurationPage.cpp @@ -39,25 +39,25 @@ #include <kcolordialog.h> #include <kconfig.h> #include <kinputdialog.h> -#include <qcolor.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { ColourConfigurationPage::ColourConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(doc, parent, name) { - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, 2, 2, + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 10, 5); m_map = m_doc->getComposition().getSegmentColourMap(); @@ -67,42 +67,42 @@ ColourConfigurationPage::ColourConfigurationPage(RosegardenGUIDoc *doc, layout->addMultiCellWidget(m_colourtable, 0, 0, 0, 1); - QPushButton* addColourButton = new QPushButton(i18n("Add New Color"), + TQPushButton* addColourButton = new TQPushButton(i18n("Add New Color"), frame); layout->addWidget(addColourButton, 1, 0, Qt::AlignHCenter); - QPushButton* deleteColourButton = new QPushButton(i18n("Delete Color"), + TQPushButton* deleteColourButton = new TQPushButton(i18n("Delete Color"), frame); layout->addWidget(deleteColourButton, 1, 1, Qt::AlignHCenter); - connect(addColourButton, SIGNAL(clicked()), - this, SLOT(slotAddNew())); + connect(addColourButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddNew())); - connect(deleteColourButton, SIGNAL(clicked()), - this, SLOT(slotDelete())); + connect(deleteColourButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelete())); - connect(this, SIGNAL(docColoursChanged()), - m_doc, SLOT(slotDocColoursChanged())); + connect(this, TQT_SIGNAL(docColoursChanged()), + m_doc, TQT_SLOT(slotDocColoursChanged())); - connect(m_colourtable, SIGNAL(entryTextChanged(unsigned int, QString)), - this, SLOT(slotTextChanged(unsigned int, QString))); + connect(m_colourtable, TQT_SIGNAL(entryTextChanged(unsigned int, TQString)), + this, TQT_SLOT(slotTextChanged(unsigned int, TQString))); - connect(m_colourtable, SIGNAL(entryColourChanged(unsigned int, QColor)), - this, SLOT(slotColourChanged(unsigned int, QColor))); + connect(m_colourtable, TQT_SIGNAL(entryColourChanged(unsigned int, TQColor)), + this, TQT_SLOT(slotColourChanged(unsigned int, TQColor))); addTab(frame, i18n("Color Map")); } void -ColourConfigurationPage::slotTextChanged(unsigned int index, QString string) +ColourConfigurationPage::slotTextChanged(unsigned int index, TQString string) { m_map.modifyNameByIndex(m_listmap[index], string.ascii()); m_colourtable->populate_table(m_map, m_listmap); } void -ColourConfigurationPage::slotColourChanged(unsigned int index, QColor color) +ColourConfigurationPage::slotColourChanged(unsigned int index, TQColor color) { m_map.modifyColourByIndex(m_listmap[index], GUIPalette::convertColour(color)); m_colourtable->populate_table(m_map, m_listmap); @@ -121,11 +121,11 @@ ColourConfigurationPage::apply() void ColourConfigurationPage::slotAddNew() { - QColor temp; + TQColor temp; bool ok = false; - QString newName = KInputDialog::getText(i18n("New Color Name"), + TQString newName = KInputDialog::getText(i18n("New Color Name"), i18n("Enter new name"), i18n("New"), &ok); @@ -149,7 +149,7 @@ ColourConfigurationPage::slotAddNew() void ColourConfigurationPage::slotDelete() { - QTableSelection temp = m_colourtable->selection(0); + TQTableSelection temp = m_colourtable->selection(0); if ((!temp.isActive()) || (temp.topRow() == 0)) return ; diff --git a/src/gui/configuration/ColourConfigurationPage.h b/src/gui/configuration/ColourConfigurationPage.h index 9ef4ae0..2d3353d 100644 --- a/src/gui/configuration/ColourConfigurationPage.h +++ b/src/gui/configuration/ColourConfigurationPage.h @@ -29,11 +29,11 @@ #include "base/ColourMap.h" #include "gui/widgets/ColourTable.h" #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -52,14 +52,14 @@ class ColourConfigurationPage : public TabbedConfigurationPage Q_OBJECT public: ColourConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual void apply(); void populate_table(); - static QString iconLabel() { return i18n("Color"); } - static QString title() { return i18n("Color Settings"); } - static QString iconName() { return "colorize"; } + static TQString iconLabel() { return i18n("Color"); } + static TQString title() { return i18n("Color Settings"); } + static TQString iconName() { return "colorize"; } signals: void docColoursChanged(); @@ -67,8 +67,8 @@ signals: protected slots: void slotAddNew(); void slotDelete(); - void slotTextChanged(unsigned int, QString); - void slotColourChanged(unsigned int, QColor); + void slotTextChanged(unsigned int, TQString); + void slotColourChanged(unsigned int, TQColor); protected: ColourTable *m_colourtable; diff --git a/src/gui/configuration/ConfigurationPage.cpp b/src/gui/configuration/ConfigurationPage.cpp index 3f3730b..d0e2369 100644 --- a/src/gui/configuration/ConfigurationPage.cpp +++ b/src/gui/configuration/ConfigurationPage.cpp @@ -27,7 +27,7 @@ #include "document/RosegardenGUIDoc.h" #include <kconfig.h> -#include <qwidget.h> +#include <tqwidget.h> #include <algorithm> diff --git a/src/gui/configuration/ConfigurationPage.h b/src/gui/configuration/ConfigurationPage.h index 4a93195..d05296a 100644 --- a/src/gui/configuration/ConfigurationPage.h +++ b/src/gui/configuration/ConfigurationPage.h @@ -29,7 +29,7 @@ #ifndef _RG_CONFIGURATIONPAGE_H_ #define _RG_CONFIGURATIONPAGE_H_ -#include <qwidget.h> +#include <tqwidget.h> class KConfig; @@ -51,16 +51,16 @@ class ConfigurationPage : public QWidget public: ConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent=0, const char *name=0) - : QWidget(parent, name), m_doc(doc), m_cfg(0), m_pageIndex(0) {} + TQWidget *parent=0, const char *name=0) + : TQWidget(parent, name), m_doc(doc), m_cfg(0), m_pageIndex(0) {} ConfigurationPage(KConfig *cfg, - QWidget *parent=0, const char *name=0) - : QWidget(parent, name), m_doc(0), m_cfg(cfg), m_pageIndex(0) {} + TQWidget *parent=0, const char *name=0) + : TQWidget(parent, name), m_doc(0), m_cfg(cfg), m_pageIndex(0) {} ConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, const char *name=0) - : QWidget(parent, name), m_doc(doc), m_cfg(cfg), m_pageIndex(0) {} + TQWidget *parent=0, const char *name=0) + : TQWidget(parent, name), m_doc(doc), m_cfg(cfg), m_pageIndex(0) {} virtual ~ConfigurationPage() {}; diff --git a/src/gui/configuration/DocumentMetaConfigurationPage.cpp b/src/gui/configuration/DocumentMetaConfigurationPage.cpp index 9f5064b..b6479cc 100644 --- a/src/gui/configuration/DocumentMetaConfigurationPage.cpp +++ b/src/gui/configuration/DocumentMetaConfigurationPage.cpp @@ -44,22 +44,22 @@ #include "TabbedConfigurationPage.h" #include <kconfig.h> #include <klistview.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtable.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtable.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { -static QString durationToString(Rosegarden::Composition &comp, +static TQString durationToString(Rosegarden::Composition &comp, Rosegarden::timeT absTime, Rosegarden::timeT duration, Rosegarden::RealTime rt) @@ -74,11 +74,11 @@ static QString durationToString(Rosegarden::Composition &comp, class SegmentDataItem : public QTableItem { public: - SegmentDataItem(QTable *t, QString s) : - QTableItem(t, QTableItem::Never, s) { } + SegmentDataItem(TQTable *t, TQString s) : + TQTableItem(t, TQTableItem::Never, s) { } virtual int alignment() const { return Qt::AlignCenter; } - virtual QString key() const { + virtual TQString key() const { // It doesn't seem to be possible to specify a comparator so // as to get the right sorting for numeric items (what am I @@ -94,9 +94,9 @@ public: // assumption should hold for all current uses of this class, // but may need checking for future uses... - QString s(text()); + TQString s(text()); if (s[0].digitValue() >= 0) { - return QString("%1%2").arg(s.length()).arg(s); + return TQString("%1%2").arg(s.length()).arg(s); } else { return s; } @@ -104,7 +104,7 @@ public: }; DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(doc, parent, name) { @@ -125,32 +125,32 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d ++internalSegments; } - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 6, 2, 10, 5); - layout->addWidget(new QLabel(i18n("Filename:"), frame), 0, 0); - layout->addWidget(new QLabel(doc->getTitle(), frame), 0, 1); + layout->addWidget(new TQLabel(i18n("Filename:"), frame), 0, 0); + layout->addWidget(new TQLabel(doc->getTitle(), frame), 0, 1); - layout->addWidget(new QLabel(i18n("Formal duration (to end marker):"), frame), 1, 0); + layout->addWidget(new TQLabel(i18n("Formal duration (to end marker):"), frame), 1, 0); timeT d = comp.getEndMarker(); RealTime rtd = comp.getElapsedRealTime(d); - layout->addWidget(new QLabel(durationToString(comp, 0, d, rtd), frame), 1, 1); + layout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 1, 1); - layout->addWidget(new QLabel(i18n("Playing duration:"), frame), 2, 0); + layout->addWidget(new TQLabel(i18n("Playing duration:"), frame), 2, 0); d = comp.getDuration(); rtd = comp.getElapsedRealTime(d); - layout->addWidget(new QLabel(durationToString(comp, 0, d, rtd), frame), 2, 1); + layout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 2, 1); - layout->addWidget(new QLabel(i18n("Tracks:"), frame), 3, 0); - layout->addWidget(new QLabel(i18n("%1 used, %2 total") + layout->addWidget(new TQLabel(i18n("Tracks:"), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("%1 used, %2 total") .arg(usedTracks.size()) .arg(comp.getNbTracks()), frame), 3, 1); - layout->addWidget(new QLabel(i18n("Segments:"), frame), 4, 0); - layout->addWidget(new QLabel(i18n("%1 MIDI, %2 audio, %3 total") + layout->addWidget(new TQLabel(i18n("Segments:"), frame), 4, 0); + layout->addWidget(new TQLabel(i18n("%1 MIDI, %2 audio, %3 total") .arg(internalSegments) .arg(audioSegments) .arg(internalSegments + audioSegments), @@ -160,11 +160,11 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d addTab(frame, i18n("Statistics")); - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 1, 1, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 1, 1, 10, 5); - QTable *table = new QTable(1, 11, frame, "Segment Table"); - table->setSelectionMode(QTable::NoSelection); + TQTable *table = new TQTable(1, 11, frame, "Segment Table"); + table->setSelectionMode(TQTable::NoSelection); table->setSorting(true); table->horizontalHeader()->setLabel(0, i18n("Type")); table->horizontalHeader()->setLabel(1, i18n("Track")); @@ -205,25 +205,25 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 1, new SegmentDataItem (table, - QString("%1").arg(s->getTrack() + 1))); + TQString("%1").arg(s->getTrack() + 1))); - QPixmap colourPixmap(16, 16); + TQPixmap colourPixmap(16, 16); Colour colour = comp.getSegmentColourMap().getColourByIndex(s->getColourIndex()); colourPixmap.fill(GUIPalette::convertColour(colour)); table->setItem(i, 2, - new QTableItem(table, QTableItem::Never, + new TQTableItem(table, TQTableItem::Never, strtoqstr(s->getLabel()), colourPixmap)); table->setItem(i, 3, new SegmentDataItem (table, - QString("%1").arg(s->getStartTime()))); + TQString("%1").arg(s->getStartTime()))); table->setItem(i, 4, new SegmentDataItem (table, - QString("%1").arg(s->getEndMarkerTime() - + TQString("%1").arg(s->getEndMarkerTime() - s->getStartTime()))); std::set<long> notesOn; @@ -254,11 +254,11 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 5, new SegmentDataItem (table, - QString("%1").arg(events))); + TQString("%1").arg(events))); table->setItem(i, 6, new SegmentDataItem (table, - QString("%1").arg(maxPoly))); + TQString("%1").arg(maxPoly))); table->setItem(i, 7, new SegmentDataItem (table, @@ -280,13 +280,13 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 9, new SegmentDataItem (table, - QString("%1").arg(s->getTranspose()))); + TQString("%1").arg(s->getTranspose()))); if (s->getDelay() != 0) { if (s->getRealTimeDelay() != RealTime::zeroTime) { table->setItem(i, 10, new SegmentDataItem (table, - QString("%1 + %2 ms") + TQString("%1 + %2 ms") .arg(NotationStrings::makeNoteMenuLabel (s->getDelay(), true, discard, false)) .arg(s->getRealTimeDelay().sec * 1000 + @@ -300,7 +300,7 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d } else if (s->getRealTimeDelay() != RealTime::zeroTime) { table->setItem(i, 10, new SegmentDataItem (table, - QString("%2 ms") + TQString("%2 ms") .arg(s->getRealTimeDelay().sec * 1000 + s->getRealTimeDelay().msec()))); } else { @@ -328,13 +328,13 @@ DocumentMetaConfigurationPage::apply() /* hjj: WHAT TO DO WITH THIS ? void -DocumentMetaConfigurationPage::selectMetadata(QString name) +DocumentMetaConfigurationPage::selectMetadata(TQString name) { std::vector<PropertyName> fixedKeys = CompositionMetadataKeys::getFixedKeys(); std::vector<PropertyName>::iterator i = fixedKeys.begin(); - for (QListViewItem *item = m_fixed->firstChild(); + for (TQListViewItem *item = m_fixed->firstChild(); item != 0; item = item->nextSibling()) { if (i == fixedKeys.end()) @@ -349,7 +349,7 @@ DocumentMetaConfigurationPage::selectMetadata(QString name) ++i; } - for (QListViewItem *item = m_metadata->firstChild(); + for (TQListViewItem *item = m_metadata->firstChild(); item != 0; item = item->nextSibling()) { if (item->text(0).lower() != name) diff --git a/src/gui/configuration/DocumentMetaConfigurationPage.h b/src/gui/configuration/DocumentMetaConfigurationPage.h index db26f54..7a18bf6 100644 --- a/src/gui/configuration/DocumentMetaConfigurationPage.h +++ b/src/gui/configuration/DocumentMetaConfigurationPage.h @@ -27,11 +27,11 @@ #define _RG_DOCUMENTMETACONFIGURATIONPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; +class TQWidget; class KListView; @@ -51,15 +51,15 @@ class DocumentMetaConfigurationPage : public TabbedConfigurationPage Q_OBJECT public: DocumentMetaConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent = 0, const char *name = 0); + TQWidget *parent = 0, const char *name = 0); virtual void apply(); - static QString iconLabel() { return i18n("About"); } - static QString title() { return i18n("About"); } - static QString iconName() { return "contents"; } + static TQString iconLabel() { return i18n("About"); } + static TQString title() { return i18n("About"); } + static TQString iconName() { return "contents"; } /* hjj: WHAT TO DO WITH THIS ? - void selectMetadata(QString name); + void selectMetadata(TQString name); */ protected: diff --git a/src/gui/configuration/GeneralConfigurationPage.cpp b/src/gui/configuration/GeneralConfigurationPage.cpp index 22915ed..d6c850e 100644 --- a/src/gui/configuration/GeneralConfigurationPage.cpp +++ b/src/gui/configuration/GeneralConfigurationPage.cpp @@ -39,19 +39,19 @@ #include <kconfig.h> #include <kfiledialog.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qfileinfo.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqfileinfo.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden @@ -59,7 +59,7 @@ namespace Rosegarden GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : TabbedConfigurationPage(cfg, parent, name), m_doc(doc), m_client(0), @@ -68,23 +68,23 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, { m_cfg->setGroup(GeneralOptionsConfigGroup); - QFrame *frame; - QGridLayout *layout; - QLabel *label = 0; + TQFrame *frame; + TQGridLayout *layout; + TQLabel *label = 0; int row = 0; // // "Behavior" tab // - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 6, 2, // nbrow, nbcol 10, 5); layout->setRowSpacing(row, 15); ++row; - layout->addWidget(new QLabel(i18n("Double-click opens segment in"), + layout->addWidget(new TQLabel(i18n("Double-click opens segment in"), frame), row, 0); m_client = new KComboBox(frame); @@ -96,17 +96,17 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, layout->addMultiCellWidget(m_client, row, row, 1, 2); ++row; - layout->addWidget(new QLabel(i18n("Number of count-in measures when recording"), + layout->addWidget(new TQLabel(i18n("Number of count-in measures when recording"), frame), row, 0); - m_countIn = new QSpinBox(frame); + m_countIn = new TQSpinBox(frame); m_countIn->setValue(m_cfg->readUnsignedNumEntry("countinbars", 0)); m_countIn->setMaxValue(10); m_countIn->setMinValue(0); layout->addMultiCellWidget(m_countIn, row, row, 1, 2); ++row; - layout->addWidget(new QLabel(i18n("Auto-save interval"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Auto-save interval"), frame), row, 0); m_autoSave = new KComboBox(frame); m_autoSave->insertItem(i18n("Every 30 seconds")); @@ -137,10 +137,10 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, #ifdef HAVE_LIBJACK m_cfg->setGroup(SequencerOptionsConfigGroup); - label = new QLabel(i18n("Use JACK transport"), frame); + label = new TQLabel(i18n("Use JACK transport"), frame); layout->addWidget(label, row, 0); - m_jackTransport = new QCheckBox(frame); + m_jackTransport = new TQCheckBox(frame); layout->addMultiCellWidget(m_jackTransport, row, row, 1, 2); // m_jackTransport->insertItem(i18n("Ignore JACK transport")); @@ -168,9 +168,9 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, layout->setRowSpacing(row, 20); ++row; - layout->addWidget(new QLabel(i18n("Sequencer status"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Sequencer status"), frame), row, 0); - QString status(i18n("Unknown")); + TQString status(i18n("Unknown")); SequenceManager *mgr = doc->getSequenceManager(); if (mgr) { int driverStatus = mgr->getSoundDriverStatus() & (AUDIO_OK | MIDI_OK); @@ -190,12 +190,12 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, } } - layout->addWidget(new QLabel(status, frame), row, 1); + layout->addWidget(new TQLabel(status, frame), row, 1); - QPushButton *showStatusButton = new QPushButton(i18n("Details..."), + TQPushButton *showStatusButton = new TQPushButton(i18n("Details..."), frame); - QObject::connect(showStatusButton, SIGNAL(clicked()), - this, SLOT(slotShowStatus())); + TQObject::connect(showStatusButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotShowStatus())); layout->addWidget(showStatusButton, row, 2, Qt::AlignRight); ++row; @@ -206,8 +206,8 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, // // "Appearance" tab // - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 7, 4, // nbrow, nbcol -- one extra row improves layout 10, 5); @@ -216,7 +216,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, layout->setRowSpacing(row, 15); ++row; - layout->addWidget(new QLabel(i18n("Side-bar parameter box layout"), + layout->addWidget(new TQLabel(i18n("Side-bar parameter box layout"), frame), row, 0); m_sidebarStyle = new KComboBox(frame); @@ -230,7 +230,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, layout->addMultiCellWidget(m_sidebarStyle, row, row, 1, 3); ++row; - layout->addWidget(new QLabel(i18n("Note name style"), + layout->addWidget(new TQLabel(i18n("Note name style"), frame), row, 0); m_nameStyle = new KComboBox(frame); @@ -240,24 +240,24 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, layout->addMultiCellWidget(m_nameStyle, row, row, 1, 3); ++row; /* - layout->addWidget(new QLabel(i18n("Show tool context help in status bar"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Show tool context help in status bar"), frame), row, 0); - m_toolContextHelp = new QCheckBox(frame); + m_toolContextHelp = new TQCheckBox(frame); layout->addWidget(m_toolContextHelp, row, 1); m_toolContextHelp->setChecked(m_cfg->readBoolEntry ("toolcontexthelp", true)); ++row; */ - layout->addWidget(new QLabel(i18n("Show textured background on"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Show textured background on"), frame), row, 0); - m_backgroundTextures = new QCheckBox(i18n("Main window"), frame); + m_backgroundTextures = new TQCheckBox(i18n("Main window"), frame); layout->addWidget(m_backgroundTextures, row, 1); - m_matrixBackgroundTextures = new QCheckBox(i18n("Matrix"), frame); + m_matrixBackgroundTextures = new TQCheckBox(i18n("Matrix"), frame); layout->addWidget(m_matrixBackgroundTextures, row, 2); - m_notationBackgroundTextures = new QCheckBox(i18n("Notation"), frame); + m_notationBackgroundTextures = new TQCheckBox(i18n("Notation"), frame); layout->addWidget(m_notationBackgroundTextures, row, 3); m_backgroundTextures->setChecked(m_cfg->readBoolEntry @@ -272,7 +272,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_cfg->setGroup(GeneralOptionsConfigGroup); ++row; - layout->addWidget(new QLabel(i18n("Use bundled Klearlook theme"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Use bundled Klearlook theme"), frame), row, 0); m_globalStyle = new KComboBox(frame); m_globalStyle->insertItem(i18n("Never")); m_globalStyle->insertItem(i18n("When not running under KDE")); diff --git a/src/gui/configuration/GeneralConfigurationPage.h b/src/gui/configuration/GeneralConfigurationPage.h index 7d3203d..0c6b74c 100644 --- a/src/gui/configuration/GeneralConfigurationPage.h +++ b/src/gui/configuration/GeneralConfigurationPage.h @@ -28,15 +28,15 @@ #include "TabbedConfigurationPage.h" #include "gui/editors/eventlist/EventView.h" -#include <qstring.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qcombobox.h> -#include <qlineedit.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> #include <klocale.h> #include <kiconloader.h> -class QWidget; +class TQWidget; class KConfig; @@ -71,13 +71,13 @@ public: GeneralConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("General"); } - static QString title() { return i18n("General Configuration"); } - static QString iconName() { return "configure-general"; } + static TQString iconLabel() { return i18n("General"); } + static TQString title() { return i18n("General Configuration"); } + static TQString iconName() { return "configure-general"; } signals: void updateAutoSaveInterval(unsigned int); @@ -94,17 +94,17 @@ protected: //--------------- Data members --------------------------------- RosegardenGUIDoc* m_doc; - QComboBox* m_client; - QSpinBox* m_countIn; - QCheckBox* m_toolContextHelp; - QCheckBox* m_backgroundTextures; - QCheckBox* m_notationBackgroundTextures; - QCheckBox* m_matrixBackgroundTextures; - QComboBox *m_autoSave; - QComboBox* m_nameStyle; - QComboBox* m_sidebarStyle; - QComboBox* m_globalStyle; - QCheckBox *m_jackTransport; + TQComboBox* m_client; + TQSpinBox* m_countIn; + TQCheckBox* m_toolContextHelp; + TQCheckBox* m_backgroundTextures; + TQCheckBox* m_notationBackgroundTextures; + TQCheckBox* m_matrixBackgroundTextures; + TQComboBox *m_autoSave; + TQComboBox* m_nameStyle; + TQComboBox* m_sidebarStyle; + TQComboBox* m_globalStyle; + TQCheckBox *m_jackTransport; }; diff --git a/src/gui/configuration/HeadersConfigurationPage.cpp b/src/gui/configuration/HeadersConfigurationPage.cpp index 0571fb5..54ec010 100644 --- a/src/gui/configuration/HeadersConfigurationPage.cpp +++ b/src/gui/configuration/HeadersConfigurationPage.cpp @@ -35,35 +35,35 @@ #include <kconfig.h> #include <klistview.h> #include <klocale.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qfont.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqfont.h> namespace Rosegarden { -HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, +HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, RosegardenGUIDoc *doc) : - QVBox(parent), + TQVBox(parent), m_doc(doc) { // // LilyPond export: Printable headers // - QGroupBox *headersBox = new QGroupBox + TQGroupBox *headersBox = new QGroupBox (1, Horizontal, i18n("Printable headers"), this); - QFrame *frameHeaders = new QFrame(headersBox); - QGridLayout *layoutHeaders = new QGridLayout(frameHeaders, 10, 6, 10, 5); + TQFrame *frameHeaders = new TQFrame(headersBox); + TQGridLayout *layoutHeaders = new TQGridLayout(frameHeaders, 10, 6, 10, 5); // grab user headers from metadata Configuration metadata = (&m_doc->getComposition())->getMetadata(); @@ -84,8 +84,8 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, } unsigned int row = 0, col = 0, width = 1; - QLineEdit *editHeader = new QLineEdit(strtoqstr( header ), frameHeaders); - QString trName; + TQLineEdit *editHeader = new TQLineEdit(strtoqstr( header ), frameHeaders); + TQString trName; if (key == headerDedication) { m_editDedication = editHeader; row = 0; col = 2; width = 2; @@ -148,11 +148,11 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, // // ToolTips // - QToolTip::add( editHeader, trName ); + TQToolTip::add( editHeader, trName ); shown.insert(key); } - QLabel *separator = new QLabel(i18n("The composition comes here."), frameHeaders); + TQLabel *separator = new TQLabel(i18n("The composition comes here."), frameHeaders); separator->setAlignment( Qt::AlignCenter ); layoutHeaders->addMultiCellWidget(separator, 7, 7, 1, 4 ); @@ -162,7 +162,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, // set default expansion to false for this group -- what a faff KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); bool expanded = config->readBoolEntry("nonprintableheaders", false); config->writeEntry("nonprintableheaders", expanded); @@ -170,14 +170,14 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, CollapsingFrame *otherHeadersBox = new CollapsingFrame (i18n("Non-printable headers"), this, "nonprintableheaders"); - QFrame *frameOtherHeaders = new QFrame(otherHeadersBox); + TQFrame *frameOtherHeaders = new TQFrame(otherHeadersBox); otherHeadersBox->setWidgetFill(true); - QFont font(otherHeadersBox->font()); + TQFont font(otherHeadersBox->font()); font.setBold(false); otherHeadersBox->setFont(font); otherHeadersBox->setWidget(frameOtherHeaders); - QGridLayout *layoutOtherHeaders = new QGridLayout(frameOtherHeaders, 2, 2, 10, 5); + TQGridLayout *layoutOtherHeaders = new TQGridLayout(frameOtherHeaders, 2, 2, 10, 5); m_metadata = new KListView(frameOtherHeaders); m_metadata->addColumn(i18n("Name")); @@ -187,7 +187,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, m_metadata->setRenameable(0); m_metadata->setRenameable(1); m_metadata->setItemMargin(5); - m_metadata->setDefaultRenameAction(QListView::Accept); + m_metadata->setDefaultRenameAction(TQListView::Accept); m_metadata->setShowSortIndicator(true); std::vector<std::string> names(metadata.getPropertyNames()); @@ -197,7 +197,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, if (shown.find(names[i]) != shown.end()) continue; - QString name(strtoqstr(names[i])); + TQString name(strtoqstr(names[i])); // property names stored in lower case name = name.left(1).upper() + name.right(name.length() - 1); @@ -210,25 +210,25 @@ HeadersConfigurationPage::HeadersConfigurationPage(QWidget *parent, layoutOtherHeaders->addMultiCellWidget(m_metadata, 0, 0, 0, 1); - QPushButton* addPropButton = new QPushButton(i18n("Add New Property"), + TQPushButton* addPropButton = new TQPushButton(i18n("Add New Property"), frameOtherHeaders); layoutOtherHeaders->addWidget(addPropButton, 1, 0, Qt::AlignHCenter); - QPushButton* deletePropButton = new QPushButton(i18n("Delete Property"), + TQPushButton* deletePropButton = new TQPushButton(i18n("Delete Property"), frameOtherHeaders); layoutOtherHeaders->addWidget(deletePropButton, 1, 1, Qt::AlignHCenter); - connect(addPropButton, SIGNAL(clicked()), - this, SLOT(slotAddNewProperty())); + connect(addPropButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddNewProperty())); - connect(deletePropButton, SIGNAL(clicked()), - this, SLOT(slotDeleteProperty())); + connect(deletePropButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteProperty())); } void HeadersConfigurationPage::slotAddNewProperty() { - QString propertyName; + TQString propertyName; int i = 0; while (1) { @@ -280,7 +280,7 @@ void HeadersConfigurationPage::apply() metadata.set<String>(CompositionMetadataKeys::Copyright, qstrtostr(m_editCopyright->text())); metadata.set<String>(CompositionMetadataKeys::Tagline, qstrtostr(m_editTagline->text())); - for (QListViewItem *item = m_metadata->firstChild(); + for (TQListViewItem *item = m_metadata->firstChild(); item != 0; item = item->nextSibling()) { metadata.set<String>(qstrtostr(item->text(0).lower()), diff --git a/src/gui/configuration/HeadersConfigurationPage.h b/src/gui/configuration/HeadersConfigurationPage.h index 403d412..496bb92 100644 --- a/src/gui/configuration/HeadersConfigurationPage.h +++ b/src/gui/configuration/HeadersConfigurationPage.h @@ -26,11 +26,11 @@ #ifndef _RG_HEADERSCONFIGURATIONPAGE_H_ #define _RG_HEADERSCONFIGURATIONPAGE_H_ -#include <qvbox.h> +#include <tqvbox.h> -class QVBox; -class QWidget; -class QLineEdit; +class TQVBox; +class TQWidget; +class TQLineEdit; class KListView; namespace Rosegarden @@ -43,7 +43,7 @@ class HeadersConfigurationPage : public QVBox Q_OBJECT public: - HeadersConfigurationPage(QWidget *parent = 0, + HeadersConfigurationPage(TQWidget *parent = 0, RosegardenGUIDoc *doc = 0); public slots: @@ -57,19 +57,19 @@ protected: RosegardenGUIDoc *m_doc; // Header fields - QLineEdit *m_editDedication; - QLineEdit *m_editTitle; - QLineEdit *m_editSubtitle; - QLineEdit *m_editSubsubtitle; - QLineEdit *m_editPoet; - QLineEdit *m_editComposer; - QLineEdit *m_editMeter; - QLineEdit *m_editOpus; - QLineEdit *m_editArranger; - QLineEdit *m_editInstrument; - QLineEdit *m_editPiece; - QLineEdit *m_editCopyright; - QLineEdit *m_editTagline; + TQLineEdit *m_editDedication; + TQLineEdit *m_editTitle; + TQLineEdit *m_editSubtitle; + TQLineEdit *m_editSubsubtitle; + TQLineEdit *m_editPoet; + TQLineEdit *m_editComposer; + TQLineEdit *m_editMeter; + TQLineEdit *m_editOpus; + TQLineEdit *m_editArranger; + TQLineEdit *m_editInstrument; + TQLineEdit *m_editPiece; + TQLineEdit *m_editCopyright; + TQLineEdit *m_editTagline; KListView *m_metadata; }; diff --git a/src/gui/configuration/LatencyConfigurationPage.cpp b/src/gui/configuration/LatencyConfigurationPage.cpp index ff89edb..4ac9390 100644 --- a/src/gui/configuration/LatencyConfigurationPage.cpp +++ b/src/gui/configuration/LatencyConfigurationPage.cpp @@ -24,20 +24,20 @@ #include "LatencyConfigurationPage.h" -#include <qlayout.h> +#include <tqlayout.h> #include "document/ConfigGroups.h" #include "ConfigurationPage.h" #include "document/RosegardenGUIDoc.h" #include "TabbedConfigurationPage.h" #include <kconfig.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qslider.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> namespace Rosegarden @@ -45,7 +45,7 @@ namespace Rosegarden LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(doc, cfg, parent, name) { @@ -55,44 +55,44 @@ LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, #ifdef NOT_DEFINED #ifdef HAVE_LIBJACK - frame = new QFrame(m_tabWidget, i18n("JACK latency")); - layout = new QGridLayout(frame, 6, 5, 10, 10); + frame = new TQFrame(m_tabWidget, i18n("JACK latency")); + layout = new TQGridLayout(frame, 6, 5, 10, 10); - layout->addMultiCellWidget(new QLabel(i18n("Use the \"Fetch JACK latencies\" button to discover the latency values set at\nthe sequencer. It's recommended that you use the returned values but it's also\npossible to override them manually using the sliders. Note that if you change\nyour JACK server parameters you should always fetch the latency values again.\nThe latency values will be stored by Rosegarden for use next time."), frame), + layout->addMultiCellWidget(new TQLabel(i18n("Use the \"Fetch JACK latencies\" button to discover the latency values set at\nthe sequencer. It's recommended that you use the returned values but it's also\npossible to override them manually using the sliders. Note that if you change\nyour JACK server parameters you should always fetch the latency values again.\nThe latency values will be stored by Rosegarden for use next time."), frame), 0, 0, 0, 3); - layout->addWidget(new QLabel(i18n("JACK playback latency (in ms)"), frame), 1, 0); - layout->addWidget(new QLabel(i18n("JACK record latency (in ms)"), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("JACK playback latency (in ms)"), frame), 1, 0); + layout->addWidget(new TQLabel(i18n("JACK record latency (in ms)"), frame), 3, 0); - m_fetchLatencyValues = new QPushButton(i18n("Fetch JACK latencies"), + m_fetchLatencyValues = new TQPushButton(i18n("Fetch JACK latencies"), frame); layout->addWidget(m_fetchLatencyValues, 1, 3); - connect(m_fetchLatencyValues, SIGNAL(released()), - SLOT(slotFetchLatencyValues())); + connect(m_fetchLatencyValues, TQT_SIGNAL(released()), + TQT_SLOT(slotFetchLatencyValues())); int jackPlaybackValue = (m_cfg->readLongNumEntry( "jackplaybacklatencyusec", 0) / 1000) + (m_cfg->readLongNumEntry( "jackplaybacklatencysec", 0) * 1000); - m_jackPlayback = new QSlider(Horizontal, frame); - m_jackPlayback->setTickmarks(QSlider::Below); + m_jackPlayback = new TQSlider(Horizontal, frame); + m_jackPlayback->setTickmarks(TQSlider::Below); layout->addMultiCellWidget(m_jackPlayback, 3, 3, 2, 3); - QLabel *jackPlaybackLabel = new QLabel(QString("%1").arg(jackPlaybackValue), + TQLabel *jackPlaybackLabel = new TQLabel(TQString("%1").arg(jackPlaybackValue), frame); layout->addWidget(jackPlaybackLabel, 2, 2, Qt::AlignHCenter); - connect(m_jackPlayback, SIGNAL(valueChanged(int)), - jackPlaybackLabel, SLOT(setNum(int))); + connect(m_jackPlayback, TQT_SIGNAL(valueChanged(int)), + jackPlaybackLabel, TQT_SLOT(setNum(int))); m_jackPlayback->setMinValue(0); - layout->addWidget(new QLabel("0", frame), 3, 1, Qt::AlignRight); + layout->addWidget(new TQLabel("0", frame), 3, 1, Qt::AlignRight); m_jackPlayback->setMaxValue(500); - layout->addWidget(new QLabel("500", frame), 3, 4, Qt::AlignLeft); + layout->addWidget(new TQLabel("500", frame), 3, 4, Qt::AlignLeft); m_jackPlayback->setValue(jackPlaybackValue); @@ -101,22 +101,22 @@ LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, (m_cfg->readLongNumEntry( "jackrecordlatencysec", 0) * 1000); - m_jackRecord = new QSlider(Horizontal, frame); - m_jackRecord->setTickmarks(QSlider::Below); + m_jackRecord = new TQSlider(Horizontal, frame); + m_jackRecord->setTickmarks(TQSlider::Below); layout->addMultiCellWidget(m_jackRecord, 5, 5, 2, 3); - QLabel *jackRecordLabel = new QLabel(QString("%1").arg(jackRecordValue), + TQLabel *jackRecordLabel = new TQLabel(TQString("%1").arg(jackRecordValue), frame); layout->addWidget(jackRecordLabel, 4, 2, Qt::AlignHCenter); - connect(m_jackRecord, SIGNAL(valueChanged(int)), - jackRecordLabel, SLOT(setNum(int))); + connect(m_jackRecord, TQT_SIGNAL(valueChanged(int)), + jackRecordLabel, TQT_SLOT(setNum(int))); m_jackRecord->setMinValue(0); - layout->addWidget(new QLabel("0", frame), 5, 1, Qt::AlignRight); + layout->addWidget(new TQLabel("0", frame), 5, 1, Qt::AlignRight); m_jackRecord->setMaxValue(500); m_jackRecord->setValue(jackRecordValue); - layout->addWidget(new QLabel("500", frame), 5, 4, Qt::AlignLeft); + layout->addWidget(new TQLabel("500", frame), 5, 4, Qt::AlignLeft); addTab(frame, i18n("JACK Latency")); #endif // HAVE_LIBJACK diff --git a/src/gui/configuration/LatencyConfigurationPage.h b/src/gui/configuration/LatencyConfigurationPage.h index 6caba88..7512214 100644 --- a/src/gui/configuration/LatencyConfigurationPage.h +++ b/src/gui/configuration/LatencyConfigurationPage.h @@ -27,13 +27,13 @@ #define _RG_LATENCYCONFIGURATIONPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -#include <qslider.h> +#include <tqslider.h> -class QWidget; -class QPushButton; +class TQWidget; +class TQPushButton; class KConfig; @@ -55,12 +55,12 @@ class LatencyConfigurationPage : public TabbedConfigurationPage public: LatencyConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("Latency"); } - static QString title() { return i18n("Sequencer Latency"); } + static TQString iconLabel() { return i18n("Latency"); } + static TQString title() { return i18n("Sequencer Latency"); } int getJACKPlaybackValue() { return m_jackPlayback->value(); } int getJACKRecordValue() { return m_jackRecord->value(); } @@ -74,10 +74,10 @@ protected: //--------------- Data members --------------------------------- - QSlider* m_jackPlayback; - QSlider* m_jackRecord; + TQSlider* m_jackPlayback; + TQSlider* m_jackRecord; - QPushButton* m_fetchLatencyValues; + TQPushButton* m_fetchLatencyValues; }; diff --git a/src/gui/configuration/MIDIConfigurationPage.cpp b/src/gui/configuration/MIDIConfigurationPage.cpp index 3d46841..80ccf6b 100644 --- a/src/gui/configuration/MIDIConfigurationPage.cpp +++ b/src/gui/configuration/MIDIConfigurationPage.cpp @@ -41,25 +41,25 @@ #include <kcombobox.h> #include <kconfig.h> #include <kfiledialog.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qobject.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qslider.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qcheckbox.h> -#include <qhbox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqobject.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqslider.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqcheckbox.h> +#include <tqhbox.h> namespace Rosegarden { @@ -67,7 +67,7 @@ namespace Rosegarden MIDIConfigurationPage::MIDIConfigurationPage( RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name): TabbedConfigurationPage(cfg, parent, name), m_midiPitchOctave(0) @@ -77,22 +77,22 @@ MIDIConfigurationPage::MIDIConfigurationPage( // ---------------- General tab ------------------ // - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, 9, 4, 10, 5); + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 9, 4, 10, 5); int row = 0; layout->setRowSpacing(row, 15); ++row; - QLabel *label = 0; + TQLabel *label = 0; m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addMultiCellWidget(new QLabel(i18n("Base octave number for MIDI pitch display"), + layout->addMultiCellWidget(new TQLabel(i18n("Base octave number for MIDI pitch display"), frame), row, row, 0, 1); - m_midiPitchOctave = new QSpinBox(frame); + m_midiPitchOctave = new TQSpinBox(frame); m_midiPitchOctave->setMaxValue(10); m_midiPitchOctave->setMinValue( -10); m_midiPitchOctave->setValue(m_cfg->readNumEntry("midipitchoctave", -2)); @@ -104,10 +104,10 @@ MIDIConfigurationPage::MIDIConfigurationPage( m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addMultiCellWidget(new QLabel(i18n("Always use default studio when loading files"), + layout->addMultiCellWidget(new TQLabel(i18n("Always use default studio when loading files"), frame), row, row, 0, 1); - m_studio = new QCheckBox(frame); + m_studio = new TQCheckBox(frame); m_studio->setChecked(m_cfg->readBoolEntry("alwaysusedefaultstudio", false)); layout->addWidget(m_studio, row, 2); ++row; @@ -116,17 +116,17 @@ MIDIConfigurationPage::MIDIConfigurationPage( // m_cfg->setGroup(SequencerOptionsConfigGroup); - label = new QLabel(i18n("Send all MIDI Controllers at start of each playback"), frame); + label = new TQLabel(i18n("Send all MIDI Controllers at start of each playback"), frame); - QString controllerTip = i18n("Rosegarden can send all MIDI Controllers (Pan, Reverb etc) to all MIDI devices every\ntime you hit play if you so wish. Please note that this option will usually incur a\ndelay at the start of playback due to the amount of data being transmitted."); - QToolTip::add + TQString controllerTip = i18n("Rosegarden can send all MIDI Controllers (Pan, Reverb etc) to all MIDI devices every\ntime you hit play if you so wish. Please note that this option will usually incur a\ndelay at the start of playback due to the amount of data being transmitted."); + TQToolTip::add (label, controllerTip); layout->addMultiCellWidget(label, row, row, 0, 1); - m_sendControllersAtPlay = new QCheckBox(frame); + m_sendControllersAtPlay = new TQCheckBox(frame); bool sendControllers = m_cfg->readBoolEntry("alwayssendcontrollers", false); m_sendControllersAtPlay->setChecked(sendControllers); - QToolTip::add + TQToolTip::add (m_sendControllersAtPlay, controllerTip); layout->addWidget(m_sendControllersAtPlay, row, 2); ++row; @@ -135,15 +135,15 @@ MIDIConfigurationPage::MIDIConfigurationPage( // m_cfg->setGroup(SequencerOptionsConfigGroup); - label = new QLabel(i18n("Sequencer timing source"), frame); + label = new TQLabel(i18n("Sequencer timing source"), frame); layout->addMultiCellWidget(label, row, row, 0, 1); m_timer = new KComboBox(frame); layout->addMultiCellWidget(m_timer, row, row, 2, 3); - QStringList timers = m_doc->getTimers(); + TQStringList timers = m_doc->getTimers(); m_origTimer = m_doc->getCurrentTimer(); - QString currentTimer = m_cfg->readEntry("timer", m_origTimer); + TQString currentTimer = m_cfg->readEntry("timer", m_origTimer); for (unsigned int i = 0; i < timers.size(); ++i) { m_timer->insertItem(timers[i]); @@ -160,27 +160,27 @@ MIDIConfigurationPage::MIDIConfigurationPage( // SoundFont loading // - QLabel* lbl = new QLabel(i18n("Load SoundFont to SoundBlaster card at startup"), frame); - QString tooltip = i18n("Check this box to enable soundfont loading on EMU10K-based cards when Rosegarden is launched"); - QToolTip::add(lbl, tooltip); + TQLabel* lbl = new TQLabel(i18n("Load SoundFont to SoundBlaster card at startup"), frame); + TQString tooltip = i18n("Check this box to enable soundfont loading on EMU10K-based cards when Rosegarden is launched"); + TQToolTip::add(lbl, tooltip); layout->addMultiCellWidget(lbl, row, row, 0, 1); - m_sfxLoadEnabled = new QCheckBox(frame); + m_sfxLoadEnabled = new TQCheckBox(frame); layout->addWidget(m_sfxLoadEnabled, row, 2); - QToolTip::add(m_sfxLoadEnabled, tooltip); + TQToolTip::add(m_sfxLoadEnabled, tooltip); ++row; - layout->addWidget(new QLabel(i18n("Path to 'asfxload' or 'sfxload' command"), frame), row, 0); - m_sfxLoadPath = new QLineEdit(m_cfg->readEntry("sfxloadpath", "/bin/sfxload"), frame); + layout->addWidget(new TQLabel(i18n("Path to 'asfxload' or 'sfxload' command"), frame), row, 0); + m_sfxLoadPath = new TQLineEdit(m_cfg->readEntry("sfxloadpath", "/bin/sfxload"), frame); layout->addMultiCellWidget(m_sfxLoadPath, row, row, 1, 2); - m_sfxLoadChoose = new QPushButton("Choose...", frame); + m_sfxLoadChoose = new TQPushButton("Choose...", frame); layout->addWidget(m_sfxLoadChoose, row, 3); ++row; - layout->addWidget(new QLabel(i18n("SoundFont"), frame), row, 0); - m_soundFontPath = new QLineEdit(m_cfg->readEntry("soundfontpath", ""), frame); + layout->addWidget(new TQLabel(i18n("SoundFont"), frame), row, 0); + m_soundFontPath = new TQLineEdit(m_cfg->readEntry("soundfontpath", ""), frame); layout->addMultiCellWidget(m_soundFontPath, row, row, 1, 2); - m_soundFontChoose = new QPushButton("Choose...", frame); + m_soundFontChoose = new TQPushButton("Choose...", frame); layout->addWidget(m_soundFontChoose, row, 3); ++row; @@ -193,14 +193,14 @@ MIDIConfigurationPage::MIDIConfigurationPage( m_soundFontChoose->setEnabled(false); } - connect(m_sfxLoadEnabled, SIGNAL(toggled(bool)), - this, SLOT(slotSoundFontToggled(bool))); + connect(m_sfxLoadEnabled, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSoundFontToggled(bool))); - connect(m_sfxLoadChoose, SIGNAL(clicked()), - this, SLOT(slotSfxLoadPathChoose())); + connect(m_sfxLoadChoose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSfxLoadPathChoose())); - connect(m_soundFontChoose, SIGNAL(clicked()), - this, SLOT(slotSoundFontChoose())); + connect(m_soundFontChoose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSoundFontChoose())); layout->setRowStretch(row, 10); @@ -210,8 +210,8 @@ MIDIConfigurationPage::MIDIConfigurationPage( // -------------- Synchronisation tab ----------------- // - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 7, 2, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 7, 2, 10, 5); row = 0; @@ -220,7 +220,7 @@ MIDIConfigurationPage::MIDIConfigurationPage( // MIDI Clock and System Realtime Messages // - label = new QLabel(i18n("MIDI Clock and System messages"), frame); + label = new TQLabel(i18n("MIDI Clock and System messages"), frame); layout->addWidget(label, row, 0); m_midiSync = new KComboBox(frame); layout->addWidget(m_midiSync, row, 1); @@ -238,7 +238,7 @@ MIDIConfigurationPage::MIDIConfigurationPage( // MMC Transport // - label = new QLabel(i18n("MIDI Machine Control mode"), frame); + label = new TQLabel(i18n("MIDI Machine Control mode"), frame); layout->addWidget(label, row, 0); m_mmcTransport = new KComboBox(frame); @@ -257,7 +257,7 @@ MIDIConfigurationPage::MIDIConfigurationPage( // MTC transport // - label = new QLabel(i18n("MIDI Time Code mode"), frame); + label = new TQLabel(i18n("MIDI Time Code mode"), frame); layout->addWidget(label, row, 0); m_mtcTransport = new KComboBox(frame); @@ -274,13 +274,13 @@ MIDIConfigurationPage::MIDIConfigurationPage( ++row; - QHBox *hbox = new QHBox(frame); + TQHBox *hbox = new TQHBox(frame); hbox->setSpacing(5); layout->addMultiCellWidget(hbox, row, row, 0, 1); - label = new QLabel(i18n("Automatically connect sync output to all devices in use"), hbox); + label = new TQLabel(i18n("Automatically connect sync output to all devices in use"), hbox); // layout->addWidget(label, row, 0); - m_midiSyncAuto = new QCheckBox(hbox); + m_midiSyncAuto = new TQCheckBox(hbox); // layout->addWidget(m_midiSyncAuto, row, 1); m_midiSyncAuto->setChecked(m_cfg->readBoolEntry("midisyncautoconnect", false)); @@ -305,14 +305,14 @@ MIDIConfigurationPage::slotSoundFontToggled(bool isChecked) void MIDIConfigurationPage::slotSfxLoadPathChoose() { - QString path = KFileDialog::getOpenFileName(":SFXLOAD", QString::null, this, i18n("sfxload path")); + TQString path = KFileDialog::getOpenFileName(":SFXLOAD", TQString::null, this, i18n("sfxload path")); m_sfxLoadPath->setText(path); } void MIDIConfigurationPage::slotSoundFontChoose() { - QString path = KFileDialog::getOpenFileName(":SOUNDFONTS", "*.sb *.sf2 *.SF2 *.SB", this, i18n("Soundfont path")); + TQString path = KFileDialog::getOpenFileName(":SOUNDFONTS", "*.sb *.sf2 *.SF2 *.SB", this, i18n("Soundfont path")); m_soundFontPath->setText(path); } @@ -365,7 +365,7 @@ MIDIConfigurationPage::apply() int midiClock = m_midiSync->currentItem(); m_cfg->writeEntry("midiclock", midiClock); - // Now send it (OLD METHOD - to be removed) + // Now send it (OLD TQT_METHOD - to be removed) //!!! No, don't remove -- this controls SPP as well doesn't it? // MappedEvent mEMIDIClock(MidiInstrumentBase, // InstrumentId diff --git a/src/gui/configuration/MIDIConfigurationPage.h b/src/gui/configuration/MIDIConfigurationPage.h index 243f041..43a29d9 100644 --- a/src/gui/configuration/MIDIConfigurationPage.h +++ b/src/gui/configuration/MIDIConfigurationPage.h @@ -26,18 +26,18 @@ #define _RG_MIDICONFIGURATIONPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> -class QWidget; -class QSpinBox; -class QSlider; -class QPushButton; -class QLabel; -class QComboBox; +class TQWidget; +class TQSpinBox; +class TQSlider; +class TQPushButton; +class TQLabel; +class TQComboBox; class KConfig; class KComboBox; @@ -54,14 +54,14 @@ class MIDIConfigurationPage : public TabbedConfigurationPage public: MIDIConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("MIDI"); } - static QString title() { return i18n("MIDI Settings"); } - static QString iconName() { return "configure-midi"; } + static TQString iconLabel() { return i18n("MIDI"); } + static TQString title() { return i18n("MIDI Settings"); } + static TQString iconName() { return "configure-midi"; } protected slots: void slotSoundFontToggled(bool); @@ -74,26 +74,26 @@ protected: //--------------- Data members --------------------------------- // General - QCheckBox *m_sendControllersAtPlay; + TQCheckBox *m_sendControllersAtPlay; - QCheckBox *m_sfxLoadEnabled; - QLineEdit *m_sfxLoadPath; - QPushButton *m_sfxLoadChoose; - QLineEdit *m_soundFontPath; - QPushButton *m_soundFontChoose; + TQCheckBox *m_sfxLoadEnabled; + TQLineEdit *m_sfxLoadPath; + TQPushButton *m_sfxLoadChoose; + TQLineEdit *m_soundFontPath; + TQPushButton *m_soundFontChoose; // Sync and timing // - //QCheckBox *m_midiClockEnabled; - QComboBox *m_midiSync; - QString m_origTimer; - QComboBox *m_timer; - QComboBox *m_mmcTransport; - QComboBox *m_mtcTransport; - QCheckBox *m_midiSyncAuto; - - QCheckBox* m_studio; - QSpinBox* m_midiPitchOctave; + //TQCheckBox *m_midiClockEnabled; + TQComboBox *m_midiSync; + TQString m_origTimer; + TQComboBox *m_timer; + TQComboBox *m_mmcTransport; + TQComboBox *m_mtcTransport; + TQCheckBox *m_midiSyncAuto; + + TQCheckBox* m_studio; + TQSpinBox* m_midiPitchOctave; }; diff --git a/src/gui/configuration/MatrixConfigurationPage.cpp b/src/gui/configuration/MatrixConfigurationPage.cpp index e21f3fd..c996922 100644 --- a/src/gui/configuration/MatrixConfigurationPage.cpp +++ b/src/gui/configuration/MatrixConfigurationPage.cpp @@ -32,29 +32,29 @@ #include "gui/editors/matrix/MatrixView.h" #include "TabbedConfigurationPage.h" #include <kconfig.h> -#include <qframe.h> -#include <qlabel.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { MatrixConfigurationPage::MatrixConfigurationPage(KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(cfg, parent, name) { m_cfg->setGroup(MatrixViewConfigGroup); - QFrame *frame = new QFrame(m_tabWidget); - QGridLayout *layout = new QGridLayout(frame, + TQFrame *frame = new TQFrame(m_tabWidget); + TQGridLayout *layout = new TQGridLayout(frame, 4, 2, // nbrow, nbcol 10, 5); - layout->addWidget(new QLabel("Nothing here yet", frame), 0, 0); + layout->addWidget(new TQLabel("Nothing here yet", frame), 0, 0); addTab(frame, i18n("General")); } diff --git a/src/gui/configuration/MatrixConfigurationPage.h b/src/gui/configuration/MatrixConfigurationPage.h index 9c4b3fc..19e2104 100644 --- a/src/gui/configuration/MatrixConfigurationPage.h +++ b/src/gui/configuration/MatrixConfigurationPage.h @@ -27,11 +27,11 @@ #define _RG_MATRIXCONFIGURATIONPAGE_H_ #include "TabbedConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; +class TQWidget; class KConfig; @@ -49,12 +49,12 @@ class MatrixConfigurationPage : public TabbedConfigurationPage public: MatrixConfigurationPage(KConfig *cfg, - QWidget *parent = 0, const char *name=0); + TQWidget *parent = 0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("Matrix"); } - static QString title() { return i18n("Matrix"); } + static TQString iconLabel() { return i18n("Matrix"); } + static TQString title() { return i18n("Matrix"); } protected slots: diff --git a/src/gui/configuration/NotationConfigurationPage.cpp b/src/gui/configuration/NotationConfigurationPage.cpp index a828fe7..c059cd9 100644 --- a/src/gui/configuration/NotationConfigurationPage.cpp +++ b/src/gui/configuration/NotationConfigurationPage.cpp @@ -24,7 +24,7 @@ #include "NotationConfigurationPage.h" -#include <qlayout.h> +#include <tqlayout.h> #include "misc/Strings.h" #include "document/ConfigGroups.h" @@ -47,44 +47,44 @@ #include <kconfig.h> #include <kfontrequester.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qfont.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqtooltip.h> #include <algorithm> namespace Rosegarden { NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name) : TabbedConfigurationPage(cfg, parent, name) { m_cfg->setGroup(NotationViewConfigGroup); - QFrame *frame; - QGridLayout *layout; + TQFrame *frame; + TQGridLayout *layout; - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 9, 3, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 9, 3, 10, 5); int row = 0; layout->setRowSpacing(row, 15); ++row; - layout->addWidget(new QLabel(i18n("Default layout mode"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Default layout mode"), frame), row, 0); m_layoutMode = new KComboBox(frame); m_layoutMode->setEditable(false); @@ -98,7 +98,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, layout->addMultiCellWidget(m_layoutMode, row, row, 1, 2); ++row; - layout->addWidget(new QLabel(i18n("Default spacing"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Default spacing"), frame), row, 0); m_spacing = new KComboBox(frame); m_spacing->setEditable(false); @@ -108,7 +108,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, for (std::vector<int>::iterator i = s.begin(); i != s.end(); ++i) { - QString text("%1 %"); + TQString text("%1 %"); if (*i == 100) text = "%1 % (normal)"; m_spacing->insertItem(text.arg(*i)); @@ -122,7 +122,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; - layout->addWidget(new QLabel(i18n("Default duration factor"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Default duration factor"), frame), row, 0); m_proportion = new KComboBox(frame); m_proportion->setEditable(false); @@ -132,7 +132,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, for (std::vector<int>::iterator i = s.begin(); i != s.end(); ++i) { - QString text = QString("%1 %").arg(*i); + TQString text = TQString("%1 %").arg(*i); if (*i == 40) text = "40 % (normal)"; else if (*i == 0) @@ -149,7 +149,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, layout->addMultiCellWidget(m_proportion, row, row, 1, 2); ++row; - layout->addWidget(new QLabel(i18n("Show track headers (linear layout only)"), + layout->addWidget(new TQLabel(i18n("Show track headers (linear layout only)"), frame), row, 0); m_showTrackHeaders = new KComboBox(frame); @@ -162,7 +162,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, if (HeadersGroup::isValidShowMode(defaultShowTrackHeaders)) { m_showTrackHeaders->setCurrentItem(defaultShowTrackHeaders); } - QToolTip::add(m_showTrackHeaders, QString(i18n( + TQToolTip::add(m_showTrackHeaders, TQString(i18n( "\"Always\" and \"Never\" mean what they usually mean\n" "\"When needed\" means \"when staves are too many to all fit" " in the current window\""))); @@ -177,7 +177,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Show non-notation events as question marks"), frame), row, row, 0, 1); - m_showUnknowns = new QCheckBox(frame); + m_showUnknowns = new TQCheckBox(frame); bool defaultShowUnknowns = m_cfg->readBoolEntry("showunknowns", false); m_showUnknowns->setChecked(defaultShowUnknowns); layout->addWidget(m_showUnknowns, row, 2); @@ -187,7 +187,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Show notation-quantized notes in a different color"), frame), row, row, 0, 1); - m_colourQuantize = new QCheckBox(frame); + m_colourQuantize = new TQCheckBox(frame); bool defaultColourQuantize = m_cfg->readBoolEntry("colourquantize", false); m_colourQuantize->setChecked(defaultColourQuantize); layout->addWidget(m_colourQuantize, row, 2); @@ -197,7 +197,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Show \"invisible\" events in grey"), frame), row, row, 0, 1); - m_showInvisibles = new QCheckBox(frame); + m_showInvisibles = new TQCheckBox(frame); bool defaultShowInvisibles = m_cfg->readBoolEntry("showinvisibles", true); m_showInvisibles->setChecked(defaultShowInvisibles); layout->addWidget(m_showInvisibles, row, 2); @@ -207,7 +207,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Show notes outside suggested playable range in red"), frame), row, row, 0, 1); - m_showRanges = new QCheckBox(frame); + m_showRanges = new TQCheckBox(frame); bool defaultShowRanges = m_cfg->readBoolEntry("showranges", true); m_showRanges->setChecked(defaultShowRanges); layout->addWidget(m_showRanges, row, 2); @@ -217,7 +217,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Highlight superimposed notes with a halo effect"), frame), row, row, 0, 1); - m_showCollisions = new QCheckBox(frame); + m_showCollisions = new TQCheckBox(frame); bool defaultShowCollisions = m_cfg->readBoolEntry("showcollisions", true); m_showCollisions->setChecked(defaultShowCollisions); layout->addWidget(m_showCollisions, row, 2); @@ -230,7 +230,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("When recording MIDI, split-and-tie long notes at barlines"), frame), row, row, 0, 1); - m_splitAndTie = new QCheckBox(frame); + m_splitAndTie = new TQCheckBox(frame); bool defaultSplitAndTie = m_cfg->readBoolEntry("quantizemakeviable", false); m_splitAndTie->setChecked(defaultSplitAndTie); layout->addWidget(m_splitAndTie, row, 2); @@ -243,8 +243,8 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 6, 3, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 6, 3, 10, 5); row = 0; @@ -252,7 +252,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addMultiCellWidget - (new QLabel(i18n("Default note style for new notes"), frame), + (new TQLabel(i18n("Default note style for new notes"), frame), row, row, 0, 1); layout->setColStretch(2, 10); @@ -261,7 +261,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, m_noteStyle->setEditable(false); m_untranslatedNoteStyle.clear(); - QString defaultStyle = + TQString defaultStyle = m_cfg->readEntry("style", strtoqstr(NoteStyleFactory::DefaultStyle)); std::vector<NoteStyleName> styles (NoteStyleFactory::getAvailableStyleNames()); @@ -269,7 +269,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - QString styleQName(strtoqstr(*i)); + TQString styleQName(strtoqstr(*i)); m_untranslatedNoteStyle.append(styleQName); m_noteStyle->insertItem(i18n(styleQName.utf8())); if (styleQName == defaultStyle) { @@ -284,7 +284,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addWidget - (new QLabel(i18n("When inserting notes..."), frame), row, 0); + (new TQLabel(i18n("When inserting notes..."), frame), row, 0); int defaultInsertType = m_cfg->readNumEntry("inserttype", 0); @@ -304,7 +304,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Auto-beam on insert when appropriate"), frame), row, row, 0, 1); - m_autoBeam = new QCheckBox(frame); + m_autoBeam = new TQCheckBox(frame); m_autoBeam->setChecked(autoBeam); layout->addMultiCellWidget(m_autoBeam, row, row, 2, 2); @@ -316,7 +316,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, (new QLabel (i18n("Collapse rests after erase"), frame), row, row, 0, 1); - m_collapseRests = new QCheckBox(frame); + m_collapseRests = new TQCheckBox(frame); m_collapseRests->setChecked(collapse); layout->addMultiCellWidget(m_collapseRests, row, row, 2, 2); ++row; @@ -325,7 +325,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addWidget - (new QLabel(i18n("Default paste type"), frame), row, 0); + (new TQLabel(i18n("Default paste type"), frame), row, 0); m_pasteType = new KComboBox(frame); m_pasteType->setEditable(false); @@ -351,15 +351,15 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 4, 2, 10, 5); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 4, 2, 10, 5); row = 0; layout->setRowSpacing(row, 15); ++row; - layout->addWidget(new QLabel(i18n("Accidentals in one octave..."), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Accidentals in one octave..."), frame), row, 0); m_accOctavePolicy = new KComboBox(frame); m_accOctavePolicy->insertItem(i18n("Affect only that octave")); m_accOctavePolicy->insertItem(i18n("Require cautionaries in other octaves")); @@ -371,7 +371,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, layout->addWidget(m_accOctavePolicy, row, 1); ++row; - layout->addWidget(new QLabel(i18n("Accidentals in one bar..."), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Accidentals in one bar..."), frame), row, 0); m_accBarPolicy = new KComboBox(frame); m_accBarPolicy->insertItem(i18n("Affect only that bar")); m_accBarPolicy->insertItem(i18n("Require cautionary resets in following bar")); @@ -383,7 +383,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, layout->addWidget(m_accBarPolicy, row, 1); ++row; - layout->addWidget(new QLabel(i18n("Key signature cancellation style"), frame), row, 0); + layout->addWidget(new TQLabel(i18n("Key signature cancellation style"), frame), row, 0); m_keySigCancelMode = new KComboBox(frame); m_keySigCancelMode->insertItem(i18n("Cancel only when entering C major or A minor")); m_keySigCancelMode->insertItem(i18n("Cancel whenever removing sharps or flats")); @@ -400,7 +400,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, addTab(frame, i18n("Accidentals")); /* - QString preamble = + TQString preamble = (i18n("Rosegarden can apply automatic quantization to recorded " "or imported MIDI data for notation purposes only. " "This does not affect playback, and does not affect " @@ -419,78 +419,78 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, */ row = 0; -// QFrame *mainFrame = new QFrame(m_tabWidget); -// QGridLayout *mainLayout = new QGridLayout(mainFrame, 2, 4, 10, 5); +// TQFrame *mainFrame = new TQFrame(m_tabWidget); +// TQGridLayout *mainLayout = new TQGridLayout(mainFrame, 2, 4, 10, 5); -// QGroupBox *noteFontBox = new QGroupBox(1, Horizontal, i18n("Notation font"), mainFrame); -// QGroupBox *otherFontBox = new QGroupBox(1, Horizontal, i18n("Other fonts"), mainFrame); -// QGroupBox *descriptionBox = new QGroupBox(1, Horizontal, i18n("Description"), mainFrame); +// TQGroupBox *noteFontBox = new TQGroupBox(1, Horizontal, i18n("Notation font"), mainFrame); +// TQGroupBox *otherFontBox = new TQGroupBox(1, Horizontal, i18n("Other fonts"), mainFrame); +// TQGroupBox *descriptionBox = new TQGroupBox(1, Horizontal, i18n("Description"), mainFrame); // mainLayout->addWidget(noteFontBox, 0, 0); // mainLayout->addWidget(otherFontBox, 1, 0); -// QFrame *mainFrame = new QFrame(m_tabWidget); - frame = new QFrame(m_tabWidget); - layout = new QGridLayout(frame, 2, 4, 10, 5); +// TQFrame *mainFrame = new TQFrame(m_tabWidget); + frame = new TQFrame(m_tabWidget); + layout = new TQGridLayout(frame, 2, 4, 10, 5); -// frame = new QFrame(noteFontBox); -// layout = new QGridLayout(frame, 5, 2, 10, 5); +// frame = new TQFrame(noteFontBox); +// layout = new TQGridLayout(frame, 5, 2, 10, 5); m_viewButton = 0; - layout->addWidget(new QLabel(i18n("Notation font"), frame), 0, 0); + layout->addWidget(new TQLabel(i18n("Notation font"), frame), 0, 0); m_font = new KComboBox(frame); #ifdef HAVE_XFT - m_viewButton = new QPushButton(i18n("View"), frame); + m_viewButton = new TQPushButton(i18n("View"), frame); layout->addMultiCellWidget(m_font, row, row, 1, 2); layout->addWidget(m_viewButton, row, 3); - QObject::connect(m_viewButton, SIGNAL(clicked()), - this, SLOT(slotViewButtonPressed())); + TQObject::connect(m_viewButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotViewButtonPressed())); #else layout->addMultiCellWidget(m_font, row, row, 1, 3); #endif m_font->setEditable(false); - QObject::connect(m_font, SIGNAL(activated(int)), - this, SLOT(slotFontComboChanged(int))); + TQObject::connect(m_font, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotFontComboChanged(int))); ++row; - QFrame *subFrame = new QFrame(frame); - QGridLayout *subLayout = new QGridLayout(subFrame, + TQFrame *subFrame = new TQFrame(frame); + TQGridLayout *subLayout = new TQGridLayout(subFrame, 4, 2, // nbrow, nbcol 12, 2); - QFont font = m_font->font(); + TQFont font = m_font->font(); font.setPointSize((font.pointSize() * 9) / 10); - QLabel *originLabel = new QLabel(i18n("Origin:"), subFrame); + TQLabel *originLabel = new TQLabel(i18n("Origin:"), subFrame); originLabel->setFont(font); subLayout->addWidget(originLabel, 0, 0); - QLabel *copyrightLabel = new QLabel(i18n("Copyright:"), subFrame); + TQLabel *copyrightLabel = new TQLabel(i18n("Copyright:"), subFrame); copyrightLabel->setFont(font); subLayout->addWidget(copyrightLabel, 1, 0); - QLabel *mappedLabel = new QLabel(i18n("Mapped by:"), subFrame); + TQLabel *mappedLabel = new TQLabel(i18n("Mapped by:"), subFrame); mappedLabel->setFont(font); subLayout->addWidget(mappedLabel, 2, 0); - QLabel *typeLabel = new QLabel(i18n("Type:"), subFrame); + TQLabel *typeLabel = new TQLabel(i18n("Type:"), subFrame); typeLabel->setFont(font); subLayout->addWidget(typeLabel, 3, 0); - m_fontOriginLabel = new QLabel(subFrame); + m_fontOriginLabel = new TQLabel(subFrame); m_fontOriginLabel->setAlignment(Qt::WordBreak); m_fontOriginLabel->setFont(font); // m_fontOriginLabel->setFixedWidth(250); - m_fontCopyrightLabel = new QLabel(subFrame); + m_fontCopyrightLabel = new TQLabel(subFrame); m_fontCopyrightLabel->setAlignment(Qt::WordBreak); m_fontCopyrightLabel->setFont(font); // m_fontCopyrightLabel->setFixedWidth(250); - m_fontMappedByLabel = new QLabel(subFrame); + m_fontMappedByLabel = new TQLabel(subFrame); m_fontMappedByLabel->setFont(font); - m_fontTypeLabel = new QLabel(subFrame); + m_fontTypeLabel = new TQLabel(subFrame); m_fontTypeLabel->setFont(font); subLayout->addWidget(m_fontOriginLabel, 0, 1); subLayout->addWidget(m_fontCopyrightLabel, 1, 1); @@ -505,7 +505,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addMultiCellWidget - (new QLabel(i18n("Font size for single-staff views"), frame), + (new TQLabel(i18n("Font size for single-staff views"), frame), row, row, 0, 1); m_singleStaffSize = new KComboBox(frame); m_singleStaffSize->setEditable(false); @@ -513,7 +513,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addMultiCellWidget - (new QLabel(i18n("Font size for multi-staff views"), frame), + (new TQLabel(i18n("Font size for multi-staff views"), frame), row, row, 0, 1); m_multiStaffSize = new KComboBox(frame); m_multiStaffSize->setEditable(false); @@ -521,7 +521,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, ++row; layout->addMultiCellWidget - (new QLabel(i18n("Font size for printing (pt)"), frame), + (new TQLabel(i18n("Font size for printing (pt)"), frame), row, row, 0, 1); m_printingSize = new KComboBox(frame); m_printingSize->setEditable(false); @@ -533,22 +533,22 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, layout->setRowSpacing(row, 15); ++row; - QFont defaultTextFont(NotePixmapFactory::defaultSerifFontFamily), + TQFont defaultTextFont(NotePixmapFactory::defaultSerifFontFamily), defaultSansFont(NotePixmapFactory::defaultSansSerifFontFamily), defaultTimeSigFont(NotePixmapFactory::defaultTimeSigFontFamily); layout->addWidget - (new QLabel(i18n("Text font"), frame), row, 0); + (new TQLabel(i18n("Text font"), frame), row, 0); m_textFont = new KFontRequester(frame); - QFont textFont = m_cfg->readFontEntry("textfont", &defaultTextFont); + TQFont textFont = m_cfg->readFontEntry("textfont", &defaultTextFont); m_textFont->setFont(textFont); layout->addMultiCellWidget(m_textFont, row, row, 1, 3); ++row; layout->addWidget - (new QLabel(i18n("Sans-serif font"), frame), row, 0); + (new TQLabel(i18n("Sans-serif font"), frame), row, 0); m_sansFont = new KFontRequester(frame); - QFont sansFont = m_cfg->readFontEntry("sansfont", &defaultSansFont); + TQFont sansFont = m_cfg->readFontEntry("sansfont", &defaultSansFont); m_sansFont->setFont(sansFont); layout->addMultiCellWidget(m_sansFont, row, row, 1, 3); ++row; @@ -558,9 +558,9 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, * and our default notation font has all the characters we need layout->addWidget - (new QLabel(i18n("Time Signature font"), frame), row, 0); + (new TQLabel(i18n("Time Signature font"), frame), row, 0); m_timeSigFont = new KFontRequester(frame); - QFont timeSigFont = m_cfg->readFontEntry("timesigfont", &defaultTimeSigFont); + TQFont timeSigFont = m_cfg->readFontEntry("timesigfont", &defaultTimeSigFont); m_timeSigFont->setFont(timeSigFont); layout->addMultiCellWidget(m_timeSigFont, row, row, 1, 3); ++row; @@ -582,7 +582,7 @@ NotationConfigurationPage::slotViewButtonPressed() NoteFont *noteFont = NoteFontFactory::getFont (fontName, NoteFontFactory::getDefaultSize(fontName)); const NoteFontMap &map(noteFont->getNoteFontMap()); - QStringList systemFontNames(map.getSystemFontNames()); + TQStringList systemFontNames(map.getSystemFontNames()); if (systemFontNames.count() == 0) { m_viewButton->setEnabled(false); // oops } else { @@ -600,7 +600,7 @@ NotationConfigurationPage::slotViewButtonPressed() void NotationConfigurationPage::slotPopulateFontCombo(bool rescan) { - QString defaultFont = m_cfg->readEntry + TQString defaultFont = m_cfg->readEntry ("notefont", strtoqstr(NoteFontFactory::getDefaultFontName())); try { @@ -620,7 +620,7 @@ NotationConfigurationPage::slotPopulateFontCombo(bool rescan) m_font->clear(); for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString s(strtoqstr(*i)); + TQString s(strtoqstr(*i)); m_untranslatedFont.append(s); m_font->insertItem(i18n(s.utf8())); if (s == defaultFont) @@ -646,7 +646,7 @@ NotationConfigurationPage::slotFontComboChanged(int index) int printpt = m_cfg->readUnsignedNumEntry("printingnotesize", 5); for (int i = 2; i < 16; ++i) { - m_printingSize->insertItem(QString("%1").arg(i)); + m_printingSize->insertItem(TQString("%1").arg(i)); if (i == printpt) { m_printingSize->setCurrentItem(m_printingSize->count() - 1); } @@ -675,7 +675,7 @@ NotationConfigurationPage::slotFontComboChanged(int index) } void -NotationConfigurationPage::populateSizeCombo(QComboBox *combo, +NotationConfigurationPage::populateSizeCombo(TQComboBox *combo, std::string font, int defaultSize) { @@ -683,7 +683,7 @@ NotationConfigurationPage::populateSizeCombo(QComboBox *combo, combo->clear(); for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { - combo->insertItem(QString("%1").arg(*i)); + combo->insertItem(TQString("%1").arg(*i)); if (*i == defaultSize) combo->setCurrentItem(combo->count() - 1); } diff --git a/src/gui/configuration/NotationConfigurationPage.h b/src/gui/configuration/NotationConfigurationPage.h index a3d3dc5..c7a777a 100644 --- a/src/gui/configuration/NotationConfigurationPage.h +++ b/src/gui/configuration/NotationConfigurationPage.h @@ -28,16 +28,16 @@ #include <string> #include "TabbedConfigurationPage.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <klocale.h> -class QWidget; -class QPushButton; -class QLabel; -class QComboBox; -class QCheckBox; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQComboBox; +class TQCheckBox; class KFontRequester; class KConfig; @@ -57,13 +57,13 @@ class NotationConfigurationPage : public TabbedConfigurationPage public: NotationConfigurationPage(KConfig *cfg, - QWidget *parent = 0, const char *name=0); + TQWidget *parent = 0, const char *name=0); virtual void apply(); - static QString iconLabel() { return i18n("Notation"); } - static QString title() { return i18n("Notation"); } - static QString iconName() { return "configure-notation"; } + static TQString iconLabel() { return i18n("Notation"); } + static TQString title() { return i18n("Notation"); } + static TQString iconName() { return "configure-notation"; } protected slots: void slotFontComboChanged(int); @@ -74,41 +74,41 @@ protected: //--------------- Data members --------------------------------- - QComboBox *m_font; - QComboBox *m_singleStaffSize; - QComboBox *m_multiStaffSize; - QComboBox *m_printingSize; + TQComboBox *m_font; + TQComboBox *m_singleStaffSize; + TQComboBox *m_multiStaffSize; + TQComboBox *m_printingSize; KFontRequester* m_textFont; KFontRequester* m_sansFont; KFontRequester* m_timeSigFont; - QPushButton *m_viewButton; - QLabel *m_fontOriginLabel; - QLabel *m_fontCopyrightLabel; - QLabel *m_fontMappedByLabel; - QLabel *m_fontTypeLabel; - QComboBox *m_layoutMode; - QComboBox *m_spacing; - QComboBox *m_proportion; - QCheckBox *m_colourQuantize; - QCheckBox *m_showUnknowns; - QCheckBox *m_showInvisibles; - QCheckBox *m_showRanges; - QCheckBox *m_showCollisions; - QComboBox *m_showTrackHeaders; - QComboBox *m_noteStyle; - QComboBox *m_insertType; - QCheckBox *m_autoBeam; - QCheckBox *m_collapseRests; - QComboBox *m_pasteType; - QComboBox *m_accOctavePolicy; - QComboBox *m_accBarPolicy; - QComboBox *m_keySigCancelMode; - QCheckBox *m_splitAndTie; + TQPushButton *m_viewButton; + TQLabel *m_fontOriginLabel; + TQLabel *m_fontCopyrightLabel; + TQLabel *m_fontMappedByLabel; + TQLabel *m_fontTypeLabel; + TQComboBox *m_layoutMode; + TQComboBox *m_spacing; + TQComboBox *m_proportion; + TQCheckBox *m_colourQuantize; + TQCheckBox *m_showUnknowns; + TQCheckBox *m_showInvisibles; + TQCheckBox *m_showRanges; + TQCheckBox *m_showCollisions; + TQComboBox *m_showTrackHeaders; + TQComboBox *m_noteStyle; + TQComboBox *m_insertType; + TQCheckBox *m_autoBeam; + TQCheckBox *m_collapseRests; + TQComboBox *m_pasteType; + TQComboBox *m_accOctavePolicy; + TQComboBox *m_accBarPolicy; + TQComboBox *m_keySigCancelMode; + TQCheckBox *m_splitAndTie; QuantizeParameters *m_quantizeFrame; - QStringList m_untranslatedFont; - QStringList m_untranslatedNoteStyle; + TQStringList m_untranslatedFont; + TQStringList m_untranslatedNoteStyle; - void populateSizeCombo(QComboBox *combo, std::string font, int dfltSize); + void populateSizeCombo(TQComboBox *combo, std::string font, int dfltSize); }; diff --git a/src/gui/configuration/TabbedConfigurationPage.cpp b/src/gui/configuration/TabbedConfigurationPage.cpp index cc808a9..ae64894 100644 --- a/src/gui/configuration/TabbedConfigurationPage.cpp +++ b/src/gui/configuration/TabbedConfigurationPage.cpp @@ -29,17 +29,17 @@ #include "document/RosegardenGUIDoc.h" #include <kconfig.h> #include <kdialog.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : ConfigurationPage(doc, parent, name) { @@ -47,7 +47,7 @@ TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, } TabbedConfigurationPage::TabbedConfigurationPage(KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name) : ConfigurationPage(cfg, parent, name) { @@ -56,7 +56,7 @@ TabbedConfigurationPage::TabbedConfigurationPage(KConfig *cfg, TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent, + TQWidget *parent, const char *name) : ConfigurationPage(doc, cfg, parent, name) { @@ -65,12 +65,12 @@ TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, void TabbedConfigurationPage::init() { - QVBoxLayout *vlay = new QVBoxLayout(this, 0, KDialog::spacingHint()); - m_tabWidget = new QTabWidget(this); + TQVBoxLayout *vlay = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + m_tabWidget = new TQTabWidget(this); vlay->addWidget(m_tabWidget); } -void TabbedConfigurationPage::addTab(QWidget *tab, const QString &title) +void TabbedConfigurationPage::addTab(TQWidget *tab, const TQString &title) { m_tabWidget->addTab(tab, title); } diff --git a/src/gui/configuration/TabbedConfigurationPage.h b/src/gui/configuration/TabbedConfigurationPage.h index 8c370d5..afe4520 100644 --- a/src/gui/configuration/TabbedConfigurationPage.h +++ b/src/gui/configuration/TabbedConfigurationPage.h @@ -27,11 +27,11 @@ #define _RG_TABBEDCONFIGURATIONPAGE_H_ #include "ConfigurationPage.h" -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QTabWidget; +class TQWidget; +class TQTabWidget; class KConfig; @@ -51,24 +51,24 @@ class TabbedConfigurationPage : public ConfigurationPage public: TabbedConfigurationPage(RosegardenGUIDoc *doc, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); TabbedConfigurationPage(KConfig *cfg, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); TabbedConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); - static QString iconName() { return "misc"; } + static TQString iconName() { return "misc"; } protected: void init(); - void addTab(QWidget *tab, const QString &title); + void addTab(TQWidget *tab, const TQString &title); //--------------- Data members --------------------------------- - QTabWidget *m_tabWidget; + TQTabWidget *m_tabWidget; }; diff --git a/src/gui/dialogs/AddTracksDialog.cpp b/src/gui/dialogs/AddTracksDialog.cpp index 67e5412..498e010 100644 --- a/src/gui/dialogs/AddTracksDialog.cpp +++ b/src/gui/dialogs/AddTracksDialog.cpp @@ -27,12 +27,12 @@ #include <klocale.h> #include <kdialogbase.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> #include <kcombobox.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <kapp.h> #include <kconfig.h> @@ -42,24 +42,24 @@ namespace Rosegarden { -AddTracksDialog::AddTracksDialog(QWidget *parent, int currentTrack) : +AddTracksDialog::AddTracksDialog(TQWidget *parent, int currentTrack) : KDialogBase(parent, 0, true, i18n("Add Tracks"), Ok | Cancel), m_currentTrack(currentTrack) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QHBox *countBox = new QHBox(vBox); + TQHBox *countBox = new TQHBox(vBox); countBox->setSpacing(4); - new QLabel(i18n("How many tracks do you want to add?"), countBox); - m_count = new QSpinBox(countBox); + new TQLabel(i18n("How many tracks do you want to add?"), countBox); + m_count = new TQSpinBox(countBox); m_count->setMinValue(1); m_count->setMaxValue(32); m_count->setValue(1); - QHBox *posBox = new QHBox(vBox); + TQHBox *posBox = new TQHBox(vBox); posBox->setSpacing(4); - new QLabel(i18n("Add tracks"), posBox); + new TQLabel(i18n("Add tracks"), posBox); m_position = new KComboBox(posBox); m_position->insertItem(i18n("At the top")); m_position->insertItem(i18n("Above the current selected track")); diff --git a/src/gui/dialogs/AddTracksDialog.h b/src/gui/dialogs/AddTracksDialog.h index 9930e46..495acfa 100644 --- a/src/gui/dialogs/AddTracksDialog.h +++ b/src/gui/dialogs/AddTracksDialog.h @@ -27,9 +27,9 @@ #include <kdialogbase.h> -class QWidget; -class QSpinBox; -class QComboBox; +class TQWidget; +class TQSpinBox; +class TQComboBox; namespace Rosegarden { @@ -39,15 +39,15 @@ class AddTracksDialog : public KDialogBase Q_OBJECT public: - AddTracksDialog(QWidget *parent, int currentTrack = -1); + AddTracksDialog(TQWidget *parent, int currentTrack = -1); int getTracks(); int getInsertPosition(); protected: int m_currentTrack; - QSpinBox *m_count; - QComboBox *m_position; + TQSpinBox *m_count; + TQComboBox *m_position; }; diff --git a/src/gui/dialogs/AudioManagerDialog.cpp b/src/gui/dialogs/AudioManagerDialog.cpp index 5982632..a5c326c 100644 --- a/src/gui/dialogs/AudioManagerDialog.cpp +++ b/src/gui/dialogs/AudioManagerDialog.cpp @@ -67,23 +67,23 @@ #include <kurl.h> #include <kxmlguiclient.h> #include <kio/netaccess.h> -#include <qaccel.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qdragobject.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qstrlist.h> -#include <qtimer.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqdragobject.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqstrlist.h> +#include <tqtimer.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -93,29 +93,29 @@ const int AudioManagerDialog::m_maxPreviewWidth = 100; const int AudioManagerDialog::m_previewHeight = 30; const char* const AudioManagerDialog::m_listViewLayoutName = "AudioManagerDialog Layout"; -AudioManagerDialog::AudioManagerDialog(QWidget *parent, +AudioManagerDialog::AudioManagerDialog(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "audioManagerDialog"), m_doc(doc), m_playingAudioFile(0), m_audioPlayingDialog(0), - m_playTimer(new QTimer(this)), + m_playTimer(new TQTimer(this)), m_audiblePreview(true) { setCaption(i18n("Audio File Manager")); setWFlags(WDestructiveClose); - QVBox *box = new QVBox(this); + TQVBox *box = new TQVBox(this); setCentralWidget(box); box->setMargin(10); box->setSpacing(5); m_sampleRate = 0; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; m_sampleRate = result; @@ -123,54 +123,54 @@ AudioManagerDialog::AudioManagerDialog(QWidget *parent, m_fileList = new AudioListView(box); - m_wrongSampleRates = new QLabel(i18n("* Some audio files are encoded at a sample rate different from that of the JACK audio server.\nRosegarden will play them at the correct speed, but they will sound terrible.\nPlease consider resampling such files externally, or adjusting the sample rate of the JACK server."), box); + m_wrongSampleRates = new TQLabel(i18n("* Some audio files are encoded at a sample rate different from that of the JACK audio server.\nRosegarden will play them at the correct speed, but they will sound terrible.\nPlease consider resampling such files externally, or adjusting the sample rate of the JACK server."), box); m_wrongSampleRates->hide(); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/transport-play.xpm")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/transport-play.xpm")); new KAction(i18n("&Add Audio File..."), "fileopen", 0, this, - SLOT(slotAdd()), actionCollection(), "add_audio"); + TQT_SLOT(slotAdd()), actionCollection(), "add_audio"); new KAction(i18n("&Unload Audio File"), "editdelete", 0, this, - SLOT(slotRemove()), + TQT_SLOT(slotRemove()), actionCollection(), "remove_audio"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/transport-play.xpm")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/transport-play.xpm")); new KAction(i18n("&Play Preview"), icon, 0, this, - SLOT(slotPlayPreview()), + TQT_SLOT(slotPlayPreview()), actionCollection(), "preview_audio"); /*!!! Not actually implemented -- this never worked right! new KAction(i18n("Re&label"), 0, 0, this, - SLOT(slotRename()), + TQT_SLOT(slotRename()), actionCollection(), "rename_audio"); */ - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/insert_audio_into_track.xpm")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/insert_audio_into_track.xpm")); new KAction(i18n("&Insert into Selected Audio Track"), - icon, 0, this, SLOT(slotInsert()), + icon, 0, this, TQT_SLOT(slotInsert()), actionCollection(), "insert_audio"); new KAction(i18n("Unload &all Audio Files"), 0, 0, this, - SLOT(slotRemoveAll()), + TQT_SLOT(slotRemoveAll()), actionCollection(), "remove_all_audio"); new KAction(i18n("Unload all &Unused Audio Files"), 0, 0, this, - SLOT(slotRemoveAllUnused()), + TQT_SLOT(slotRemoveAllUnused()), actionCollection(), "remove_all_unused_audio"); new KAction(i18n("&Delete Unused Audio Files..."), 0, 0, this, - SLOT(slotDeleteUnused()), + TQT_SLOT(slotDeleteUnused()), actionCollection(), "delete_unused_audio"); new KAction(i18n("&Export Audio File..."), "fileexport", 0, this, - SLOT(slotExportAudio()), + TQT_SLOT(slotExportAudio()), actionCollection(), "export_audio"); /* new KAction(i18n("Distribute Audio on &MIDI"), 0, 0, this, - SLOT(slotDistributeOnMidiSegment()), + TQT_SLOT(slotDistributeOnMidiSegment()), actionCollection(), "distribute_audio"); */ @@ -202,36 +202,36 @@ AudioManagerDialog::AudioManagerDialog(QWidget *parent, m_fileList->setShowToolTips(true); // connect selection mechanism - connect(m_fileList, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotSelectionChanged(QListViewItem*))); + connect(m_fileList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotSelectionChanged(TQListViewItem*))); - connect(m_fileList, SIGNAL(dropped(QDropEvent*, QListViewItem*)), - SLOT(slotDropped(QDropEvent*, QListViewItem*))); + connect(m_fileList, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), + TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*))); // setup local accelerators // - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); // delete // m_accelerators->connectItem(m_accelerators->insertItem(Key_Delete), this, - SLOT(slotRemove())); + TQT_SLOT(slotRemove())); slotPopulateFileList(); // Connect command history for updates // - connect(getCommandHistory(), SIGNAL(commandExecuted(KCommand *)), - this, SLOT(slotCommandExecuted(KCommand *))); + connect(getCommandHistory(), TQT_SIGNAL(commandExecuted(KCommand *)), + this, TQT_SLOT(slotCommandExecuted(KCommand *))); //setInitialSize(configDialogSize(AudioManagerDialogConfigGroup)); - connect(m_playTimer, SIGNAL(timeout()), - this, SLOT(slotCancelPlayingAudio())); + connect(m_playTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotCancelPlayingAudio())); KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); createGUI("audiomanager.rc"); @@ -250,7 +250,7 @@ void AudioManagerDialog::slotPopulateFileList() { // create pixmap of given size - QPixmap *audioPixmap = new QPixmap(m_maxPreviewWidth, m_previewHeight); + TQPixmap *audioPixmap = new TQPixmap(m_maxPreviewWidth, m_previewHeight); // Store last selected item if we have one // @@ -280,7 +280,7 @@ AudioManagerDialog::slotPopulateFileList() // Turn off selection and report empty list // new AudioListItem(m_fileList, i18n("<no audio files>"), 0); - m_fileList->setSelectionMode(QListView::NoSelection); + m_fileList->setSelectionMode(TQListView::NoSelection); m_fileList->setRootIsDecorated(false); m_fileList->blockSignals(false); @@ -292,10 +292,10 @@ AudioManagerDialog::slotPopulateFileList() m_fileList->setRootIsDecorated(true); // enable selection - m_fileList->setSelectionMode(QListView::Single); + m_fileList->setSelectionMode(TQListView::Single); // for the sample file length - QString msecs, sRate; + TQString msecs, sRate; RealTime length; // Create a vector of audio Segments only @@ -325,15 +325,15 @@ AudioManagerDialog::slotPopulateFileList() audioPixmap); } catch (Exception e) { audioPixmap->fill(); // white - QPainter p(audioPixmap); + TQPainter p(audioPixmap); p.setPen(Qt::black); - p.drawText(10, m_previewHeight / 2, QString("<no preview>")); + p.drawText(10, m_previewHeight / 2, TQString("<no preview>")); } //!!! Why isn't the label the label the user assigned to the file? // Why do we allow the user to assign a label at all, then? - QString label = QString((*it)->getShortFilename().c_str()); + TQString label = TQString((*it)->getShortFilename().c_str()); // Set the label, duration, envelope pixmap and filename // @@ -343,7 +343,7 @@ AudioManagerDialog::slotPopulateFileList() // length = (*it)->getLength(); msecs.sprintf("%03d", length.nsec / 1000000); - item->setText(1, QString("%1.%2s").arg(length.sec).arg(msecs)); + item->setText(1, TQString("%1.%2s").arg(length.sec).arg(msecs)); // set start time and duration item->setStartTime(RealTime::zeroTime); @@ -355,17 +355,17 @@ AudioManagerDialog::slotPopulateFileList() // File location // - item->setText(6, QString( + item->setText(6, TQString( m_doc->getAudioFileManager(). substituteHomeForTilde((*it)->getFilename()).c_str())); // Resolution // - item->setText(5, QString("%1 bits").arg((*it)->getBitsPerSample())); + item->setText(5, TQString("%1 bits").arg((*it)->getBitsPerSample())); // Channels // - item->setText(4, QString("%1").arg((*it)->getChannels())); + item->setText(4, TQString("%1").arg((*it)->getChannels())); // Sample rate // @@ -390,7 +390,7 @@ AudioManagerDialog::slotPopulateFileList() if ((*iit)->getAudioFileId() == (*it)->getId()) { AudioListItem *childItem = new AudioListItem(item, - QString((*iit)->getLabel().c_str()), + TQString((*iit)->getLabel().c_str()), (*it)->getId()); segmentDuration = (*iit)->getAudioEndTime() - (*iit)->getAudioStartTime(); @@ -403,7 +403,7 @@ AudioManagerDialog::slotPopulateFileList() // Write segment duration // msecs.sprintf("%03d", segmentDuration.nsec / 1000000); - childItem->setText(1, QString("%1.%2s") + childItem->setText(1, TQString("%1.%2s") .arg(segmentDuration.sec) .arg(msecs)); @@ -483,7 +483,7 @@ AudioManagerDialog::slotExportAudio() Segment *segment = item->getSegment(); - QString saveFile = + TQString saveFile = KFileDialog::getSaveFileName(":WAVS", i18n("*.wav|WAV files (*.wav)"), this, i18n("Choose a name to save this file as")); @@ -551,7 +551,7 @@ AudioManagerDialog::slotRemove() if (item->getSegment()) { // Get the next item to highlight // - QListViewItem *newItem = item->itemBelow(); + TQListViewItem *newItem = item->itemBelow(); // Or try above // @@ -606,8 +606,8 @@ AudioManagerDialog::slotRemove() if (haveSegments) { - QString question = i18n("This will unload audio file \"%1\" and remove all associated segments. Are you sure?") - .arg(QString(audioFile->getFilename().c_str())); + TQString question = i18n("This will unload audio file \"%1\" and remove all associated segments. Are you sure?") + .arg(TQString(audioFile->getFilename().c_str())); // Ask the question int reply = KMessageBox::warningContinueCancel(this, question); @@ -655,7 +655,7 @@ AudioManagerDialog::slotPlayPreview() // now open up the playing dialog // m_audioPlayingDialog = - new AudioPlayingDialog(this, QString(audioFile->getFilename().c_str())); + new AudioPlayingDialog(this, TQString(audioFile->getFilename().c_str())); // Setup timer to pop down dialog after file has completed // @@ -665,7 +665,7 @@ AudioManagerDialog::slotPlayPreview() // just execute // - if (m_audioPlayingDialog->exec() == QDialog::Rejected) + if (m_audioPlayingDialog->exec() == TQDialog::Rejected) emit cancelPlayingAudioFile(m_playingAudioFile); delete m_audioPlayingDialog; @@ -689,7 +689,7 @@ AudioManagerDialog::slotCancelPlayingAudio() void AudioManagerDialog::slotAdd() { - QString extensionList = i18n("*.wav|WAV files (*.wav)\n*.*|All files"); + TQString extensionList = i18n("*.wav|WAV files (*.wav)\n*.*|All files"); if (RosegardenGUIApp::self()->haveAudioImporter()) { //!!! This list really needs to come from the importer helper program @@ -759,7 +759,7 @@ AudioManagerDialog::slotInsert() void AudioManagerDialog::slotRemoveAll() { - QString question = + TQString question = i18n("This will unload all audio files and remove their associated segments.\nThis action cannot be undone, and associations with these files will be lost.\nFiles will not be removed from your disk.\nAre you sure?"); int reply = KMessageBox::warningContinueCancel(this, question); @@ -796,7 +796,7 @@ AudioManagerDialog::slotRemoveAll() void AudioManagerDialog::slotRemoveAllUnused() { - QString question = + TQString question = i18n("This will unload all audio files that are not associated with any segments in this composition.\nThis action cannot be undone, and associations with these files will be lost.\nFiles will not be removed from your disk.\nAre you sure?"); int reply = KMessageBox::warningContinueCancel(this, question); @@ -848,8 +848,8 @@ AudioManagerDialog::slotDeleteUnused() audioFiles.insert((*it)->getAudioFileId()); } - std::vector<QString> toDelete; - std::map<QString, AudioFileId> nameMap; + std::vector<TQString> toDelete; + std::map<TQString, AudioFileId> nameMap; for (std::vector<AudioFile*>::const_iterator aIt = m_doc->getAudioFileManager().begin(); @@ -865,13 +865,13 @@ AudioManagerDialog::slotDeleteUnused() i18n("The following audio files are not used in the current composition.\n\nPlease select the ones you wish to delete permanently from the hard disk.\n"), toDelete); - if (dialog->exec() == QDialog::Accepted) { + if (dialog->exec() == TQDialog::Accepted) { - std::vector<QString> names = dialog->getSelectedAudioFileNames(); + std::vector<TQString> names = dialog->getSelectedAudioFileNames(); if (names.size() > 0) { - QString question = + TQString question = i18n("<qt>About to delete 1 audio file permanently from the hard disk.<br>This action cannot be undone, and there will be no way to recover this file.<br>Are you sure?</qt>\n", "<qt>About to delete %n audio files permanently from the hard disk.<br>This action cannot be undone, and there will be no way to recover these files.<br>Are you sure?</qt>", names.size()); int reply = KMessageBox::warningContinueCancel(this, question); @@ -883,7 +883,7 @@ AudioManagerDialog::slotDeleteUnused() for (int i = 0; i < names.size(); ++i) { std::cerr << i << ": " << names[i] << std::endl; - QFile file(names[i]); + TQFile file(names[i]); if (!file.remove()) { KMessageBox::error(this, i18n("File %1 could not be deleted.").arg(names[i])); } else { @@ -894,7 +894,7 @@ AudioManagerDialog::slotDeleteUnused() std::cerr << "WARNING: Audio file name " << names[i] << " not in name map" << std::endl; } - QFile peakFile(QString("%1.pk").arg(names[i])); + TQFile peakFile(TQString("%1.pk").arg(names[i])); peakFile.remove(); } } @@ -917,10 +917,10 @@ AudioManagerDialog::slotRename() bool ok = false; - QString newText = KLineEditDlg::getText( + TQString newText = KLineEditDlg::getText( i18n("Change Audio File label"), i18n("Enter new label"), - QString(audioFile->getName().c_str()), + TQString(audioFile->getName().c_str()), &ok, this); @@ -931,7 +931,7 @@ AudioManagerDialog::slotRename() } void -AudioManagerDialog::slotSelectionChanged(QListViewItem *item) +AudioManagerDialog::slotSelectionChanged(TQListViewItem *item) { AudioListItem *aItem = dynamic_cast<AudioListItem*>(item); @@ -952,8 +952,8 @@ AudioManagerDialog::setSelected(AudioFileId id, const Segment *segment, bool propagate) { - QListViewItem *it = m_fileList->firstChild(); - QListViewItem *chIt = 0; + TQListViewItem *it = m_fileList->firstChild(); + TQListViewItem *chIt = 0; AudioListItem *aItem; while (it) { @@ -997,7 +997,7 @@ AudioManagerDialog::setSelected(AudioFileId id, } void -AudioManagerDialog::selectFileListItemNoSignal(QListViewItem* it) +AudioManagerDialog::selectFileListItemNoSignal(TQListViewItem* it) { m_fileList->blockSignals(true); @@ -1093,31 +1093,31 @@ AudioManagerDialog::addFile(const KURL& kurl) // Connect the progress dialog // - connect(&aFM, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(&aFM, SIGNAL(setOperationName(QString)), - &progressDlg, SLOT(slotSetOperationName(QString))); - connect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopImport())); + connect(&aFM, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(&aFM, TQT_SIGNAL(setOperationName(TQString)), + &progressDlg, TQT_SLOT(slotSetOperationName(TQString))); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopImport())); try { id = aFM.importURL(kurl, m_sampleRate); } catch (AudioFileManager::BadAudioPathException e) { CurrentProgressDialog::freeze(); - QString errorString = i18n("Failed to add audio file. ") + strtoqstr(e.getMessage()); + TQString errorString = i18n("Failed to add audio file. ") + strtoqstr(e.getMessage()); KMessageBox::sorry(this, errorString); return false; } catch (SoundFile::BadSoundFileException e) { CurrentProgressDialog::freeze(); - QString errorString = i18n("Failed to add audio file. ") + strtoqstr(e.getMessage()); + TQString errorString = i18n("Failed to add audio file. ") + strtoqstr(e.getMessage()); KMessageBox::sorry(this, errorString); return false; } - disconnect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopImport())); - connect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopPreview())); + disconnect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopImport())); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopPreview())); progressDlg.progressBar()->show(); progressDlg.slotSetOperationName(i18n("Generating audio preview...")); @@ -1126,13 +1126,13 @@ AudioManagerDialog::addFile(const KURL& kurl) } catch (Exception e) { CurrentProgressDialog::freeze(); - QString message = strtoqstr(e.getMessage()) + "\n\n" + + TQString message = strtoqstr(e.getMessage()) + "\n\n" + i18n("Try copying this file to a directory where you have write permission and re-add it"); KMessageBox::information(this, message); } - disconnect(&progressDlg, SIGNAL(cancelClicked()), - &aFM, SLOT(slotStopPreview())); + disconnect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &aFM, TQT_SLOT(slotStopPreview())); slotPopulateFileList(); @@ -1143,14 +1143,14 @@ AudioManagerDialog::addFile(const KURL& kurl) } void -AudioManagerDialog::slotDropped(QDropEvent *event, QListViewItem*) +AudioManagerDialog::slotDropped(TQDropEvent *event, TQListViewItem*) { - QStrList uri; + TQStrList uri; // see if we can decode a URI.. if not, just ignore it - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { // okay, we have a URI.. process it - for (QString url = uri.first(); url; url = uri.next()) { + for (TQString url = uri.first(); url; url = uri.next()) { RG_DEBUG << "AudioManagerDialog::dropEvent() : got " << url << endl; @@ -1162,7 +1162,7 @@ AudioManagerDialog::slotDropped(QDropEvent *event, QListViewItem*) } void -AudioManagerDialog::closeEvent(QCloseEvent *e) +AudioManagerDialog::closeEvent(TQCloseEvent *e) { RG_DEBUG << "AudioManagerDialog::closeEvent()\n"; emit closing(); @@ -1188,9 +1188,9 @@ AudioManagerDialog::setAudioSubsystemStatus(bool ok) } bool -AudioManagerDialog::addAudioFile(const QString &filePath) +AudioManagerDialog::addAudioFile(const TQString &filePath) { - return addFile(QFileInfo(filePath).absFilePath()); + return addFile(TQFileInfo(filePath).absFilePath()); } bool diff --git a/src/gui/dialogs/AudioManagerDialog.h b/src/gui/dialogs/AudioManagerDialog.h index 728b700..eae07c0 100644 --- a/src/gui/dialogs/AudioManagerDialog.h +++ b/src/gui/dialogs/AudioManagerDialog.h @@ -31,14 +31,14 @@ #include "document/ConfigGroups.h" -class QWidget; -class QTimer; -class QString; -class QListViewItem; -class QLabel; -class QDropEvent; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQTimer; +class TQString; +class TQListViewItem; +class TQLabel; +class TQDropEvent; +class TQCloseEvent; +class TQAccel; class KURL; class KListView; class KCommand; @@ -61,7 +61,7 @@ class AudioManagerDialog : public KMainWindow Q_OBJECT public: - AudioManagerDialog(QWidget *parent, + AudioManagerDialog(TQWidget *parent, RosegardenGUIDoc *doc); ~AudioManagerDialog(); @@ -91,11 +91,11 @@ public: // Return the accelerator object // - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } // Add a new file to the audio file manager // - bool addAudioFile(const QString &filePath); + bool addAudioFile(const TQString &filePath); public slots: @@ -110,7 +110,7 @@ public slots: void slotExportAudio(); // get selection - void slotSelectionChanged(QListViewItem *); + void slotSelectionChanged(TQListViewItem *); // Repopulate // @@ -168,28 +168,28 @@ signals: void closing(); protected slots: - void slotDropped(QDropEvent*, QListViewItem*); + void slotDropped(TQDropEvent*, TQListViewItem*); void slotCancelPlayingAudio(); protected: bool addFile(const KURL& kurl); bool isSelectedTrackAudio(); - void selectFileListItemNoSignal(QListViewItem*); + void selectFileListItemNoSignal(TQListViewItem*); void updateActionState(bool haveSelection); - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); //--------------- Data members --------------------------------- KListView *m_fileList; - QLabel *m_wrongSampleRates; + TQLabel *m_wrongSampleRates; RosegardenGUIDoc *m_doc; - QAccel *m_accelerators; + TQAccel *m_accelerators; AudioFileId m_playingAudioFile; AudioPlayingDialog *m_audioPlayingDialog; - QTimer *m_playTimer; + TQTimer *m_playTimer; static const char* const m_listViewLayoutName; static const int m_maxPreviewWidth; diff --git a/src/gui/dialogs/AudioPlayingDialog.cpp b/src/gui/dialogs/AudioPlayingDialog.cpp index 0915ef2..524278e 100644 --- a/src/gui/dialogs/AudioPlayingDialog.cpp +++ b/src/gui/dialogs/AudioPlayingDialog.cpp @@ -27,24 +27,24 @@ #include <klocale.h> #include <kdialogbase.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -AudioPlayingDialog::AudioPlayingDialog(QWidget *parent, - const QString &name): +AudioPlayingDialog::AudioPlayingDialog(TQWidget *parent, + const TQString &name): KDialogBase(parent, 0, true, i18n("Playing audio file"), Cancel) { - QHBox *w = makeHBoxMainWidget(); - QLabel *label = new - QLabel(i18n("Playing audio file \"%1\"").arg(name), w); + TQHBox *w = makeHBoxMainWidget(); + TQLabel *label = new + TQLabel(i18n("Playing audio file \"%1\"").arg(name), w); label->setMinimumHeight(80); diff --git a/src/gui/dialogs/AudioPlayingDialog.h b/src/gui/dialogs/AudioPlayingDialog.h index 880d0bd..5cdfaba 100644 --- a/src/gui/dialogs/AudioPlayingDialog.h +++ b/src/gui/dialogs/AudioPlayingDialog.h @@ -30,8 +30,8 @@ #include "gui/application/RosegardenDCOP.h" -class QWidget; -class QString; +class TQWidget; +class TQString; namespace Rosegarden @@ -44,7 +44,7 @@ class AudioPlayingDialog : public KDialogBase Q_OBJECT public: - AudioPlayingDialog(QWidget *parent, const QString &label); + AudioPlayingDialog(TQWidget *parent, const TQString &label); signals: diff --git a/src/gui/dialogs/AudioPluginDialog.cpp b/src/gui/dialogs/AudioPluginDialog.cpp index 7f54f71..16e4500 100644 --- a/src/gui/dialogs/AudioPluginDialog.cpp +++ b/src/gui/dialogs/AudioPluginDialog.cpp @@ -24,7 +24,7 @@ #include "AudioPluginDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -42,25 +42,25 @@ #include "sound/PluginIdentifier.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qaccel.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <set> namespace Rosegarden { -AudioPluginDialog::AudioPluginDialog(QWidget *parent, +AudioPluginDialog::AudioPluginDialog(TQWidget *parent, AudioPluginManager *aPM, #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *aGM, @@ -86,78 +86,78 @@ AudioPluginDialog::AudioPluginDialog(QWidget *parent, { setHelp("studio-plugins"); - setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Fixed)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + TQSizePolicy::Fixed)); #ifdef HAVE_LIBLO setButtonText(Details, i18n("Editor")); #endif - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *pluginSelectionBox = new QGroupBox + TQGroupBox *pluginSelectionBox = new QGroupBox (1, Horizontal, i18n("Plugin"), vbox); makePluginParamsBox(vbox, 0, 10); - m_pluginCategoryBox = new QHBox(pluginSelectionBox); - new QLabel(i18n("Category:"), m_pluginCategoryBox); + m_pluginCategoryBox = new TQHBox(pluginSelectionBox); + new TQLabel(i18n("Category:"), m_pluginCategoryBox); m_pluginCategoryList = new KComboBox(m_pluginCategoryBox); m_pluginCategoryList->setSizeLimit(20); - QHBox *hbox = new QHBox(pluginSelectionBox); - m_pluginLabel = new QLabel(i18n("Plugin:"), hbox); + TQHBox *hbox = new TQHBox(pluginSelectionBox); + m_pluginLabel = new TQLabel(i18n("Plugin:"), hbox); m_pluginList = new KComboBox(hbox); m_pluginList->setSizeLimit(20); - QToolTip::add + TQToolTip::add (m_pluginList, i18n("Select a plugin from this list.")); - QHBox *h = new QHBox(pluginSelectionBox); + TQHBox *h = new TQHBox(pluginSelectionBox); // top line - m_bypass = new QCheckBox(i18n("Bypass"), h); - QToolTip::add + m_bypass = new TQCheckBox(i18n("Bypass"), h); + TQToolTip::add (m_bypass, i18n("Bypass this plugin.")); - connect(m_bypass, SIGNAL(toggled(bool)), - this, SLOT(slotBypassChanged(bool))); + connect(m_bypass, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotBypassChanged(bool))); - m_insOuts = new QLabel(i18n("<ports>"), h); + m_insOuts = new TQLabel(i18n("<ports>"), h); m_insOuts->setAlignment(AlignRight); - QToolTip::add + TQToolTip::add (m_insOuts, i18n("Input and output port counts.")); - m_pluginId = new QLabel(i18n("<id>"), h); + m_pluginId = new TQLabel(i18n("<id>"), h); m_pluginId->setAlignment(AlignRight); - QToolTip::add + TQToolTip::add (m_pluginId, i18n("Unique ID of plugin.")); - connect(m_pluginList, SIGNAL(activated(int)), - this, SLOT(slotPluginSelected(int))); + connect(m_pluginList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPluginSelected(int))); - connect(m_pluginCategoryList, SIGNAL(activated(int)), - this, SLOT(slotCategorySelected(int))); + connect(m_pluginCategoryList, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotCategorySelected(int))); // new line - h = new QHBox(pluginSelectionBox); - m_copyButton = new QPushButton(i18n("Copy"), h); - connect(m_copyButton, SIGNAL(clicked()), - this, SLOT(slotCopy())); - QToolTip::add + h = new TQHBox(pluginSelectionBox); + m_copyButton = new TQPushButton(i18n("Copy"), h); + connect(m_copyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopy())); + TQToolTip::add (m_copyButton, i18n("Copy plugin parameters")); - m_pasteButton = new QPushButton(i18n("Paste"), h); - connect(m_pasteButton, SIGNAL(clicked()), - this, SLOT(slotPaste())); - QToolTip::add + m_pasteButton = new TQPushButton(i18n("Paste"), h); + connect(m_pasteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPaste())); + TQToolTip::add (m_pasteButton, i18n("Paste plugin parameters")); - m_defaultButton = new QPushButton(i18n("Default"), h); - connect(m_defaultButton, SIGNAL(clicked()), - this, SLOT(slotDefault())); - QToolTip::add + m_defaultButton = new TQPushButton(i18n("Default"), h); + connect(m_defaultButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDefault())); + TQToolTip::add (m_defaultButton, i18n("Set to defaults")); populatePluginCategoryList(); @@ -165,7 +165,7 @@ AudioPluginDialog::AudioPluginDialog(QWidget *parent, m_generating = false; - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } #ifdef HAVE_LIBLO @@ -192,8 +192,8 @@ AudioPluginDialog::populatePluginCategoryList() { AudioPluginInstance *inst = m_pluginContainer->getPlugin(m_index); std::set - <QString> categories; - QString currentCategory; + <TQString> categories; + TQString currentCategory; for (PluginIterator i = m_pluginManager->begin(); i != m_pluginManager->end(); ++i) { @@ -227,7 +227,7 @@ AudioPluginDialog::populatePluginCategoryList() m_pluginCategoryList->setCurrentItem(0); for (std::set - <QString>::iterator i = categories.begin(); + <TQString>::iterator i = categories.begin(); i != categories.end(); ++i) { m_pluginCategoryList->insertItem(*i); @@ -247,7 +247,7 @@ AudioPluginDialog::populatePluginList() m_pluginList->insertItem(i18n("(none)")); m_pluginsInList.push_back(0); - QString category; + TQString category; bool needCategory = false; if (m_pluginCategoryList->currentItem() > 0) { @@ -267,7 +267,7 @@ AudioPluginDialog::populatePluginList() // Use this temporary map to ensure that the plugins are sorted // by name when they go into the combobox typedef std::pair<int, AudioPlugin *> PluginPair; - typedef std::map<QString, PluginPair> PluginMap; + typedef std::map<TQString, PluginPair> PluginMap; PluginMap plugins; int count = 0; @@ -280,22 +280,22 @@ AudioPluginDialog::populatePluginList() (!isSynth() && (*i)->isEffect())) { if (needCategory) { - QString cat = ""; + TQString cat = ""; if ((*i)->getCategory()) cat = (*i)->getCategory(); if (cat != category) continue; } - QString name = (*i)->getName(); + TQString name = (*i)->getName(); bool store = true; if (plugins.find(name) != plugins.end()) { // We already have a plugin of this name. If it's a // LADSPA plugin, replace it (this one might be // something better); otherwise leave it alone. - QString id = plugins[name].second->getIdentifier(); - QString type, soname, label; + TQString id = plugins[name].second->getIdentifier(); + TQString type, soname, label; PluginIdentifier::parseIdentifier(id, type, soname, label); if (type != "ladspa") { store = false; @@ -314,7 +314,7 @@ AudioPluginDialog::populatePluginList() for (PluginMap::iterator i = plugins.begin(); i != plugins.end(); ++i) { - QString name = i->first; + TQString name = i->first; if (name.endsWith(" VST")) name = name.left(name.length() - 4); @@ -330,10 +330,10 @@ AudioPluginDialog::populatePluginList() } void -AudioPluginDialog::makePluginParamsBox(QWidget *parent, int portCount, +AudioPluginDialog::makePluginParamsBox(TQWidget *parent, int portCount, int tooManyPorts) { - m_pluginParamsBox = new QFrame(parent); + m_pluginParamsBox = new TQFrame(parent); int columns = 2; if (portCount > tooManyPorts) { @@ -351,7 +351,7 @@ AudioPluginDialog::makePluginParamsBox(QWidget *parent, int portCount, perColumn = 2; } - m_gridLayout = new QGridLayout(m_pluginParamsBox, + m_gridLayout = new TQGridLayout(m_pluginParamsBox, 1, // rows (will expand) columns * perColumn, 5); // margin @@ -381,20 +381,20 @@ AudioPluginDialog::slotPluginSelected(int i) RG_DEBUG << "AudioPluginDialog::::slotPluginSelected - " << "setting up plugin from position " << number << " at menu item " << i << endl; - QString caption = + TQString caption = strtoqstr(m_pluginContainer->getName()) + - QString(" [ %1 ] - ").arg(m_index + 1); + TQString(" [ %1 ] - ").arg(m_index + 1); if (number == 0) { setCaption(caption + i18n("<no plugin>")); m_insOuts->setText(i18n("<ports>")); m_pluginId->setText(i18n("<id>")); - QToolTip::hide(); - QToolTip::remove + TQToolTip::hide(); + TQToolTip::remove (m_pluginList); - QToolTip::add + TQToolTip::add (m_pluginList, i18n("Select a plugin from this list.")); } @@ -402,7 +402,7 @@ AudioPluginDialog::slotPluginSelected(int i) // Destroy old param widgets // - QWidget* parent = dynamic_cast<QWidget*>(m_pluginParamsBox->parent()); + TQWidget* parent = dynamic_cast<TQWidget*>(m_pluginParamsBox->parent()); delete m_pluginParamsBox; m_pluginWidgets.clear(); // The widgets are deleted with the parameter box @@ -424,7 +424,7 @@ AudioPluginDialog::slotPluginSelected(int i) if (portCount > tooManyPorts) { m_gridLayout->addMultiCellWidget( - new QLabel(i18n("This plugin has too many controls to edit here."), + new TQLabel(i18n("This plugin has too many controls to edit here."), m_pluginParamsBox), 1, 1, 0, m_gridLayout->numCols() - 1, Qt::AlignCenter); } @@ -437,13 +437,13 @@ AudioPluginDialog::slotPluginSelected(int i) setCaption(caption + plugin->getName()); m_pluginId->setText(i18n("Id: %1").arg(plugin->getUniqueId())); - QString pluginInfo = plugin->getAuthor() + QString("\n") + + TQString pluginInfo = plugin->getAuthor() + TQString("\n") + plugin->getCopyright(); - QToolTip::hide(); - QToolTip::remove + TQToolTip::hide(); + TQToolTip::remove (m_pluginList); - QToolTip::add + TQToolTip::add (m_pluginList, pluginInfo); std::string identifier = plugin->getIdentifier().data(); @@ -493,7 +493,7 @@ AudioPluginDialog::slotPluginSelected(int i) else m_insOuts->setText(i18n("%1 in, %2 out").arg(ins).arg(outs)); - QString shortName(plugin->getName()); + TQString shortName(plugin->getName()); int parenIdx = shortName.find(" ("); if (parenIdx > 0) { shortName = shortName.left(parenIdx); @@ -511,11 +511,11 @@ AudioPluginDialog::slotPluginSelected(int i) if (plugin) { int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { - m_programLabel = new QLabel(i18n("Program: "), m_pluginParamsBox); + m_programLabel = new TQLabel(i18n("Program: "), m_pluginParamsBox); m_programCombo = new KComboBox(m_pluginParamsBox); m_programCombo->setSizeLimit(20); @@ -525,8 +525,8 @@ AudioPluginDialog::slotPluginSelected(int i) m_gridLayout->addMultiCellWidget(m_programCombo, 0, 0, 1, m_gridLayout->numCols() - 1, Qt::AlignLeft); - connect(m_programCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotPluginProgramChanged(const QString &))); + connect(m_programCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotPluginProgramChanged(const TQString &))); m_programCombo->clear(); m_programCombo->insertItem(i18n("<none selected>")); @@ -555,8 +555,8 @@ AudioPluginDialog::slotPluginSelected(int i) showBounds, portCount > tooManyPorts); - connect(control, SIGNAL(valueChanged(float)), - this, SLOT(slotPluginPortChanged(float))); + connect(control, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotPluginPortChanged(float))); m_pluginWidgets.push_back(control); } @@ -582,9 +582,9 @@ AudioPluginDialog::slotPluginSelected(int i) QStringList AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤t) { - QStringList list; + TQStringList list; int mappedId = inst->getMappedId(); - QString currentProgram = strtoqstr(inst->getProgram()); + TQString currentProgram = strtoqstr(inst->getProgram()); MappedObjectPropertyList propertyList = StudioControl::getStudioObjectProperty (mappedId, MappedPluginSlot::Programs); @@ -604,7 +604,7 @@ AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤ void AudioPluginDialog::slotPluginPortChanged(float value) { - const QObject* object = sender(); + const TQObject* object = sender(); const PluginControl* control = dynamic_cast<const PluginControl*>(object); @@ -619,7 +619,7 @@ AudioPluginDialog::slotPluginPortChanged(float value) } void -AudioPluginDialog::slotPluginProgramChanged(const QString &value) +AudioPluginDialog::slotPluginProgramChanged(const TQString &value) { // store the new value AudioPluginInstance *inst = m_pluginContainer->getPlugin(m_index); @@ -697,11 +697,11 @@ AudioPluginDialog::updatePluginProgramList() if (!m_programCombo) { int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { - m_programLabel = new QLabel(i18n("Program: "), m_pluginParamsBox); + m_programLabel = new TQLabel(i18n("Program: "), m_pluginParamsBox); m_programCombo = new KComboBox(m_pluginParamsBox); m_programCombo->setSizeLimit(20); @@ -722,8 +722,8 @@ AudioPluginDialog::updatePluginProgramList() m_programCombo->show(); m_programCombo->blockSignals(true); - connect(m_programCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotPluginProgramChanged(const QString &))); + connect(m_programCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotPluginProgramChanged(const TQString &))); } else { return ; @@ -736,7 +736,7 @@ AudioPluginDialog::updatePluginProgramList() } int current = -1; - QStringList programs = getProgramsForInstance(inst, current); + TQStringList programs = getProgramsForInstance(inst, current); if (programs.count() > 0) { m_programCombo->show(); @@ -773,7 +773,7 @@ AudioPluginDialog::windowActivationChange(bool oldState) } void -AudioPluginDialog::closeEvent(QCloseEvent *e) +AudioPluginDialog::closeEvent(TQCloseEvent *e) { e->accept(); emit destroyed(m_containerId, m_index); diff --git a/src/gui/dialogs/AudioPluginDialog.h b/src/gui/dialogs/AudioPluginDialog.h index bc8a38b..5ff5dc4 100644 --- a/src/gui/dialogs/AudioPluginDialog.h +++ b/src/gui/dialogs/AudioPluginDialog.h @@ -29,19 +29,19 @@ #include "base/Instrument.h" #include "base/MidiProgram.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <vector> -class QWidget; -class QPushButton; -class QLabel; -class QGridLayout; -class QFrame; -class QCloseEvent; -class QCheckBox; -class QAccel; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQGridLayout; +class TQFrame; +class TQCloseEvent; +class TQCheckBox; +class TQAccel; class KComboBox; @@ -60,7 +60,7 @@ class AudioPluginDialog : public KDialogBase Q_OBJECT public: - AudioPluginDialog(QWidget *parent, + AudioPluginDialog(TQWidget *parent, AudioPluginManager *aPM, #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *aGM, @@ -70,7 +70,7 @@ public: PluginContainer* getPluginContainer() const { return m_pluginContainer; } - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } bool isSynth() { return m_index == int(Instrument::SYNTH_PLUGIN_POSITION); } @@ -84,7 +84,7 @@ public slots: void slotCategorySelected(int); void slotPluginSelected(int index); void slotPluginPortChanged(float value); - void slotPluginProgramChanged(const QString &value); + void slotPluginProgramChanged(const TQString &value); void slotBypassChanged(bool); void slotCopy(); void slotPaste(); @@ -100,7 +100,7 @@ signals: void pluginPortChanged(InstrumentId, int pluginIndex, int portIndex); void pluginProgramChanged(InstrumentId, int pluginIndex); void changePluginConfiguration(InstrumentId, int pluginIndex, - bool global, QString key, QString value); + bool global, TQString key, TQString value); void showPluginGUI(InstrumentId, int pluginIndex); void stopPluginGUI(InstrumentId, int pluginIndex); @@ -114,11 +114,11 @@ protected slots: virtual void slotClose(); protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); virtual void windowActivationChange(bool); - void makePluginParamsBox(QWidget*, int portCount, int tooManyPorts); - QStringList getProgramsForInstance(AudioPluginInstance *inst, int ¤t); + void makePluginParamsBox(TQWidget*, int portCount, int tooManyPorts); + TQStringList getProgramsForInstance(AudioPluginInstance *inst, int ¤t); //--------------- Data members --------------------------------- @@ -129,31 +129,31 @@ protected: PluginContainer *m_pluginContainer; InstrumentId m_containerId; - QFrame *m_pluginParamsBox; - QWidget *m_pluginCategoryBox; + TQFrame *m_pluginParamsBox; + TQWidget *m_pluginCategoryBox; KComboBox *m_pluginCategoryList; - QLabel *m_pluginLabel; + TQLabel *m_pluginLabel; KComboBox *m_pluginList; std::vector<int> m_pluginsInList; - QLabel *m_insOuts; - QLabel *m_pluginId; - QCheckBox *m_bypass; - QPushButton *m_copyButton; - QPushButton *m_pasteButton; - QPushButton *m_defaultButton; - QPushButton *m_guiButton; + TQLabel *m_insOuts; + TQLabel *m_pluginId; + TQCheckBox *m_bypass; + TQPushButton *m_copyButton; + TQPushButton *m_pasteButton; + TQPushButton *m_defaultButton; + TQPushButton *m_guiButton; - QLabel *m_programLabel; + TQLabel *m_programLabel; KComboBox *m_programCombo; std::vector<PluginControl*> m_pluginWidgets; - QGridLayout *m_gridLayout; + TQGridLayout *m_gridLayout; int m_index; bool m_generating; bool m_guiShown; - QAccel *m_accelerators; + TQAccel *m_accelerators; void populatePluginCategoryList(); void populatePluginList(); diff --git a/src/gui/dialogs/AudioSplitDialog.cpp b/src/gui/dialogs/AudioSplitDialog.cpp index 42290b3..b7a1b67 100644 --- a/src/gui/dialogs/AudioSplitDialog.cpp +++ b/src/gui/dialogs/AudioSplitDialog.cpp @@ -36,21 +36,21 @@ #include "gui/application/RosegardenApplication.h" #include "sound/AudioFileManager.h" #include <kdialogbase.h> -#include <qcanvas.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qpalette.h> -#include <qscrollview.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqpalette.h> +#include <tqscrollview.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -AudioSplitDialog::AudioSplitDialog(QWidget *parent, +AudioSplitDialog::AudioSplitDialog(TQWidget *parent, Segment *segment, RosegardenGUIDoc *doc): KDialogBase(parent, 0, true, @@ -65,27 +65,27 @@ AudioSplitDialog::AudioSplitDialog(QWidget *parent, if (!segment || segment->getType() != Segment::Audio) reject(); - QVBox *w = makeVBoxMainWidget(); + TQVBox *w = makeVBoxMainWidget(); - new QLabel(i18n("AutoSplit Segment \"") + - strtoqstr(m_segment->getLabel()) + QString("\""), w); + new TQLabel(i18n("AutoSplit Segment \"") + + strtoqstr(m_segment->getLabel()) + TQString("\""), w); - m_canvas = new QCanvas(w); + m_canvas = new TQCanvas(w); m_canvas->resize(m_canvasWidth, m_canvasHeight); - m_canvasView = new QCanvasView(m_canvas, w); + m_canvasView = new TQCanvasView(m_canvas, w); m_canvasView->setFixedWidth(m_canvasWidth); m_canvasView->setFixedHeight(m_canvasHeight); - m_canvasView->setHScrollBarMode(QScrollView::AlwaysOff); - m_canvasView->setVScrollBarMode(QScrollView::AlwaysOff); + m_canvasView->setHScrollBarMode(TQScrollView::AlwaysOff); + m_canvasView->setVScrollBarMode(TQScrollView::AlwaysOff); m_canvasView->setDragAutoScroll(false); - QHBox *hbox = new QHBox(w); - new QLabel(i18n("Threshold"), hbox); - m_thresholdSpin = new QSpinBox(hbox); + TQHBox *hbox = new TQHBox(w); + new TQLabel(i18n("Threshold"), hbox); + m_thresholdSpin = new TQSpinBox(hbox); m_thresholdSpin->setSuffix(" %"); - connect(m_thresholdSpin, SIGNAL(valueChanged(int)), - SLOT(slotThresholdChanged(int))); + connect(m_thresholdSpin, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotThresholdChanged(int))); // ensure this is cleared m_previewBoxes.clear(); @@ -103,8 +103,8 @@ AudioSplitDialog::drawPreview() { // Delete everything on the canvas // - QCanvasItemList list = m_canvas->allItems(); - for (QCanvasItemList::Iterator it = list.begin(); it != list.end(); it++) + TQCanvasItemList list = m_canvas->allItems(); + for (TQCanvasItemList::Iterator it = list.begin(); it != list.end(); it++) delete *it; // empty the preview boxes @@ -113,13 +113,13 @@ AudioSplitDialog::drawPreview() // Draw a bounding box // int border = 5; - QCanvasRectangle *rect = new QCanvasRectangle(m_canvas); + TQCanvasRectangle *rect = new TQCanvasRectangle(m_canvas); rect->setSize(m_canvasWidth - border * 2, m_canvasHeight - border * 2); rect->setX(border); rect->setY(border); rect->setZ(1); - rect->setPen(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); - rect->setBrush(kapp->palette().color(QPalette::Active, QColorGroup::Base)); + rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); + rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Base)); rect->setVisible(true); // Get preview in vector form @@ -136,9 +136,9 @@ AudioSplitDialog::drawPreview() m_previewWidth, false); } catch (Exception e) { - QCanvasText *text = new QCanvasText(m_canvas); + TQCanvasText *text = new TQCanvasText(m_canvas); text->setColor(kapp->palette(). - color(QPalette::Active, QColorGroup::Shadow)); + color(TQPalette::Active, TQColorGroup::Shadow)); text->setText(i18n("<no preview generated for this audio file>")); text->setX(30); text->setY(30); @@ -182,28 +182,28 @@ AudioSplitDialog::drawPreview() endY = 0; } - QCanvasLine *line = new QCanvasLine(m_canvas); + TQCanvasLine *line = new TQCanvasLine(m_canvas); line->setPoints(startX + i, startY, startX + i, endY); line->setZ(3); line->setPen(kapp-> - palette().color(QPalette::Active, QColorGroup::Shadow)); + palette().color(TQPalette::Active, TQColorGroup::Shadow)); line->setBrush(kapp-> - palette().color(QPalette::Active, QColorGroup::Shadow)); + palette().color(TQPalette::Active, TQColorGroup::Shadow)); line->setVisible(true); } // Draw zero dc line // - rect = new QCanvasRectangle(m_canvas); + rect = new TQCanvasRectangle(m_canvas); rect->setX(startX); rect->setY(halfHeight - 1); rect->setSize(m_previewWidth, 2); - rect->setPen(kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); - rect->setBrush(kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); + rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); + rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(4); rect->setVisible(true); @@ -211,46 +211,46 @@ AudioSplitDialog::drawPreview() // char msecs[100]; sprintf(msecs, "%03d", m_segment->getAudioStartTime().msec()); - QString startText = QString("%1.%2s") + TQString startText = TQString("%1.%2s") .arg(m_segment->getAudioStartTime().sec) .arg(msecs); - QCanvasText *text = new QCanvasText(m_canvas); + TQCanvasText *text = new TQCanvasText(m_canvas); text->setColor( - kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); + kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); text->setText(startText); text->setX(startX - 20); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setZ(3); text->setVisible(true); - rect = new QCanvasRectangle(m_canvas); + rect = new TQCanvasRectangle(m_canvas); rect->setX(startX - 1); rect->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 14); rect->setSize(1, m_previewHeight + 28); - rect->setPen(kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); + rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(3); rect->setVisible(true); // End time // sprintf(msecs, "%03d", m_segment->getAudioEndTime().msec()); - QString endText = QString("%1.%2s") + TQString endText = TQString("%1.%2s") .arg(m_segment->getAudioEndTime().sec) .arg(msecs); - text = new QCanvasText(m_canvas); + text = new TQCanvasText(m_canvas); text->setColor( - kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); + kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); text->setText(endText); text->setX(startX + m_previewWidth - 20); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setZ(3); text->setVisible(true); - rect = new QCanvasRectangle(m_canvas); + rect = new TQCanvasRectangle(m_canvas); rect->setX(startX + m_previewWidth - 1); rect->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 14); rect->setSize(1, m_previewHeight + 28); - rect->setPen(kapp->palette().color(QPalette::Active, QColorGroup::Shadow)); + rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(3); rect->setVisible(true); @@ -273,7 +273,7 @@ AudioSplitDialog::drawSplits(int threshold) threshold); std::vector<SplitPointPair>::iterator it; - std::vector<QCanvasRectangle*> tempRects; + std::vector<TQCanvasRectangle*> tempRects; RealTime length = endTime - startTime; double ticksPerUsec = double(m_previewWidth) / @@ -294,20 +294,20 @@ AudioSplitDialog::drawSplits(int threshold) x2 = int(ticksPerUsec * double(double(splitEnd.sec) * 1000000.0 + double(splitEnd.usec()))); - QCanvasRectangle *rect = new QCanvasRectangle(m_canvas); + TQCanvasRectangle *rect = new TQCanvasRectangle(m_canvas); rect->setX(startX + x1); rect->setY(halfHeight - m_previewHeight / 2 - overlapHeight / 2); rect->setZ(2); rect->setSize(x2 - x1, m_previewHeight + overlapHeight); rect->setPen(kapp-> - palette().color(QPalette::Active, QColorGroup::Mid)); + palette().color(TQPalette::Active, TQColorGroup::Mid)); rect->setBrush(kapp-> - palette().color(QPalette::Active, QColorGroup::Mid)); + palette().color(TQPalette::Active, TQColorGroup::Mid)); rect->setVisible(true); tempRects.push_back(rect); } - std::vector<QCanvasRectangle*>::iterator pIt; + std::vector<TQCanvasRectangle*>::iterator pIt; // We've written the new Rects, now delete the old ones // diff --git a/src/gui/dialogs/AudioSplitDialog.h b/src/gui/dialogs/AudioSplitDialog.h index 7dc52c0..0d1febf 100644 --- a/src/gui/dialogs/AudioSplitDialog.h +++ b/src/gui/dialogs/AudioSplitDialog.h @@ -28,13 +28,13 @@ #include <kdialogbase.h> #include <vector> -#include <qspinbox.h> +#include <tqspinbox.h> -class QWidget; -class QCanvasView; -class QCanvasRectangle; -class QCanvas; +class TQWidget; +class TQCanvasView; +class TQCanvasRectangle; +class TQCanvas; namespace Rosegarden @@ -48,7 +48,7 @@ class AudioSplitDialog : public KDialogBase { Q_OBJECT public: - AudioSplitDialog(QWidget *parent, + AudioSplitDialog(TQWidget *parent, Segment *segment, RosegardenGUIDoc *doc); @@ -68,16 +68,16 @@ public slots: protected: RosegardenGUIDoc *m_doc; Segment *m_segment; - QCanvas *m_canvas; - QCanvasView *m_canvasView; - QSpinBox *m_thresholdSpin; + TQCanvas *m_canvas; + TQCanvasView *m_canvasView; + TQSpinBox *m_thresholdSpin; int m_canvasWidth; int m_canvasHeight; int m_previewWidth; int m_previewHeight; - std::vector<QCanvasRectangle*> m_previewBoxes; + std::vector<TQCanvasRectangle*> m_previewBoxes; }; diff --git a/src/gui/dialogs/BeatsBarsDialog.cpp b/src/gui/dialogs/BeatsBarsDialog.cpp index 774ddb9..8f765a7 100644 --- a/src/gui/dialogs/BeatsBarsDialog.cpp +++ b/src/gui/dialogs/BeatsBarsDialog.cpp @@ -24,35 +24,35 @@ #include "BeatsBarsDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "base/Segment.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qspinbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqspinbox.h> +#include <tqwidget.h> namespace Rosegarden { -BeatsBarsDialog::BeatsBarsDialog(QWidget* parent) : +BeatsBarsDialog::BeatsBarsDialog(TQWidget* parent) : KDialogBase(parent, 0, true, i18n("Audio Segment Duration"), Ok | Cancel, Ok) { - QHBox *hbox = makeHBoxMainWidget(); + TQHBox *hbox = makeHBoxMainWidget(); - QGroupBox *gbox = new QGroupBox(1, Horizontal, + TQGroupBox *gbox = new TQGroupBox(1, Horizontal, i18n("The selected audio segment contains:"), hbox); - QFrame *frame = new QFrame(gbox); - QGridLayout *layout = new QGridLayout(frame, 1, 2, 5, 5); + TQFrame *frame = new TQFrame(gbox); + TQGridLayout *layout = new TQGridLayout(frame, 1, 2, 5, 5); - m_spinBox = new QSpinBox(1, INT_MAX, 1, frame, "glee"); + m_spinBox = new TQSpinBox(1, INT_MAX, 1, frame, "glee"); layout->addWidget(m_spinBox, 0, 0); m_comboBox = new KComboBox(false, frame); diff --git a/src/gui/dialogs/BeatsBarsDialog.h b/src/gui/dialogs/BeatsBarsDialog.h index 6546f01..658a4fb 100644 --- a/src/gui/dialogs/BeatsBarsDialog.h +++ b/src/gui/dialogs/BeatsBarsDialog.h @@ -27,10 +27,10 @@ #define _RG_BEATSBARSDIALOG_H_ #include <kdialogbase.h> -#include <qspinbox.h> +#include <tqspinbox.h> #include <kcombobox.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -46,13 +46,13 @@ class BeatsBarsDialog : public KDialogBase public: BeatsBarsDialog(); - BeatsBarsDialog(QWidget *parent); + BeatsBarsDialog(TQWidget *parent); int getQuantity() { return m_spinBox->value(); } int getMode() { return m_comboBox->currentItem(); } protected: - QSpinBox *m_spinBox; + TQSpinBox *m_spinBox; KComboBox *m_comboBox; }; diff --git a/src/gui/dialogs/ClefDialog.cpp b/src/gui/dialogs/ClefDialog.cpp index 8f802b0..bfb2ee1 100644 --- a/src/gui/dialogs/ClefDialog.cpp +++ b/src/gui/dialogs/ClefDialog.cpp @@ -30,23 +30,23 @@ #include "gui/widgets/BigArrowButton.h" #include <klocale.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -ClefDialog::ClefDialog(QWidget *parent, +ClefDialog::ClefDialog(TQWidget *parent, NotePixmapFactory *npf, Clef defaultClef, bool showConversionOptions) : @@ -56,38 +56,38 @@ ClefDialog::ClefDialog(QWidget *parent, { setHelp("nv-signatures-clef"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *clefFrame = new QGroupBox + TQGroupBox *clefFrame = new QGroupBox (1, Horizontal, i18n("Clef"), vbox); - QButtonGroup *conversionFrame = new QButtonGroup + TQButtonGroup *conversionFrame = new QButtonGroup (1, Horizontal, i18n("Existing notes following clef change"), vbox); - QHBox *clefBox = new QHBox(clefFrame); + TQHBox *clefBox = new TQHBox(clefFrame); BigArrowButton *clefDown = new BigArrowButton(clefBox, Qt::LeftArrow); - QToolTip::add + TQToolTip::add (clefDown, i18n("Lower clef")); - QHBox *clefLabelBox = new QVBox(clefBox); + TQHBox *clefLabelBox = new TQVBox(clefBox); m_octaveUp = new BigArrowButton(clefLabelBox, Qt::UpArrow); - QToolTip::add + TQToolTip::add (m_octaveUp, i18n("Up an Octave")); - m_clefLabel = new QLabel(i18n("Clef"), clefLabelBox); + m_clefLabel = new TQLabel(i18n("Clef"), clefLabelBox); m_clefLabel->setAlignment(AlignVCenter | AlignHCenter); m_octaveDown = new BigArrowButton(clefLabelBox, Qt::DownArrow); - QToolTip::add + TQToolTip::add (m_octaveDown, i18n("Down an Octave")); BigArrowButton *clefUp = new BigArrowButton(clefBox, Qt::RightArrow); - QToolTip::add + TQToolTip::add (clefUp, i18n("Higher clef")); - m_clefNameLabel = new QLabel(i18n("Clef"), clefLabelBox); + m_clefNameLabel = new TQLabel(i18n("Clef"), clefLabelBox); m_clefNameLabel->setAlignment(AlignVCenter | AlignHCenter); if (showConversionOptions) { @@ -111,10 +111,10 @@ ClefDialog::ClefDialog(QWidget *parent, conversionFrame->hide(); } - QObject::connect(clefUp, SIGNAL(clicked()), this, SLOT(slotClefUp())); - QObject::connect(clefDown, SIGNAL(clicked()), this, SLOT(slotClefDown())); - QObject::connect(m_octaveUp, SIGNAL(clicked()), this, SLOT(slotOctaveUp())); - QObject::connect(m_octaveDown, SIGNAL(clicked()), this, SLOT(slotOctaveDown())); + TQObject::connect(clefUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClefUp())); + TQObject::connect(clefDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClefDown())); + TQObject::connect(m_octaveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOctaveUp())); + TQObject::connect(m_octaveDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOctaveDown())); redrawClefPixmap(); } @@ -219,11 +219,11 @@ ClefDialog::slotOctaveDown() void ClefDialog::redrawClefPixmap() { - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (m_notePixmapFactory->makeClefDisplayPixmap(m_clef)); m_clefLabel->setPixmap(pmap); - QString name; + TQString name; int octave = m_clef.getOctaveOffset(); switch (octave) { diff --git a/src/gui/dialogs/ClefDialog.h b/src/gui/dialogs/ClefDialog.h index 771cd4a..634e4b9 100644 --- a/src/gui/dialogs/ClefDialog.h +++ b/src/gui/dialogs/ClefDialog.h @@ -30,9 +30,9 @@ #include <kdialogbase.h> -class QWidget; -class QRadioButton; -class QLabel; +class TQWidget; +class TQRadioButton; +class TQLabel; namespace Rosegarden @@ -53,7 +53,7 @@ public: Transpose, }; - ClefDialog(QWidget *parent, + ClefDialog(TQWidget *parent, NotePixmapFactory *npf, Clef defaultClef, bool showConversionOptions = true); @@ -75,15 +75,15 @@ protected: NotePixmapFactory *m_notePixmapFactory; Clef m_clef; - QLabel *m_clefLabel; - QLabel *m_clefNameLabel; + TQLabel *m_clefLabel; + TQLabel *m_clefNameLabel; BigArrowButton *m_octaveUp; BigArrowButton *m_octaveDown; - QRadioButton *m_noConversionButton; - QRadioButton *m_changeOctaveButton; - QRadioButton *m_transposeButton; + TQRadioButton *m_noConversionButton; + TQRadioButton *m_changeOctaveButton; + TQRadioButton *m_transposeButton; }; diff --git a/src/gui/dialogs/CompositionLengthDialog.cpp b/src/gui/dialogs/CompositionLengthDialog.cpp index 24a3107..85d2530 100644 --- a/src/gui/dialogs/CompositionLengthDialog.cpp +++ b/src/gui/dialogs/CompositionLengthDialog.cpp @@ -28,39 +28,39 @@ #include <klocale.h> #include "base/Composition.h" #include <kdialogbase.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { CompositionLengthDialog::CompositionLengthDialog( - QWidget *parent, + TQWidget *parent, Composition *composition): KDialogBase(parent, 0, true, i18n("Change Composition Length"), Ok | Cancel), m_composition(composition) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - new QLabel(i18n("Set the Start and End bar markers for this Composition"), + new TQLabel(i18n("Set the Start and End bar markers for this Composition"), vBox); - QHBox *startBox = new QHBox(vBox); - new QLabel(i18n("Start Bar"), startBox); - m_startMarkerSpinBox = new QSpinBox(startBox); + TQHBox *startBox = new TQHBox(vBox); + new TQLabel(i18n("Start Bar"), startBox); + m_startMarkerSpinBox = new TQSpinBox(startBox); m_startMarkerSpinBox->setMinValue( -10); m_startMarkerSpinBox->setMaxValue(10000); m_startMarkerSpinBox->setValue( m_composition->getBarNumber(m_composition->getStartMarker()) + 1); - QHBox *endBox = new QHBox(vBox); - new QLabel(i18n("End Bar"), endBox); - m_endMarkerSpinBox = new QSpinBox(endBox); + TQHBox *endBox = new TQHBox(vBox); + new TQLabel(i18n("End Bar"), endBox); + m_endMarkerSpinBox = new TQSpinBox(endBox); m_endMarkerSpinBox->setMinValue( -10); m_endMarkerSpinBox->setMaxValue(10000); m_endMarkerSpinBox->setValue( diff --git a/src/gui/dialogs/CompositionLengthDialog.h b/src/gui/dialogs/CompositionLengthDialog.h index e6d688c..373bf73 100644 --- a/src/gui/dialogs/CompositionLengthDialog.h +++ b/src/gui/dialogs/CompositionLengthDialog.h @@ -30,8 +30,8 @@ #include "base/Event.h" -class QWidget; -class QSpinBox; +class TQWidget; +class TQSpinBox; namespace Rosegarden @@ -44,7 +44,7 @@ class CompositionLengthDialog : public KDialogBase { Q_OBJECT public: - CompositionLengthDialog(QWidget *parent, + CompositionLengthDialog(TQWidget *parent, Composition *composition); timeT getStartMarker(); @@ -52,8 +52,8 @@ public: protected: - QSpinBox *m_startMarkerSpinBox; - QSpinBox *m_endMarkerSpinBox; + TQSpinBox *m_startMarkerSpinBox; + TQSpinBox *m_endMarkerSpinBox; Composition *m_composition; }; diff --git a/src/gui/dialogs/ConfigureDialog.cpp b/src/gui/dialogs/ConfigureDialog.cpp index 1bdd3b4..2ba63c0 100644 --- a/src/gui/dialogs/ConfigureDialog.cpp +++ b/src/gui/dialogs/ConfigureDialog.cpp @@ -24,7 +24,7 @@ #include "ConfigureDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "ConfigureDialogBase.h" @@ -36,37 +36,37 @@ #include <kconfig.h> #include <kdialogbase.h> #include <kstddirs.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -static QPixmap loadIcon(const char *name) +static TQPixmap loadIcon(const char *name) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString fileBase = pixmapDir + "/misc/"; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileBase = pixmapDir + "/misc/"; fileBase += name; - if (QFile(fileBase + ".png").exists()) { - return QPixmap(fileBase + ".png"); - } else if (QFile(fileBase + ".xpm").exists()) { - return QPixmap(fileBase + ".xpm"); + if (TQFile(fileBase + ".png").exists()) { + return TQPixmap(fileBase + ".png"); + } else if (TQFile(fileBase + ".xpm").exists()) { + return TQPixmap(fileBase + ".xpm"); } - QPixmap pmap = KGlobal::instance()->iconLoader() - ->loadIcon(QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); + TQPixmap pmap = KGlobal::instance()->iconLoader() + ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); return pmap; } ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc, KConfig* cfg, - QWidget *parent, + TQWidget *parent, const char *name) : ConfigureDialogBase(parent, i18n("Configure Rosegarden"), name) { - QWidget *pageWidget = 0; - QVBoxLayout *vlay = 0; + TQWidget *pageWidget = 0; + TQVBoxLayout *vlay = 0; ConfigurationPage* page = 0; // General Page @@ -74,21 +74,21 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc, pageWidget = addPage(GeneralConfigurationPage::iconLabel(), GeneralConfigurationPage::title(), loadIcon(GeneralConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new GeneralConfigurationPage(doc, cfg, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); m_configurationPages.push_back(page); - connect(page, SIGNAL(updateAutoSaveInterval(unsigned int)), - this, SIGNAL(updateAutoSaveInterval(unsigned int))); - connect(page, SIGNAL(updateSidebarStyle(unsigned int)), - this, SIGNAL(updateSidebarStyle(unsigned int))); + connect(page, TQT_SIGNAL(updateAutoSaveInterval(unsigned int)), + this, TQT_SIGNAL(updateAutoSaveInterval(unsigned int))); + connect(page, TQT_SIGNAL(updateSidebarStyle(unsigned int)), + this, TQT_SIGNAL(updateSidebarStyle(unsigned int))); pageWidget = addPage(MIDIConfigurationPage::iconLabel(), MIDIConfigurationPage::title(), loadIcon(MIDIConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new MIDIConfigurationPage(doc, cfg, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); @@ -97,7 +97,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc, pageWidget = addPage(AudioConfigurationPage::iconLabel(), AudioConfigurationPage::title(), loadIcon(AudioConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new AudioConfigurationPage(doc, cfg, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); @@ -107,7 +107,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc, pageWidget = addPage(NotationConfigurationPage::iconLabel(), NotationConfigurationPage::title(), loadIcon(NotationConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new NotationConfigurationPage(cfg, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); diff --git a/src/gui/dialogs/ConfigureDialog.h b/src/gui/dialogs/ConfigureDialog.h index 4dd6fff..7b63ffd 100644 --- a/src/gui/dialogs/ConfigureDialog.h +++ b/src/gui/dialogs/ConfigureDialog.h @@ -29,7 +29,7 @@ #include "ConfigureDialogBase.h" -class QWidget; +class TQWidget; class KConfig; @@ -45,7 +45,7 @@ class ConfigureDialog : public ConfigureDialogBase public: ConfigureDialog(RosegardenGUIDoc *doc, KConfig* cfg, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0); signals: void updateAutoSaveInterval(unsigned int); diff --git a/src/gui/dialogs/ConfigureDialogBase.cpp b/src/gui/dialogs/ConfigureDialogBase.cpp index 7d5555a..017e6a6 100644 --- a/src/gui/dialogs/ConfigureDialogBase.cpp +++ b/src/gui/dialogs/ConfigureDialogBase.cpp @@ -28,15 +28,15 @@ #include <klocale.h> #include "gui/configuration/ConfigurationPage.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -ConfigureDialogBase::ConfigureDialogBase(QWidget *parent, - QString label, +ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent, + TQString label, const char *name): KDialogBase(IconList, label ? label : i18n("Configure"), Help | Apply | Ok | Cancel, Ok, parent, name, true) // modal diff --git a/src/gui/dialogs/ConfigureDialogBase.h b/src/gui/dialogs/ConfigureDialogBase.h index fe05ebe..dc02a9c 100644 --- a/src/gui/dialogs/ConfigureDialogBase.h +++ b/src/gui/dialogs/ConfigureDialogBase.h @@ -27,11 +27,11 @@ #define _RG_CONFIGUREDIALOGBASE_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidget; +class TQWidget; namespace Rosegarden @@ -44,8 +44,8 @@ class ConfigureDialogBase : public KDialogBase { Q_OBJECT public: - ConfigureDialogBase(QWidget *parent=0, - QString label = 0, + ConfigureDialogBase(TQWidget *parent=0, + TQString label = 0, const char *name=0); virtual ~ConfigureDialogBase(); diff --git a/src/gui/dialogs/CountdownBar.cpp b/src/gui/dialogs/CountdownBar.cpp index cfad3d8..8d4d0b8 100644 --- a/src/gui/dialogs/CountdownBar.cpp +++ b/src/gui/dialogs/CountdownBar.cpp @@ -26,25 +26,25 @@ #include "CountdownBar.h" #include "gui/general/GUIPalette.h" -#include <qframe.h> -#include <qpainter.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqpainter.h> +#include <tqwidget.h> namespace Rosegarden { -CountdownBar::CountdownBar(QWidget *parent, int width, int height): - QFrame(parent), m_width(width), m_height(height), m_position(0) +CountdownBar::CountdownBar(TQWidget *parent, int width, int height): + TQFrame(parent), m_width(width), m_height(height), m_position(0) { resize(m_width, m_height); repaint(); } void -CountdownBar::paintEvent(QPaintEvent *e) +CountdownBar::paintEvent(TQPaintEvent *e) { - QPainter p(this); + TQPainter p(this); p.setClipRegion(e->region()); p.setClipRect(e->rect().normalize()); diff --git a/src/gui/dialogs/CountdownBar.h b/src/gui/dialogs/CountdownBar.h index 364d0cf..edb17e3 100644 --- a/src/gui/dialogs/CountdownBar.h +++ b/src/gui/dialogs/CountdownBar.h @@ -26,11 +26,11 @@ #ifndef _RG_COUNTDOWNBAR_H_ #define _RG_COUNTDOWNBAR_H_ -#include <qframe.h> +#include <tqframe.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -42,11 +42,11 @@ class CountdownBar : public QFrame { Q_OBJECT public: - CountdownBar(QWidget *parent, int width, int height); + CountdownBar(TQWidget *parent, int width, int height); void setPosition(int position); protected: - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); int m_width; int m_height; diff --git a/src/gui/dialogs/CountdownDialog.cpp b/src/gui/dialogs/CountdownDialog.cpp index f624aba..537bc2b 100644 --- a/src/gui/dialogs/CountdownDialog.cpp +++ b/src/gui/dialogs/CountdownDialog.cpp @@ -24,36 +24,36 @@ #include "CountdownDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "CountdownBar.h" -#include <qaccel.h> -#include <qdialog.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqwidget.h> #include "misc/Debug.h" namespace Rosegarden { -CountdownDialog::CountdownDialog(QWidget *parent, int seconds): - QDialog(parent, "", false, WStyle_StaysOnTop | WStyle_DialogBorder), +CountdownDialog::CountdownDialog(TQWidget *parent, int seconds): + TQDialog(parent, "", false, WStyle_StaysOnTop | WStyle_DialogBorder), m_pastEndMode(false), m_totalTime(seconds), m_progressBarWidth(150), m_progressBarHeight(15) { - QBoxLayout *layout = new QBoxLayout(this, QBoxLayout::TopToBottom, 10, 14); + TQBoxLayout *layout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, 10, 14); setCaption(i18n("Recording...")); - QHBox *hBox = new QHBox(this); - m_label = new QLabel(hBox); - m_time = new QLabel(hBox); + TQHBox *hBox = new TQHBox(this); + m_label = new TQLabel(hBox); + m_time = new TQLabel(hBox); layout->addWidget(hBox, 0, AlignCenter); @@ -65,24 +65,24 @@ CountdownDialog::CountdownDialog(QWidget *parent, int seconds): // Simply re-emit from Stop button // - m_stopButton = new QPushButton(i18n("Stop"), this); + m_stopButton = new TQPushButton(i18n("Stop"), this); m_stopButton->setFixedWidth(60); layout->addWidget(m_progressBar, 0, AlignCenter); layout->addWidget(m_stopButton, 0, AlignRight); - connect (m_stopButton, SIGNAL(released()), this, SIGNAL(stopped())); + connect (m_stopButton, TQT_SIGNAL(released()), this, TQT_SIGNAL(stopped())); // Set the total time to show the bar in initial position // setElapsedTime(0); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } void -CountdownDialog::setLabel(const QString &label) +CountdownDialog::setLabel(const TQString &label) { m_label->setText(label); } @@ -105,17 +105,17 @@ CountdownDialog::setElapsedTime(int elapsedSeconds) setPastEndMode(); } - QString h, m, s; + TQString h, m, s; h.sprintf("%02d", seconds / 3600); m.sprintf("%02d", seconds / 60); s.sprintf("%02d", seconds % 60); if (seconds < 3600) // less than an hour { - m_time->setText(QString("%1:%2").arg(m).arg(s)); + m_time->setText(TQString("%1:%2").arg(m).arg(s)); } else if (seconds < 86400) // less than a day { - m_time->setText(QString("%1:%2:%3").arg(h).arg(m).arg(s)); + m_time->setText(TQString("%1:%2:%3").arg(h).arg(m).arg(s)); } else { m_time->setText(i18n("Just how big is your hard disk?")); } diff --git a/src/gui/dialogs/CountdownDialog.h b/src/gui/dialogs/CountdownDialog.h index 00aa6e0..fdba289 100644 --- a/src/gui/dialogs/CountdownDialog.h +++ b/src/gui/dialogs/CountdownDialog.h @@ -27,14 +27,14 @@ #define _RG_COUNTDOWNDIALOG_H_ #include <kdialogbase.h> -#include <qdialog.h> +#include <tqdialog.h> -class QWidget; -class QString; -class QPushButton; -class QLabel; -class QAccel; +class TQWidget; +class TQString; +class TQPushButton; +class TQLabel; +class TQAccel; namespace Rosegarden @@ -43,20 +43,20 @@ namespace Rosegarden class CountdownBar; -class CountdownDialog : public QDialog // KDialogBase +class CountdownDialog : public TQDialog // KDialogBase { Q_OBJECT public: - CountdownDialog(QWidget *parent, int seconds = 300); + CountdownDialog(TQWidget *parent, int seconds = 300); - void setLabel(const QString &label); + void setLabel(const TQString &label); void setElapsedTime(int seconds); int getTotalTime() const { return m_totalTime; } void setTotalTime(int seconds); - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } signals: void completed(); // m_totalTime has elapsed @@ -69,16 +69,16 @@ protected: int m_totalTime; - QLabel *m_label; - QLabel *m_time; + TQLabel *m_label; + TQLabel *m_time; CountdownBar *m_progressBar; - QPushButton *m_stopButton; + TQPushButton *m_stopButton; int m_progressBarWidth; int m_progressBarHeight; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/dialogs/DocumentConfigureDialog.cpp b/src/gui/dialogs/DocumentConfigureDialog.cpp index 5f79f33..d959a5c 100644 --- a/src/gui/dialogs/DocumentConfigureDialog.cpp +++ b/src/gui/dialogs/DocumentConfigureDialog.cpp @@ -24,7 +24,7 @@ #include "DocumentConfigureDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "ConfigureDialogBase.h" @@ -34,37 +34,37 @@ #include "gui/configuration/DocumentMetaConfigurationPage.h" #include "gui/configuration/GeneralConfigurationPage.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> #include <kstddirs.h> namespace Rosegarden { -static QPixmap loadIcon(const char *name) +static TQPixmap loadIcon(const char *name) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString fileBase = pixmapDir + "/misc/"; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileBase = pixmapDir + "/misc/"; fileBase += name; - if (QFile(fileBase + ".png").exists()) { - return QPixmap(fileBase + ".png"); - } else if (QFile(fileBase + ".xpm").exists()) { - return QPixmap(fileBase + ".xpm"); + if (TQFile(fileBase + ".png").exists()) { + return TQPixmap(fileBase + ".png"); + } else if (TQFile(fileBase + ".xpm").exists()) { + return TQPixmap(fileBase + ".xpm"); } - QPixmap pmap = KGlobal::instance()->iconLoader() - ->loadIcon(QString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); + TQPixmap pmap = KGlobal::instance()->iconLoader() + ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); return pmap; } DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, - QWidget *parent, + TQWidget *parent, const char *name) : ConfigureDialogBase(parent, i18n("Document Properties"), name) { - QWidget *pageWidget = 0; - QVBoxLayout *vlay = 0; + TQWidget *pageWidget = 0; + TQVBoxLayout *vlay = 0; ConfigurationPage* page = 0; // Document Meta Page @@ -72,7 +72,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, pageWidget = addPage(DocumentMetaConfigurationPage::iconLabel(), DocumentMetaConfigurationPage::title(), loadIcon(DocumentMetaConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new DocumentMetaConfigurationPage(doc, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); @@ -83,7 +83,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, pageWidget = addPage(AudioPropertiesPage::iconLabel(), AudioPropertiesPage::title(), loadIcon(AudioPropertiesPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new AudioPropertiesPage(doc, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); @@ -94,7 +94,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, ColourConfigurationPage::title(), loadIcon(ColourConfigurationPage::iconName())); - vlay = new QVBoxLayout(pageWidget, 0, spacingHint()); + vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); page = new ColourConfigurationPage(doc, pageWidget); vlay->addWidget(page); page->setPageIndex(pageIndex(pageWidget)); @@ -126,7 +126,7 @@ DocumentConfigureDialog::showAudioPage() /* hjj: WHAT TO DO WITH THIS ? void -DocumentConfigureDialog::selectMetadata(QString name) +DocumentConfigureDialog::selectMetadata(TQString name) { int index = 0; diff --git a/src/gui/dialogs/DocumentConfigureDialog.h b/src/gui/dialogs/DocumentConfigureDialog.h index 6713047..08f9283 100644 --- a/src/gui/dialogs/DocumentConfigureDialog.h +++ b/src/gui/dialogs/DocumentConfigureDialog.h @@ -26,10 +26,10 @@ #define _RG_DOCUMENTCONFIGUREDIALOG_H_ #include "ConfigureDialogBase.h" -#include <qstring.h> +#include <tqstring.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -42,13 +42,13 @@ class DocumentConfigureDialog : public ConfigureDialogBase { public: DocumentConfigureDialog(RosegardenGUIDoc *doc, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0); void showAudioPage(); /* hjj: WHAT TO DO WITH THIS ? - void selectMetadata(QString name); + void selectMetadata(TQString name); */ }; diff --git a/src/gui/dialogs/EventEditDialog.cpp b/src/gui/dialogs/EventEditDialog.cpp index c9991f1..6446246 100644 --- a/src/gui/dialogs/EventEditDialog.cpp +++ b/src/gui/dialogs/EventEditDialog.cpp @@ -35,29 +35,29 @@ #include "gui/editors/notation/NotePixmapFactory.h" #include <kdialogbase.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qfont.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qobject.h> -#include <qobjectlist.h> -#include <qpushbutton.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqfont.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqpushbutton.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -EventEditDialog::EventEditDialog(QWidget *parent, +EventEditDialog::EventEditDialog(TQWidget *parent, const Event &event, bool editable) : KDialogBase(parent, 0, true, i18n(editable ? "Advanced Event Edit" : "Advanced Event Viewer"), @@ -75,66 +75,66 @@ EventEditDialog::EventEditDialog(QWidget *parent, m_subOrdering(event.getSubOrdering()), m_modified(false) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *intrinsicBox = new QGroupBox + TQGroupBox *intrinsicBox = new QGroupBox (1, Horizontal, i18n("Intrinsics"), vbox); - QGrid *intrinsicGrid = new QGrid(4, QGrid::Horizontal, intrinsicBox); + TQGrid *intrinsicGrid = new TQGrid(4, TQGrid::Horizontal, intrinsicBox); - new QLabel(i18n("Event type: "), intrinsicGrid); - new QLabel("", intrinsicGrid); - new QLabel("", intrinsicGrid); - QLineEdit *lineEdit = new QLineEdit(intrinsicGrid); + new TQLabel(i18n("Event type: "), intrinsicGrid); + new TQLabel("", intrinsicGrid); + new TQLabel("", intrinsicGrid); + TQLineEdit *lineEdit = new TQLineEdit(intrinsicGrid); lineEdit->setText(strtoqstr(event.getType())); - new QLabel(i18n("Absolute time: "), intrinsicGrid); - new QLabel("", intrinsicGrid); - new QLabel("", intrinsicGrid); - QSpinBox *absoluteTime = new QSpinBox + new TQLabel(i18n("Absolute time: "), intrinsicGrid); + new TQLabel("", intrinsicGrid); + new TQLabel("", intrinsicGrid); + TQSpinBox *absoluteTime = new QSpinBox (INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), intrinsicGrid); absoluteTime->setValue(event.getAbsoluteTime()); - QObject::connect(absoluteTime, SIGNAL(valueChanged(int)), - this, SLOT(slotAbsoluteTimeChanged(int))); + TQObject::connect(absoluteTime, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotAbsoluteTimeChanged(int))); slotAbsoluteTimeChanged(event.getAbsoluteTime()); - new QLabel(i18n("Duration: "), intrinsicGrid); - m_durationDisplay = new QLabel("(note)", intrinsicGrid); + new TQLabel(i18n("Duration: "), intrinsicGrid); + m_durationDisplay = new TQLabel("(note)", intrinsicGrid); m_durationDisplay->setMinimumWidth(20); - m_durationDisplayAux = new QLabel("(note)", intrinsicGrid); + m_durationDisplayAux = new TQLabel("(note)", intrinsicGrid); m_durationDisplayAux->setMinimumWidth(20); - QSpinBox *duration = new QSpinBox + TQSpinBox *duration = new QSpinBox (0, INT_MAX, Note(Note::Shortest).getDuration(), intrinsicGrid); duration->setValue(event.getDuration()); - QObject::connect(duration, SIGNAL(valueChanged(int)), - this, SLOT(slotDurationChanged(int))); + TQObject::connect(duration, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotDurationChanged(int))); slotDurationChanged(event.getDuration()); - new QLabel(i18n("Sub-ordering: "), intrinsicGrid); - new QLabel("", intrinsicGrid); - new QLabel("", intrinsicGrid); + new TQLabel(i18n("Sub-ordering: "), intrinsicGrid); + new TQLabel("", intrinsicGrid); + new TQLabel("", intrinsicGrid); - QSpinBox *subOrdering = new QSpinBox( -100, 100, 1, intrinsicGrid); + TQSpinBox *subOrdering = new TQSpinBox( -100, 100, 1, intrinsicGrid); subOrdering->setValue(event.getSubOrdering()); - QObject::connect(subOrdering, SIGNAL(valueChanged(int)), - this, SLOT(slotSubOrderingChanged(int))); + TQObject::connect(subOrdering, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSubOrderingChanged(int))); slotSubOrderingChanged(event.getSubOrdering()); - QGroupBox *persistentBox = new QGroupBox + TQGroupBox *persistentBox = new QGroupBox (1, Horizontal, i18n("Persistent properties"), vbox); - m_persistentGrid = new QGrid(4, QGrid::Horizontal, persistentBox); + m_persistentGrid = new TQGrid(4, TQGrid::Horizontal, persistentBox); - QLabel *label = new QLabel(i18n("Name"), m_persistentGrid); - QFont font(label->font()); + TQLabel *label = new TQLabel(i18n("Name"), m_persistentGrid); + TQFont font(label->font()); font.setItalic(true); label->setFont(font); - label = new QLabel(i18n("Type"), m_persistentGrid); + label = new TQLabel(i18n("Type"), m_persistentGrid); label->setFont(font); - label = new QLabel(i18n("Value"), m_persistentGrid); + label = new TQLabel(i18n("Value"), m_persistentGrid); label->setFont(font); - label = new QLabel("", m_persistentGrid); + label = new TQLabel("", m_persistentGrid); label->setFont(font); Event::PropertyNames p = event.getPersistentPropertyNames(); @@ -151,43 +151,43 @@ EventEditDialog::EventEditDialog(QWidget *parent, m_nonPersistentGrid = 0; } else { - QGroupBox *nonPersistentBox = new QGroupBox + TQGroupBox *nonPersistentBox = new QGroupBox (1, Horizontal, i18n("Non-persistent properties"), vbox); - new QLabel(i18n("These are cached values, lost if the event is modified."), + new TQLabel(i18n("These are cached values, lost if the event is modified."), nonPersistentBox); - m_nonPersistentView = new QScrollView(nonPersistentBox); - //m_nonPersistentView->setHScrollBarMode(QScrollView::AlwaysOff); - m_nonPersistentView->setResizePolicy(QScrollView::AutoOneFit); + m_nonPersistentView = new TQScrollView(nonPersistentBox); + //m_nonPersistentView->setHScrollBarMode(TQScrollView::AlwaysOff); + m_nonPersistentView->setResizePolicy(TQScrollView::AutoOneFit); m_nonPersistentGrid = new QGrid - (4, QGrid::Horizontal, m_nonPersistentView->viewport()); + (4, TQGrid::Horizontal, m_nonPersistentView->viewport()); m_nonPersistentView->addChild(m_nonPersistentGrid); m_nonPersistentGrid->setSpacing(4); m_nonPersistentGrid->setMargin(5); - label = new QLabel(i18n("Name "), m_nonPersistentGrid); + label = new TQLabel(i18n("Name "), m_nonPersistentGrid); label->setFont(font); - label = new QLabel(i18n("Type "), m_nonPersistentGrid); + label = new TQLabel(i18n("Type "), m_nonPersistentGrid); label->setFont(font); - label = new QLabel(i18n("Value "), m_nonPersistentGrid); + label = new TQLabel(i18n("Value "), m_nonPersistentGrid); label->setFont(font); - label = new QLabel("", m_nonPersistentGrid); + label = new TQLabel("", m_nonPersistentGrid); label->setFont(font); for (Event::PropertyNames::iterator i = p.begin(); i != p.end(); ++i) { - new QLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i)); - new QLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); - new QLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); - QPushButton *button = new QPushButton("P", m_nonPersistentGrid, strtoqstr(*i)); - button->setFixedSize(QSize(24, 24)); - QToolTip::add + new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i)); + new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); + new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); + TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i)); + button->setFixedSize(TQSize(24, 24)); + TQToolTip::add (button, i18n("Make persistent")); - QObject::connect(button, SIGNAL(clicked()), - this, SLOT(slotPropertyMadePersistent())); + TQObject::connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPropertyMadePersistent())); } } } @@ -195,9 +195,9 @@ EventEditDialog::EventEditDialog(QWidget *parent, void EventEditDialog::addPersistentProperty(const PropertyName &name) { - QLabel *label = new QLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name)); + TQLabel *label = new TQLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name)); label->show(); - label = new QLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)), + label = new TQLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)), m_persistentGrid, strtoqstr(name)); label->show(); @@ -212,11 +212,11 @@ EventEditDialog::addPersistentProperty(const PropertyName &name) min = 0; max = 127; } - QSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new QSpinBox (min, max, 1, m_persistentGrid, strtoqstr(name)); spinBox->setValue(m_originalEvent.get<Int>(name)); - QObject::connect(spinBox, SIGNAL(valueChanged(int)), - this, SLOT(slotIntPropertyChanged(int))); + TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotIntPropertyChanged(int))); spinBox->show(); break; } @@ -227,28 +227,28 @@ case UInt: { min = 0; max = 65535; } - QSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new QSpinBox (min, max, 1, m_persistentGrid, strtoqstr(name)); spinBox->setValue(m_originalEvent.get<UInt>(name)); - QObject::connect(spinBox, SIGNAL(valueChanged(int)), - this, SLOT(slotIntPropertyChanged(int))); + TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotIntPropertyChanged(int))); spinBox->show(); break; } case RealTimeT: { RealTime realTime = m_originalEvent.get<RealTimeT>(name); - QHBox* hbox = new QHBox(m_persistentGrid); + TQHBox* hbox = new TQHBox(m_persistentGrid); // seconds // - QSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new QSpinBox (INT_MIN, INT_MAX, 1, hbox, strtoqstr(name) + "%sec"); spinBox->setValue(realTime.sec); - QObject::connect(spinBox, SIGNAL(valueChanged(int)), - this, SLOT(slotRealTimePropertyChanged(int))); + TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotRealTimePropertyChanged(int))); // nseconds // @@ -257,41 +257,41 @@ case UInt: { hbox, strtoqstr(name) + "%nsec"); spinBox->setValue(realTime.nsec); - QObject::connect(spinBox, SIGNAL(valueChanged(int)), - this, SLOT(slotRealTimePropertyChanged(int))); + TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotRealTimePropertyChanged(int))); spinBox->show(); break; } case Bool: { - QCheckBox *checkBox = new QCheckBox + TQCheckBox *checkBox = new QCheckBox ("", m_persistentGrid, strtoqstr(name)); checkBox->setChecked(m_originalEvent.get<Bool>(name)); - QObject::connect(checkBox, SIGNAL(activated()), - this, SLOT(slotBoolPropertyChanged())); + TQObject::connect(checkBox, TQT_SIGNAL(activated()), + this, TQT_SLOT(slotBoolPropertyChanged())); checkBox->show(); break; } case String: { - QLineEdit *lineEdit = new QLineEdit + TQLineEdit *lineEdit = new QLineEdit (strtoqstr(m_originalEvent.get<String>(name)), m_persistentGrid, strtoqstr(name)); - QObject::connect(lineEdit, SIGNAL(textChanged(const QString &)), - this, SLOT(slotStringPropertyChanged(const QString &))); + TQObject::connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotStringPropertyChanged(const TQString &))); lineEdit->show(); break; } } - QPushButton *button = new QPushButton("X", m_persistentGrid, + TQPushButton *button = new TQPushButton("X", m_persistentGrid, strtoqstr(name)); - button->setFixedSize(QSize(24, 24)); - QToolTip::add + button->setFixedSize(TQSize(24, 24)); + TQToolTip::add (button, i18n("Delete this property")); - QObject::connect(button, SIGNAL(clicked()), - this, SLOT(slotPropertyDeleted())); + TQObject::connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPropertyDeleted())); button->show(); } @@ -302,7 +302,7 @@ EventEditDialog::getEvent() const } void -EventEditDialog::slotEventTypeChanged(const QString &type) +EventEditDialog::slotEventTypeChanged(const TQString &type) { std::string t(qstrtostr(type)); if (t != m_type) { @@ -356,28 +356,28 @@ EventEditDialog::slotSubOrderingChanged(int value) void EventEditDialog::slotIntPropertyChanged(int value) { - const QObject *s = sender(); - const QSpinBox *spinBox = dynamic_cast<const QSpinBox *>(s); + const TQObject *s = sender(); + const TQSpinBox *spinBox = dynamic_cast<const TQSpinBox *>(s); if (!spinBox) return ; m_modified = true; - QString propertyName = spinBox->name(); + TQString propertyName = spinBox->name(); m_event.set<Int>(qstrtostr(propertyName), value); } void EventEditDialog::slotRealTimePropertyChanged(int value) { - const QObject *s = sender(); - const QSpinBox *spinBox = dynamic_cast<const QSpinBox *>(s); + const TQObject *s = sender(); + const TQSpinBox *spinBox = dynamic_cast<const TQSpinBox *>(s); if (!spinBox) return ; m_modified = true; - QString propertyFullName = spinBox->name(); + TQString propertyFullName = spinBox->name(); - QString propertyName = propertyFullName.section('%', 0, 0), + TQString propertyName = propertyFullName.section('%', 0, 0), nsecOrSec = propertyFullName.section('%', 1, 1); RealTime realTime = m_event.get<RealTimeT>(qstrtostr(propertyName)); @@ -393,40 +393,40 @@ EventEditDialog::slotRealTimePropertyChanged(int value) void EventEditDialog::slotBoolPropertyChanged() { - const QObject *s = sender(); - const QCheckBox *checkBox = dynamic_cast<const QCheckBox *>(s); + const TQObject *s = sender(); + const TQCheckBox *checkBox = dynamic_cast<const TQCheckBox *>(s); if (!checkBox) return ; m_modified = true; - QString propertyName = checkBox->name(); + TQString propertyName = checkBox->name(); bool checked = checkBox->isChecked(); m_event.set<Bool>(qstrtostr(propertyName), checked); } void -EventEditDialog::slotStringPropertyChanged(const QString &value) +EventEditDialog::slotStringPropertyChanged(const TQString &value) { - const QObject *s = sender(); - const QLineEdit *lineEdit = dynamic_cast<const QLineEdit *>(s); + const TQObject *s = sender(); + const TQLineEdit *lineEdit = dynamic_cast<const TQLineEdit *>(s); if (!lineEdit) return ; m_modified = true; - QString propertyName = lineEdit->name(); + TQString propertyName = lineEdit->name(); m_event.set<String>(qstrtostr(propertyName), qstrtostr(value)); } void EventEditDialog::slotPropertyDeleted() { - const QObject *s = sender(); - const QPushButton *pushButton = dynamic_cast<const QPushButton *>(s); + const TQObject *s = sender(); + const TQPushButton *pushButton = dynamic_cast<const TQPushButton *>(s); if (!pushButton) return ; - QString propertyName = pushButton->name(); + TQString propertyName = pushButton->name(); if (KMessageBox::warningContinueCancel (this, @@ -438,9 +438,9 @@ EventEditDialog::slotPropertyDeleted() return ; m_modified = true; - QObjectList *list = m_persistentGrid->queryList(0, propertyName, false); - QObjectListIt i(*list); - QObject *obj; + TQObjectList *list = m_persistentGrid->queryList(0, propertyName, false); + TQObjectListIt i(*list); + TQObject *obj; while ((obj = i.current()) != 0) { ++i; delete obj; @@ -453,12 +453,12 @@ EventEditDialog::slotPropertyDeleted() void EventEditDialog::slotPropertyMadePersistent() { - const QObject *s = sender(); - const QPushButton *pushButton = dynamic_cast<const QPushButton *>(s); + const TQObject *s = sender(); + const TQPushButton *pushButton = dynamic_cast<const TQPushButton *>(s); if (!pushButton) return ; - QString propertyName = pushButton->name(); + TQString propertyName = pushButton->name(); if (KMessageBox::warningContinueCancel (this, @@ -470,9 +470,9 @@ EventEditDialog::slotPropertyMadePersistent() i18n("Make &Persistent")) != KMessageBox::Continue) return ; - QObjectList *list = m_nonPersistentGrid->queryList(0, propertyName, false); - QObjectListIt i(*list); - QObject *obj; + TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName, false); + TQObjectListIt i(*list); + TQObject *obj; while ((obj = i.current()) != 0) { ++i; delete obj; diff --git a/src/gui/dialogs/EventEditDialog.h b/src/gui/dialogs/EventEditDialog.h index 337a190..15f83ac 100644 --- a/src/gui/dialogs/EventEditDialog.h +++ b/src/gui/dialogs/EventEditDialog.h @@ -32,11 +32,11 @@ #include <kdialogbase.h> -class QWidget; -class QString; -class QScrollView; -class QLabel; -class QGrid; +class TQWidget; +class TQString; +class TQScrollView; +class TQLabel; +class TQGrid; namespace Rosegarden @@ -57,7 +57,7 @@ public: * the resulting edited version can subsequently be queried * through getEvent(). */ - EventEditDialog(QWidget *parent, + EventEditDialog(TQWidget *parent, const Event &event, bool editable = true); @@ -65,7 +65,7 @@ public: Event getEvent() const; public slots: - void slotEventTypeChanged(const QString &); + void slotEventTypeChanged(const TQString &); void slotAbsoluteTimeChanged(int value); void slotDurationChanged(int value); void slotSubOrderingChanged(int value); @@ -73,7 +73,7 @@ public slots: void slotIntPropertyChanged(int); void slotRealTimePropertyChanged(int); void slotBoolPropertyChanged(); - void slotStringPropertyChanged(const QString &); + void slotStringPropertyChanged(const TQString &); void slotPropertyDeleted(); void slotPropertyMadePersistent(); @@ -84,13 +84,13 @@ protected: //--------------- Data members --------------------------------- NotePixmapFactory m_notePixmapFactory; - QLabel *m_durationDisplay; - QLabel *m_durationDisplayAux; + TQLabel *m_durationDisplay; + TQLabel *m_durationDisplayAux; - QGrid *m_persistentGrid; - QGrid *m_nonPersistentGrid; + TQGrid *m_persistentGrid; + TQGrid *m_nonPersistentGrid; - QScrollView *m_nonPersistentView; + TQScrollView *m_nonPersistentView; const Event &m_originalEvent; Event m_event; diff --git a/src/gui/dialogs/EventFilterDialog.cpp b/src/gui/dialogs/EventFilterDialog.cpp index 7b0c15c..d2763a6 100644 --- a/src/gui/dialogs/EventFilterDialog.cpp +++ b/src/gui/dialogs/EventFilterDialog.cpp @@ -41,27 +41,27 @@ #include <kconfig.h> #include <kdialogbase.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -EventFilterDialog::EventFilterDialog(QWidget* parent) +EventFilterDialog::EventFilterDialog(TQWidget* parent) : KDialogBase(parent, "eventfilerdialog", true, i18n("Event Filter"), Ok | Cancel, Ok), m_standardQuantizations(BasicQuantizer::getStandardQuantizations()) { @@ -77,47 +77,47 @@ EventFilterDialog::~EventFilterDialog() void EventFilterDialog::initDialog() { - QVBox* mainWidget = makeVBoxMainWidget(); + TQVBox* mainWidget = makeVBoxMainWidget(); //----------[ Note Filter Widgets ]------------------------- // Frame - QGroupBox* noteFrame = new QGroupBox(i18n("Note Events"), mainWidget); - QGridLayout* noteFrameLayout = new QGridLayout(noteFrame, 1, 1, 20, 6); + TQGroupBox* noteFrame = new TQGroupBox(i18n("Note Events"), mainWidget); + TQGridLayout* noteFrameLayout = new TQGridLayout(noteFrame, 1, 1, 20, 6); // Labels - QLabel* pitchFromLabel = new QLabel(i18n("lowest:"), noteFrame); + TQLabel* pitchFromLabel = new TQLabel(i18n("lowest:"), noteFrame); noteFrameLayout->addWidget(pitchFromLabel, 0, 2); - QLabel* pitchToLabel = new QLabel(i18n("highest:"), noteFrame); + TQLabel* pitchToLabel = new TQLabel(i18n("highest:"), noteFrame); noteFrameLayout->addWidget(pitchToLabel, 0, 4); - QLabel* pitchLabel = new QLabel(i18n("Pitch:"), noteFrame); + TQLabel* pitchLabel = new TQLabel(i18n("Pitch:"), noteFrame); noteFrameLayout->addWidget(pitchLabel, 1, 1); - QLabel* velocityLabel = new QLabel(i18n("Velocity:"), noteFrame); + TQLabel* velocityLabel = new TQLabel(i18n("Velocity:"), noteFrame); noteFrameLayout->addWidget(velocityLabel, 2, 1); - QLabel* durationLabel = new QLabel(i18n("Duration:"), noteFrame); + TQLabel* durationLabel = new TQLabel(i18n("Duration:"), noteFrame); noteFrameLayout->addWidget(durationLabel, 3, 1); // Include Boxes - m_notePitchIncludeComboBox = new QComboBox(0, noteFrame); + m_notePitchIncludeComboBox = new TQComboBox(0, noteFrame); m_notePitchIncludeComboBox->insertItem(i18n("include")); m_notePitchIncludeComboBox->insertItem(i18n("exclude")); cfg->setGroup(EventFilterDialogConfigGroup); m_notePitchIncludeComboBox->setCurrentItem(cfg->readBoolEntry("pitchinclude", 0)); noteFrameLayout->addWidget(m_notePitchIncludeComboBox, 1, 0); - m_noteVelocityIncludeComboBox = new QComboBox(0, noteFrame); + m_noteVelocityIncludeComboBox = new TQComboBox(0, noteFrame); m_noteVelocityIncludeComboBox->insertItem(i18n("include")); m_noteVelocityIncludeComboBox->insertItem(i18n("exclude")); cfg->setGroup(EventFilterDialogConfigGroup); m_noteVelocityIncludeComboBox->setCurrentItem(cfg->readBoolEntry("velocityinclude", 0)); noteFrameLayout->addWidget(m_noteVelocityIncludeComboBox, 2, 0); - m_noteDurationIncludeComboBox = new QComboBox(0, noteFrame); + m_noteDurationIncludeComboBox = new TQComboBox(0, noteFrame); m_noteDurationIncludeComboBox->insertItem(i18n("include")); m_noteDurationIncludeComboBox->insertItem(i18n("exclude")); cfg->setGroup(EventFilterDialogConfigGroup); @@ -125,92 +125,92 @@ EventFilterDialog::initDialog() noteFrameLayout->addWidget(m_noteDurationIncludeComboBox, 3, 0); // Pitch From - m_pitchFromSpinBox = new QSpinBox(noteFrame); + m_pitchFromSpinBox = new TQSpinBox(noteFrame); m_pitchFromSpinBox->setMaxValue(127); cfg->setGroup(EventFilterDialogConfigGroup); m_pitchFromSpinBox->setValue(cfg->readUnsignedNumEntry("pitchfrom", 0)); noteFrameLayout->addWidget(m_pitchFromSpinBox, 1, 2); - connect(m_pitchFromSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotPitchFromChanged(int))); + connect(m_pitchFromSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotPitchFromChanged(int))); - m_pitchFromChooserButton = new QPushButton(i18n("edit"), noteFrame); - m_pitchFromChooserButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, - (QSizePolicy::SizeType)0, 0, 0, m_pitchFromChooserButton-> + m_pitchFromChooserButton = new TQPushButton(i18n("edit"), noteFrame); + m_pitchFromChooserButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0, + (TQSizePolicy::SizeType)0, 0, 0, m_pitchFromChooserButton-> sizePolicy().hasHeightForWidth())); - QToolTip::add + TQToolTip::add (m_pitchFromChooserButton, i18n("choose a pitch using a staff")); noteFrameLayout->addWidget(m_pitchFromChooserButton, 1, 3); - connect(m_pitchFromChooserButton, SIGNAL(clicked()), - SLOT(slotPitchFromChooser())); + connect(m_pitchFromChooserButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPitchFromChooser())); // Pitch To - m_pitchToSpinBox = new QSpinBox(noteFrame); + m_pitchToSpinBox = new TQSpinBox(noteFrame); m_pitchToSpinBox->setMaxValue(127); cfg->setGroup(EventFilterDialogConfigGroup); m_pitchToSpinBox->setValue(cfg->readUnsignedNumEntry("pitchto", 127)); noteFrameLayout->addWidget(m_pitchToSpinBox, 1, 4); - connect(m_pitchToSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotPitchToChanged(int))); + connect(m_pitchToSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotPitchToChanged(int))); - m_pitchToChooserButton = new QPushButton(i18n("edit"), noteFrame); - QToolTip::add + m_pitchToChooserButton = new TQPushButton(i18n("edit"), noteFrame); + TQToolTip::add (m_pitchToChooserButton, i18n("choose a pitch using a staff")); noteFrameLayout->addWidget(m_pitchToChooserButton, 1, 5); - connect(m_pitchToChooserButton, SIGNAL(clicked()), - SLOT(slotPitchToChooser())); + connect(m_pitchToChooserButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPitchToChooser())); // Velocity From/To - m_velocityFromSpinBox = new QSpinBox(noteFrame); + m_velocityFromSpinBox = new TQSpinBox(noteFrame); m_velocityFromSpinBox->setMaxValue(127); cfg->setGroup(EventFilterDialogConfigGroup); m_velocityFromSpinBox->setValue(cfg->readUnsignedNumEntry("velocityfrom", 0)); noteFrameLayout->addWidget(m_velocityFromSpinBox, 2, 2); - connect(m_velocityFromSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotVelocityFromChanged(int))); + connect(m_velocityFromSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotVelocityFromChanged(int))); - m_velocityToSpinBox = new QSpinBox(noteFrame); + m_velocityToSpinBox = new TQSpinBox(noteFrame); m_velocityToSpinBox->setMaxValue(127); cfg->setGroup(EventFilterDialogConfigGroup); m_velocityToSpinBox->setValue(cfg->readUnsignedNumEntry("velocityto", 127)); noteFrameLayout->addWidget( m_velocityToSpinBox, 2, 4 ); - connect(m_velocityToSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotVelocityToChanged(int))); + connect(m_velocityToSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotVelocityToChanged(int))); // Duration From/To - m_noteDurationFromComboBox = new QComboBox(0, noteFrame); + m_noteDurationFromComboBox = new TQComboBox(0, noteFrame); m_noteDurationFromComboBox->insertItem(i18n("longest")); noteFrameLayout->addWidget(m_noteDurationFromComboBox, 3, 2); - connect(m_noteDurationFromComboBox, SIGNAL(activated(int)), - SLOT(slotDurationFromChanged(int))); + connect(m_noteDurationFromComboBox, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotDurationFromChanged(int))); - m_noteDurationToComboBox = new QComboBox(0, noteFrame); + m_noteDurationToComboBox = new TQComboBox(0, noteFrame); m_noteDurationToComboBox->insertItem(i18n("longest")); noteFrameLayout->addWidget(m_noteDurationToComboBox, 3, 4); - connect(m_noteDurationToComboBox, SIGNAL(activated(int)), - SLOT(slotDurationToChanged(int))); + connect(m_noteDurationToComboBox, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotDurationToChanged(int))); populateDurationCombos(); //---------[ Buttons ]-------------------------------------- - QFrame* privateLayoutWidget = new QFrame(mainWidget); - QGridLayout* buttonLayout = new QGridLayout(privateLayoutWidget, 1, 1, 20, 6); + TQFrame* privateLayoutWidget = new TQFrame(mainWidget); + TQGridLayout* buttonLayout = new TQGridLayout(privateLayoutWidget, 1, 1, 20, 6); - m_buttonAll = new QPushButton(i18n("Include all"), privateLayoutWidget); + m_buttonAll = new TQPushButton(i18n("Include all"), privateLayoutWidget); m_buttonAll->setAutoDefault(true); - QToolTip::add + TQToolTip::add (m_buttonAll, i18n("Include entire range of values")); buttonLayout->addWidget( m_buttonAll, 0, 0 ); - m_buttonNone = new QPushButton(i18n("Exclude all"), privateLayoutWidget); + m_buttonNone = new TQPushButton(i18n("Exclude all"), privateLayoutWidget); m_buttonNone->setAutoDefault(true); - QToolTip::add + TQToolTip::add (m_buttonNone, i18n("Exclude entire range of values")); buttonLayout->addWidget( m_buttonNone, 0, 1 ); - connect(m_buttonAll, SIGNAL(clicked()), this, SLOT(slotToggleAll())); - connect(m_buttonNone, SIGNAL(clicked()), this, SLOT(slotToggleNone())); + connect(m_buttonAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToggleAll())); + connect(m_buttonNone, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotToggleNone())); } @@ -218,14 +218,14 @@ EventFilterDialog::initDialog() void EventFilterDialog::populateDurationCombos() { - QPixmap noMap = NotePixmapFactory::toQPixmap + TQPixmap noMap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_noteDurationFromComboBox->insertItem(error ? noMap : pmap, label); m_noteDurationToComboBox ->insertItem(error ? noMap : pmap, label); @@ -332,7 +332,7 @@ EventFilterDialog::slotPitchFromChooser() { PitchPickerDialog dialog(this, m_pitchFromSpinBox->value(), i18n("Lowest pitch")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_pitchFromSpinBox->setValue(dialog.getPitch()); } } @@ -342,7 +342,7 @@ EventFilterDialog::slotPitchToChooser() { PitchPickerDialog dialog(this, m_pitchToSpinBox->value(), i18n("Highest pitch")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_pitchToSpinBox->setValue(dialog.getPitch()); } } diff --git a/src/gui/dialogs/EventFilterDialog.h b/src/gui/dialogs/EventFilterDialog.h index 0d3eb05..207f6e5 100644 --- a/src/gui/dialogs/EventFilterDialog.h +++ b/src/gui/dialogs/EventFilterDialog.h @@ -32,13 +32,13 @@ #include <utility> #include <vector> #include "base/Event.h" -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> -class QWidget; -class QSpinBox; -class QPushButton; -class QGridLayout; +class TQWidget; +class TQSpinBox; +class TQPushButton; +class TQGridLayout; class KConfig; @@ -62,7 +62,7 @@ class EventFilterDialog : public KDialogBase public: - EventFilterDialog(QWidget* parent); + EventFilterDialog(TQWidget* parent); ~EventFilterDialog(); KConfig *cfg; @@ -142,23 +142,23 @@ protected slots: private: //---------[ data members ]----------------------------- - QGridLayout* layout; + TQGridLayout* layout; - QComboBox* m_noteDurationFromComboBox; - QComboBox* m_noteDurationIncludeComboBox; - QComboBox* m_noteDurationToComboBox; - QComboBox* m_notePitchIncludeComboBox; - QComboBox* m_noteVelocityIncludeComboBox; + TQComboBox* m_noteDurationFromComboBox; + TQComboBox* m_noteDurationIncludeComboBox; + TQComboBox* m_noteDurationToComboBox; + TQComboBox* m_notePitchIncludeComboBox; + TQComboBox* m_noteVelocityIncludeComboBox; - QPushButton* m_pitchFromChooserButton; - QPushButton* m_pitchToChooserButton; - QPushButton* m_buttonAll; - QPushButton* m_buttonNone; + TQPushButton* m_pitchFromChooserButton; + TQPushButton* m_pitchToChooserButton; + TQPushButton* m_buttonAll; + TQPushButton* m_buttonNone; - QSpinBox* m_pitchFromSpinBox; - QSpinBox* m_pitchToSpinBox; - QSpinBox* m_velocityFromSpinBox; - QSpinBox* m_velocityToSpinBox; + TQSpinBox* m_pitchFromSpinBox; + TQSpinBox* m_pitchToSpinBox; + TQSpinBox* m_velocityFromSpinBox; + TQSpinBox* m_velocityToSpinBox; std::vector<timeT> m_standardQuantizations; diff --git a/src/gui/dialogs/EventParameterDialog.cpp b/src/gui/dialogs/EventParameterDialog.cpp index 036491e..98abb44 100644 --- a/src/gui/dialogs/EventParameterDialog.cpp +++ b/src/gui/dialogs/EventParameterDialog.cpp @@ -31,34 +31,34 @@ #include "base/PropertyName.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { EventParameterDialog::EventParameterDialog( - QWidget *parent, - const QString &name, + TQWidget *parent, + const TQString &name, const PropertyName &property, int startValue): KDialogBase(parent, 0, true, name, Ok | Cancel), m_property(property) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QHBox *topBox = new QHBox(vBox); - QLabel *explainLabel = new QLabel(topBox); - QString text = i18n("Set the %1 property of the event selection:"). + TQHBox *topBox = new TQHBox(vBox); + TQLabel *explainLabel = new TQLabel(topBox); + TQString text = i18n("Set the %1 property of the event selection:"). arg(strtoqstr(property)); explainLabel->setText(text); - QHBox *patternBox = new QHBox(vBox); - new QLabel(i18n("Pattern"), patternBox); + TQHBox *patternBox = new TQHBox(vBox); + new TQLabel(i18n("Pattern"), patternBox); m_patternCombo = new KComboBox(patternBox); // create options @@ -82,20 +82,20 @@ EventParameterDialog::EventParameterDialog( text = i18n("Ringing - set %1 alternating from max to min with both dying to zero").arg(strtoqstr(property)); m_patternCombo->insertItem(text); - connect(m_patternCombo, SIGNAL(activated(int)), - this, SLOT(slotPatternSelected(int))); + connect(m_patternCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPatternSelected(int))); - QHBox *value1Box = new QHBox(vBox); - m_value1Label = new QLabel(i18n("Value"), value1Box); + TQHBox *value1Box = new TQHBox(vBox); + m_value1Label = new TQLabel(i18n("Value"), value1Box); m_value1Combo = new KComboBox(value1Box); - QHBox *value2Box = new QHBox(vBox); - m_value2Label = new QLabel(i18n("Value"), value2Box); + TQHBox *value2Box = new TQHBox(vBox); + m_value2Label = new TQLabel(i18n("Value"), value2Box); m_value2Combo = new KComboBox(value2Box); for (unsigned int i = 0; i < 128; i++) { - m_value1Combo->insertItem(QString("%1").arg(i)); - m_value2Combo->insertItem(QString("%1").arg(i)); + m_value1Combo->insertItem(TQString("%1").arg(i)); + m_value2Combo->insertItem(TQString("%1").arg(i)); } m_value1Combo->setCurrentItem(127); diff --git a/src/gui/dialogs/EventParameterDialog.h b/src/gui/dialogs/EventParameterDialog.h index 040e2f9..848e44d 100644 --- a/src/gui/dialogs/EventParameterDialog.h +++ b/src/gui/dialogs/EventParameterDialog.h @@ -30,9 +30,9 @@ #include <kdialogbase.h> #include "commands/edit/SelectionPropertyCommand.h" -class QWidget; -class QString; -class QLabel; +class TQWidget; +class TQString; +class TQLabel; class KComboBox; @@ -46,8 +46,8 @@ class EventParameterDialog : public KDialogBase Q_OBJECT public: - EventParameterDialog(QWidget *parent, - const QString &name, // name + EventParameterDialog(TQWidget *parent, + const TQString &name, // name const PropertyName &property, // property int startValue); // start @@ -67,8 +67,8 @@ protected: KComboBox *m_value2Combo; KComboBox *m_patternCombo; - QLabel *m_value1Label; - QLabel *m_value2Label; + TQLabel *m_value1Label; + TQLabel *m_value2Label; }; diff --git a/src/gui/dialogs/ExportDeviceDialog.cpp b/src/gui/dialogs/ExportDeviceDialog.cpp index ce5f52e..348a5b8 100644 --- a/src/gui/dialogs/ExportDeviceDialog.cpp +++ b/src/gui/dialogs/ExportDeviceDialog.cpp @@ -27,28 +27,28 @@ #include <klocale.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -ExportDeviceDialog::ExportDeviceDialog(QWidget *parent, QString deviceName) : +ExportDeviceDialog::ExportDeviceDialog(TQWidget *parent, TQString deviceName) : KDialogBase(parent, "exportdevicedialog", true, i18n("Export Devices..."), Ok | Cancel, Ok) { - QVBox *vbox = makeVBoxMainWidget(); - QButtonGroup *bg = new QButtonGroup(1, Qt::Horizontal, + TQVBox *vbox = makeVBoxMainWidget(); + TQButtonGroup *bg = new TQButtonGroup(1, Qt::Horizontal, i18n("Export devices"), vbox); - m_exportAll = new QRadioButton(i18n("Export all devices"), bg); - m_exportOne = new QRadioButton(i18n("Export selected device only"), bg); - new QLabel(i18n(" (\"%1\")").arg(deviceName), bg); + m_exportAll = new TQRadioButton(i18n("Export all devices"), bg); + m_exportOne = new TQRadioButton(i18n("Export selected device only"), bg); + new TQLabel(i18n(" (\"%1\")").arg(deviceName), bg); m_exportOne->setChecked(true); } diff --git a/src/gui/dialogs/ExportDeviceDialog.h b/src/gui/dialogs/ExportDeviceDialog.h index 21fc183..0b092bc 100644 --- a/src/gui/dialogs/ExportDeviceDialog.h +++ b/src/gui/dialogs/ExportDeviceDialog.h @@ -27,11 +27,11 @@ #define _RG_EXPORTDEVICEDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QRadioButton; +class TQWidget; +class TQRadioButton; namespace Rosegarden @@ -44,13 +44,13 @@ class ExportDeviceDialog : public KDialogBase public: enum ExportType { ExportOne, ExportAll }; - ExportDeviceDialog(QWidget *parent, QString deviceName); + ExportDeviceDialog(TQWidget *parent, TQString deviceName); ExportType getExportType(); protected: - QRadioButton *m_exportAll; - QRadioButton *m_exportOne; + TQRadioButton *m_exportAll; + TQRadioButton *m_exportOne; }; diff --git a/src/gui/dialogs/FileLocateDialog.cpp b/src/gui/dialogs/FileLocateDialog.cpp index 4f153c8..5b2a370 100644 --- a/src/gui/dialogs/FileLocateDialog.cpp +++ b/src/gui/dialogs/FileLocateDialog.cpp @@ -29,19 +29,19 @@ #include "misc/Debug.h" #include <kdialogbase.h> #include <kfiledialog.h> -#include <qfileinfo.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfileinfo.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -FileLocateDialog::FileLocateDialog(QWidget *parent, - const QString &file, - const QString & /*path*/): +FileLocateDialog::FileLocateDialog(TQWidget *parent, + const TQString &file, + const TQString & /*path*/): KDialogBase(parent, 0, true, i18n("Locate audio file"), User1 | User2 | User3, @@ -52,12 +52,12 @@ FileLocateDialog::FileLocateDialog(QWidget *parent, i18n("&Locate")), m_file(file) { - QHBox *w = makeHBoxMainWidget(); - QString label = + TQHBox *w = makeHBoxMainWidget(); + TQString label = i18n("Can't find file \"%1\".\n" "Would you like to try and locate this file or skip it?").arg(m_file); - QLabel *labelW = new QLabel(label, w); + TQLabel *labelW = new TQLabel(label, w); labelW->setAlignment(Qt::AlignCenter); labelW->setMinimumHeight(60); } @@ -69,8 +69,8 @@ FileLocateDialog::slotUser3() m_file = KFileDialog::getOpenFileName (":WAVS", i18n("%1|Requested file (%2)\n*.wav|WAV files (*.wav)") - .arg(QFileInfo(m_file).fileName()) - .arg(QFileInfo(m_file).fileName()), + .arg(TQFileInfo(m_file).fileName()) + .arg(TQFileInfo(m_file).fileName()), this, i18n("Select an Audio File")); RG_DEBUG << "FileLocateDialog::slotUser3() : m_file = " << m_file << endl; @@ -79,7 +79,7 @@ FileLocateDialog::slotUser3() RG_DEBUG << "FileLocateDialog::slotUser3() : reject\n"; reject(); } else { - QFileInfo fileInfo(m_file); + TQFileInfo fileInfo(m_file); m_path = fileInfo.dirPath(); accept(); } diff --git a/src/gui/dialogs/FileLocateDialog.h b/src/gui/dialogs/FileLocateDialog.h index 1786221..a9e3220 100644 --- a/src/gui/dialogs/FileLocateDialog.h +++ b/src/gui/dialogs/FileLocateDialog.h @@ -27,10 +27,10 @@ #define _RG_FILELOCATEDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -43,20 +43,20 @@ class FileLocateDialog : public KDialogBase Q_OBJECT public: - FileLocateDialog(QWidget *parent, - const QString &file, - const QString &path); + FileLocateDialog(TQWidget *parent, + const TQString &file, + const TQString &path); - QString getDirectory() { return m_path; } - QString getFilename() { return m_file; } + TQString getDirectory() { return m_path; } + TQString getFilename() { return m_file; } protected: virtual void slotUser1(); virtual void slotUser2(); virtual void slotUser3(); - QString m_file; - QString m_path; + TQString m_file; + TQString m_path; }; diff --git a/src/gui/dialogs/FileMergeDialog.cpp b/src/gui/dialogs/FileMergeDialog.cpp index d997327..d7d48cf 100644 --- a/src/gui/dialogs/FileMergeDialog.cpp +++ b/src/gui/dialogs/FileMergeDialog.cpp @@ -28,29 +28,29 @@ #include <klocale.h> #include <kcombobox.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> #include "document/RosegardenGUIDoc.h" namespace Rosegarden { -FileMergeDialog::FileMergeDialog(QWidget *parent, - QString /*fileName*/, +FileMergeDialog::FileMergeDialog(TQWidget *parent, + TQString /*fileName*/, bool timingsDiffer) : KDialogBase(parent, 0, true, i18n("Merge File"), Ok | Cancel | Help) { setHelp("file-merge"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QHBox *hbox = new QHBox(vbox); - new QLabel(i18n("Merge new file "), hbox); + TQHBox *hbox = new TQHBox(vbox); + new TQLabel(i18n("Merge new file "), hbox); m_choice = new KComboBox(hbox); m_choice->insertItem(i18n("At start of existing composition")); @@ -58,8 +58,8 @@ FileMergeDialog::FileMergeDialog(QWidget *parent, m_useTimings = 0; if (timingsDiffer) { - new QLabel(i18n("The file has different time signatures or tempos."), vbox); - m_useTimings = new QCheckBox(i18n("Import these as well"), vbox); + new TQLabel(i18n("The file has different time signatures or tempos."), vbox); + m_useTimings = new TQCheckBox(i18n("Import these as well"), vbox); m_useTimings->setChecked(false); } } diff --git a/src/gui/dialogs/FileMergeDialog.h b/src/gui/dialogs/FileMergeDialog.h index f305cae..33a8638 100644 --- a/src/gui/dialogs/FileMergeDialog.h +++ b/src/gui/dialogs/FileMergeDialog.h @@ -27,11 +27,11 @@ #define _RG_FILEMERGEDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QCheckBox; +class TQWidget; +class TQCheckBox; class KComboBox; @@ -45,13 +45,13 @@ class FileMergeDialog : public KDialogBase Q_OBJECT public: - FileMergeDialog(QWidget *parent, QString fileName, bool timingsDiffer); + FileMergeDialog(TQWidget *parent, TQString fileName, bool timingsDiffer); int getMergeOptions(); private: KComboBox *m_choice; - QCheckBox *m_useTimings; + TQCheckBox *m_useTimings; }; diff --git a/src/gui/dialogs/FloatEdit.cpp b/src/gui/dialogs/FloatEdit.cpp index 06e8aa3..a4b9788 100644 --- a/src/gui/dialogs/FloatEdit.cpp +++ b/src/gui/dialogs/FloatEdit.cpp @@ -27,28 +27,28 @@ #include "gui/widgets/HSpinBox.h" #include <kdialogbase.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <cmath> namespace Rosegarden { -FloatEdit::FloatEdit(QWidget *parent, - const QString &title, - const QString &text, +FloatEdit::FloatEdit(TQWidget *parent, + const TQString &title, + const TQString &text, float min, float max, float value, float step): KDialogBase(parent, "rosegardenFloatEdit", true, title, Ok | Cancel, Ok) { - QVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox(1, Horizontal, text, vbox); - QVBox *inVbox = new QVBox(groupBox); + TQVBox *vbox = makeVBoxMainWidget(); + TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, text, vbox); + TQVBox *inVbox = new TQVBox(groupBox); // Calculate decimal points according to the step size // @@ -59,7 +59,7 @@ FloatEdit::FloatEdit(QWidget *parent, //std::cout << "CAL DP = " << calDP << ", dps = " << dps << std::endl; m_spin = new HSpinBox(inVbox, value, 1, min, max, dps); - new QLabel(QString("(min: %1, max: %2)").arg(min).arg(max), inVbox); + new TQLabel(TQString("(min: %1, max: %2)").arg(min).arg(max), inVbox); } float diff --git a/src/gui/dialogs/FloatEdit.h b/src/gui/dialogs/FloatEdit.h index 24f1b2c..dc5a060 100644 --- a/src/gui/dialogs/FloatEdit.h +++ b/src/gui/dialogs/FloatEdit.h @@ -29,9 +29,9 @@ #include <kdialogbase.h> -class QWidget; -class QString; -class QLabel; +class TQWidget; +class TQString; +class TQLabel; namespace Rosegarden @@ -45,9 +45,9 @@ class FloatEdit : public KDialogBase Q_OBJECT public: - FloatEdit(QWidget *parent, - const QString &title, - const QString &text, + FloatEdit(TQWidget *parent, + const TQString &title, + const TQString &text, float min, float max, float value, @@ -57,7 +57,7 @@ public: protected: - QLabel *m_text; + TQLabel *m_text; HSpinBox *m_spin; }; diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.cpp b/src/gui/dialogs/IdentifyTextCodecDialog.cpp index 07b5ec1..c07d887 100644 --- a/src/gui/dialogs/IdentifyTextCodecDialog.cpp +++ b/src/gui/dialogs/IdentifyTextCodecDialog.cpp @@ -30,34 +30,34 @@ #include "base/NotationTypes.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qfont.h> -#include <qlabel.h> -#include <qstring.h> -#include <qtextcodec.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqtextcodec.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent, +IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *parent, std::string text) : KDialogBase(parent, 0, true, i18n("Choose Text Encoding"), Ok), m_text(text) { - QVBox *vbox = makeVBoxMainWidget(); - new QLabel(i18n("\nThis file contains text in an unknown language encoding.\n\nPlease select one of the following estimated text encodings\nfor use with the text in this file:\n"), vbox); + TQVBox *vbox = makeVBoxMainWidget(); + new TQLabel(i18n("\nThis file contains text in an unknown language encoding.\n\nPlease select one of the following estimated text encodings\nfor use with the text in this file:\n"), vbox); KComboBox *codecs = new KComboBox(vbox); std::string defaultCodec; - QTextCodec *cc = QTextCodec::codecForContent(text.c_str(), text.length()); - QTextCodec *codec = 0; + TQTextCodec *cc = TQTextCodec::codecForContent(text.c_str(), text.length()); + TQTextCodec *codec = 0; std::cerr << "cc is " << (cc ? cc->name() : "null") << std::endl; - std::map<std::string, QString> codecDescriptions; + std::map<std::string, TQString> codecDescriptions; codecDescriptions["SJIS"] = i18n("Japanese Shift-JIS"); codecDescriptions["UTF-8"] = i18n("Unicode variable-width"); codecDescriptions["ISO 8859-1"] = i18n("Western Europe"); @@ -90,7 +90,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent, (m_text.c_str(), m_text.length()); } - while ((codec = QTextCodec::codecForIndex(i)) != 0) { + while ((codec = TQTextCodec::codecForIndex(i)) != 0) { int probability = codec->heuristicContentMatch (m_text.c_str(), m_text.length()); @@ -111,7 +111,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent, cc = codec; } - QString description = codecDescriptions[name]; + TQString description = codecDescriptions[name]; if (description == "") { if (strtoqstr(name).left(3) == "CP ") { description = i18n("Microsoft Code Page %1"). @@ -136,13 +136,13 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(QWidget *parent, ++i; } - connect(codecs, SIGNAL(activated(int)), - this, SLOT(slotCodecSelected(int))); + connect(codecs, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotCodecSelected(int))); - new QLabel(i18n("\nExample text from file:"), vbox); - m_example = new QLabel("", vbox); - QFont font; - font.setStyleHint(QFont::TypeWriter); + new TQLabel(i18n("\nExample text from file:"), vbox); + m_example = new TQLabel("", vbox); + TQFont font; + font.setStyleHint(TQFont::TypeWriter); m_example->setFont(font); m_example->setPaletteForegroundColor(Qt::blue); std::cerr << "calling slotCodecSelected(" << current << ")" << std::endl; @@ -160,11 +160,11 @@ IdentifyTextCodecDialog::slotCodecSelected(int i) // std::cerr << "codecs: "; // for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " "; // std::cerr << std::endl; - QTextCodec *codec = QTextCodec::codecForName(strtoqstr(name)); + TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name)); if (!codec) return; m_codec = qstrtostr(codec->name()); std::cerr << "Applying codec " << m_codec << std::endl; - QString outText = codec->toUnicode(m_text.c_str(), m_text.length()); + TQString outText = codec->toUnicode(m_text.c_str(), m_text.length()); if (outText.length() > 80) outText = outText.left(80); m_example->setText("\"" + outText + "\""); } diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.h b/src/gui/dialogs/IdentifyTextCodecDialog.h index 288cd17..8b71be4 100644 --- a/src/gui/dialogs/IdentifyTextCodecDialog.h +++ b/src/gui/dialogs/IdentifyTextCodecDialog.h @@ -31,8 +31,8 @@ #include <deque> -class QWidget; -class QLabel; +class TQWidget; +class TQLabel; namespace Rosegarden @@ -45,7 +45,7 @@ class IdentifyTextCodecDialog : public KDialogBase Q_OBJECT public: - IdentifyTextCodecDialog(QWidget *parent, std::string text); + IdentifyTextCodecDialog(TQWidget *parent, std::string text); std::string getCodec() const { return m_codec; } @@ -56,7 +56,7 @@ protected: std::string m_text; std::string m_codec; std::deque<std::string> m_codecs; - QLabel *m_example; + TQLabel *m_example; }; diff --git a/src/gui/dialogs/ImportDeviceDialog.cpp b/src/gui/dialogs/ImportDeviceDialog.cpp index 58a6ce5..cde1cac 100644 --- a/src/gui/dialogs/ImportDeviceDialog.cpp +++ b/src/gui/dialogs/ImportDeviceDialog.cpp @@ -24,7 +24,7 @@ #include "ImportDeviceDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -40,21 +40,21 @@ #include <kmessagebox.h> #include <kurl.h> #include <kio/netaccess.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -ImportDeviceDialog::ImportDeviceDialog(QWidget *parent, KURL url) : +ImportDeviceDialog::ImportDeviceDialog(TQWidget *parent, KURL url) : KDialogBase(parent, "importdevicedialog", true, i18n("Import from Device..."), Ok | Cancel, Ok), @@ -75,14 +75,14 @@ ImportDeviceDialog::~ImportDeviceDialog() bool ImportDeviceDialog::doImport() { - QVBox *mainFrame = makeVBoxMainWidget(); + TQVBox *mainFrame = makeVBoxMainWidget(); if (m_url.isEmpty()) { reject(); return false; } - QString target; + TQString target; if (KIO::NetAccess::download(m_url, target) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(m_url.prettyURL())); return false; @@ -109,13 +109,13 @@ ImportDeviceDialog::doImport() return false; } - QGroupBox *groupBox = new QGroupBox(2, Qt::Horizontal, + TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal, i18n("Source device"), mainFrame); - QHBox *deviceBox = new QHBox(groupBox); - QHBoxLayout *bl = new QHBoxLayout(deviceBox); - bl->addWidget(new QLabel(i18n("Import from: "), deviceBox)); + TQHBox *deviceBox = new TQHBox(groupBox); + TQHBoxLayout *bl = new TQHBoxLayout(deviceBox); + bl->addWidget(new TQLabel(i18n("Import from: "), deviceBox)); bool showRenameOption = false; @@ -125,7 +125,7 @@ ImportDeviceDialog::doImport() bl->addWidget(m_deviceCombo); } else { m_deviceCombo = 0; - m_deviceLabel = new QLabel(deviceBox); + m_deviceLabel = new TQLabel(deviceBox); bl->addWidget(m_deviceLabel); } @@ -147,26 +147,26 @@ ImportDeviceDialog::doImport() ++count; } - QHBox *optionsBox = new QHBox(mainFrame); + TQHBox *optionsBox = new TQHBox(mainFrame); - QGroupBox *gb = new QGroupBox(1, Horizontal, i18n("Options"), + TQGroupBox *gb = new TQGroupBox(1, Horizontal, i18n("Options"), optionsBox); - m_importBanks = new QCheckBox(i18n("Import banks"), gb); - m_importKeyMappings = new QCheckBox(i18n("Import key mappings"), gb); - m_importControllers = new QCheckBox(i18n("Import controllers"), gb); + m_importBanks = new TQCheckBox(i18n("Import banks"), gb); + m_importKeyMappings = new TQCheckBox(i18n("Import key mappings"), gb); + m_importControllers = new TQCheckBox(i18n("Import controllers"), gb); if (showRenameOption) { - m_rename = new QCheckBox(i18n("Import device name"), gb); + m_rename = new TQCheckBox(i18n("Import device name"), gb); } else { m_rename = 0; } - m_buttonGroup = new QButtonGroup(1, Qt::Horizontal, + m_buttonGroup = new TQButtonGroup(1, Qt::Horizontal, i18n("Bank import behavior"), optionsBox); - m_mergeBanks = new QRadioButton(i18n("Merge banks"), m_buttonGroup); - m_overwriteBanks = new QRadioButton(i18n("Overwrite banks"), m_buttonGroup); + m_mergeBanks = new TQRadioButton(i18n("Merge banks"), m_buttonGroup); + m_overwriteBanks = new TQRadioButton(i18n("Overwrite banks"), m_buttonGroup); KConfig *config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); @@ -283,7 +283,7 @@ ImportDeviceDialog::shouldRename() const } bool -ImportDeviceDialog::importFromRG(QString fileName) +ImportDeviceDialog::importFromRG(TQString fileName) { m_fileDoc = new RosegardenGUIDoc(RosegardenGUIApp::self(), 0, true); // skipAutoload @@ -336,7 +336,7 @@ ImportDeviceDialog::importFromRG(QString fileName) } bool -ImportDeviceDialog::importFromSF2(QString filename) +ImportDeviceDialog::importFromSF2(TQString filename) { SF2PatchExtractor::Device sf2device; try { diff --git a/src/gui/dialogs/ImportDeviceDialog.h b/src/gui/dialogs/ImportDeviceDialog.h index bb79e3b..122e640 100644 --- a/src/gui/dialogs/ImportDeviceDialog.h +++ b/src/gui/dialogs/ImportDeviceDialog.h @@ -29,16 +29,16 @@ #include "base/MidiDevice.h" #include <string> #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> #include <kurl.h> -class QWidget; -class QRadioButton; -class QLabel; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQRadioButton; +class TQLabel; +class TQCheckBox; +class TQButtonGroup; class ProgramList; class KeyMappingList; class KComboBox; @@ -57,7 +57,7 @@ class ImportDeviceDialog : public KDialogBase Q_OBJECT public: - ImportDeviceDialog(QWidget *parent, KURL url); + ImportDeviceDialog(TQWidget *parent, KURL url); virtual ~ImportDeviceDialog(); bool doImport(); @@ -82,22 +82,22 @@ public slots: void slotCancel(); protected: - bool importFromRG(QString fileName); - bool importFromSF2(QString fileName); + bool importFromRG(TQString fileName); + bool importFromSF2(TQString fileName); KURL m_url; KComboBox *m_deviceCombo; - QLabel *m_deviceLabel; + TQLabel *m_deviceLabel; - QCheckBox *m_importBanks; - QCheckBox *m_importKeyMappings; - QCheckBox *m_importControllers; - QCheckBox *m_rename; + TQCheckBox *m_importBanks; + TQCheckBox *m_importKeyMappings; + TQCheckBox *m_importControllers; + TQCheckBox *m_rename; - QButtonGroup *m_buttonGroup; - QRadioButton *m_mergeBanks; - QRadioButton *m_overwriteBanks; + TQButtonGroup *m_buttonGroup; + TQRadioButton *m_mergeBanks; + TQRadioButton *m_overwriteBanks; RosegardenGUIDoc *m_fileDoc; std::vector<MidiDevice *> m_devices; diff --git a/src/gui/dialogs/InterpretDialog.cpp b/src/gui/dialogs/InterpretDialog.cpp index b11e3c4..3510d1a 100644 --- a/src/gui/dialogs/InterpretDialog.cpp +++ b/src/gui/dialogs/InterpretDialog.cpp @@ -31,22 +31,22 @@ #include "commands/notation/InterpretCommand.h" #include <kconfig.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -InterpretDialog::InterpretDialog(QWidget *parent) : +InterpretDialog::InterpretDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Interpret"), Ok | Cancel | Help) { setHelp("nv-interpret"); - QVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQVBox *vbox = makeVBoxMainWidget(); + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Interpretations to apply"), vbox); m_applyTextDynamics = new QCheckBox @@ -75,7 +75,7 @@ InterpretDialog::InterpretDialog(QWidget *parent) : (config->readBoolEntry("interpretarticulate", true)); connect(m_allInterpretations, - SIGNAL(clicked()), this, SLOT(slotAllBoxChanged())); + TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAllBoxChanged())); slotAllBoxChanged(); } diff --git a/src/gui/dialogs/InterpretDialog.h b/src/gui/dialogs/InterpretDialog.h index 75c8694..9859259 100644 --- a/src/gui/dialogs/InterpretDialog.h +++ b/src/gui/dialogs/InterpretDialog.h @@ -29,8 +29,8 @@ #include <kdialogbase.h> -class QWidget; -class QCheckBox; +class TQWidget; +class TQCheckBox; namespace Rosegarden @@ -42,7 +42,7 @@ class InterpretDialog : public KDialogBase { Q_OBJECT public: - InterpretDialog(QWidget *parent); + InterpretDialog(TQWidget *parent); // an OR from InterpretCommand's constants int getInterpretations(); @@ -51,11 +51,11 @@ protected slots: void slotAllBoxChanged(); private: - QCheckBox *m_allInterpretations; - QCheckBox *m_applyTextDynamics; - QCheckBox *m_applyHairpins; - QCheckBox *m_stressBeats; - QCheckBox *m_articulate; + TQCheckBox *m_allInterpretations; + TQCheckBox *m_applyTextDynamics; + TQCheckBox *m_applyHairpins; + TQCheckBox *m_stressBeats; + TQCheckBox *m_articulate; }; diff --git a/src/gui/dialogs/IntervalDialog.cpp b/src/gui/dialogs/IntervalDialog.cpp index 061fc31..da8e4dc 100644 --- a/src/gui/dialogs/IntervalDialog.cpp +++ b/src/gui/dialogs/IntervalDialog.cpp @@ -24,7 +24,7 @@ #include "IntervalDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <iostream> #include <klocale.h> @@ -33,27 +33,27 @@ #include "base/NotationRules.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -IntervalDialog::IntervalDialog(QWidget *parent, bool askChangeKey, bool askTransposeSegmentBack) : +IntervalDialog::IntervalDialog(TQWidget *parent, bool askChangeKey, bool askTransposeSegmentBack) : KDialogBase(parent, 0, true, i18n("Specify Interval"), Ok | Cancel ) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QHBox *hBox = new QHBox( vBox ); + TQHBox *hBox = new TQHBox( vBox ); m_referencenote = new DiatonicPitchChooser( i18n("Reference note:"), hBox ); m_targetnote = new DiatonicPitchChooser( i18n("Target note:"), hBox ); @@ -61,22 +61,22 @@ IntervalDialog::IntervalDialog(QWidget *parent, bool askChangeKey, bool askTrans intervalChromatic = 0; intervalDiatonic = 0; - //m_intervalPitchLabel = new QLabel( i18n("Pitch: %1").arg(intervalChromatic), hBox); - //m_intervalOctavesLabel = new QLabel( i18n("Octaves: %1").arg(intervalDiatonic / 7), hBox); - //m_intervalStepsLabel = new QLabel( i18n("Steps: %1").arg(intervalDiatonic % 7), hBox); + //m_intervalPitchLabel = new TQLabel( i18n("Pitch: %1").arg(intervalChromatic), hBox); + //m_intervalOctavesLabel = new TQLabel( i18n("Octaves: %1").arg(intervalDiatonic / 7), hBox); + //m_intervalStepsLabel = new TQLabel( i18n("Steps: %1").arg(intervalDiatonic % 7), hBox); - m_intervalLabel = new QLabel( i18n("a perfect unison"), vBox); + m_intervalLabel = new TQLabel( i18n("a perfect unison"), vBox); m_intervalLabel->setAlignment(Qt::AlignCenter); - QFont font(m_intervalLabel->font()); + TQFont font(m_intervalLabel->font()); font.setItalic(true); m_intervalLabel->setFont(font); if (askChangeKey) { - QButtonGroup *affectKeyGroup = new QButtonGroup(1, Horizontal, i18n("Effect on Key"), vBox); - m_transposeWithinKey = new QRadioButton(i18n("Transpose within key"), affectKeyGroup); + TQButtonGroup *affectKeyGroup = new TQButtonGroup(1, Horizontal, i18n("Effect on Key"), vBox); + m_transposeWithinKey = new TQRadioButton(i18n("Transpose within key"), affectKeyGroup); m_transposeWithinKey->setChecked(true); - m_transposeChangingKey = new QRadioButton(i18n("Change key for selection"), affectKeyGroup); + m_transposeChangingKey = new TQRadioButton(i18n("Change key for selection"), affectKeyGroup); } else { @@ -86,7 +86,7 @@ IntervalDialog::IntervalDialog(QWidget *parent, bool askChangeKey, bool askTrans if (askTransposeSegmentBack) { - m_transposeSegmentBack = new QCheckBox( i18n("Adjust segment transposition in opposite direction (maintain audible pitch)"), vBox ); + m_transposeSegmentBack = new TQCheckBox( i18n("Adjust segment transposition in opposite direction (maintain audible pitch)"), vBox ); m_transposeSegmentBack->setTristate(false); m_transposeSegmentBack->setChecked(false); } @@ -95,11 +95,11 @@ IntervalDialog::IntervalDialog(QWidget *parent, bool askChangeKey, bool askTrans m_transposeSegmentBack = NULL; } - connect(m_referencenote, SIGNAL(noteChanged(int,int,int)), - this, SLOT(slotSetReferenceNote(int,int,int))); + connect(m_referencenote, TQT_SIGNAL(noteChanged(int,int,int)), + this, TQT_SLOT(slotSetReferenceNote(int,int,int))); - connect(m_targetnote, SIGNAL(noteChanged(int,int,int)), - this, SLOT(slotSetTargetNote(int,int,int))); + connect(m_targetnote, TQT_SIGNAL(noteChanged(int,int,int)), + this, TQT_SLOT(slotSetTargetNote(int,int,int))); } // number of octaves the notes are apart @@ -176,8 +176,8 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) bool showStep = displayIntervalDiatonic == 0 || displayIntervalDiatonic % 7 != 0 || deviation != 0; - QString textInterval = ""; - QString textIntervalDeviated = ""; + TQString textInterval = ""; + TQString textIntervalDeviated = ""; if (showStep) { switch (displayIntervalDiatonic % 7) diff --git a/src/gui/dialogs/IntervalDialog.h b/src/gui/dialogs/IntervalDialog.h index b9927d2..f08326b 100644 --- a/src/gui/dialogs/IntervalDialog.h +++ b/src/gui/dialogs/IntervalDialog.h @@ -32,10 +32,10 @@ #include "gui/widgets/DiatonicPitchChooser.h" -class QWidget; +class TQWidget; class KComboBox; -class QRadioButton; -class QCheckBox; +class TQRadioButton; +class TQCheckBox; namespace Rosegarden @@ -48,7 +48,7 @@ class IntervalDialog : public KDialogBase { Q_OBJECT public: - IntervalDialog(QWidget *parent, bool askChangeKey = false, bool askTransposeSegmentBack = false); + IntervalDialog(TQWidget *parent, bool askChangeKey = false, bool askTransposeSegmentBack = false); // Distance in semitones int getChromaticDistance(); @@ -62,7 +62,7 @@ public: // Transpose the segment itself in the opposite direction? bool getTransposeSegmentBack(); - static QString getIntervalName(int intervalDiatonic, int intervalChromatic); + static TQString getIntervalName(int intervalDiatonic, int intervalChromatic); public slots: void slotSetReferenceNote(int,int,int); @@ -76,15 +76,15 @@ private: DiatonicPitchChooser *m_referencenote; DiatonicPitchChooser *m_targetnote; - QRadioButton *m_transposeWithinKey; - QRadioButton *m_transposeChangingKey; + TQRadioButton *m_transposeWithinKey; + TQRadioButton *m_transposeChangingKey; bool changeKey; - QCheckBox *m_transposeSegmentBack; + TQCheckBox *m_transposeSegmentBack; int intervalChromatic; int intervalDiatonic; - QLabel *m_intervalLabel; + TQLabel *m_intervalLabel; }; diff --git a/src/gui/dialogs/KeySignatureDialog.cpp b/src/gui/dialogs/KeySignatureDialog.cpp index c703c0a..f47d71a 100644 --- a/src/gui/dialogs/KeySignatureDialog.cpp +++ b/src/gui/dialogs/KeySignatureDialog.cpp @@ -32,30 +32,30 @@ #include "gui/widgets/BigArrowButton.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcheckbox.h> #include <algorithm> namespace Rosegarden { -KeySignatureDialog::KeySignatureDialog(QWidget *parent, +KeySignatureDialog::KeySignatureDialog(TQWidget *parent, NotePixmapFactory *npf, Clef clef, Rosegarden::Key defaultKey, bool showApplyToAll, bool showConversionOptions, - QString explanatoryText) : + TQString explanatoryText) : KDialogBase(parent, 0, true, i18n("Key Change"), Ok | Cancel | Help), m_notePixmapFactory(npf), m_key(defaultKey), @@ -68,40 +68,40 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, { setHelp("nv-signatures-key"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QHBox *keyBox = 0; - QHBox *nameBox = 0; + TQHBox *keyBox = 0; + TQHBox *nameBox = 0; - QGroupBox *keyFrame = new QGroupBox + TQGroupBox *keyFrame = new QGroupBox (1, Horizontal, i18n("Key signature"), vbox); - QGroupBox *transposeFrame = new QButtonGroup + TQGroupBox *transposeFrame = new QButtonGroup (1, Horizontal, i18n("Key transposition"), vbox); - QGroupBox *buttonFrame = new QButtonGroup + TQGroupBox *buttonFrame = new QButtonGroup (1, Horizontal, i18n("Scope"), vbox); - QButtonGroup *conversionFrame = new QButtonGroup + TQButtonGroup *conversionFrame = new QButtonGroup (1, Horizontal, i18n("Existing notes following key change"), vbox); - keyBox = new QHBox(keyFrame); - nameBox = new QHBox(keyFrame); + keyBox = new TQHBox(keyFrame); + nameBox = new TQHBox(keyFrame); - QLabel *explanatoryLabel = 0; + TQLabel *explanatoryLabel = 0; if (explanatoryText) { - explanatoryLabel = new QLabel(explanatoryText, keyFrame); + explanatoryLabel = new TQLabel(explanatoryText, keyFrame); } BigArrowButton *keyDown = new BigArrowButton(keyBox, Qt::LeftArrow); - QToolTip::add + TQToolTip::add (keyDown, i18n("Flatten")); - m_keyLabel = new QLabel(i18n("Key"), keyBox); + m_keyLabel = new TQLabel(i18n("Key"), keyBox); m_keyLabel->setAlignment(AlignVCenter | AlignHCenter); BigArrowButton *keyUp = new BigArrowButton(keyBox, Qt::RightArrow); - QToolTip::add + TQToolTip::add (keyUp, i18n("Sharpen")); m_keyCombo = new KComboBox(nameBox); @@ -120,25 +120,25 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, m_keyLabel->setMinimumHeight(m_keyLabel->pixmap()->height()); m_yesTransposeButton = - new QRadioButton(i18n("Transpose key according to segment transposition"), + new TQRadioButton(i18n("Transpose key according to segment transposition"), transposeFrame); - QRadioButton *noTransposeButton = - new QRadioButton(i18n("Use specified key. Do not transpose"), transposeFrame); + TQRadioButton *noTransposeButton = + new TQRadioButton(i18n("Use specified key. Do not transpose"), transposeFrame); m_yesTransposeButton->setChecked(true); // just to shut up the compiler warning about unused variable: noTransposeButton->setChecked(false); if (showApplyToAll) { - QRadioButton *applyToOneButton = - new QRadioButton(i18n("Apply to current segment only"), + TQRadioButton *applyToOneButton = + new TQRadioButton(i18n("Apply to current segment only"), buttonFrame); m_applyToAllButton = - new QRadioButton(i18n("Apply to all segments at this time"), + new TQRadioButton(i18n("Apply to all segments at this time"), buttonFrame); applyToOneButton->setChecked(true); m_noPercussionCheckBox = - new QCheckBox(i18n("Exclude percussion segments"), buttonFrame); + new TQCheckBox(i18n("Exclude percussion segments"), buttonFrame); m_noPercussionCheckBox->setChecked(true); } else { @@ -164,14 +164,14 @@ KeySignatureDialog::KeySignatureDialog(QWidget *parent, conversionFrame->hide(); } - QObject::connect(keyUp, SIGNAL(clicked()), this, SLOT(slotKeyUp())); - QObject::connect(keyDown, SIGNAL(clicked()), this, SLOT(slotKeyDown())); - QObject::connect(m_keyCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotKeyNameChanged(const QString &))); - QObject::connect(m_keyCombo, SIGNAL(textChanged(const QString &)), - this, SLOT(slotKeyNameChanged(const QString &))); - QObject::connect(m_majorMinorCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotMajorMinorChanged(const QString &))); + TQObject::connect(keyUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKeyUp())); + TQObject::connect(keyDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotKeyDown())); + TQObject::connect(m_keyCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotKeyNameChanged(const TQString &))); + TQObject::connect(m_keyCombo, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotKeyNameChanged(const TQString &))); + TQObject::connect(m_majorMinorCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotMajorMinorChanged(const TQString &))); } KeySignatureDialog::ConversionType @@ -279,7 +279,7 @@ KeySignatureDialog::regenerateKeyCombo() m_explanatoryLabel->hide(); m_ignoreComboChanges = true; - QString currentText = m_keyCombo->currentText(); + TQString currentText = m_keyCombo->currentText(); Rosegarden::Key::KeyList keys(Rosegarden::Key::getKeys(m_key.isMinor())); m_keyCombo->clear(); @@ -289,7 +289,7 @@ KeySignatureDialog::regenerateKeyCombo() for (Rosegarden::Key::KeyList::iterator i = keys.begin(); i != keys.end(); ++i) { - QString name(strtoqstr(i->getName())); + TQString name(strtoqstr(i->getName())); int space = name.find(' '); if (space > 0) name = name.left(space); @@ -324,7 +324,7 @@ void KeySignatureDialog::redrawKeyPixmap() { if (m_valid) { - QPixmap pmap = + TQPixmap pmap = NotePixmapFactory::toQPixmap(m_notePixmapFactory->makeKeyDisplayPixmap(m_key, m_clef)); m_keyLabel->setPixmap(pmap); } else { @@ -333,7 +333,7 @@ KeySignatureDialog::redrawKeyPixmap() } void -KeySignatureDialog::slotKeyNameChanged(const QString &s) +KeySignatureDialog::slotKeyNameChanged(const TQString &s) { if (m_ignoreComboChanges) return ; @@ -361,7 +361,7 @@ KeySignatureDialog::slotKeyNameChanged(const QString &s) } void -KeySignatureDialog::slotMajorMinorChanged(const QString &s) +KeySignatureDialog::slotMajorMinorChanged(const TQString &s) { if (m_ignoreComboChanges) return ; @@ -388,9 +388,9 @@ KeySignatureDialog::setValid(bool valid) } std::string -KeySignatureDialog::getKeyName(const QString &s, bool minor) +KeySignatureDialog::getKeyName(const TQString &s, bool minor) { - QString u((s.length() >= 1) ? (s.left(1).upper() + s.right(s.length() - 1)) + TQString u((s.length() >= 1) ? (s.left(1).upper() + s.right(s.length() - 1)) : s); std::string name(qstrtostr(u)); diff --git a/src/gui/dialogs/KeySignatureDialog.h b/src/gui/dialogs/KeySignatureDialog.h index cd4a340..2047ee7 100644 --- a/src/gui/dialogs/KeySignatureDialog.h +++ b/src/gui/dialogs/KeySignatureDialog.h @@ -29,15 +29,15 @@ #include "base/NotationTypes.h" #include <string> #include <kdialogbase.h> -#include <qstring.h> -#include <qcheckbox.h> +#include <tqstring.h> +#include <tqcheckbox.h> -class QWidget; -class QRadioButton; -class QLabel; +class TQWidget; +class TQRadioButton; +class TQLabel; class KComboBox; -class QCheckBox; +class TQCheckBox; namespace Rosegarden @@ -57,14 +57,14 @@ public: Transpose }; - KeySignatureDialog(QWidget *parent, + KeySignatureDialog(TQWidget *parent, NotePixmapFactory *npf, Clef clef, Rosegarden::Key defaultKey = Rosegarden::Key::DefaultKey, bool showApplyToAll = true, bool showConversionOptions = true, - QString explanatoryText = 0); + TQString explanatoryText = 0); bool isValid() const; ::Rosegarden::Key getKey() const; @@ -77,15 +77,15 @@ public: public slots: void slotKeyUp(); void slotKeyDown(); - void slotKeyNameChanged(const QString &); - void slotMajorMinorChanged(const QString &); + void slotKeyNameChanged(const TQString &); + void slotMajorMinorChanged(const TQString &); protected: void redrawKeyPixmap(); void regenerateKeyCombo(); void setValid(bool valid); - std::string getKeyName(const QString &s, bool minor); + std::string getKeyName(const TQString &s, bool minor); //--------------- Data members --------------------------------- @@ -96,19 +96,19 @@ protected: bool m_valid; bool m_ignoreComboChanges; - QLabel *m_keyLabel; + TQLabel *m_keyLabel; KComboBox *m_keyCombo; KComboBox *m_majorMinorCombo; - QLabel *m_explanatoryLabel; + TQLabel *m_explanatoryLabel; - QRadioButton *m_applyToAllButton; - QRadioButton *m_yesTransposeButton; + TQRadioButton *m_applyToAllButton; + TQRadioButton *m_yesTransposeButton; - QRadioButton *m_noConversionButton; - QRadioButton *m_convertButton; - QRadioButton *m_transposeButton; + TQRadioButton *m_noConversionButton; + TQRadioButton *m_convertButton; + TQRadioButton *m_transposeButton; - QCheckBox *m_noPercussionCheckBox; + TQCheckBox *m_noPercussionCheckBox; }; diff --git a/src/gui/dialogs/LilyPondOptionsDialog.cpp b/src/gui/dialogs/LilyPondOptionsDialog.cpp index f693467..6af8f86 100644 --- a/src/gui/dialogs/LilyPondOptionsDialog.cpp +++ b/src/gui/dialogs/LilyPondOptionsDialog.cpp @@ -27,7 +27,7 @@ #include "document/io/LilyPondExporter.h" #include "gui/configuration/HeadersConfigurationPage.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "document/ConfigGroups.h" @@ -39,25 +39,25 @@ #include <kdialogbase.h> #include <kglobal.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <iostream> namespace Rosegarden { -LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, +LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, RosegardenGUIDoc *doc, - QString windowCaption, - QString heading) : + TQString windowCaption, + TQString heading) : KDialogBase(parent, 0, true, (windowCaption = "" ? i18n("LilyPond Export/Preview") : windowCaption), Apply | Ok | Cancel), @@ -68,28 +68,28 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); - QVBox * mainbox = makeVBoxMainWidget(); + TQVBox * mainbox = makeVBoxMainWidget(); // // Arrange options in "General" and "Advanced" tabs. // - QTabWidget * tabWidget = new QTabWidget(mainbox); + TQTabWidget * tabWidget = new TQTabWidget(mainbox); - QFrame *generalFrame; - QFrame *advancedFrame; - QGridLayout *generalGrid; - QGridLayout *advancedGrid; + TQFrame *generalFrame; + TQFrame *advancedFrame; + TQGridLayout *generalGrid; + TQGridLayout *advancedGrid; - generalFrame = new QFrame(); + generalFrame = new TQFrame(); tabWidget->addTab(generalFrame, i18n("General options")); - generalGrid = new QGridLayout(generalFrame, 1, 1, 5, 5); + generalGrid = new TQGridLayout(generalFrame, 1, 1, 5, 5); - advancedFrame = new QFrame(); + advancedFrame = new TQFrame(); tabWidget->addTab(advancedFrame, i18n("Advanced options")); - advancedGrid = new QGridLayout(advancedFrame, 1, 1, 5, 5); + advancedGrid = new TQGridLayout(advancedFrame, 1, 1, 5, 5); m_headersPage = new HeadersConfigurationPage(this, m_doc); tabWidget->addTab(m_headersPage, i18n("Headers")); @@ -101,15 +101,15 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, // LilyPond export: Basic options // - QGroupBox *basicOptionsBox = new QGroupBox + TQGroupBox *basicOptionsBox = new QGroupBox (1, Horizontal, i18n("Basic options"), generalFrame); generalGrid->addWidget(basicOptionsBox, 0, 0); - QFrame *frameBasic = new QFrame(basicOptionsBox); - QGridLayout *layoutBasic = new QGridLayout(frameBasic, 3, 2, 10, 5); + TQFrame *frameBasic = new TQFrame(basicOptionsBox); + TQGridLayout *layoutBasic = new TQGridLayout(frameBasic, 3, 2, 10, 5); - layoutBasic->addWidget(new QLabel( + layoutBasic->addWidget(new TQLabel( i18n("Compatibility level"), frameBasic), 0, 0); m_lilyLanguage = new KComboBox(frameBasic); @@ -121,10 +121,10 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyLanguage->setCurrentItem(config->readUnsignedNumEntry("lilylanguage", 0)); layoutBasic->addWidget(m_lilyLanguage, 0, 1); - layoutBasic->addWidget(new QLabel( + layoutBasic->addWidget(new TQLabel( i18n("Paper size"), frameBasic), 1, 0); - QHBoxLayout *hboxPaper = new QHBoxLayout( frameBasic ); + TQHBoxLayout *hboxPaper = new TQHBoxLayout( frameBasic ); m_lilyPaperSize = new KComboBox(frameBasic); m_lilyPaperSize->insertItem(i18n("A3")); m_lilyPaperSize->insertItem(i18n("A4")); @@ -140,15 +140,15 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyPaperSize->setCurrentItem(config->readUnsignedNumEntry ("lilypapersize", defaultPaperSize)); - m_lilyPaperLandscape = new QCheckBox(i18n("Landscape"), frameBasic); + m_lilyPaperLandscape = new TQCheckBox(i18n("Landscape"), frameBasic); m_lilyPaperLandscape->setChecked(config->readBoolEntry("lilypaperlandscape", false)); hboxPaper->addWidget( m_lilyPaperSize ); - hboxPaper->addWidget( new QLabel( " ", frameBasic ) ); // fixed-size spacer + hboxPaper->addWidget( new TQLabel( " ", frameBasic ) ); // fixed-size spacer hboxPaper->addWidget( m_lilyPaperLandscape ); layoutBasic->addLayout(hboxPaper, 1, 1); - layoutBasic->addWidget(new QLabel( + layoutBasic->addWidget(new TQLabel( i18n("Font size"), frameBasic), 2, 0); m_lilyFontSize = new KComboBox(frameBasic); @@ -164,15 +164,15 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, // LilyPond export: Staff level options // - QGroupBox *staffOptionsBox = new QGroupBox + TQGroupBox *staffOptionsBox = new QGroupBox (1, Horizontal, i18n("Staff level options"), generalFrame); generalGrid->addWidget(staffOptionsBox, 1, 0); - QFrame *frameStaff = new QFrame(staffOptionsBox); - QGridLayout *layoutStaff = new QGridLayout(frameStaff, 2, 2, 10, 5); + TQFrame *frameStaff = new TQFrame(staffOptionsBox); + TQGridLayout *layoutStaff = new TQGridLayout(frameStaff, 2, 2, 10, 5); - layoutStaff->addWidget(new QLabel( + layoutStaff->addWidget(new TQLabel( i18n("Export content"), frameStaff), 0, 0); m_lilyExportSelection = new KComboBox(frameStaff); @@ -184,7 +184,7 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, layoutStaff->addWidget(m_lilyExportSelection, 0, 1); - m_lilyExportStaffMerge = new QCheckBox( + m_lilyExportStaffMerge = new TQCheckBox( i18n("Merge tracks that have the same name"), frameStaff); m_lilyExportStaffMerge->setChecked(config->readBoolEntry("lilyexportstaffmerge", false)); layoutStaff->addMultiCellWidget(m_lilyExportStaffMerge, 1, 1, 0, 1); @@ -193,13 +193,13 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, // LilyPond export: Notation options // - QGroupBox *notationOptionsBox = new QGroupBox + TQGroupBox *notationOptionsBox = new QGroupBox (1, Horizontal, i18n("Notation options"), generalFrame); generalGrid->addWidget(notationOptionsBox, 2, 0); - QFrame *frameNotation = new QFrame(notationOptionsBox); - QGridLayout *layoutNotation = new QGridLayout(frameNotation, 4, 2, 10, 5); + TQFrame *frameNotation = new TQFrame(notationOptionsBox); + TQGridLayout *layoutNotation = new TQGridLayout(frameNotation, 4, 2, 10, 5); m_lilyTempoMarks = new KComboBox( frameNotation ); m_lilyTempoMarks->insertItem(i18n("None")); @@ -207,11 +207,11 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyTempoMarks->insertItem(i18n("All")); m_lilyTempoMarks->setCurrentItem(config->readUnsignedNumEntry("lilyexporttempomarks", 0)); - layoutNotation->addWidget( new QLabel( + layoutNotation->addWidget( new TQLabel( i18n("Export tempo marks "), frameNotation), 0, 0 ); layoutNotation->addWidget(m_lilyTempoMarks, 0, 1); - m_lilyExportLyrics = new QCheckBox( + m_lilyExportLyrics = new TQCheckBox( i18n("Export lyrics"), frameNotation); // default to lyric export == false because if you export the default // empty "- - -" lyrics, crap results ensue, and people will know if they @@ -221,14 +221,14 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyExportLyrics->setChecked(config->readBoolEntry("lilyexportlyrics", true)); layoutNotation->addMultiCellWidget(m_lilyExportLyrics, 1, 1, 0, 1); - m_lilyExportBeams = new QCheckBox( + m_lilyExportBeams = new TQCheckBox( i18n("Export beamings"), frameNotation); m_lilyExportBeams->setChecked(config->readBoolEntry("lilyexportbeamings", false)); layoutNotation->addMultiCellWidget(m_lilyExportBeams, 2, 2, 0, 1); // recycle this for a new option to ignore the track brackets (so it is less // obnoxious to print single parts where brackets are in place) - m_lilyExportStaffGroup = new QCheckBox( + m_lilyExportStaffGroup = new TQCheckBox( i18n("Export track staff brackets"), frameNotation); m_lilyExportStaffGroup->setChecked(config->readBoolEntry("lilyexportstaffbrackets", true)); layoutNotation->addMultiCellWidget(m_lilyExportStaffGroup, 3, 3, 0, 1); @@ -239,13 +239,13 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, // LilyPond export: Advanced options // - QGroupBox *advancedLayoutOptionsBox = new QGroupBox + TQGroupBox *advancedLayoutOptionsBox = new QGroupBox (1, Horizontal, i18n("Layout options"), advancedFrame); advancedGrid->addWidget(advancedLayoutOptionsBox, 0, 0); - QFrame *frameAdvancedLayout = new QFrame(advancedLayoutOptionsBox); - QGridLayout *layoutAdvancedLayout = new QGridLayout(frameAdvancedLayout, 2, 2, 10, 5); + TQFrame *frameAdvancedLayout = new TQFrame(advancedLayoutOptionsBox); + TQGridLayout *layoutAdvancedLayout = new TQGridLayout(frameAdvancedLayout, 2, 2, 10, 5); m_lilyLyricsHAlignment = new KComboBox( frameAdvancedLayout ); m_lilyLyricsHAlignment->insertItem(i18n("Left")); @@ -253,29 +253,29 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyLyricsHAlignment->insertItem(i18n("Right")); m_lilyLyricsHAlignment->setCurrentItem(config->readUnsignedNumEntry("lilylyricshalignment", 0)); - layoutAdvancedLayout->addWidget(new QLabel( + layoutAdvancedLayout->addWidget(new TQLabel( i18n("Lyrics alignment"), frameAdvancedLayout), 0, 0); layoutAdvancedLayout->addWidget(m_lilyLyricsHAlignment, 0, 1); - m_lilyRaggedBottom = new QCheckBox( + m_lilyRaggedBottom = new TQCheckBox( i18n("Ragged bottom (systems will not be spread vertically across the page)"), frameAdvancedLayout); m_lilyRaggedBottom->setChecked(config->readBoolEntry("lilyraggedbottom", false)); layoutAdvancedLayout->addMultiCellWidget(m_lilyRaggedBottom, 1, 2, 0, 1); - QGroupBox *miscOptionsBox = new QGroupBox + TQGroupBox *miscOptionsBox = new QGroupBox (1, Horizontal, i18n("Miscellaneous options"), advancedFrame); advancedGrid->addWidget(miscOptionsBox, 1, 0); - QFrame *frameMisc = new QFrame(miscOptionsBox); - QGridLayout *layoutMisc = new QGridLayout(frameMisc, 2, 2, 10, 5); + TQFrame *frameMisc = new TQFrame(miscOptionsBox); + TQGridLayout *layoutMisc = new TQGridLayout(frameMisc, 2, 2, 10, 5); - m_lilyExportPointAndClick = new QCheckBox( + m_lilyExportPointAndClick = new TQCheckBox( i18n("Enable \"point and click\" debugging"), frameMisc); m_lilyExportPointAndClick->setChecked(config->readBoolEntry("lilyexportpointandclick", false)); layoutMisc->addMultiCellWidget(m_lilyExportPointAndClick, 0, 0, 0, 1); - m_lilyExportMidi = new QCheckBox( + m_lilyExportMidi = new TQCheckBox( i18n("Export \\midi block"), frameMisc); m_lilyExportMidi->setChecked(config->readBoolEntry("lilyexportmidi", false)); layoutMisc->addMultiCellWidget(m_lilyExportMidi, 1, 1, 0, 1); @@ -286,7 +286,7 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(QWidget *parent, m_lilyMarkerMode->insertItem(i18n("Marker text")); m_lilyMarkerMode->setCurrentItem(config->readUnsignedNumEntry("lilyexportmarkermode", 0)); - layoutMisc->addWidget( new QLabel( + layoutMisc->addWidget( new TQLabel( i18n("Export markers"), frameMisc),2, 0 ); layoutMisc->addWidget(m_lilyMarkerMode, 2, 1); @@ -327,7 +327,7 @@ LilyPondOptionsDialog::slotOk() } void -LilyPondOptionsDialog::setDefaultLilyPondVersion(QString version) +LilyPondOptionsDialog::setDefaultLilyPondVersion(TQString version) { KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); diff --git a/src/gui/dialogs/LilyPondOptionsDialog.h b/src/gui/dialogs/LilyPondOptionsDialog.h index a8f2476..9071818 100644 --- a/src/gui/dialogs/LilyPondOptionsDialog.h +++ b/src/gui/dialogs/LilyPondOptionsDialog.h @@ -26,15 +26,15 @@ #define _RG_LILYPONDOPTIONSDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include "gui/configuration/HeadersConfigurationPage.h" -class QWidget; -class QCheckBox; -class QComboBox; -class QLineEdit; -class QLineEdit; +class TQWidget; +class TQCheckBox; +class TQComboBox; +class TQLineEdit; +class TQLineEdit; namespace Rosegarden { @@ -47,12 +47,12 @@ class LilyPondOptionsDialog : public KDialogBase Q_OBJECT public: - LilyPondOptionsDialog(QWidget *parent, + LilyPondOptionsDialog(TQWidget *parent, RosegardenGUIDoc *doc, - QString windowCaption = "", - QString heading = ""); + TQString windowCaption = "", + TQString heading = ""); - static void setDefaultLilyPondVersion(QString version); + static void setDefaultLilyPondVersion(TQString version); public slots: void slotApply(); @@ -60,21 +60,21 @@ public slots: protected: RosegardenGUIDoc *m_doc; - QComboBox *m_lilyLanguage; - QComboBox *m_lilyPaperSize; - QComboBox *m_lilyFontSize; - QComboBox *m_lilyTempoMarks; - QComboBox *m_lilyExportSelection; - QComboBox *m_lilyLyricsHAlignment; - QCheckBox *m_lilyPaperLandscape; - QCheckBox *m_lilyRaggedBottom; - QCheckBox *m_lilyExportLyrics; - QCheckBox *m_lilyExportMidi; - QCheckBox *m_lilyExportPointAndClick; - QCheckBox *m_lilyExportBeams; - QCheckBox *m_lilyExportStaffMerge; - QCheckBox *m_lilyExportStaffGroup; - QComboBox *m_lilyMarkerMode; + TQComboBox *m_lilyLanguage; + TQComboBox *m_lilyPaperSize; + TQComboBox *m_lilyFontSize; + TQComboBox *m_lilyTempoMarks; + TQComboBox *m_lilyExportSelection; + TQComboBox *m_lilyLyricsHAlignment; + TQCheckBox *m_lilyPaperLandscape; + TQCheckBox *m_lilyRaggedBottom; + TQCheckBox *m_lilyExportLyrics; + TQCheckBox *m_lilyExportMidi; + TQCheckBox *m_lilyExportPointAndClick; + TQCheckBox *m_lilyExportBeams; + TQCheckBox *m_lilyExportStaffMerge; + TQCheckBox *m_lilyExportStaffGroup; + TQComboBox *m_lilyMarkerMode; HeadersConfigurationPage *m_headersPage; }; diff --git a/src/gui/dialogs/LyricEditDialog.cpp b/src/gui/dialogs/LyricEditDialog.cpp index 4dfeba2..691f046 100644 --- a/src/gui/dialogs/LyricEditDialog.cpp +++ b/src/gui/dialogs/LyricEditDialog.cpp @@ -34,21 +34,21 @@ #include "base/NotationTypes.h" #include "base/Segment.h" #include <kdialogbase.h> -#include <qgroupbox.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtextedit.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtextedit.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <kcombobox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqpushbutton.h> namespace Rosegarden { -LyricEditDialog::LyricEditDialog(QWidget *parent, +LyricEditDialog::LyricEditDialog(TQWidget *parent, Segment *segment) : KDialogBase(parent, 0, true, i18n("Edit Lyrics"), Ok | Cancel | Help), m_segment(segment), @@ -56,23 +56,23 @@ LyricEditDialog::LyricEditDialog(QWidget *parent, { setHelp("nv-text-lyrics"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Lyrics for this segment"), vbox); - QHBox *hbox = new QHBox(groupBox); + TQHBox *hbox = new TQHBox(groupBox); hbox->setSpacing(5); -// new QLabel(i18n("Verse:"), hbox); +// new TQLabel(i18n("Verse:"), hbox); m_verseNumber = new KComboBox(hbox); m_verseNumber->setEditable(false); - connect(m_verseNumber, SIGNAL(activated(int)), this, SLOT(slotVerseNumberChanged(int))); - m_verseAddButton = new QPushButton(i18n("Add Verse"), hbox); - connect(m_verseAddButton, SIGNAL(clicked()), this, SLOT(slotAddVerse())); - QFrame *f = new QFrame(hbox); + connect(m_verseNumber, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotVerseNumberChanged(int))); + m_verseAddButton = new TQPushButton(i18n("Add Verse"), hbox); + connect(m_verseAddButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddVerse())); + TQFrame *f = new TQFrame(hbox); hbox->setStretchFactor(f, 10); - m_textEdit = new QTextEdit(groupBox); + m_textEdit = new TQTextEdit(groupBox); m_textEdit->setTextFormat(Qt::PlainText); m_textEdit->setMinimumWidth(300); @@ -91,7 +91,7 @@ void LyricEditDialog::slotVerseNumberChanged(int verse) { NOTATION_DEBUG << "LyricEditDialog::slotVerseNumberChanged(" << verse << ")" << endl; - QString text = m_textEdit->text(); + TQString text = m_textEdit->text(); m_texts[m_currentVerse] = text; m_textEdit->setText(m_texts[verse]); m_currentVerse = verse; @@ -148,7 +148,7 @@ LyricEditDialog::unparse() int lastBarNo = comp->getBarNumber(lastTime); std::map<int, bool> haveLyric; - QString fragment = QString("[%1] ").arg(lastBarNo + 1); + TQString fragment = TQString("[%1] ").arg(lastBarNo + 1); m_skeleton = fragment; m_texts.clear(); @@ -192,7 +192,7 @@ LyricEditDialog::unparse() ++lastBarNo; } - fragment += QString("\n[%1] ").arg(myBarNo + 1); + fragment += TQString("\n[%1] ").arg(myBarNo + 1); m_skeleton += fragment; for (size_t v = 0; v < m_verseCount; ++v) m_texts[v] += fragment; @@ -218,8 +218,8 @@ LyricEditDialog::unparse() long verse = 0; (*i)->get<Int>(Text::LyricVersePropertyName, verse); - QString syllable(strtoqstr(ssyllable)); - syllable.replace(QRegExp("\\s+"), "~"); + TQString syllable(strtoqstr(ssyllable)); + syllable.replace(TQRegExp("\\s+"), "~"); m_texts[verse] += " " + syllable; haveLyric[verse] = true; diff --git a/src/gui/dialogs/LyricEditDialog.h b/src/gui/dialogs/LyricEditDialog.h index f4a5154..6f51e24 100644 --- a/src/gui/dialogs/LyricEditDialog.h +++ b/src/gui/dialogs/LyricEditDialog.h @@ -27,14 +27,14 @@ #define _RG_LYRICEDITDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QTextEdit; -class QComboBox; -class QPushButton; +class TQWidget; +class TQTextEdit; +class TQComboBox; +class TQPushButton; namespace Rosegarden @@ -48,10 +48,10 @@ class LyricEditDialog : public KDialogBase Q_OBJECT public: - LyricEditDialog(QWidget *parent, Segment *segment); + LyricEditDialog(TQWidget *parent, Segment *segment); int getVerseCount() const; - QString getLyricData(int verse) const; + TQString getLyricData(int verse) const; protected slots: void slotVerseNumberChanged(int); @@ -61,13 +61,13 @@ protected: Segment *m_segment; int m_currentVerse; - QComboBox *m_verseNumber; - QTextEdit *m_textEdit; - QPushButton *m_verseAddButton; + TQComboBox *m_verseNumber; + TQTextEdit *m_textEdit; + TQPushButton *m_verseAddButton; int m_verseCount; - std::vector<QString> m_texts; - QString m_skeleton; + std::vector<TQString> m_texts; + TQString m_skeleton; void countVerses(); void unparse(); diff --git a/src/gui/dialogs/MakeOrnamentDialog.cpp b/src/gui/dialogs/MakeOrnamentDialog.cpp index 7e82a22..3dfbddb 100644 --- a/src/gui/dialogs/MakeOrnamentDialog.cpp +++ b/src/gui/dialogs/MakeOrnamentDialog.cpp @@ -28,31 +28,31 @@ #include <klocale.h> #include "gui/widgets/PitchChooser.h" #include <kdialogbase.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -MakeOrnamentDialog::MakeOrnamentDialog(QWidget *parent, QString defaultName, +MakeOrnamentDialog::MakeOrnamentDialog(TQWidget *parent, TQString defaultName, int defaultBasePitch) : KDialogBase(parent, "makeornamentdialog", true, i18n("Make Ornament"), Ok | Cancel, Ok) { - QVBox *vbox = makeVBoxMainWidget(); - QGroupBox *nameBox = new QGroupBox(2, Vertical, i18n("Name"), vbox); + TQVBox *vbox = makeVBoxMainWidget(); + TQGroupBox *nameBox = new TQGroupBox(2, Vertical, i18n("Name"), vbox); - new QLabel(i18n("The name is used to identify both the ornament\nand the triggered segment that stores\nthe ornament's notes."), nameBox); + new TQLabel(i18n("The name is used to identify both the ornament\nand the triggered segment that stores\nthe ornament's notes."), nameBox); - QHBox *hbox = new QHBox(nameBox); - new QLabel(i18n("Name: "), hbox); - m_name = new QLineEdit(defaultName, hbox); + TQHBox *hbox = new TQHBox(nameBox); + new TQLabel(i18n("Name: "), hbox); + m_name = new TQLineEdit(defaultName, hbox); m_pitch = new PitchChooser(i18n("Base pitch"), vbox, defaultBasePitch); } diff --git a/src/gui/dialogs/MakeOrnamentDialog.h b/src/gui/dialogs/MakeOrnamentDialog.h index 3f1957b..0a4a00d 100644 --- a/src/gui/dialogs/MakeOrnamentDialog.h +++ b/src/gui/dialogs/MakeOrnamentDialog.h @@ -27,11 +27,11 @@ #define _RG_MAKEORNAMENTDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QLineEdit; +class TQWidget; +class TQLineEdit; namespace Rosegarden @@ -45,13 +45,13 @@ class MakeOrnamentDialog : public KDialogBase Q_OBJECT public: - MakeOrnamentDialog(QWidget *parent, QString defaultName, int defaultBasePitch); + MakeOrnamentDialog(TQWidget *parent, TQString defaultName, int defaultBasePitch); - QString getName() const; + TQString getName() const; int getBasePitch() const; protected: - QLineEdit *m_name; + TQLineEdit *m_name; PitchChooser *m_pitch; }; diff --git a/src/gui/dialogs/ManageMetronomeDialog.cpp b/src/gui/dialogs/ManageMetronomeDialog.cpp index a0f73d6..0b51e26 100644 --- a/src/gui/dialogs/ManageMetronomeDialog.cpp +++ b/src/gui/dialogs/ManageMetronomeDialog.cpp @@ -24,7 +24,7 @@ #include "ManageMetronomeDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -44,42 +44,42 @@ #include "sound/MappedEvent.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -ManageMetronomeDialog::ManageMetronomeDialog(QWidget *parent, +ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *parent, RosegardenGUIDoc *doc) : KDialogBase(parent, 0, true, i18n("Metronome"), Ok | Apply | Close | Help), m_doc(doc) { setHelp("studio-metronome"); - QHBox *hbox = makeHBoxMainWidget(); + TQHBox *hbox = makeHBoxMainWidget(); // I think having this as well probably just overcomplicates things m_instrumentParameterBox = 0; // m_instrumentParameterBox = new InstrumentParameterBox(doc, hbox); - QVBox *vbox = new QVBox(hbox); + TQVBox *vbox = new TQVBox(hbox); - QGroupBox *deviceBox = new QGroupBox + TQGroupBox *deviceBox = new QGroupBox (1, Horizontal, i18n("Metronome Instrument"), vbox); - QFrame *frame = new QFrame(deviceBox); - QGridLayout *layout = new QGridLayout(frame, 2, 2, 10, 5); + TQFrame *frame = new TQFrame(deviceBox); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 10, 5); - layout->addWidget(new QLabel(i18n("Device"), frame), 0, 0); + layout->addWidget(new TQLabel(i18n("Device"), frame), 0, 0); m_metronomeDevice = new KComboBox(frame); layout->addWidget(m_metronomeDevice, 0, 1); @@ -94,8 +94,8 @@ ManageMetronomeDialog::ManageMetronomeDialog(QWidget *parent, dynamic_cast<MidiDevice*>(*it); if (dev && dev->getDirection() == MidiDevice::Play) { - QString label = strtoqstr(dev->getName()); - QString connection = strtoqstr(dev->getConnection()); + TQString label = strtoqstr(dev->getName()); + TQString connection = strtoqstr(dev->getConnection()); label += " - "; if (connection == "") label += i18n("No connection"); @@ -108,76 +108,76 @@ ManageMetronomeDialog::ManageMetronomeDialog(QWidget *parent, } } - layout->addWidget(new QLabel(i18n("Instrument"), frame), 1, 0); + layout->addWidget(new TQLabel(i18n("Instrument"), frame), 1, 0); m_metronomeInstrument = new KComboBox(frame); - connect(m_metronomeInstrument, SIGNAL(activated(int)), this, SLOT(slotSetModified())); - connect(m_metronomeInstrument, SIGNAL(activated(int)), this, SLOT(slotInstrumentChanged(int))); + connect(m_metronomeInstrument, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetModified())); + connect(m_metronomeInstrument, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInstrumentChanged(int))); layout->addWidget(m_metronomeInstrument, 1, 1); - QGroupBox *beatBox = new QGroupBox + TQGroupBox *beatBox = new QGroupBox (1, Horizontal, i18n("Beats"), vbox); - frame = new QFrame(beatBox); - layout = new QGridLayout(frame, 4, 2, 10, 5); + frame = new TQFrame(beatBox); + layout = new TQGridLayout(frame, 4, 2, 10, 5); - layout->addWidget(new QLabel(i18n("Resolution"), frame), 0, 0); + layout->addWidget(new TQLabel(i18n("Resolution"), frame), 0, 0); m_metronomeResolution = new KComboBox(frame); m_metronomeResolution->insertItem(i18n("None")); m_metronomeResolution->insertItem(i18n("Bars only")); m_metronomeResolution->insertItem(i18n("Bars and beats")); m_metronomeResolution->insertItem(i18n("Bars, beats, and divisions")); - connect(m_metronomeResolution, SIGNAL(activated(int)), this, SLOT(slotResolutionChanged(int))); + connect(m_metronomeResolution, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotResolutionChanged(int))); layout->addWidget(m_metronomeResolution, 0, 1); - layout->addWidget(new QLabel(i18n("Bar velocity"), frame), 1, 0); - m_metronomeBarVely = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Bar velocity"), frame), 1, 0); + m_metronomeBarVely = new TQSpinBox(frame); m_metronomeBarVely->setMinValue(0); m_metronomeBarVely->setMaxValue(127); - connect(m_metronomeBarVely, SIGNAL(valueChanged(int)), this, SLOT(slotSetModified())); + connect(m_metronomeBarVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); layout->addWidget(m_metronomeBarVely, 1, 1); - layout->addWidget(new QLabel(i18n("Beat velocity"), frame), 2, 0); - m_metronomeBeatVely = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Beat velocity"), frame), 2, 0); + m_metronomeBeatVely = new TQSpinBox(frame); m_metronomeBeatVely->setMinValue(0); m_metronomeBeatVely->setMaxValue(127); - connect(m_metronomeBeatVely, SIGNAL(valueChanged(int)), this, SLOT(slotSetModified())); + connect(m_metronomeBeatVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); layout->addWidget(m_metronomeBeatVely, 2, 1); - layout->addWidget(new QLabel(i18n("Sub-beat velocity"), frame), 3, 0); - m_metronomeSubBeatVely = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Sub-beat velocity"), frame), 3, 0); + m_metronomeSubBeatVely = new TQSpinBox(frame); m_metronomeSubBeatVely->setMinValue(0); m_metronomeSubBeatVely->setMaxValue(127); - connect(m_metronomeSubBeatVely, SIGNAL(valueChanged(int)), this, SLOT(slotSetModified())); + connect(m_metronomeSubBeatVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); layout->addWidget(m_metronomeSubBeatVely, 3, 1); - vbox = new QVBox(hbox); + vbox = new TQVBox(hbox); m_metronomePitch = new PitchChooser(i18n("Pitch"), vbox, 60); - connect(m_metronomePitch, SIGNAL(pitchChanged(int)), this, SLOT(slotPitchChanged(int))); - connect(m_metronomePitch, SIGNAL(preview(int)), this, SLOT(slotPreviewPitch(int))); + connect(m_metronomePitch, TQT_SIGNAL(pitchChanged(int)), this, TQT_SLOT(slotPitchChanged(int))); + connect(m_metronomePitch, TQT_SIGNAL(preview(int)), this, TQT_SLOT(slotPreviewPitch(int))); m_metronomePitchSelector = new KComboBox(m_metronomePitch); m_metronomePitchSelector->insertItem(i18n("for Bar")); m_metronomePitchSelector->insertItem(i18n("for Beat")); m_metronomePitchSelector->insertItem(i18n("for Sub-beat")); - connect(m_metronomePitchSelector, SIGNAL(activated(int)), this, SLOT(slotPitchSelectorChanged(int))); + connect(m_metronomePitchSelector, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPitchSelectorChanged(int))); - QGroupBox *enableBox = new QGroupBox + TQGroupBox *enableBox = new QGroupBox (1, Horizontal, i18n("Metronome Activated"), vbox); - m_playEnabled = new QCheckBox(i18n("Playing"), enableBox); - m_recordEnabled = new QCheckBox(i18n("Recording"), enableBox); - connect(m_playEnabled, SIGNAL(clicked()), this, SLOT(slotSetModified())); - connect(m_recordEnabled, SIGNAL(clicked()), this, SLOT(slotSetModified())); + m_playEnabled = new TQCheckBox(i18n("Playing"), enableBox); + m_recordEnabled = new TQCheckBox(i18n("Recording"), enableBox); + connect(m_playEnabled, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetModified())); + connect(m_recordEnabled, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetModified())); // populate the dialog populate(m_metronomeDevice->currentItem()); // connect up the device list - connect(m_metronomeDevice, SIGNAL(activated(int)), - this, SLOT(populate(int))); + connect(m_metronomeDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(populate(int))); // connect up the device list - connect(m_metronomeDevice, SIGNAL(activated(int)), - this, SLOT(slotSetModified())); + connect(m_metronomeDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetModified())); setModified(false); } @@ -245,8 +245,8 @@ ManageMetronomeDialog::populate(int deviceIndex) int position = 0; int count = 0; for (iit = list.begin(); iit != list.end(); ++iit) { - QString iname(strtoqstr((*iit)->getPresentationName())); - QString pname(strtoqstr((*iit)->getProgramName())); + TQString iname(strtoqstr((*iit)->getPresentationName())); + TQString pname(strtoqstr((*iit)->getProgramName())); if (pname != "") iname += " (" + pname + ")"; diff --git a/src/gui/dialogs/ManageMetronomeDialog.h b/src/gui/dialogs/ManageMetronomeDialog.h index 08b806c..240c0b8 100644 --- a/src/gui/dialogs/ManageMetronomeDialog.h +++ b/src/gui/dialogs/ManageMetronomeDialog.h @@ -30,9 +30,9 @@ #include <kdialogbase.h> -class QWidget; -class QSpinBox; -class QCheckBox; +class TQWidget; +class TQSpinBox; +class TQCheckBox; class KComboBox; @@ -49,7 +49,7 @@ class ManageMetronomeDialog : public KDialogBase Q_OBJECT public: - ManageMetronomeDialog(QWidget *parent, RosegardenGUIDoc *doc); + ManageMetronomeDialog(TQWidget *parent, RosegardenGUIDoc *doc); void setModified(bool value); @@ -75,12 +75,12 @@ protected: KComboBox *m_metronomeResolution; KComboBox *m_metronomePitchSelector; PitchChooser *m_metronomePitch; - QSpinBox *m_metronomeBarVely; - QSpinBox *m_metronomeBeatVely; - QSpinBox *m_metronomeSubBeatVely; + TQSpinBox *m_metronomeBarVely; + TQSpinBox *m_metronomeBeatVely; + TQSpinBox *m_metronomeSubBeatVely; InstrumentParameterBox *m_instrumentParameterBox; - QCheckBox *m_playEnabled; - QCheckBox *m_recordEnabled; + TQCheckBox *m_playEnabled; + TQCheckBox *m_recordEnabled; bool m_modified; MidiByte m_barPitch; diff --git a/src/gui/dialogs/MarkerModifyDialog.cpp b/src/gui/dialogs/MarkerModifyDialog.cpp index 69e658b..9303b67 100644 --- a/src/gui/dialogs/MarkerModifyDialog.cpp +++ b/src/gui/dialogs/MarkerModifyDialog.cpp @@ -24,38 +24,38 @@ #include "MarkerModifyDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "base/Composition.h" #include "document/RosegardenGUIDoc.h" #include "gui/widgets/TimeWidget.h" #include <kdialogbase.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> #include "misc/Strings.h" namespace Rosegarden { -MarkerModifyDialog::MarkerModifyDialog(QWidget *parent, +MarkerModifyDialog::MarkerModifyDialog(TQWidget *parent, Composition *composition, int time, - const QString &name, - const QString &des): + const TQString &name, + const TQString &des): KDialogBase(parent, 0, true, i18n("Edit Marker"), Ok | Cancel) { initialise(composition, time, name, des); } -MarkerModifyDialog::MarkerModifyDialog(QWidget *parent, +MarkerModifyDialog::MarkerModifyDialog(TQWidget *parent, Composition *composition, Marker *marker) : KDialogBase(parent, 0, true, i18n("Edit Marker"), Ok | Cancel) @@ -68,20 +68,20 @@ MarkerModifyDialog::MarkerModifyDialog(QWidget *parent, void MarkerModifyDialog::initialise(Composition *composition, int time, - const QString &name, - const QString &des) + const TQString &name, + const TQString &des) { m_originalTime = time; - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_timeEdit = new TimeWidget(i18n("Marker Time"), vbox, composition, time); /*!!! - layout->addWidget(new QLabel(i18n("Absolute Time:"), frame), 0, 0); - m_timeEdit = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Absolute Time:"), frame), 0, 0); + m_timeEdit = new TQSpinBox(frame); layout->addWidget(m_timeEdit, 0, 1); m_timeEdit->setMinValue(INT_MIN); @@ -90,19 +90,19 @@ MarkerModifyDialog::initialise(Composition *composition, Note(Note::Shortest).getDuration()); m_timeEdit->setValue(time); */ - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Marker Properties"), vbox); - QFrame *frame = new QFrame(groupBox); + TQFrame *frame = new TQFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 2, 2, 5, 5); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 5, 5); - layout->addWidget(new QLabel(i18n("Text:"), frame), 0, 0); - m_nameEdit = new QLineEdit(name, frame); + layout->addWidget(new TQLabel(i18n("Text:"), frame), 0, 0); + m_nameEdit = new TQLineEdit(name, frame); layout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new QLabel(i18n("Description:"), frame), 1, 0); - m_desEdit = new QLineEdit(des, frame); + layout->addWidget(new TQLabel(i18n("Description:"), frame), 1, 0); + m_desEdit = new TQLineEdit(des, frame); layout->addWidget(m_desEdit, 1, 1); m_nameEdit->selectAll(); diff --git a/src/gui/dialogs/MarkerModifyDialog.h b/src/gui/dialogs/MarkerModifyDialog.h index 5b87b14..da4894b 100644 --- a/src/gui/dialogs/MarkerModifyDialog.h +++ b/src/gui/dialogs/MarkerModifyDialog.h @@ -27,8 +27,8 @@ #define _RG_MARKERMODIFYDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> -#include <qlineedit.h> +#include <tqstring.h> +#include <tqlineedit.h> #include "base/Marker.h" #include "gui/widgets/TimeWidget.h" @@ -46,32 +46,32 @@ class MarkerModifyDialog : public KDialogBase { Q_OBJECT public: - MarkerModifyDialog(QWidget *parent, + MarkerModifyDialog(TQWidget *parent, Composition *composition, int time, - const QString &name, - const QString &des); + const TQString &name, + const TQString &des); - MarkerModifyDialog(QWidget *parent, + MarkerModifyDialog(TQWidget *parent, Composition *composition, Marker *marker); - QString getName() const { return m_nameEdit->text(); } - QString getDescription() const { return m_desEdit->text(); } + TQString getName() const { return m_nameEdit->text(); } + TQString getDescription() const { return m_desEdit->text(); } int getTime() const { return m_timeEdit->getTime(); } int getOriginalTime() const { return m_originalTime; } protected: void initialise(Composition *composition, int time, - const QString &name, - const QString &des); + const TQString &name, + const TQString &des); RosegardenGUIDoc *m_doc; TimeWidget *m_timeEdit; - QLineEdit *m_nameEdit; - QLineEdit *m_desEdit; + TQLineEdit *m_nameEdit; + TQLineEdit *m_desEdit; int m_originalTime; }; diff --git a/src/gui/dialogs/PasteNotationDialog.cpp b/src/gui/dialogs/PasteNotationDialog.cpp index 0c725d5..cea3b87 100644 --- a/src/gui/dialogs/PasteNotationDialog.cpp +++ b/src/gui/dialogs/PasteNotationDialog.cpp @@ -28,27 +28,27 @@ #include <klocale.h> #include "commands/edit/PasteEventsCommand.h" #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qobject.h> -#include <qradiobutton.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqobject.h> +#include <tqradiobutton.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -PasteNotationDialog::PasteNotationDialog(QWidget *parent, +PasteNotationDialog::PasteNotationDialog(TQWidget *parent, PasteEventsCommand::PasteType defaultType) : KDialogBase(parent, 0, true, i18n("Paste"), Ok | Cancel | Help ), m_defaultType(defaultType) { setHelp("nv-paste-types"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QButtonGroup *pasteTypeGroup = new QButtonGroup + TQButtonGroup *pasteTypeGroup = new QButtonGroup (1, Horizontal, i18n("Paste type"), vbox); PasteEventsCommand::PasteTypeMap pasteTypes = @@ -57,15 +57,15 @@ PasteNotationDialog::PasteNotationDialog(QWidget *parent, for (PasteEventsCommand::PasteTypeMap::iterator i = pasteTypes.begin(); i != pasteTypes.end(); ++i) { - QRadioButton *button = new QRadioButton(i->second, pasteTypeGroup); + TQRadioButton *button = new TQRadioButton(i->second, pasteTypeGroup); button->setChecked(m_defaultType == i->first); - QObject::connect(button, SIGNAL(clicked()), - this, SLOT(slotPasteTypeChanged())); + TQObject::connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotPasteTypeChanged())); m_pasteTypeButtons.push_back(button); } - QButtonGroup *setAsDefaultGroup = new QButtonGroup + TQButtonGroup *setAsDefaultGroup = new QButtonGroup (1, Horizontal, i18n("Options"), vbox); m_setAsDefaultButton = new QCheckBox diff --git a/src/gui/dialogs/PasteNotationDialog.h b/src/gui/dialogs/PasteNotationDialog.h index 213eaf8..bff6d7e 100644 --- a/src/gui/dialogs/PasteNotationDialog.h +++ b/src/gui/dialogs/PasteNotationDialog.h @@ -31,9 +31,9 @@ #include <vector> -class QWidget; -class QRadioButton; -class QCheckBox; +class TQWidget; +class TQRadioButton; +class TQCheckBox; namespace Rosegarden @@ -46,7 +46,7 @@ class PasteNotationDialog : public KDialogBase Q_OBJECT public: - PasteNotationDialog(QWidget *parent, + PasteNotationDialog(TQWidget *parent, PasteEventsCommand::PasteType defaultType); PasteEventsCommand::PasteType getPasteType() const; @@ -59,8 +59,8 @@ protected: //--------------- Data members --------------------------------- - std::vector<QRadioButton *> m_pasteTypeButtons; - QCheckBox *m_setAsDefaultButton; + std::vector<TQRadioButton *> m_pasteTypeButtons; + TQCheckBox *m_setAsDefaultButton; PasteEventsCommand::PasteType m_defaultType; }; diff --git a/src/gui/dialogs/PitchDialog.cpp b/src/gui/dialogs/PitchDialog.cpp index 05fed08..c484142 100644 --- a/src/gui/dialogs/PitchDialog.cpp +++ b/src/gui/dialogs/PitchDialog.cpp @@ -28,23 +28,23 @@ #include <klocale.h> #include "gui/widgets/PitchChooser.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -PitchDialog::PitchDialog(QWidget *parent, QString title, int defaultPitch) : +PitchDialog::PitchDialog(TQWidget *parent, TQString title, int defaultPitch) : KDialogBase(parent, 0, true, title, User1 | Ok) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_pitchChooser = new PitchChooser(title, vbox, defaultPitch); setButtonText(User1, i18n("Reset")); - connect(this, SIGNAL(user1Clicked()), - m_pitchChooser, SLOT(slotResetToDefault())); + connect(this, TQT_SIGNAL(user1Clicked()), + m_pitchChooser, TQT_SLOT(slotResetToDefault())); } int diff --git a/src/gui/dialogs/PitchDialog.h b/src/gui/dialogs/PitchDialog.h index 72e6381..8a4cce7 100644 --- a/src/gui/dialogs/PitchDialog.h +++ b/src/gui/dialogs/PitchDialog.h @@ -27,10 +27,10 @@ #define _RG_PITCHDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -43,7 +43,7 @@ class PitchDialog : public KDialogBase { Q_OBJECT public: - PitchDialog(QWidget *parent, QString title, int defaultPitch = 60); + PitchDialog(TQWidget *parent, TQString title, int defaultPitch = 60); int getPitch() const; diff --git a/src/gui/dialogs/PitchPickerDialog.cpp b/src/gui/dialogs/PitchPickerDialog.cpp index ddd1f23..dddc2a3 100644 --- a/src/gui/dialogs/PitchPickerDialog.cpp +++ b/src/gui/dialogs/PitchPickerDialog.cpp @@ -26,24 +26,24 @@ #include "PitchPickerDialog.h" #include <klocale.h> #include <kdialogbase.h> -#include <qlayout.h> -#include <qframe.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -PitchPickerDialog::PitchPickerDialog(QWidget *parent, int initialPitch, QString text) : +PitchPickerDialog::PitchPickerDialog(TQWidget *parent, int initialPitch, TQString text) : KDialogBase(parent, 0, true, i18n("Pitch Selector"), Ok | Cancel) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QFrame *frame = new QFrame(vBox); + TQFrame *frame = new TQFrame(vBox); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); m_pitch = new PitchChooser(text, frame, initialPitch); layout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, Qt::AlignHCenter); diff --git a/src/gui/dialogs/PitchPickerDialog.h b/src/gui/dialogs/PitchPickerDialog.h index ebd0a6d..25fc28f 100644 --- a/src/gui/dialogs/PitchPickerDialog.h +++ b/src/gui/dialogs/PitchPickerDialog.h @@ -30,7 +30,7 @@ #include <kdialogbase.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -42,7 +42,7 @@ class PitchPickerDialog : public KDialogBase public: - PitchPickerDialog(QWidget* parent, int initialPitch, QString text); + PitchPickerDialog(TQWidget* parent, int initialPitch, TQString text); ~PitchPickerDialog(); int getPitch() { return m_pitch->getPitch(); } diff --git a/src/gui/dialogs/QuantizeDialog.cpp b/src/gui/dialogs/QuantizeDialog.cpp index b934dd5..87d7f79 100644 --- a/src/gui/dialogs/QuantizeDialog.cpp +++ b/src/gui/dialogs/QuantizeDialog.cpp @@ -29,19 +29,19 @@ #include "base/Quantizer.h" #include "gui/widgets/QuantizeParameters.h" #include <kdialogbase.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -QuantizeDialog::QuantizeDialog(QWidget *parent, bool inNotation) : +QuantizeDialog::QuantizeDialog(TQWidget *parent, bool inNotation) : KDialogBase(parent, 0, true, i18n("Quantize"), Ok | Cancel | Details | Help) { setHelp("quantization"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_quantizeFrame = new QuantizeParameters diff --git a/src/gui/dialogs/QuantizeDialog.h b/src/gui/dialogs/QuantizeDialog.h index a787dd1..fa6f07e 100644 --- a/src/gui/dialogs/QuantizeDialog.h +++ b/src/gui/dialogs/QuantizeDialog.h @@ -29,7 +29,7 @@ #include <kdialogbase.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -44,7 +44,7 @@ class QuantizeDialog : public KDialogBase Q_OBJECT public: - QuantizeDialog(QWidget *parent, bool inNotation = false); + QuantizeDialog(TQWidget *parent, bool inNotation = false); /// Returned quantizer object is on heap -- caller must delete Quantizer *getQuantizer() const; diff --git a/src/gui/dialogs/RescaleDialog.cpp b/src/gui/dialogs/RescaleDialog.cpp index d99a6fb..f47cafb 100644 --- a/src/gui/dialogs/RescaleDialog.cpp +++ b/src/gui/dialogs/RescaleDialog.cpp @@ -31,18 +31,18 @@ #include "gui/widgets/TimeWidget.h" #include <kconfig.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <kapplication.h> namespace Rosegarden { -RescaleDialog::RescaleDialog(QWidget *parent, +RescaleDialog::RescaleDialog(TQWidget *parent, Composition *composition, timeT startTime, timeT originalDuration, @@ -50,7 +50,7 @@ RescaleDialog::RescaleDialog(QWidget *parent, bool constrainToCompositionDuration) : KDialogBase(parent, 0, true, i18n("Rescale"), User1 | Ok | Cancel) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_newDuration = new TimeWidget (i18n("Duration of selection"), vbox, composition, @@ -58,8 +58,8 @@ RescaleDialog::RescaleDialog(QWidget *parent, constrainToCompositionDuration); if (showCloseGapOption) { - QGroupBox *optionBox = new QGroupBox(1, Horizontal, i18n("Options"), vbox); - m_closeGap = new QCheckBox(i18n("Adjust times of following events accordingly"), + TQGroupBox *optionBox = new TQGroupBox(1, Horizontal, i18n("Options"), vbox); + m_closeGap = new TQCheckBox(i18n("Adjust times of following events accordingly"), optionBox); KConfig *config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); @@ -70,8 +70,8 @@ RescaleDialog::RescaleDialog(QWidget *parent, } setButtonText(User1, i18n("Reset")); - connect(this, SIGNAL(user1Clicked()), - m_newDuration, SLOT(slotResetToDefault())); + connect(this, TQT_SIGNAL(user1Clicked()), + m_newDuration, TQT_SLOT(slotResetToDefault())); } timeT @@ -111,7 +111,7 @@ RescaleDialog::slotFromChanged(int i) { m_from = i + 1; int perTenThou = m_to * 10000 / m_from; - m_percent->setText(QString("%1.%2%"). + m_percent->setText(TQString("%1.%2%"). arg(perTenThou / 100). arg(perTenThou % 100)); } @@ -121,7 +121,7 @@ RescaleDialog::slotToChanged(int i) { m_to = i + 1; int perTenThou = m_to * 10000 / m_from; - m_percent->setText(QString("%1.%2%"). + m_percent->setText(TQString("%1.%2%"). arg(perTenThou / 100). arg(perTenThou % 100)); } diff --git a/src/gui/dialogs/RescaleDialog.h b/src/gui/dialogs/RescaleDialog.h index 196dd87..dedf1a1 100644 --- a/src/gui/dialogs/RescaleDialog.h +++ b/src/gui/dialogs/RescaleDialog.h @@ -30,8 +30,8 @@ #include "base/Event.h" -class QWidget; -class QCheckBox; +class TQWidget; +class TQCheckBox; namespace Rosegarden @@ -46,7 +46,7 @@ class RescaleDialog : public KDialogBase Q_OBJECT public: - RescaleDialog(QWidget *parent, + RescaleDialog(TQWidget *parent, Composition *composition, // for TimeWidget calculations timeT startTime, timeT originalDuration, @@ -58,7 +58,7 @@ public: protected: TimeWidget *m_newDuration; - QCheckBox *m_closeGap; + TQCheckBox *m_closeGap; }; diff --git a/src/gui/dialogs/ShowSequencerStatusDialog.cpp b/src/gui/dialogs/ShowSequencerStatusDialog.cpp index d98933c..240adfe 100644 --- a/src/gui/dialogs/ShowSequencerStatusDialog.cpp +++ b/src/gui/dialogs/ShowSequencerStatusDialog.cpp @@ -27,38 +27,38 @@ #include <klocale.h> #include <kdialogbase.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qlabel.h> -#include <qstring.h> -#include <qtextedit.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqtextedit.h> +#include <tqvbox.h> +#include <tqwidget.h> #include "gui/application/RosegardenApplication.h" namespace Rosegarden { -ShowSequencerStatusDialog::ShowSequencerStatusDialog(QWidget *parent) : +ShowSequencerStatusDialog::ShowSequencerStatusDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Sequencer status"), Close) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - new QLabel(i18n("Sequencer status:"), vbox); + new TQLabel(i18n("Sequencer status:"), vbox); - QString status(i18n("Status not available.")); + TQString status(i18n("Status not available.")); - QCString replyType; - QByteArray replyData; - QByteArray data; + TQCString replyType; + TQByteArray replyData; + TQByteArray data; if (!rgapp->sequencerCall("getStatusLog()", replyType, replyData)) { status = i18n("Sequencer is not running or is not responding."); } - QDataStream streamIn(replyData, IO_ReadOnly); - QString result; + TQDataStream streamIn(replyData, IO_ReadOnly); + TQString result; streamIn >> result; if (!result) { status = i18n("Sequencer is not returning a valid status report."); @@ -66,7 +66,7 @@ ShowSequencerStatusDialog::ShowSequencerStatusDialog(QWidget *parent) : status = result; } - QTextEdit *text = new QTextEdit(vbox); + TQTextEdit *text = new TQTextEdit(vbox); text->setTextFormat(Qt::PlainText); text->setReadOnly(true); text->setMinimumWidth(500); diff --git a/src/gui/dialogs/ShowSequencerStatusDialog.h b/src/gui/dialogs/ShowSequencerStatusDialog.h index ce21ab1..9b7ad41 100644 --- a/src/gui/dialogs/ShowSequencerStatusDialog.h +++ b/src/gui/dialogs/ShowSequencerStatusDialog.h @@ -29,7 +29,7 @@ #include <kdialogbase.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -41,7 +41,7 @@ class ShowSequencerStatusDialog : public KDialogBase { Q_OBJECT public: - ShowSequencerStatusDialog(QWidget *parent); + ShowSequencerStatusDialog(TQWidget *parent); }; diff --git a/src/gui/dialogs/SimpleEventEditDialog.cpp b/src/gui/dialogs/SimpleEventEditDialog.cpp index ca6b76a..152748a 100644 --- a/src/gui/dialogs/SimpleEventEditDialog.cpp +++ b/src/gui/dialogs/SimpleEventEditDialog.cpp @@ -24,7 +24,7 @@ #include "SimpleEventEditDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include "base/BaseProperties.h" #include "base/Event.h" @@ -39,24 +39,24 @@ #include <kdialogbase.h> #include <kfiledialog.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qfile.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqfile.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent, +SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, RosegardenGUIDoc *doc, const Event &event, bool inserting) : @@ -69,16 +69,16 @@ SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent, m_duration(event.getDuration()), m_modified(false) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Event Properties"), vbox); - QFrame *frame = new QFrame(groupBox); + TQFrame *frame = new TQFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 7, 3, 5, 5); + TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5); - layout->addWidget(new QLabel(i18n("Event type:"), frame), 0, 0); + layout->addWidget(new TQLabel(i18n("Event type:"), frame), 0, 0); if (inserting) { @@ -103,128 +103,128 @@ SimpleEventEditDialog::SimpleEventEditDialog(QWidget *parent, // Connect up the combos // - connect(m_typeCombo, SIGNAL(activated(int)), - SLOT(slotEventTypeChanged(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotEventTypeChanged(int))); } else { m_typeCombo = 0; - m_typeLabel = new QLabel(frame); + m_typeLabel = new TQLabel(frame); layout->addWidget(m_typeLabel, 0, 1); } - m_timeLabel = new QLabel(i18n("Absolute time:"), frame); + m_timeLabel = new TQLabel(i18n("Absolute time:"), frame); layout->addWidget(m_timeLabel, 1, 0); - m_timeSpinBox = new QSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); - m_timeEditButton = new QPushButton("edit", frame); + m_timeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); + m_timeEditButton = new TQPushButton("edit", frame); layout->addWidget(m_timeSpinBox, 1, 1); layout->addWidget(m_timeEditButton, 1, 2); - connect(m_timeSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotAbsoluteTimeChanged(int))); - connect(m_timeEditButton, SIGNAL(released()), - SLOT(slotEditAbsoluteTime())); + connect(m_timeSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotAbsoluteTimeChanged(int))); + connect(m_timeEditButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditAbsoluteTime())); - m_durationLabel = new QLabel(i18n("Duration:"), frame); + m_durationLabel = new TQLabel(i18n("Duration:"), frame); layout->addWidget(m_durationLabel, 2, 0); - m_durationSpinBox = new QSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); - m_durationEditButton = new QPushButton("edit", frame); + m_durationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); + m_durationEditButton = new TQPushButton("edit", frame); layout->addWidget(m_durationSpinBox, 2, 1); layout->addWidget(m_durationEditButton, 2, 2); - connect(m_durationSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotDurationChanged(int))); - connect(m_durationEditButton, SIGNAL(released()), - SLOT(slotEditDuration())); + connect(m_durationSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotDurationChanged(int))); + connect(m_durationEditButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditDuration())); - m_pitchLabel = new QLabel(i18n("Pitch:"), frame); + m_pitchLabel = new TQLabel(i18n("Pitch:"), frame); layout->addWidget(m_pitchLabel, 3, 0); - m_pitchSpinBox = new QSpinBox(frame); - m_pitchEditButton = new QPushButton("edit", frame); + m_pitchSpinBox = new TQSpinBox(frame); + m_pitchEditButton = new TQPushButton("edit", frame); layout->addWidget(m_pitchSpinBox, 3, 1); layout->addWidget(m_pitchEditButton, 3, 2); - connect(m_pitchSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotPitchChanged(int))); - connect(m_pitchEditButton, SIGNAL(released()), - SLOT(slotEditPitch())); + connect(m_pitchSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotPitchChanged(int))); + connect(m_pitchEditButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditPitch())); m_pitchSpinBox->setMinValue(MidiMinValue); m_pitchSpinBox->setMaxValue(MidiMaxValue); - m_controllerLabel = new QLabel(i18n("Controller name:"), frame); - m_controllerLabelValue = new QLabel(i18n("<none>"), frame); - m_controllerLabelValue->setAlignment(QLabel::AlignRight); + m_controllerLabel = new TQLabel(i18n("Controller name:"), frame); + m_controllerLabelValue = new TQLabel(i18n("<none>"), frame); + m_controllerLabelValue->setAlignment(TQLabel::AlignRight); layout->addWidget(m_controllerLabel, 4, 0); layout->addWidget(m_controllerLabelValue, 4, 1); - m_velocityLabel = new QLabel(i18n("Velocity:"), frame); + m_velocityLabel = new TQLabel(i18n("Velocity:"), frame); layout->addWidget(m_velocityLabel, 5, 0); - m_velocitySpinBox = new QSpinBox(frame); + m_velocitySpinBox = new TQSpinBox(frame); layout->addWidget(m_velocitySpinBox, 5, 1); - connect(m_velocitySpinBox, SIGNAL(valueChanged(int)), - SLOT(slotVelocityChanged(int))); + connect(m_velocitySpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotVelocityChanged(int))); m_velocitySpinBox->setMinValue(MidiMinValue); m_velocitySpinBox->setMaxValue(MidiMaxValue); - m_metaLabel = new QLabel(i18n("Meta string:"), frame); + m_metaLabel = new TQLabel(i18n("Meta string:"), frame); layout->addWidget(m_metaLabel, 6, 0); - m_metaEdit = new QLineEdit(frame); + m_metaEdit = new TQLineEdit(frame); layout->addWidget(m_metaEdit, 6, 1); - m_sysexLoadButton = new QPushButton(i18n("Load data"), frame); + m_sysexLoadButton = new TQPushButton(i18n("Load data"), frame); layout->addWidget(m_sysexLoadButton, 6, 2); - m_sysexSaveButton = new QPushButton(i18n("Save data"), frame); + m_sysexSaveButton = new TQPushButton(i18n("Save data"), frame); layout->addWidget(m_sysexSaveButton, 4, 2); - connect(m_metaEdit, SIGNAL(textChanged(const QString &)), - SLOT(slotMetaChanged(const QString &))); - connect(m_sysexLoadButton, SIGNAL(released()), - SLOT(slotSysexLoad())); - connect(m_sysexSaveButton, SIGNAL(released()), - SLOT(slotSysexSave())); + connect(m_metaEdit, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(slotMetaChanged(const TQString &))); + connect(m_sysexLoadButton, TQT_SIGNAL(released()), + TQT_SLOT(slotSysexLoad())); + connect(m_sysexSaveButton, TQT_SIGNAL(released()), + TQT_SLOT(slotSysexSave())); m_notationGroupBox = new QGroupBox (1, Horizontal, i18n("Notation Properties"), vbox); - frame = new QFrame(m_notationGroupBox); + frame = new TQFrame(m_notationGroupBox); - layout = new QGridLayout(frame, 3, 3, 5, 5); + layout = new TQGridLayout(frame, 3, 3, 5, 5); - m_lockNotationValues = new QCheckBox(i18n("Lock to changes in performed values"), frame); + m_lockNotationValues = new TQCheckBox(i18n("Lock to changes in performed values"), frame); layout->addMultiCellWidget(m_lockNotationValues, 0, 0, 0, 2); m_lockNotationValues->setChecked(true); - connect(m_lockNotationValues, SIGNAL(released()), - SLOT(slotLockNotationChanged())); + connect(m_lockNotationValues, TQT_SIGNAL(released()), + TQT_SLOT(slotLockNotationChanged())); - m_notationTimeLabel = new QLabel(i18n("Notation time:"), frame); + m_notationTimeLabel = new TQLabel(i18n("Notation time:"), frame); layout->addWidget(m_notationTimeLabel, 1, 0); - m_notationTimeSpinBox = new QSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); - m_notationTimeEditButton = new QPushButton("edit", frame); + m_notationTimeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); + m_notationTimeEditButton = new TQPushButton("edit", frame); layout->addWidget(m_notationTimeSpinBox, 1, 1); layout->addWidget(m_notationTimeEditButton, 1, 2); - connect(m_notationTimeSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotNotationAbsoluteTimeChanged(int))); - connect(m_notationTimeEditButton, SIGNAL(released()), - SLOT(slotEditNotationAbsoluteTime())); + connect(m_notationTimeSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotNotationAbsoluteTimeChanged(int))); + connect(m_notationTimeEditButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditNotationAbsoluteTime())); - m_notationDurationLabel = new QLabel(i18n("Notation duration:"), frame); + m_notationDurationLabel = new TQLabel(i18n("Notation duration:"), frame); layout->addWidget(m_notationDurationLabel, 2, 0); - m_notationDurationSpinBox = new QSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); - m_notationDurationEditButton = new QPushButton("edit", frame); + m_notationDurationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); + m_notationDurationEditButton = new TQPushButton("edit", frame); layout->addWidget(m_notationDurationSpinBox, 2, 1); layout->addWidget(m_notationDurationEditButton, 2, 2); - connect(m_notationDurationSpinBox, SIGNAL(valueChanged(int)), - SLOT(slotNotationDurationChanged(int))); - connect(m_notationDurationEditButton, SIGNAL(released()), - SLOT(slotEditNotationDuration())); + connect(m_notationDurationSpinBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotNotationDurationChanged(int))); + connect(m_notationDurationEditButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditNotationDuration())); setupForEvent(); } @@ -478,7 +478,7 @@ SimpleEventEditDialog::setupForEvent() m_metaLabel->setText(i18n("Data:")); try { SystemExclusive sysEx(m_event); - m_controllerLabelValue->setText(QString("%1"). + m_controllerLabelValue->setText(TQString("%1"). arg(sysEx.getRawData().length())); m_metaEdit->setText(strtoqstr(sysEx.getHexData())); } catch (...) { @@ -942,7 +942,7 @@ SimpleEventEditDialog::slotVelocityChanged(int value) } void -SimpleEventEditDialog::slotMetaChanged(const QString &) +SimpleEventEditDialog::slotMetaChanged(const TQString &) { m_modified = true; } @@ -964,7 +964,7 @@ SimpleEventEditDialog::slotEditAbsoluteTime() &m_doc->getComposition(), m_timeSpinBox->value(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_timeSpinBox->setValue(dialog.getTime()); } } @@ -976,7 +976,7 @@ SimpleEventEditDialog::slotEditNotationAbsoluteTime() &m_doc->getComposition(), m_notationTimeSpinBox->value(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_notationTimeSpinBox->setValue(dialog.getTime()); } } @@ -989,7 +989,7 @@ SimpleEventEditDialog::slotEditDuration() m_timeSpinBox->value(), m_durationSpinBox->value(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_durationSpinBox->setValue(dialog.getTime()); } } @@ -1002,7 +1002,7 @@ SimpleEventEditDialog::slotEditNotationDuration() m_notationTimeSpinBox->value(), m_notationDurationSpinBox->value(), true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_notationDurationSpinBox->setValue(dialog.getTime()); } } @@ -1011,7 +1011,7 @@ void SimpleEventEditDialog::slotEditPitch() { PitchDialog dialog(this, i18n("Edit Pitch"), m_pitchSpinBox->value()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_pitchSpinBox->setValue(dialog.getPitch()); } } @@ -1019,13 +1019,13 @@ SimpleEventEditDialog::slotEditPitch() void SimpleEventEditDialog::slotSysexLoad() { - QString path = KFileDialog::getOpenFileName(":SYSTEMEXCLUSIVE", + TQString path = KFileDialog::getOpenFileName(":SYSTEMEXCLUSIVE", i18n("*.syx|System exclusive files (*.syx)"), this, i18n("Load System Exclusive data in File")); if (path.isNull()) return ; - QFile file(path); + TQFile file(path); file.open(IO_ReadOnly); std::string s; unsigned char c; @@ -1044,13 +1044,13 @@ SimpleEventEditDialog::slotSysexLoad() void SimpleEventEditDialog::slotSysexSave() { - QString path = KFileDialog::getSaveFileName(":SYSTEMEXCLUSIVE", + TQString path = KFileDialog::getSaveFileName(":SYSTEMEXCLUSIVE", i18n("*.syx|System exclusive files (*.syx)"), this, i18n("Save System Exclusive data to...")); if (path.isNull()) return ; - QFile file(path); + TQFile file(path); file.open(IO_WriteOnly); SystemExclusive sysEx(m_event); file.writeBlock(sysEx.getRawData().c_str(), sysEx.getRawData().length()); diff --git a/src/gui/dialogs/SimpleEventEditDialog.h b/src/gui/dialogs/SimpleEventEditDialog.h index 60b8441..dcb1c60 100644 --- a/src/gui/dialogs/SimpleEventEditDialog.h +++ b/src/gui/dialogs/SimpleEventEditDialog.h @@ -31,14 +31,14 @@ #include <kdialogbase.h> -class QWidget; -class QString; -class QSpinBox; -class QPushButton; -class QLineEdit; -class QLabel; -class QGroupBox; -class QCheckBox; +class TQWidget; +class TQString; +class TQSpinBox; +class TQPushButton; +class TQLineEdit; +class TQLabel; +class TQGroupBox; +class TQCheckBox; class KComboBox; @@ -52,7 +52,7 @@ class SimpleEventEditDialog : public KDialogBase { Q_OBJECT public: - SimpleEventEditDialog(QWidget *parent, + SimpleEventEditDialog(TQWidget *parent, RosegardenGUIDoc *doc, const Event &event, bool inserting = false); // inserting or editing @@ -71,7 +71,7 @@ public slots: void slotNotationDurationChanged(int value); void slotPitchChanged(int value); void slotVelocityChanged(int value); - void slotMetaChanged(const QString &); + void slotMetaChanged(const TQString &); void slotEditAbsoluteTime(); void slotEditNotationAbsoluteTime(); void slotEditDuration(); @@ -92,37 +92,37 @@ protected: timeT m_notationDuration; KComboBox *m_typeCombo; - QLabel *m_typeLabel; - - QLabel *m_timeLabel; - QLabel *m_durationLabel; - QLabel *m_pitchLabel; - QLabel *m_velocityLabel; - QLabel *m_metaLabel; - QLabel *m_controllerLabel; - QLabel *m_controllerLabelValue; - - QSpinBox *m_timeSpinBox; - QSpinBox *m_durationSpinBox; - QSpinBox *m_pitchSpinBox; - QSpinBox *m_velocitySpinBox; - - QPushButton *m_timeEditButton; - QPushButton *m_durationEditButton; - QPushButton *m_pitchEditButton; - QPushButton *m_sysexLoadButton; - QPushButton *m_sysexSaveButton; - - QGroupBox *m_notationGroupBox; - QLabel *m_notationTimeLabel; - QLabel *m_notationDurationLabel; - QSpinBox *m_notationTimeSpinBox; - QSpinBox *m_notationDurationSpinBox; - QPushButton *m_notationTimeEditButton; - QPushButton *m_notationDurationEditButton; - QCheckBox *m_lockNotationValues; - - QLineEdit *m_metaEdit; + TQLabel *m_typeLabel; + + TQLabel *m_timeLabel; + TQLabel *m_durationLabel; + TQLabel *m_pitchLabel; + TQLabel *m_velocityLabel; + TQLabel *m_metaLabel; + TQLabel *m_controllerLabel; + TQLabel *m_controllerLabelValue; + + TQSpinBox *m_timeSpinBox; + TQSpinBox *m_durationSpinBox; + TQSpinBox *m_pitchSpinBox; + TQSpinBox *m_velocitySpinBox; + + TQPushButton *m_timeEditButton; + TQPushButton *m_durationEditButton; + TQPushButton *m_pitchEditButton; + TQPushButton *m_sysexLoadButton; + TQPushButton *m_sysexSaveButton; + + TQGroupBox *m_notationGroupBox; + TQLabel *m_notationTimeLabel; + TQLabel *m_notationDurationLabel; + TQSpinBox *m_notationTimeSpinBox; + TQSpinBox *m_notationDurationSpinBox; + TQPushButton *m_notationTimeEditButton; + TQPushButton *m_notationDurationEditButton; + TQCheckBox *m_lockNotationValues; + + TQLineEdit *m_metaEdit; bool m_modified; }; diff --git a/src/gui/dialogs/SplitByPitchDialog.cpp b/src/gui/dialogs/SplitByPitchDialog.cpp index 9b3dffa..9ff3772 100644 --- a/src/gui/dialogs/SplitByPitchDialog.cpp +++ b/src/gui/dialogs/SplitByPitchDialog.cpp @@ -31,39 +31,39 @@ #include "gui/widgets/PitchChooser.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { -SplitByPitchDialog::SplitByPitchDialog(QWidget *parent) : +SplitByPitchDialog::SplitByPitchDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Split by Pitch"), Ok | Cancel) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QFrame *frame = new QFrame(vBox); + TQFrame *frame = new TQFrame(vBox); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); m_pitch = new PitchChooser(i18n("Starting split pitch"), frame, 60); layout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, Qt::AlignHCenter); - m_range = new QCheckBox(i18n("Range up and down to follow music"), frame); + m_range = new TQCheckBox(i18n("Range up and down to follow music"), frame); layout->addMultiCellWidget(m_range, 1, 1, // fromRow, toRow 0, 2 // fromCol, toCol ); - m_duplicate = new QCheckBox(i18n("Duplicate non-note events"), frame); + m_duplicate = new TQCheckBox(i18n("Duplicate non-note events"), frame); layout->addMultiCellWidget(m_duplicate, 2, 2, 0, 2); - layout->addWidget(new QLabel(i18n("Clef handling:"), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("Clef handling:"), frame), 3, 0); m_clefs = new KComboBox(frame); m_clefs->insertItem(i18n("Leave clefs alone")); diff --git a/src/gui/dialogs/SplitByPitchDialog.h b/src/gui/dialogs/SplitByPitchDialog.h index 40a6fb8..ada2c24 100644 --- a/src/gui/dialogs/SplitByPitchDialog.h +++ b/src/gui/dialogs/SplitByPitchDialog.h @@ -29,8 +29,8 @@ #include <kdialogbase.h> -class QWidget; -class QCheckBox; +class TQWidget; +class TQCheckBox; class KComboBox; @@ -44,7 +44,7 @@ class SplitByPitchDialog : public KDialogBase { Q_OBJECT public: - SplitByPitchDialog(QWidget *parent); + SplitByPitchDialog(TQWidget *parent); int getPitch(); @@ -55,8 +55,8 @@ public: private: PitchChooser *m_pitch; - QCheckBox *m_range; - QCheckBox *m_duplicate; + TQCheckBox *m_range; + TQCheckBox *m_duplicate; KComboBox *m_clefs; }; diff --git a/src/gui/dialogs/SplitByRecordingSrcDialog.cpp b/src/gui/dialogs/SplitByRecordingSrcDialog.cpp index cc61bfa..91b8629 100644 --- a/src/gui/dialogs/SplitByRecordingSrcDialog.cpp +++ b/src/gui/dialogs/SplitByRecordingSrcDialog.cpp @@ -24,7 +24,7 @@ #include "SplitByRecordingSrcDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Strings.h" @@ -32,41 +32,41 @@ #include "document/RosegardenGUIDoc.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -SplitByRecordingSrcDialog::SplitByRecordingSrcDialog(QWidget *parent, RosegardenGUIDoc *doc) : +SplitByRecordingSrcDialog::SplitByRecordingSrcDialog(TQWidget *parent, RosegardenGUIDoc *doc) : KDialogBase(parent, 0, true, i18n("Split by Recording Source"), Ok | Cancel ) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Recording Source"), vBox); - QFrame *frame = new QFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 2, 2, 10, 5); + TQFrame *frame = new TQFrame(groupBox); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 10, 5); - layout->addWidget(new QLabel( i18n("Channel:"), frame ), 0, 0); + layout->addWidget(new TQLabel( i18n("Channel:"), frame ), 0, 0); m_channel = new KComboBox( frame ); m_channel->setSizeLimit( 17 ); layout->addWidget(m_channel, 0, 1); - QSpacerItem *spacer = new QSpacerItem( 1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem *spacer = new TQSpacerItem( 1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); layout->addItem( spacer, 0, 2 ); m_channel->insertItem(i18n("any")); for (int i = 1; i < 17; ++i) { - m_channel->insertItem(QString::number(i)); + m_channel->insertItem(TQString::number(i)); } - layout->addWidget(new QLabel( i18n("Device:"), frame ), 1, 0); + layout->addWidget(new TQLabel( i18n("Device:"), frame ), 1, 0); m_device = new KComboBox( frame ); layout->addMultiCellWidget( m_device, 1, 1, 1, 2 ); @@ -80,10 +80,10 @@ SplitByRecordingSrcDialog::SplitByRecordingSrcDialog(QWidget *parent, Rosegarden MidiDevice *dev = dynamic_cast<MidiDevice*>(*it); if (dev && dev->getDirection() == MidiDevice::Record) { - QString label = QString::number(dev->getId()); + TQString label = TQString::number(dev->getId()); label += ": "; label += strtoqstr(dev->getName()); - QString connection = strtoqstr(dev->getConnection()); + TQString connection = strtoqstr(dev->getConnection()); label += " - "; if (connection == "") label += i18n("No connection"); diff --git a/src/gui/dialogs/SplitByRecordingSrcDialog.h b/src/gui/dialogs/SplitByRecordingSrcDialog.h index af982a2..851c3f9 100644 --- a/src/gui/dialogs/SplitByRecordingSrcDialog.h +++ b/src/gui/dialogs/SplitByRecordingSrcDialog.h @@ -31,7 +31,7 @@ #include "gui/application/RosegardenDCOP.h" -class QWidget; +class TQWidget; class KComboBox; @@ -45,7 +45,7 @@ class SplitByRecordingSrcDialog : public KDialogBase { Q_OBJECT public: - SplitByRecordingSrcDialog(QWidget *parent, RosegardenGUIDoc *doc); + SplitByRecordingSrcDialog(TQWidget *parent, RosegardenGUIDoc *doc); int getChannel(); int getDevice(); diff --git a/src/gui/dialogs/TempoDialog.cpp b/src/gui/dialogs/TempoDialog.cpp index 3896fde..1edab6b 100644 --- a/src/gui/dialogs/TempoDialog.cpp +++ b/src/gui/dialogs/TempoDialog.cpp @@ -24,7 +24,7 @@ #include "TempoDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -36,22 +36,22 @@ #include "gui/widgets/TimeWidget.h" #include "gui/widgets/HSpinBox.h" #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, +TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, bool timeEditable): KDialogBase(parent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help), m_doc(doc), @@ -59,30 +59,30 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, { setHelp("tempo"); - QVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox(1, Horizontal, i18n("Tempo"), vbox); + TQVBox *vbox = makeVBoxMainWidget(); + TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Tempo"), vbox); - QFrame *frame = new QFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 5, 5); + TQFrame *frame = new TQFrame(groupBox); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 5, 5); // Set tempo - layout->addWidget(new QLabel(i18n("New tempo:"), frame), 0, 1); + layout->addWidget(new TQLabel(i18n("New tempo:"), frame), 0, 1); m_tempoValueSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5); layout->addWidget(m_tempoValueSpinBox, 0, 2); - connect(m_tempoValueSpinBox, SIGNAL(valueChanged(const QString &)), - SLOT(slotTempoChanged(const QString &))); + connect(m_tempoValueSpinBox, TQT_SIGNAL(valueChanged(const TQString &)), + TQT_SLOT(slotTempoChanged(const TQString &))); - m_tempoTap= new QPushButton(i18n("Tap"), frame); + m_tempoTap= new TQPushButton(i18n("Tap"), frame); layout->addWidget(m_tempoTap, 0, 3); - connect(m_tempoTap, SIGNAL(clicked()), SLOT(slotTapClicked())); + connect(m_tempoTap, TQT_SIGNAL(clicked()), TQT_SLOT(slotTapClicked())); - m_tempoConstant = new QRadioButton(i18n("Tempo is fixed until the following tempo change"), frame); - m_tempoRampToNext = new QRadioButton(i18n("Tempo ramps to the following tempo"), frame); - m_tempoRampToTarget = new QRadioButton(i18n("Tempo ramps to:"), frame); + m_tempoConstant = new TQRadioButton(i18n("Tempo is fixed until the following tempo change"), frame); + m_tempoRampToNext = new TQRadioButton(i18n("Tempo ramps to the following tempo"), frame); + m_tempoRampToTarget = new TQRadioButton(i18n("Tempo ramps to:"), frame); - // m_tempoTargetCheckBox = new QCheckBox(i18n("Ramping to:"), frame); + // m_tempoTargetCheckBox = new TQCheckBox(i18n("Ramping to:"), frame); m_tempoTargetSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5); // layout->addMultiCellWidget(m_tempoTargetCheckBox, 1, 1, 0, 1, AlignRight); @@ -93,24 +93,24 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, layout->addWidget(m_tempoRampToTarget, 3, 1); layout->addWidget(m_tempoTargetSpinBox, 3, 2); - // connect(m_tempoTargetCheckBox, SIGNAL(clicked()), - // SLOT(slotTargetCheckBoxClicked())); - connect(m_tempoConstant, SIGNAL(clicked()), - SLOT(slotTempoConstantClicked())); - connect(m_tempoRampToNext, SIGNAL(clicked()), - SLOT(slotTempoRampToNextClicked())); - connect(m_tempoRampToTarget, SIGNAL(clicked()), - SLOT(slotTempoRampToTargetClicked())); - connect(m_tempoTargetSpinBox, SIGNAL(valueChanged(const QString &)), - SLOT(slotTargetChanged(const QString &))); - - m_tempoBeatLabel = new QLabel(frame); + // connect(m_tempoTargetCheckBox, TQT_SIGNAL(clicked()), + // TQT_SLOT(slotTargetCheckBoxClicked())); + connect(m_tempoConstant, TQT_SIGNAL(clicked()), + TQT_SLOT(slotTempoConstantClicked())); + connect(m_tempoRampToNext, TQT_SIGNAL(clicked()), + TQT_SLOT(slotTempoRampToNextClicked())); + connect(m_tempoRampToTarget, TQT_SIGNAL(clicked()), + TQT_SLOT(slotTempoRampToTargetClicked())); + connect(m_tempoTargetSpinBox, TQT_SIGNAL(valueChanged(const TQString &)), + TQT_SLOT(slotTargetChanged(const TQString &))); + + m_tempoBeatLabel = new TQLabel(frame); layout->addWidget(m_tempoBeatLabel, 0, 4); - m_tempoBeat = new QLabel(frame); + m_tempoBeat = new TQLabel(frame); layout->addWidget(m_tempoBeat, 0, 5); - m_tempoBeatsPerMinute = new QLabel(frame); + m_tempoBeatsPerMinute = new TQLabel(frame); layout->addWidget(m_tempoBeatsPerMinute, 0, 6); m_timeEditor = 0; @@ -124,30 +124,30 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, } // Scope Box - QButtonGroup *scopeGroup = new QButtonGroup(1, Horizontal, + TQButtonGroup *scopeGroup = new TQButtonGroup(1, Horizontal, i18n("Scope"), vbox); -// new QLabel(scopeBox); +// new TQLabel(scopeBox); - QVBox *scopeBox = new QVBox(scopeGroup); + TQVBox *scopeBox = new TQVBox(scopeGroup); scopeBox->setSpacing(5); scopeBox->setMargin(5); - QHBox *currentBox = new QHBox(scopeBox); - new QLabel(i18n("The pointer is currently at "), currentBox); - m_tempoTimeLabel = new QLabel(currentBox); - m_tempoBarLabel = new QLabel(currentBox); - QLabel *spare = new QLabel(currentBox); + TQHBox *currentBox = new TQHBox(scopeBox); + new TQLabel(i18n("The pointer is currently at "), currentBox); + m_tempoTimeLabel = new TQLabel(currentBox); + m_tempoBarLabel = new TQLabel(currentBox); + TQLabel *spare = new TQLabel(currentBox); currentBox->setStretchFactor(spare, 20); - m_tempoStatusLabel = new QLabel(scopeBox); + m_tempoStatusLabel = new TQLabel(scopeBox); -// new QLabel(scopeBox); +// new TQLabel(scopeBox); - QHBox *changeWhereBox = new QHBox(scopeBox); - spare = new QLabel(" ", changeWhereBox); - QVBox *changeWhereVBox = new QVBox(changeWhereBox); + TQHBox *changeWhereBox = new TQHBox(scopeBox); + spare = new TQLabel(" ", changeWhereBox); + TQVBox *changeWhereVBox = new TQVBox(changeWhereBox); changeWhereBox->setStretchFactor(changeWhereVBox, 20); m_tempoChangeHere = new QRadioButton @@ -157,7 +157,7 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, m_tempoChangeBefore = new QRadioButton (i18n("Replace the last tempo change"), changeWhereVBox); - m_tempoChangeBeforeAt = new QLabel(changeWhereVBox); + m_tempoChangeBeforeAt = new TQLabel(changeWhereVBox); m_tempoChangeBeforeAt->hide(); m_tempoChangeStartOfBar = new QRadioButton @@ -166,23 +166,23 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, m_tempoChangeGlobal = new QRadioButton (i18n("Apply this tempo to the whole composition"), changeWhereVBox); - QHBox *optionHBox = new QHBox(changeWhereVBox); - new QLabel(" ", optionHBox); + TQHBox *optionHBox = new TQHBox(changeWhereVBox); + new TQLabel(" ", optionHBox); m_defaultBox = new QCheckBox (i18n("Also make this the default tempo"), optionHBox); - spare = new QLabel(optionHBox); + spare = new TQLabel(optionHBox); optionHBox->setStretchFactor(spare, 20); -// new QLabel(scopeBox); +// new TQLabel(scopeBox); - connect(m_tempoChangeHere, SIGNAL(clicked()), - SLOT(slotActionChanged())); - connect(m_tempoChangeBefore, SIGNAL(clicked()), - SLOT(slotActionChanged())); - connect(m_tempoChangeStartOfBar, SIGNAL(clicked()), - SLOT(slotActionChanged())); - connect(m_tempoChangeGlobal, SIGNAL(clicked()), - SLOT(slotActionChanged())); + connect(m_tempoChangeHere, TQT_SIGNAL(clicked()), + TQT_SLOT(slotActionChanged())); + connect(m_tempoChangeBefore, TQT_SIGNAL(clicked()), + TQT_SLOT(slotActionChanged())); + connect(m_tempoChangeStartOfBar, TQT_SIGNAL(clicked()), + TQT_SLOT(slotActionChanged())); + connect(m_tempoChangeGlobal, TQT_SIGNAL(clicked()), + TQT_SLOT(slotActionChanged())); m_tempoChangeHere->setChecked(true); @@ -251,7 +251,7 @@ TempoDialog::populateTempo() } RealTime tempoTime = comp.getElapsedRealTime(m_tempoTime); - QString milliSeconds; + TQString milliSeconds; milliSeconds.sprintf("%03d", tempoTime.msec()); m_tempoTimeLabel->setText(i18n("%1.%2 s,").arg(tempoTime.sec) .arg(milliSeconds)); @@ -278,7 +278,7 @@ TempoDialog::populateTempo() if (lastTempoTime < m_tempoTime) { RealTime lastRT = comp.getElapsedRealTime(lastTempoTime); - QString lastms; + TQString lastms; lastms.sprintf("%03d", lastRT.msec()); int lastBar = comp.getBarNumber(lastTempoTime); m_tempoChangeBeforeAt->setText @@ -343,8 +343,8 @@ TempoDialog::updateBeatLabels(double qpm) ("menu-no-note"))); m_tempoBeatsPerMinute->setText - // (QString("= %1 )").arg - (QString("= %1 ").arg + // (TQString("= %1 )").arg + (TQString("= %1 ").arg (int(qpm * Note(Note::Crotchet).getDuration() / beat))); m_tempoBeatLabel->show(); m_tempoBeat->show(); @@ -353,13 +353,13 @@ TempoDialog::updateBeatLabels(double qpm) } void -TempoDialog::slotTempoChanged(const QString &) +TempoDialog::slotTempoChanged(const TQString &) { updateBeatLabels(double(m_tempoValueSpinBox->valuef())); } void -TempoDialog::slotTargetChanged(const QString &) +TempoDialog::slotTargetChanged(const TQString &) { //... } @@ -443,9 +443,9 @@ TempoDialog::slotOk() void TempoDialog::slotTapClicked() { - QTime now = QTime::currentTime(); + TQTime now = TQTime::currentTime(); - if (m_tapMinusOne != QTime()) { + if (m_tapMinusOne != TQTime()) { int ms1 = m_tapMinusOne.msecsTo(now); @@ -453,7 +453,7 @@ TempoDialog::slotTapClicked() int msec = ms1; - if (m_tapMinusTwo != QTime()) { + if (m_tapMinusTwo != TQTime()) { int ms2 = m_tapMinusTwo.msecsTo(m_tapMinusOne); if (ms2 < 10000) { msec = (ms1 + ms2) / 2; diff --git a/src/gui/dialogs/TempoDialog.h b/src/gui/dialogs/TempoDialog.h index dd3edf1..db26ce7 100644 --- a/src/gui/dialogs/TempoDialog.h +++ b/src/gui/dialogs/TempoDialog.h @@ -29,15 +29,15 @@ #include <kdialogbase.h> #include "base/Event.h" #include "base/Composition.h" -#include <qpushbutton.h> -#include <qdatetime.h> +#include <tqpushbutton.h> +#include <tqdatetime.h> -class QWidget; -class QString; -class QRadioButton; -class QLabel; -class QCheckBox; +class TQWidget; +class TQString; +class TQRadioButton; +class TQLabel; +class TQCheckBox; namespace Rosegarden @@ -60,7 +60,7 @@ public: GlobalTempoWithDefault }; - TempoDialog(QWidget *parent, RosegardenGUIDoc *doc, + TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, bool timeEditable = false); ~TempoDialog(); @@ -71,11 +71,11 @@ public: public slots: virtual void slotOk(); void slotActionChanged(); - void slotTempoChanged(const QString &); + void slotTempoChanged(const TQString &); void slotTempoConstantClicked(); void slotTempoRampToNextClicked(); void slotTempoRampToTargetClicked(); - void slotTargetChanged(const QString &); + void slotTargetChanged(const TQString &); void slotTapClicked(); signals: @@ -95,31 +95,31 @@ protected: RosegardenGUIDoc *m_doc; timeT m_tempoTime; HSpinBox *m_tempoValueSpinBox; - QPushButton *m_tempoTap; - QTime m_tapMinusTwo; - QTime m_tapMinusOne; + TQPushButton *m_tempoTap; + TQTime m_tapMinusTwo; + TQTime m_tapMinusOne; - QRadioButton *m_tempoConstant; - QRadioButton *m_tempoRampToNext; - QRadioButton *m_tempoRampToTarget; + TQRadioButton *m_tempoConstant; + TQRadioButton *m_tempoRampToNext; + TQRadioButton *m_tempoRampToTarget; HSpinBox *m_tempoTargetSpinBox; - QLabel *m_tempoBeatLabel; - QLabel *m_tempoBeat; - QLabel *m_tempoBeatsPerMinute; + TQLabel *m_tempoBeatLabel; + TQLabel *m_tempoBeat; + TQLabel *m_tempoBeatsPerMinute; TimeWidget *m_timeEditor; - QLabel *m_tempoTimeLabel; - QLabel *m_tempoBarLabel; - QLabel *m_tempoStatusLabel; + TQLabel *m_tempoTimeLabel; + TQLabel *m_tempoBarLabel; + TQLabel *m_tempoStatusLabel; - QRadioButton *m_tempoChangeHere; - QRadioButton *m_tempoChangeBefore; - QLabel *m_tempoChangeBeforeAt; - QRadioButton *m_tempoChangeStartOfBar; - QRadioButton *m_tempoChangeGlobal; - QCheckBox *m_defaultBox; + TQRadioButton *m_tempoChangeHere; + TQRadioButton *m_tempoChangeBefore; + TQLabel *m_tempoChangeBeforeAt; + TQRadioButton *m_tempoChangeStartOfBar; + TQRadioButton *m_tempoChangeGlobal; + TQCheckBox *m_defaultBox; }; diff --git a/src/gui/dialogs/TextEventDialog.cpp b/src/gui/dialogs/TextEventDialog.cpp index 156b5d1..ef02fbd 100644 --- a/src/gui/dialogs/TextEventDialog.cpp +++ b/src/gui/dialogs/TextEventDialog.cpp @@ -34,23 +34,23 @@ #include <kcombobox.h> #include <kconfig.h> #include <kdialogbase.h> -#include <qbitmap.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qobject.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qspinbox.h> +#include <tqbitmap.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqspinbox.h> namespace Rosegarden { -TextEventDialog::TextEventDialog(QWidget *parent, +TextEventDialog::TextEventDialog(TQWidget *parent, NotePixmapFactory *npf, Text defaultText, int maxLength) : @@ -60,23 +60,23 @@ TextEventDialog::TextEventDialog(QWidget *parent, //m_directives(Text::getLilyPondDirectives()) */ { setHelp("nv-text"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *entryBox = new QGroupBox + TQGroupBox *entryBox = new QGroupBox (1, Horizontal, i18n("Specification"), vbox); - QGroupBox *exampleBox = new QGroupBox + TQGroupBox *exampleBox = new QGroupBox (1, Horizontal, i18n("Preview"), vbox); - QGrid *entryGrid = new QGrid(2, QGrid::Horizontal, entryBox); + TQGrid *entryGrid = new TQGrid(2, TQGrid::Horizontal, entryBox); - new QLabel(i18n("Text: "), entryGrid); - m_text = new QLineEdit(entryGrid); + new TQLabel(i18n("Text: "), entryGrid); + m_text = new TQLineEdit(entryGrid); m_text->setText(strtoqstr(defaultText.getText())); if (maxLength > 0) m_text->setMaxLength(maxLength); // style combo - new QLabel(i18n("Style: "), entryGrid); + new TQLabel(i18n("Style: "), entryGrid); m_typeCombo = new KComboBox(entryGrid); for (unsigned int i = 0; i < m_styles.size(); ++i) @@ -135,9 +135,9 @@ TextEventDialog::TextEventDialog(QWidget *parent, } } - m_verseLabel = new QLabel(i18n("Verse: "), entryGrid); + m_verseLabel = new TQLabel(i18n("Verse: "), entryGrid); m_verseLabel->hide(); - m_verseSpin = new QSpinBox(entryGrid); + m_verseSpin = new TQSpinBox(entryGrid); m_verseSpin->setMinValue(1); m_verseSpin->setMaxValue(12); m_verseSpin->setLineStep(1); @@ -145,7 +145,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_verseSpin->hide(); // dynamic shortcuts combo - m_dynamicShortcutLabel = new QLabel(i18n("Dynamic: "), entryGrid); + m_dynamicShortcutLabel = new TQLabel(i18n("Dynamic: "), entryGrid); m_dynamicShortcutLabel->hide(); m_dynamicShortcutCombo = new KComboBox(entryGrid); @@ -162,7 +162,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_dynamicShortcutCombo->hide(); // direction shortcuts combo - m_directionShortcutLabel = new QLabel(i18n("Direction: "), entryGrid); + m_directionShortcutLabel = new TQLabel(i18n("Direction: "), entryGrid); m_directionShortcutLabel->hide(); m_directionShortcutCombo = new KComboBox(entryGrid); @@ -181,7 +181,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_directionShortcutCombo->hide(); // local direction shortcuts combo - m_localDirectionShortcutLabel = new QLabel(i18n("Local Direction: "), entryGrid); + m_localDirectionShortcutLabel = new TQLabel(i18n("Local Direction: "), entryGrid); m_localDirectionShortcutLabel->hide(); m_localDirectionShortcutCombo = new KComboBox(entryGrid); @@ -207,7 +207,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_localDirectionShortcutCombo->hide(); // tempo shortcuts combo - m_tempoShortcutLabel = new QLabel(i18n("Tempo: "), entryGrid); + m_tempoShortcutLabel = new TQLabel(i18n("Tempo: "), entryGrid); m_tempoShortcutLabel->hide(); m_tempoShortcutCombo = new KComboBox(entryGrid); @@ -231,7 +231,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, // nobody is actually sure what is supposed to distinguish Tempo from // Local Tempo, or what this text style is supposed to be good for in the // way of standard notation) - m_localTempoShortcutLabel = new QLabel(i18n("Local Tempo: "), entryGrid); + m_localTempoShortcutLabel = new TQLabel(i18n("Local Tempo: "), entryGrid); m_localTempoShortcutLabel->hide(); m_localTempoShortcutCombo = new KComboBox(entryGrid); @@ -252,7 +252,7 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_localTempoShortcutCombo->hide(); // LilyPond directive combo - m_directiveLabel = new QLabel(i18n("Directive: "), entryGrid); + m_directiveLabel = new TQLabel(i18n("Directive: "), entryGrid); m_directiveLabel->hide(); m_lilyPondDirectiveCombo = new KComboBox(entryGrid); @@ -276,18 +276,18 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_lilyPondDirectiveCombo->insertItem(Text::Small); m_lilyPondDirectiveCombo->insertItem(Text::NormalSize); - QVBox *exampleVBox = new QVBox(exampleBox); + TQVBox *exampleVBox = new TQVBox(exampleBox); int ls = m_notePixmapFactory->getLineSpacing(); int mapWidth = 200; - QPixmap map(mapWidth, ls * 5 + 1); - QBitmap mask(mapWidth, ls * 5 + 1); + TQPixmap map(mapWidth, ls * 5 + 1); + TQBitmap mask(mapWidth, ls * 5 + 1); map.fill(); mask.fill(Qt::color0); - QPainter p, pm; + TQPainter p, pm; p.begin(&map); pm.begin(&mask); @@ -306,12 +306,12 @@ TextEventDialog::TextEventDialog(QWidget *parent, map.setMask(mask); - m_staffAboveLabel = new QLabel("staff", exampleVBox); + m_staffAboveLabel = new TQLabel("staff", exampleVBox); m_staffAboveLabel->setPixmap(map); - m_textExampleLabel = new QLabel(i18n("Example"), exampleVBox); + m_textExampleLabel = new TQLabel(i18n("Example"), exampleVBox); - m_staffBelowLabel = new QLabel("staff", exampleVBox); + m_staffBelowLabel = new TQLabel("staff", exampleVBox); m_staffBelowLabel->setPixmap(map); // restore last setting for shortcut combos @@ -329,23 +329,23 @@ TextEventDialog::TextEventDialog(QWidget *parent, m_prevLyric = config->readEntry("previous_lyric", ""); m_prevAnnotation = config->readEntry("previous_annotation", ""); - QObject::connect(m_text, SIGNAL(textChanged(const QString &)), - this, SLOT(slotTextChanged(const QString &))); - QObject::connect(m_typeCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotTypeChanged(const QString &))); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotOK())); - QObject::connect(m_dynamicShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotDynamicShortcutChanged(const QString &))); - QObject::connect(m_directionShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotDirectionShortcutChanged(const QString &))); - QObject::connect(m_localDirectionShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLocalDirectionShortcutChanged(const QString &))); - QObject::connect(m_tempoShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotTempoShortcutChanged(const QString &))); - QObject::connect(m_localTempoShortcutCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLocalTempoShortcutChanged(const QString &))); - QObject::connect(m_lilyPondDirectiveCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotLilyPondDirectiveChanged(const QString &))); + TQObject::connect(m_text, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotTextChanged(const TQString &))); + TQObject::connect(m_typeCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotTypeChanged(const TQString &))); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOK())); + TQObject::connect(m_dynamicShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotDynamicShortcutChanged(const TQString &))); + TQObject::connect(m_directionShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotDirectionShortcutChanged(const TQString &))); + TQObject::connect(m_localDirectionShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLocalDirectionShortcutChanged(const TQString &))); + TQObject::connect(m_tempoShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotTempoShortcutChanged(const TQString &))); + TQObject::connect(m_localTempoShortcutCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLocalTempoShortcutChanged(const TQString &))); + TQObject::connect(m_lilyPondDirectiveCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotLilyPondDirectiveChanged(const TQString &))); m_text->setFocus(); slotTypeChanged(strtoqstr(getTextType())); @@ -379,11 +379,11 @@ TextEventDialog::getTextString() const } void -TextEventDialog::slotTextChanged(const QString &qtext) +TextEventDialog::slotTextChanged(const TQString &qtext) { std::string type(getTextType()); - QString qtrunc(qtext); + TQString qtrunc(qtext); if (qtrunc.length() > 20) qtrunc = qtrunc.left(20) + "..."; std::string text(qstrtostr(qtrunc)); @@ -396,11 +396,11 @@ TextEventDialog::slotTextChanged(const QString &qtext) } void -TextEventDialog::slotTypeChanged(const QString &) +TextEventDialog::slotTypeChanged(const TQString &) { std::string type(getTextType()); - QString qtrunc(m_text->text()); + TQString qtrunc(m_text->text()); if (qtrunc.length() > 20) qtrunc = qtrunc.left(20) + "..."; std::string text(qstrtostr(qtrunc)); @@ -534,7 +534,7 @@ TextEventDialog::slotOK() } void -TextEventDialog::slotDynamicShortcutChanged(const QString &text) +TextEventDialog::slotDynamicShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_dynamicShortcutCombo->currentText())); @@ -544,7 +544,7 @@ TextEventDialog::slotDynamicShortcutChanged(const QString &text) } void -TextEventDialog::slotDirectionShortcutChanged(const QString &text) +TextEventDialog::slotDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_directionShortcutCombo->currentText())); @@ -554,7 +554,7 @@ TextEventDialog::slotDirectionShortcutChanged(const QString &text) } void -TextEventDialog::slotLocalDirectionShortcutChanged(const QString &text) +TextEventDialog::slotLocalDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_localDirectionShortcutCombo->currentText())); @@ -564,7 +564,7 @@ TextEventDialog::slotLocalDirectionShortcutChanged(const QString &text) } void -TextEventDialog::slotTempoShortcutChanged(const QString &text) +TextEventDialog::slotTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_tempoShortcutCombo->currentText())); @@ -574,7 +574,7 @@ TextEventDialog::slotTempoShortcutChanged(const QString &text) } void -TextEventDialog::slotLocalTempoShortcutChanged(const QString &text) +TextEventDialog::slotLocalTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { m_text->setText(strtoqstr(m_localTempoShortcutCombo->currentText())); @@ -584,7 +584,7 @@ TextEventDialog::slotLocalTempoShortcutChanged(const QString &text) } void -TextEventDialog::slotLilyPondDirectiveChanged(const QString &) +TextEventDialog::slotLilyPondDirectiveChanged(const TQString &) { m_text->setText(strtoqstr(m_lilyPondDirectiveCombo->currentText())); } diff --git a/src/gui/dialogs/TextEventDialog.h b/src/gui/dialogs/TextEventDialog.h index 0f389b0..d74fb00 100644 --- a/src/gui/dialogs/TextEventDialog.h +++ b/src/gui/dialogs/TextEventDialog.h @@ -29,15 +29,15 @@ #include "base/NotationTypes.h" #include <string> #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QLineEdit; -class QLabel; +class TQWidget; +class TQLineEdit; +class TQLabel; class KComboBox; -class QSpinBox; +class TQSpinBox; namespace Rosegarden { @@ -50,7 +50,7 @@ class TextEventDialog : public KDialogBase Q_OBJECT public: - TextEventDialog(QWidget *parent, + TextEventDialog(TQWidget *parent, NotePixmapFactory *npf, Text defaultText, int maxLength = -1); // for Qt default @@ -58,8 +58,8 @@ public: Text getText() const; public slots: - void slotTextChanged(const QString &); - void slotTypeChanged(const QString &); + void slotTextChanged(const TQString &); + void slotTypeChanged(const TQString &); /* * Save previous state of assorted widgets for restoration in the next @@ -68,18 +68,18 @@ public slots: void slotOK(); // convenience canned texts - void slotDynamicShortcutChanged(const QString &); - void slotDirectionShortcutChanged(const QString &); - void slotLocalDirectionShortcutChanged(const QString &); - void slotTempoShortcutChanged(const QString &); - void slotLocalTempoShortcutChanged(const QString &); + void slotDynamicShortcutChanged(const TQString &); + void slotDirectionShortcutChanged(const TQString &); + void slotLocalDirectionShortcutChanged(const TQString &); + void slotTempoShortcutChanged(const TQString &); + void slotLocalTempoShortcutChanged(const TQString &); // // special LilyPond directives, initial phase, as cheap text events; will // eventually move out of Text, and out of this dialog into // some other less cheesy interface // - void slotLilyPondDirectiveChanged(const QString &); + void slotLilyPondDirectiveChanged(const TQString &); protected: @@ -88,9 +88,9 @@ protected: //--------------- Data members --------------------------------- - QLineEdit *m_text; + TQLineEdit *m_text; KComboBox *m_typeCombo; - QSpinBox *m_verseSpin; + TQSpinBox *m_verseSpin; KComboBox *m_dynamicShortcutCombo; KComboBox *m_directionShortcutCombo; KComboBox *m_localDirectionShortcutCombo; @@ -100,21 +100,21 @@ protected: KComboBox *m_lilyPondDirectiveCombo; - QLabel *m_staffAboveLabel; - QLabel *m_textExampleLabel; - QLabel *m_staffBelowLabel; - QLabel *m_dynamicShortcutLabel; - QLabel *m_directionShortcutLabel; - QLabel *m_localDirectionShortcutLabel; - QLabel *m_tempoShortcutLabel; - QLabel *m_localTempoShortcutLabel; - QLabel *m_verseLabel; + TQLabel *m_staffAboveLabel; + TQLabel *m_textExampleLabel; + TQLabel *m_staffBelowLabel; + TQLabel *m_dynamicShortcutLabel; + TQLabel *m_directionShortcutLabel; + TQLabel *m_localDirectionShortcutLabel; + TQLabel *m_tempoShortcutLabel; + TQLabel *m_localTempoShortcutLabel; + TQLabel *m_verseLabel; // temporary home: - QLabel *m_directiveLabel; + TQLabel *m_directiveLabel; - QString m_prevChord; - QString m_prevLyric; - QString m_prevAnnotation; + TQString m_prevChord; + TQString m_prevLyric; + TQString m_prevAnnotation; NotePixmapFactory *m_notePixmapFactory; std::vector<std::string> m_styles; diff --git a/src/gui/dialogs/TimeDialog.cpp b/src/gui/dialogs/TimeDialog.cpp index 40d1da2..d4eb4b6 100644 --- a/src/gui/dialogs/TimeDialog.cpp +++ b/src/gui/dialogs/TimeDialog.cpp @@ -29,45 +29,45 @@ #include "base/Composition.h" #include "gui/widgets/TimeWidget.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -TimeDialog::TimeDialog(QWidget *parent, QString title, +TimeDialog::TimeDialog(TQWidget *parent, TQString title, Composition *composition, timeT defaultTime, bool constrainToCompositionDuration) : KDialogBase(parent, 0, true, title, User1 | Ok | Cancel) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_timeWidget = new TimeWidget (title, vbox, composition, defaultTime, true, constrainToCompositionDuration); setButtonText(User1, i18n("Reset")); - connect(this, SIGNAL(user1Clicked()), - m_timeWidget, SLOT(slotResetToDefault())); + connect(this, TQT_SIGNAL(user1Clicked()), + m_timeWidget, TQT_SLOT(slotResetToDefault())); } -TimeDialog::TimeDialog(QWidget *parent, QString title, +TimeDialog::TimeDialog(TQWidget *parent, TQString title, Composition *composition, timeT startTime, timeT defaultTime, bool constrainToCompositionDuration) : KDialogBase(parent, 0, true, title, User1 | Ok | Cancel) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); m_timeWidget = new TimeWidget (title, vbox, composition, startTime, defaultTime, true, constrainToCompositionDuration); setButtonText(User1, i18n("Reset")); - connect(this, SIGNAL(user1Clicked()), - m_timeWidget, SLOT(slotResetToDefault())); + connect(this, TQT_SIGNAL(user1Clicked()), + m_timeWidget, TQT_SLOT(slotResetToDefault())); } timeT diff --git a/src/gui/dialogs/TimeDialog.h b/src/gui/dialogs/TimeDialog.h index e12a007..d418234 100644 --- a/src/gui/dialogs/TimeDialog.h +++ b/src/gui/dialogs/TimeDialog.h @@ -27,11 +27,11 @@ #define _RG_TIMEDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; +class TQWidget; namespace Rosegarden @@ -46,11 +46,11 @@ class TimeDialog : public KDialogBase Q_OBJECT public: /// for absolute times - TimeDialog(QWidget *parent, QString title, Composition *composition, + TimeDialog(TQWidget *parent, TQString title, Composition *composition, timeT defaultTime, bool constrainToCompositionDuration); /// for durations - TimeDialog(QWidget *parent, QString title, Composition *composition, + TimeDialog(TQWidget *parent, TQString title, Composition *composition, timeT startTime, timeT defaultDuration, bool constrainToCompositionDuration); diff --git a/src/gui/dialogs/TimeSignatureDialog.cpp b/src/gui/dialogs/TimeSignatureDialog.cpp index 082f123..1e0dca8 100644 --- a/src/gui/dialogs/TimeSignatureDialog.cpp +++ b/src/gui/dialogs/TimeSignatureDialog.cpp @@ -34,28 +34,28 @@ #include "gui/widgets/BigArrowButton.h" #include <kconfig.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qfont.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqfont.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, +TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, Composition *composition, timeT insertionTime, TimeSignature sig, bool timeEditable, - QString explanatoryText) : + TQString explanatoryText) : KDialogBase(parent, 0, true, i18n("Time Signature"), Ok | Cancel | Help), m_composition(composition), m_timeSignature(sig), @@ -70,31 +70,31 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, m_startOfBarButton(0), m_timeEditor(0) { - static QFont *timeSigFont = 0; + static TQFont *timeSigFont = 0; if (timeSigFont == 0) { - timeSigFont = new QFont("new century schoolbook", 8, QFont::Bold); + timeSigFont = new TQFont("new century schoolbook", 8, TQFont::Bold); timeSigFont->setPixelSize(20); } - QVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQVBox *vbox = makeVBoxMainWidget(); + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Time signature"), vbox); - QHBox *numBox = new QHBox(groupBox); - QHBox *denomBox = new QHBox(groupBox); + TQHBox *numBox = new TQHBox(groupBox); + TQHBox *denomBox = new TQHBox(groupBox); - QLabel *explanatoryLabel = 0; + TQLabel *explanatoryLabel = 0; if (explanatoryText) { - explanatoryLabel = new QLabel(explanatoryText, groupBox); + explanatoryLabel = new TQLabel(explanatoryText, groupBox); } BigArrowButton *numDown = new BigArrowButton(numBox, Qt::LeftArrow); BigArrowButton *denomDown = new BigArrowButton(denomBox, Qt::LeftArrow); m_numLabel = new QLabel - (QString("%1").arg(m_timeSignature.getNumerator()), numBox); + (TQString("%1").arg(m_timeSignature.getNumerator()), numBox); m_denomLabel = new QLabel - (QString("%1").arg(m_timeSignature.getDenominator()), denomBox); + (TQString("%1").arg(m_timeSignature.getDenominator()), denomBox); m_numLabel->setAlignment(AlignHCenter | AlignVCenter); m_denomLabel->setAlignment(AlignHCenter | AlignVCenter); @@ -105,10 +105,10 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, BigArrowButton *numUp = new BigArrowButton(numBox, Qt::RightArrow); BigArrowButton *denomUp = new BigArrowButton(denomBox, Qt::RightArrow); - QObject::connect(numDown, SIGNAL(clicked()), this, SLOT(slotNumDown())); - QObject::connect(numUp, SIGNAL(clicked()), this, SLOT(slotNumUp())); - QObject::connect(denomDown, SIGNAL(clicked()), this, SLOT(slotDenomDown())); - QObject::connect(denomUp, SIGNAL(clicked()), this, SLOT(slotDenomUp())); + TQObject::connect(numDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNumDown())); + TQObject::connect(numUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNumUp())); + TQObject::connect(denomDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDenomDown())); + TQObject::connect(denomUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDenomUp())); if (timeEditable) { @@ -126,14 +126,14 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, m_timeEditor = 0; - groupBox = new QButtonGroup(1, Horizontal, i18n("Scope"), vbox); + groupBox = new TQButtonGroup(1, Horizontal, i18n("Scope"), vbox); int barNo = composition->getBarNumber(m_time); bool atStartOfBar = (m_time == composition->getBarStart(barNo)); if (!atStartOfBar) { - QString scopeText; + TQString scopeText; if (barNo != 0 || !atStartOfBar) { if (atStartOfBar) { @@ -150,7 +150,7 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, (i18n("Insertion point is at start of composition.")); } - new QLabel(scopeText, groupBox); + new TQLabel(scopeText, groupBox); m_asGivenButton = new QRadioButton (i18n("Start measure %1 here").arg(barNo + 2), groupBox); @@ -163,12 +163,12 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, m_asGivenButton->setChecked(true); } } else { - new QLabel(i18n("Time change will take effect at the start of measure %1.") + new TQLabel(i18n("Time change will take effect at the start of measure %1.") .arg(barNo + 1), groupBox); } } - groupBox = new QGroupBox(1, Horizontal, i18n("Options"), vbox); + groupBox = new TQGroupBox(1, Horizontal, i18n("Options"), vbox); KConfig *config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); @@ -192,8 +192,8 @@ TimeSignatureDialog::TimeSignatureDialog(QWidget *parent, m_normalizeRestsButton->setChecked (config->readBoolEntry("timesigdialognormalize", true)); - QObject::connect(m_hideSignatureButton, SIGNAL(clicked()), this, - SLOT(slotUpdateCommonTimeButton())); + TQObject::connect(m_hideSignatureButton, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotUpdateCommonTimeButton())); slotUpdateCommonTimeButton(); m_explanatoryLabel = explanatoryLabel; @@ -231,7 +231,7 @@ TimeSignatureDialog::slotNumDown() int n = m_timeSignature.getNumerator(); if (--n >= 1) { m_timeSignature = TimeSignature(n, m_timeSignature.getDenominator()); - m_numLabel->setText(QString("%1").arg(n)); + m_numLabel->setText(TQString("%1").arg(n)); } slotUpdateCommonTimeButton(); } @@ -242,7 +242,7 @@ TimeSignatureDialog::slotNumUp() int n = m_timeSignature.getNumerator(); if (++n <= 99) { m_timeSignature = TimeSignature(n, m_timeSignature.getDenominator()); - m_numLabel->setText(QString("%1").arg(n)); + m_numLabel->setText(TQString("%1").arg(n)); } slotUpdateCommonTimeButton(); } @@ -253,7 +253,7 @@ TimeSignatureDialog::slotDenomDown() int n = m_timeSignature.getDenominator(); if ((n /= 2) >= 1) { m_timeSignature = TimeSignature(m_timeSignature.getNumerator(), n); - m_denomLabel->setText(QString("%1").arg(n)); + m_denomLabel->setText(TQString("%1").arg(n)); } slotUpdateCommonTimeButton(); } @@ -264,7 +264,7 @@ TimeSignatureDialog::slotDenomUp() int n = m_timeSignature.getDenominator(); if ((n *= 2) <= 64) { m_timeSignature = TimeSignature(m_timeSignature.getNumerator(), n); - m_denomLabel->setText(QString("%1").arg(n)); + m_denomLabel->setText(TQString("%1").arg(n)); } slotUpdateCommonTimeButton(); } diff --git a/src/gui/dialogs/TimeSignatureDialog.h b/src/gui/dialogs/TimeSignatureDialog.h index 330134c..5326f71 100644 --- a/src/gui/dialogs/TimeSignatureDialog.h +++ b/src/gui/dialogs/TimeSignatureDialog.h @@ -28,14 +28,14 @@ #include "base/NotationTypes.h" #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QRadioButton; -class QLabel; -class QCheckBox; +class TQWidget; +class TQRadioButton; +class TQLabel; +class TQCheckBox; namespace Rosegarden @@ -50,13 +50,13 @@ class TimeSignatureDialog : public KDialogBase Q_OBJECT public: - TimeSignatureDialog(QWidget *parent, + TimeSignatureDialog(TQWidget *parent, Composition *composition, timeT insertionTime, TimeSignature defaultSig = TimeSignature::DefaultTimeSignature, bool timeEditable = false, - QString explanatoryText = 0); + TQString explanatoryText = 0); TimeSignature getTimeSignature() const; @@ -77,17 +77,17 @@ protected: TimeSignature m_timeSignature; timeT m_time; - QLabel *m_numLabel; - QLabel *m_denomLabel; - QLabel *m_explanatoryLabel; + TQLabel *m_numLabel; + TQLabel *m_denomLabel; + TQLabel *m_explanatoryLabel; - QCheckBox *m_commonTimeButton; - QCheckBox *m_hideSignatureButton; - QCheckBox *m_hideBarsButton; - QCheckBox *m_normalizeRestsButton; + TQCheckBox *m_commonTimeButton; + TQCheckBox *m_hideSignatureButton; + TQCheckBox *m_hideBarsButton; + TQCheckBox *m_normalizeRestsButton; - QRadioButton *m_asGivenButton; - QRadioButton *m_startOfBarButton; + TQRadioButton *m_asGivenButton; + TQRadioButton *m_startOfBarButton; TimeWidget *m_timeEditor; }; diff --git a/src/gui/dialogs/TransportDialog.cpp b/src/gui/dialogs/TransportDialog.cpp index 115a528..a632469 100644 --- a/src/gui/dialogs/TransportDialog.cpp +++ b/src/gui/dialogs/TransportDialog.cpp @@ -39,28 +39,28 @@ #include "document/ConfigGroups.h" #include <kconfig.h> #include <kglobal.h> -#include <qaccel.h> -#include <qcolor.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qfont.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qpalette.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcolor.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqfont.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqpalette.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden { -TransportDialog::TransportDialog(QWidget *parent, +TransportDialog::TransportDialog(TQWidget *parent, const char *name, WFlags flags): - QWidget(parent, name, WType_TopLevel | WStyle_DialogBorder | WStyle_Minimize | WStyle_SysMenu | WDestructiveClose), + TQWidget(parent, name, WType_TopLevel | WStyle_DialogBorder | WStyle_Minimize | WStyle_SysMenu | WDestructiveClose), m_transport(0), m_lastTenHours(0), m_lastUnitHours(0), @@ -138,45 +138,45 @@ TransportDialog::TransportDialog(QWidget *parent, loadPixmaps(); // Create Midi label timers - m_midiInTimer = new QTimer(this); - m_midiOutTimer = new QTimer(this); - m_clearMetronomeTimer = new QTimer(this); + m_midiInTimer = new TQTimer(this); + m_midiOutTimer = new TQTimer(this); + m_clearMetronomeTimer = new TQTimer(this); - connect(m_midiInTimer, SIGNAL(timeout()), - SLOT(slotClearMidiInLabel())); + connect(m_midiInTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotClearMidiInLabel())); - connect(m_midiOutTimer, SIGNAL(timeout()), - SLOT(slotClearMidiOutLabel())); + connect(m_midiOutTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotClearMidiOutLabel())); - connect(m_clearMetronomeTimer, SIGNAL(timeout()), - SLOT(slotResetBackground())); + connect(m_clearMetronomeTimer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotResetBackground())); m_transport->TimeDisplayLabel->hide(); m_transport->ToEndLabel->hide(); - connect(m_transport->TimeDisplayButton, SIGNAL(clicked()), - SLOT(slotChangeTimeDisplay())); + connect(m_transport->TimeDisplayButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotChangeTimeDisplay())); - connect(m_transport->ToEndButton, SIGNAL(clicked()), - SLOT(slotChangeToEnd())); + connect(m_transport->ToEndButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotChangeToEnd())); - connect(m_transport->LoopButton, SIGNAL(clicked()), - SLOT(slotLoopButtonClicked())); + connect(m_transport->LoopButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotLoopButtonClicked())); - connect(m_transport->PanelOpenButton, SIGNAL(clicked()), - SLOT(slotPanelOpenButtonClicked())); + connect(m_transport->PanelOpenButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPanelOpenButtonClicked())); - connect(m_transport->PanelCloseButton, SIGNAL(clicked()), - SLOT(slotPanelCloseButtonClicked())); + connect(m_transport->PanelCloseButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPanelCloseButtonClicked())); - connect(m_transport->PanicButton, SIGNAL(clicked()), SIGNAL(panic())); + connect(m_transport->PanicButton, TQT_SIGNAL(clicked()), TQT_SIGNAL(panic())); m_panelOpen = *m_transport->PanelOpenButton->pixmap(); m_panelClosed = *m_transport->PanelCloseButton->pixmap(); - connect(m_transport->SetStartLPButton, SIGNAL(clicked()), SLOT(slotSetStartLoopingPointAtMarkerPos())); - connect(m_transport->SetStopLPButton, SIGNAL(clicked()), SLOT(slotSetStopLoopingPointAtMarkerPos())); + connect(m_transport->SetStartLPButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSetStartLoopingPointAtMarkerPos())); + connect(m_transport->SetStopLPButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSetStopLoopingPointAtMarkerPos())); // clear labels // @@ -202,66 +202,66 @@ TransportDialog::TransportDialog(QWidget *parent, // if the rest of the Transport ever changes then this code // will have to as well. // - QPalette pal; - pal.setColor(QColorGroup::Foreground, QColor(192, 216, 255)); + TQPalette pal; + pal.setColor(TQColorGroup::Foreground, TQColor(192, 216, 255)); m_transport->TempoDisplay->setPalette(pal); - m_transport->TempoDisplay->setAlignment(int(QLabel::AlignVCenter | QLabel::AlignRight)); + m_transport->TempoDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); m_transport->TimeSigDisplay->setPalette(pal); - m_transport->TimeSigDisplay->setAlignment(int(QLabel::AlignVCenter | QLabel::AlignRight)); + m_transport->TimeSigDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); - QFont localFont(m_transport->OutDisplay->font() ); + TQFont localFont(m_transport->OutDisplay->font() ); localFont.setFamily( "lucida" ); localFont.setBold( TRUE ); m_transport->TempoDisplay->setFont( localFont ); m_transport->TimeSigDisplay->setFont( localFont ); - connect(m_transport->TempoDisplay, SIGNAL(doubleClicked()), - this, SLOT(slotEditTempo())); + connect(m_transport->TempoDisplay, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTempo())); - connect(m_transport->TempoDisplay, SIGNAL(scrollWheel(int)), - this, SIGNAL(scrollTempo(int))); + connect(m_transport->TempoDisplay, TQT_SIGNAL(scrollWheel(int)), + this, TQT_SIGNAL(scrollTempo(int))); - connect(m_transport->TimeSigDisplay, SIGNAL(doubleClicked()), - this, SLOT(slotEditTimeSignature())); + connect(m_transport->TimeSigDisplay, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTimeSignature())); // toil through the individual pixmaps - connect(m_transport->NegativePixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->TenHoursPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->UnitHoursPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->HourColonPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->TenMinutesPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->UnitMinutesPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->MinuteColonPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->TenSecondsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->UnitSecondsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->SecondColonPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->TenthsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->HundredthsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->HundredthColonPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->TenThousandthsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); - connect(m_transport->ThousandthsPixmap, SIGNAL(doubleClicked()), - this, SLOT(slotEditTime())); + connect(m_transport->NegativePixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->TenHoursPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->UnitHoursPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->HourColonPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->TenMinutesPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->UnitMinutesPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->MinuteColonPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->TenSecondsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->UnitSecondsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->SecondColonPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->TenthsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->HundredthsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->HundredthColonPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->TenThousandthsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); + connect(m_transport->ThousandthsPixmap, TQT_SIGNAL(doubleClicked()), + this, TQT_SLOT(slotEditTime())); // accelerator object // - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } TransportDialog::~TransportDialog() @@ -311,16 +311,16 @@ TransportDialog::show() int x = config->readNumEntry("transportx", -1); int y = config->readNumEntry("transporty", -1); if (x >= 0 && y >= 0) { - int dw = QApplication::desktop()->availableGeometry(QPoint(x, y)).width(); - int dh = QApplication::desktop()->availableGeometry(QPoint(x, y)).height(); + int dw = TQApplication::desktop()->availableGeometry(TQPoint(x, y)).width(); + int dh = TQApplication::desktop()->availableGeometry(TQPoint(x, y)).height(); if (x + m_transport->width() > dw) x = dw - m_transport->width(); if (y + m_transport->height() > dh) y = dh - m_transport->height(); move(x, y); // std::cerr << "TransportDialog::show(): moved to " << x << "," << y << std::endl; - QWidget::show(); + TQWidget::show(); // std::cerr << "TransportDialog::show(): now at " << this->x() << "," << this->y() << std::endl; } else { - QWidget::show(); + TQWidget::show(); } } @@ -333,18 +333,18 @@ TransportDialog::hide() config->writeEntry("transportx", x()); config->writeEntry("transporty", y()); } - QWidget::hide(); + TQWidget::hide(); } void TransportDialog::loadPixmaps() { m_lcdList.clear(); - QString fileName; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileName; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); for (int i = 0; i < 10; i++) { - fileName = QString("%1/transport/led-%2.xpm").arg(pixmapDir).arg(i); + fileName = TQString("%1/transport/led-%2.xpm").arg(pixmapDir).arg(i); if (!m_lcdList[i].load(fileName)) { std::cerr << "TransportDialog - failed to load pixmap \"" << fileName << "\"" << std::endl; @@ -353,7 +353,7 @@ TransportDialog::loadPixmaps() // Load the "negative" sign pixmap // - fileName = QString("%1/transport/led--.xpm").arg(pixmapDir); + fileName = TQString("%1/transport/led--.xpm").arg(pixmapDir); m_lcdNegative.load(fileName); } @@ -376,9 +376,9 @@ TransportDialog::resetFonts() } void -TransportDialog::resetFont(QWidget *w) +TransportDialog::resetFont(TQWidget *w) { - QFont font = w->font(); + TQFont font = w->font(); font.setPixelSize(10); w->setFont(font); } @@ -404,12 +404,12 @@ TransportDialog::computeSampleRate() { if (m_sampleRate == 0) { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; m_sampleRate = 0; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; m_sampleRate = result; @@ -479,7 +479,7 @@ TransportDialog::displayTime() case FrameMode: m_clearMetronomeTimer->stop(); - m_transport->TimeDisplayLabel->setText(QString("%1").arg(m_sampleRate)); + m_transport->TimeDisplayLabel->setText(TQString("%1").arg(m_sampleRate)); m_transport->TimeDisplayLabel->show(); break; } @@ -879,7 +879,7 @@ TransportDialog::setTempo(const tempoT &tempo) StudioControl::sendQuarterNoteLength(qnTime); - QString tempoString; + TQString tempoString; tempoString.sprintf("%4.3f", Composition::getTempoQpm(tempo)); m_transport->TempoDisplay->setText(tempoString); @@ -895,7 +895,7 @@ TransportDialog::setTimeSignature(const TimeSignature &timeSig) m_numerator = numerator; m_denominator = denominator; - QString timeSigString; + TQString timeSigString; timeSigString.sprintf("%d/%d", numerator, denominator); m_transport->TimeSigDisplay->setText(timeSigString); } @@ -917,7 +917,7 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE) MidiPitchLabel mPL(mE->getPitch()); m_transport->InDisplay->setText (mPL.getQString() + - QString(" %1").arg(mE->getVelocity())); + TQString(" %1").arg(mE->getVelocity())); } break; @@ -959,7 +959,7 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE) void TransportDialog::slotClearMidiInLabel() { - m_transport->InDisplay->setText(i18n(QString("NO EVENTS"))); + m_transport->InDisplay->setText(i18n(TQString("NO EVENTS"))); // also, just to be sure: slotResetBackground(); @@ -977,7 +977,7 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE) MidiPitchLabel mPL(mE->getPitch()); m_transport->OutDisplay->setText (mPL.getQString() + - QString(" %1").arg(mE->getVelocity())); + TQString(" %1").arg(mE->getVelocity())); } break; @@ -1019,11 +1019,11 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE) void TransportDialog::slotClearMidiOutLabel() { - m_transport->OutDisplay->setText(i18n(QString("NO EVENTS"))); + m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS"))); } void -TransportDialog::closeEvent (QCloseEvent * /*e*/) +TransportDialog::closeEvent (TQCloseEvent * /*e*/) { //e->accept(); // accept the close event here emit closed(); @@ -1118,7 +1118,7 @@ TransportDialog::slotEditTime() } void -TransportDialog::slotSetBackground(QColor c) +TransportDialog::slotSetBackground(TQColor c) { if (!m_haveOriginalBackground) { m_originalBackground = m_transport->LCDBoxFrame->paletteBackgroundColor(); @@ -1133,13 +1133,13 @@ TransportDialog::slotSetBackground(QColor c) /* this is a bit more thorough, but too slow and flickery: - const QObjectList *children = m_transport->LCDBoxFrame->children(); - QObjectListIt it(*children); - QObject *obj; + const TQObjectList *children = m_transport->LCDBoxFrame->tqchildren(); + TQObjectListIt it(*children); + TQObject *obj; while ((obj = it.current()) != 0) { - QWidget *w = dynamic_cast<QWidget *>(obj); + TQWidget *w = dynamic_cast<TQWidget *>(obj); if (w) { w->setPaletteBackgroundColor(c); } diff --git a/src/gui/dialogs/TransportDialog.h b/src/gui/dialogs/TransportDialog.h index e5c4948..48de68c 100644 --- a/src/gui/dialogs/TransportDialog.h +++ b/src/gui/dialogs/TransportDialog.h @@ -27,17 +27,17 @@ #include <map> #include <kdockwidget.h> -#include <qcolor.h> -#include <qpixmap.h> +#include <tqcolor.h> +#include <tqpixmap.h> #include "base/Composition.h" // for tempoT #include "RosegardenTransport.h" // generated by uic class RosegardenTransport; -class QWidget; -class QTimer; -class QPushButton; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQTimer; +class TQPushButton; +class TQCloseEvent; +class TQAccel; namespace Rosegarden @@ -52,7 +52,7 @@ class TransportDialog : public QWidget { Q_OBJECT public: - TransportDialog(QWidget *parent=0, + TransportDialog(TQWidget *parent=0, const char *name=0, WFlags flags = /*Qt::WStyle_StaysOnTop |*/ Qt::WStyle_NormalBorder); @@ -86,27 +86,27 @@ public: // Return the accelerator object // - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } // RosegardenTransport member accessors - QPushButton* MetronomeButton() { return m_transport->MetronomeButton; } - QPushButton* SoloButton() { return m_transport->SoloButton; } - QPushButton* LoopButton() { return m_transport->LoopButton; } - QPushButton* PlayButton() { return m_transport->PlayButton; } - QPushButton* StopButton() { return m_transport->StopButton; } - QPushButton* FfwdButton() { return m_transport->FfwdButton; } - QPushButton* RewindButton() { return m_transport->RewindButton; } - QPushButton* RecordButton() { return m_transport->RecordButton; } - QPushButton* RewindEndButton() { return m_transport->RewindEndButton; } - QPushButton* FfwdEndButton() { return m_transport->FfwdEndButton; } - QPushButton* TimeDisplayButton() { return m_transport->TimeDisplayButton; } - QPushButton* ToEndButton() { return m_transport->ToEndButton; } + TQPushButton* MetronomeButton() { return m_transport->MetronomeButton; } + TQPushButton* SoloButton() { return m_transport->SoloButton; } + TQPushButton* LoopButton() { return m_transport->LoopButton; } + TQPushButton* PlayButton() { return m_transport->PlayButton; } + TQPushButton* StopButton() { return m_transport->StopButton; } + TQPushButton* FfwdButton() { return m_transport->FfwdButton; } + TQPushButton* RewindButton() { return m_transport->RewindButton; } + TQPushButton* RecordButton() { return m_transport->RecordButton; } + TQPushButton* RewindEndButton() { return m_transport->RewindEndButton; } + TQPushButton* FfwdEndButton() { return m_transport->FfwdEndButton; } + TQPushButton* TimeDisplayButton() { return m_transport->TimeDisplayButton; } + TQPushButton* ToEndButton() { return m_transport->ToEndButton; } virtual void show(); virtual void hide(); protected: - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); void computeSampleRate(); void cycleThroughModes(); void displayTime(); @@ -133,7 +133,7 @@ public slots: void slotEditTimeSignature(); void slotEditTime(); - void slotSetBackground(QColor); + void slotSetBackground(TQColor); void slotResetBackground(); void slotSetStartLoopingPointAtMarkerPos(); @@ -149,24 +149,24 @@ signals: void setLoopStartTime(); void setLoopStopTime(); - void editTempo(QWidget *); - void editTimeSignature(QWidget *); - void editTransportTime(QWidget *); + void editTempo(TQWidget *); + void editTimeSignature(TQWidget *); + void editTransportTime(TQWidget *); void scrollTempo(int); void panic(); private: void loadPixmaps(); void resetFonts(); - void resetFont(QWidget *); + void resetFont(TQWidget *); void initModeMap(); //--------------- Data members --------------------------------- RosegardenTransport* m_transport; - std::map<int, QPixmap> m_lcdList; - QPixmap m_lcdNegative; + std::map<int, TQPixmap> m_lcdList; + TQPixmap m_lcdNegative; int m_lastTenHours; int m_lastUnitHours; @@ -201,21 +201,21 @@ private: int m_framesPerSecond; int m_bitsPerFrame; - QTimer *m_midiInTimer; - QTimer *m_midiOutTimer; - QTimer *m_clearMetronomeTimer; + TQTimer *m_midiInTimer; + TQTimer *m_midiOutTimer; + TQTimer *m_clearMetronomeTimer; - QPixmap m_panelOpen; - QPixmap m_panelClosed; + TQPixmap m_panelOpen; + TQPixmap m_panelClosed; void updateTimeDisplay(); - QAccel *m_accelerators; + TQAccel *m_accelerators; bool m_isExpanded; bool m_haveOriginalBackground; bool m_isBackgroundSet; - QColor m_originalBackground; + TQColor m_originalBackground; int m_sampleRate; diff --git a/src/gui/dialogs/TriggerSegmentDialog.cpp b/src/gui/dialogs/TriggerSegmentDialog.cpp index a5064e1..85035df 100644 --- a/src/gui/dialogs/TriggerSegmentDialog.cpp +++ b/src/gui/dialogs/TriggerSegmentDialog.cpp @@ -35,30 +35,30 @@ #include <kcombobox.h> #include <kconfig.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qlabel.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqlayout.h> namespace Rosegarden { -TriggerSegmentDialog::TriggerSegmentDialog(QWidget *parent, +TriggerSegmentDialog::TriggerSegmentDialog(TQWidget *parent, Composition *composition) : KDialogBase(parent, "triggersegmentdialog", true, i18n("Trigger Segment"), Ok | Cancel, Ok), m_composition(composition) { - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QFrame *frame = new QFrame(vbox); - QGridLayout *layout = new QGridLayout(frame, 3, 2, 5, 5); + TQFrame *frame = new TQFrame(vbox); + TQGridLayout *layout = new TQGridLayout(frame, 3, 2, 5, 5); - QLabel *label = new QLabel(i18n("Trigger segment: "), frame); + TQLabel *label = new TQLabel(i18n("Trigger segment: "), frame); layout->addWidget(label, 0, 0); m_segment = new KComboBox(frame); @@ -69,10 +69,10 @@ TriggerSegmentDialog::TriggerSegmentDialog(QWidget *parent, m_composition->getTriggerSegments().begin(); i != m_composition->getTriggerSegments().end(); ++i) { m_segment->insertItem - (QString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); + (TQString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); } - label = new QLabel(i18n("Perform with timing: "), frame); + label = new TQLabel(i18n("Perform with timing: "), frame); layout->addWidget(label, 1, 0); m_adjustTime = new KComboBox(frame); @@ -83,7 +83,7 @@ TriggerSegmentDialog::TriggerSegmentDialog(QWidget *parent, m_adjustTime->insertItem(i18n("End at same time as note")); m_adjustTime->insertItem(i18n("Stretch or squash segment to note duration")); - m_retune = new QCheckBox(i18n("Adjust pitch to note"), frame); + m_retune = new TQCheckBox(i18n("Adjust pitch to note"), frame); m_retune->setChecked(true); layout->addWidget(m_retune, 2, 1); diff --git a/src/gui/dialogs/TriggerSegmentDialog.h b/src/gui/dialogs/TriggerSegmentDialog.h index 3f74f45..c71f34c 100644 --- a/src/gui/dialogs/TriggerSegmentDialog.h +++ b/src/gui/dialogs/TriggerSegmentDialog.h @@ -31,8 +31,8 @@ #include <kdialogbase.h> -class QWidget; -class QCheckBox; +class TQWidget; +class TQCheckBox; class KComboBox; @@ -47,7 +47,7 @@ class TriggerSegmentDialog : public KDialogBase Q_OBJECT public: - TriggerSegmentDialog(QWidget *parent, Composition *); + TriggerSegmentDialog(TQWidget *parent, Composition *); TriggerSegmentId getId() const; bool getRetune() const; @@ -61,7 +61,7 @@ protected: Composition *m_composition; KComboBox *m_segment; - QCheckBox *m_retune; + TQCheckBox *m_retune; KComboBox *m_adjustTime; }; diff --git a/src/gui/dialogs/TupletDialog.cpp b/src/gui/dialogs/TupletDialog.cpp index ed1c583..a785097 100644 --- a/src/gui/dialogs/TupletDialog.cpp +++ b/src/gui/dialogs/TupletDialog.cpp @@ -24,7 +24,7 @@ #include "TupletDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "base/NotationTypes.h" @@ -32,29 +32,29 @@ #include "gui/editors/notation/NotePixmapFactory.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, +TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, timeT maxDuration) : KDialogBase(parent, 0, true, i18n("Tuplet"), Ok | Cancel | Help), m_maxDuration(maxDuration) { setHelp("nv-tuplets"); - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *timingBox = new QGroupBox + TQGroupBox *timingBox = new QGroupBox (1, Horizontal, i18n("New timing for tuplet group"), vbox); if (m_maxDuration > 0) { @@ -70,10 +70,10 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, defaultUnitType = maxUnitType; } - QFrame *timingFrame = new QFrame(timingBox); - QGridLayout *timingLayout = new QGridLayout(timingFrame, 3, 3, 5, 5); + TQFrame *timingFrame = new TQFrame(timingBox); + TQGridLayout *timingLayout = new TQGridLayout(timingFrame, 3, 3, 5, 5); - timingLayout->addWidget(new QLabel(i18n("Play "), timingFrame), 0, 0); + timingLayout->addWidget(new TQLabel(i18n("Play "), timingFrame), 0, 0); m_untupledCombo = new KComboBox(timingFrame); timingLayout->addWidget(m_untupledCombo, 0, 1); @@ -95,7 +95,7 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, } } - timingLayout->addWidget(new QLabel(i18n("in the time of "), timingFrame), 1, 0); + timingLayout->addWidget(new TQLabel(i18n("in the time of "), timingFrame), 1, 0); m_tupledCombo = new KComboBox(timingFrame); timingLayout->addWidget(m_tupledCombo, 1, 1); @@ -105,7 +105,7 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, m_hasTimingAlready->setChecked(false); timingLayout->addMultiCellWidget(m_hasTimingAlready, 2, 2, 0, 2); - connect(m_hasTimingAlready, SIGNAL(clicked()), this, SLOT(slotHasTimingChanged())); + connect(m_hasTimingAlready, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHasTimingChanged())); updateUntupledCombo(); updateTupledCombo(); @@ -113,45 +113,45 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, m_timingDisplayBox = new QGroupBox (1, Horizontal, i18n("Timing calculations"), vbox); - QGrid *timingDisplayGrid = new QGrid(3, QGrid::Horizontal, m_timingDisplayBox); + TQGrid *timingDisplayGrid = new TQGrid(3, TQGrid::Horizontal, m_timingDisplayBox); if (maxDuration > 0) { - new QLabel(i18n("Selected region:"), timingDisplayGrid); - new QLabel("", timingDisplayGrid); - m_selectionDurationDisplay = new QLabel("x", timingDisplayGrid); - m_selectionDurationDisplay->setAlignment(int(QLabel::AlignVCenter | - QLabel::AlignRight)); + new TQLabel(i18n("Selected region:"), timingDisplayGrid); + new TQLabel("", timingDisplayGrid); + m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid); + m_selectionDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + TQLabel::AlignRight)); } else { m_selectionDurationDisplay = 0; } - new QLabel(i18n("Group with current timing:"), timingDisplayGrid); - m_untupledDurationCalculationDisplay = new QLabel("x", timingDisplayGrid); - m_untupledDurationDisplay = new QLabel("x", timingDisplayGrid); - m_untupledDurationDisplay->setAlignment(int(QLabel::AlignVCenter | - QLabel::AlignRight)); + new TQLabel(i18n("Group with current timing:"), timingDisplayGrid); + m_untupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); + m_untupledDurationDisplay = new TQLabel("x", timingDisplayGrid); + m_untupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + TQLabel::AlignRight)); - new QLabel(i18n("Group with new timing:"), timingDisplayGrid); - m_tupledDurationCalculationDisplay = new QLabel("x", timingDisplayGrid); - m_tupledDurationDisplay = new QLabel("x", timingDisplayGrid); - m_tupledDurationDisplay->setAlignment(int(QLabel::AlignVCenter | - QLabel::AlignRight)); + new TQLabel(i18n("Group with new timing:"), timingDisplayGrid); + m_tupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); + m_tupledDurationDisplay = new TQLabel("x", timingDisplayGrid); + m_tupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + TQLabel::AlignRight)); - new QLabel(i18n("Gap created by timing change:"), timingDisplayGrid); - m_newGapDurationCalculationDisplay = new QLabel("x", timingDisplayGrid); - m_newGapDurationDisplay = new QLabel("x", timingDisplayGrid); - m_newGapDurationDisplay->setAlignment(int(QLabel::AlignVCenter | - QLabel::AlignRight)); + new TQLabel(i18n("Gap created by timing change:"), timingDisplayGrid); + m_newGapDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); + m_newGapDurationDisplay = new TQLabel("x", timingDisplayGrid); + m_newGapDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + TQLabel::AlignRight)); if (maxDuration > 0) { - new QLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid); + new TQLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid); m_unchangedDurationCalculationDisplay = new QLabel ("x", timingDisplayGrid); - m_unchangedDurationDisplay = new QLabel("x", timingDisplayGrid); - m_unchangedDurationDisplay->setAlignment(int(QLabel::AlignVCenter | - QLabel::AlignRight)); + m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid); + m_unchangedDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + TQLabel::AlignRight)); } else { m_unchangedDurationDisplay = 0; @@ -159,18 +159,18 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType, updateTimingDisplays(); - QObject::connect(m_unitCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotUnitChanged(const QString &))); + TQObject::connect(m_unitCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotUnitChanged(const TQString &))); - QObject::connect(m_untupledCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotUntupledChanged(const QString &))); - QObject::connect(m_untupledCombo, SIGNAL(textChanged(const QString &)), - this, SLOT(slotUntupledChanged(const QString &))); + TQObject::connect(m_untupledCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotUntupledChanged(const TQString &))); + TQObject::connect(m_untupledCombo, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotUntupledChanged(const TQString &))); - QObject::connect(m_tupledCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotTupledChanged(const QString &))); - QObject::connect(m_tupledCombo, SIGNAL(textChanged(const QString &)), - this, SLOT(slotTupledChanged(const QString &))); + TQObject::connect(m_tupledCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotTupledChanged(const TQString &))); + TQObject::connect(m_tupledCombo, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(slotTupledChanged(const TQString &))); } void @@ -235,10 +235,10 @@ TupletDialog::updateUntupledCombo() } } - QString previousText = m_untupledCombo->currentText(); + TQString previousText = m_untupledCombo->currentText(); if (previousText.toInt() == 0) { if (maxValue < 3) - previousText = QString("%1").arg(maxValue); + previousText = TQString("%1").arg(maxValue); else previousText = "3"; } @@ -247,7 +247,7 @@ TupletDialog::updateUntupledCombo() bool setText = false; for (int i = 1; i <= maxValue; ++i) { - QString text = QString("%1").arg(i); + TQString text = TQString("%1").arg(i); m_untupledCombo->insertItem(text); if (m_hasTimingAlready->isChecked()) { if (i == (m_maxDuration * 3) / (Note(getUnitType()).getDuration()*2)) { @@ -274,11 +274,11 @@ TupletDialog::updateTupledCombo() int untupled = getUntupledCount(); - QString previousText = m_tupledCombo->currentText(); + TQString previousText = m_tupledCombo->currentText(); if (previousText.toInt() == 0 || previousText.toInt() > untupled) { if (untupled < 2) - previousText = QString("%1").arg(untupled); + previousText = TQString("%1").arg(untupled); else previousText = "2"; } @@ -286,7 +286,7 @@ TupletDialog::updateTupledCombo() m_tupledCombo->clear(); for (int i = 1; i < untupled; ++i) { - QString text = QString("%1").arg(i); + TQString text = TQString("%1").arg(i); m_tupledCombo->insertItem(text); if (m_hasTimingAlready->isChecked()) { if (i == m_maxDuration / Note(getUnitType()).getDuration()) { @@ -310,38 +310,38 @@ TupletDialog::updateTimingDisplays() timeT tupledDuration = unitDuration * tupledCount; if (m_selectionDurationDisplay) { - m_selectionDurationDisplay->setText(QString("%1").arg(m_maxDuration)); + m_selectionDurationDisplay->setText(TQString("%1").arg(m_maxDuration)); } m_untupledDurationCalculationDisplay->setText - (QString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration)); + (TQString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration)); m_untupledDurationDisplay->setText - (QString("%1").arg(untupledDuration)); + (TQString("%1").arg(untupledDuration)); m_tupledDurationCalculationDisplay->setText - (QString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration)); + (TQString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration)); m_tupledDurationDisplay->setText - (QString("%1").arg(tupledDuration)); + (TQString("%1").arg(tupledDuration)); m_newGapDurationCalculationDisplay->setText - (QString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration)); + (TQString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration)); m_newGapDurationDisplay->setText - (QString("%1").arg(untupledDuration - tupledDuration)); + (TQString("%1").arg(untupledDuration - tupledDuration)); if (m_selectionDurationDisplay && m_unchangedDurationDisplay) { if (m_maxDuration != untupledDuration) { m_unchangedDurationCalculationDisplay->setText - (QString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration)); + (TQString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration)); } else { m_unchangedDurationCalculationDisplay->setText(""); } m_unchangedDurationDisplay->setText - (QString("%1").arg(m_maxDuration - untupledDuration)); + (TQString("%1").arg(m_maxDuration - untupledDuration)); } } void -TupletDialog::slotUnitChanged(const QString &) +TupletDialog::slotUnitChanged(const TQString &) { updateUntupledCombo(); updateTupledCombo(); @@ -349,14 +349,14 @@ TupletDialog::slotUnitChanged(const QString &) } void -TupletDialog::slotUntupledChanged(const QString &) +TupletDialog::slotUntupledChanged(const TQString &) { updateTupledCombo(); updateTimingDisplays(); } void -TupletDialog::slotTupledChanged(const QString &) +TupletDialog::slotTupledChanged(const TQString &) { updateTimingDisplays(); } diff --git a/src/gui/dialogs/TupletDialog.h b/src/gui/dialogs/TupletDialog.h index bc7252b..ae57ca9 100644 --- a/src/gui/dialogs/TupletDialog.h +++ b/src/gui/dialogs/TupletDialog.h @@ -31,11 +31,11 @@ #include "base/Event.h" -class QWidget; -class QString; -class QLabel; -class QGroupBox; -class QCheckBox; +class TQWidget; +class TQString; +class TQLabel; +class TQGroupBox; +class TQCheckBox; class KComboBox; @@ -49,7 +49,7 @@ class TupletDialog : public KDialogBase Q_OBJECT public: - TupletDialog(QWidget *parent, + TupletDialog(TQWidget *parent, Note::Type defaultUnitType, timeT maxDuration = 0); @@ -59,9 +59,9 @@ public: bool hasTimingAlready() const; public slots: - void slotUnitChanged(const QString &); - void slotUntupledChanged(const QString &); - void slotTupledChanged(const QString &); + void slotUnitChanged(const TQString &); + void slotUntupledChanged(const TQString &); + void slotTupledChanged(const TQString &); void slotHasTimingChanged(); protected: @@ -76,18 +76,18 @@ protected: KComboBox *m_untupledCombo; KComboBox *m_tupledCombo; - QCheckBox *m_hasTimingAlready; - - QGroupBox *m_timingDisplayBox; - QLabel *m_selectionDurationDisplay; - QLabel *m_untupledDurationCalculationDisplay; - QLabel *m_untupledDurationDisplay; - QLabel *m_tupledDurationCalculationDisplay; - QLabel *m_tupledDurationDisplay; - QLabel *m_newGapDurationCalculationDisplay; - QLabel *m_newGapDurationDisplay; - QLabel *m_unchangedDurationCalculationDisplay; - QLabel *m_unchangedDurationDisplay; + TQCheckBox *m_hasTimingAlready; + + TQGroupBox *m_timingDisplayBox; + TQLabel *m_selectionDurationDisplay; + TQLabel *m_untupledDurationCalculationDisplay; + TQLabel *m_untupledDurationDisplay; + TQLabel *m_tupledDurationCalculationDisplay; + TQLabel *m_tupledDurationDisplay; + TQLabel *m_newGapDurationCalculationDisplay; + TQLabel *m_newGapDurationDisplay; + TQLabel *m_unchangedDurationCalculationDisplay; + TQLabel *m_unchangedDurationDisplay; timeT m_maxDuration; }; diff --git a/src/gui/dialogs/UnusedAudioSelectionDialog.cpp b/src/gui/dialogs/UnusedAudioSelectionDialog.cpp index 0a44168..b15fe07 100644 --- a/src/gui/dialogs/UnusedAudioSelectionDialog.cpp +++ b/src/gui/dialogs/UnusedAudioSelectionDialog.cpp @@ -28,25 +28,25 @@ #include <klocale.h> #include <kdialogbase.h> #include <klistview.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(QWidget *parent, - QString introductoryText, - std::vector<QString> fileNames, +UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(TQWidget *parent, + TQString introductoryText, + std::vector<TQString> fileNames, bool offerCancel) : KDialogBase(parent, 0, true, i18n("Select Unused Audio Files"), (offerCancel ? (Ok | Cancel) : Ok)) { - QVBox *vbox = makeVBoxMainWidget(); - new QLabel(introductoryText, vbox); + TQVBox *vbox = makeVBoxMainWidget(); + new TQLabel(introductoryText, vbox); m_listView = new KListView(vbox); @@ -55,27 +55,27 @@ UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(QWidget *parent, m_listView->addColumn(i18n("Last modified date")); for (unsigned int i = 0; i < fileNames.size(); ++i) { - QString fileName = fileNames[i]; - QFileInfo info(fileName); - QString fileSize = i18n(" (not found) "); - QString fileDate; + TQString fileName = fileNames[i]; + TQFileInfo info(fileName); + TQString fileSize = i18n(" (not found) "); + TQString fileDate; if (info.exists()) { - fileSize = QString(" %1 ").arg(info.size()); - fileDate = QString(" %1 ").arg(info.lastModified().toString()); + fileSize = TQString(" %1 ").arg(info.size()); + fileDate = TQString(" %1 ").arg(info.lastModified().toString()); } - QListViewItem *item = new KListViewItem + TQListViewItem *item = new KListViewItem (m_listView, fileName, fileSize, fileDate); } - m_listView->setSelectionMode(QListView::Multi); + m_listView->setSelectionMode(TQListView::Multi); } -std::vector<QString> +std::vector<TQString> UnusedAudioSelectionDialog::getSelectedAudioFileNames() const { - std::vector<QString> selectedNames; + std::vector<TQString> selectedNames; - QListViewItem *item = m_listView->firstChild(); + TQListViewItem *item = m_listView->firstChild(); while (item) { diff --git a/src/gui/dialogs/UnusedAudioSelectionDialog.h b/src/gui/dialogs/UnusedAudioSelectionDialog.h index e11301a..7b6b4b4 100644 --- a/src/gui/dialogs/UnusedAudioSelectionDialog.h +++ b/src/gui/dialogs/UnusedAudioSelectionDialog.h @@ -27,12 +27,12 @@ #define _RG_UNUSEDAUDIOSELECTIONDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QListView; +class TQWidget; +class TQListView; namespace Rosegarden @@ -43,15 +43,15 @@ namespace Rosegarden class UnusedAudioSelectionDialog : public KDialogBase { public: - UnusedAudioSelectionDialog(QWidget *, - QString introductoryText, - std::vector<QString> fileNames, + UnusedAudioSelectionDialog(TQWidget *, + TQString introductoryText, + std::vector<TQString> fileNames, bool offerCancel = true); - std::vector<QString> getSelectedAudioFileNames() const; + std::vector<TQString> getSelectedAudioFileNames() const; protected: - QListView *m_listView; + TQListView *m_listView; }; diff --git a/src/gui/dialogs/UseOrnamentDialog.cpp b/src/gui/dialogs/UseOrnamentDialog.cpp index 971f170..b644a08 100644 --- a/src/gui/dialogs/UseOrnamentDialog.cpp +++ b/src/gui/dialogs/UseOrnamentDialog.cpp @@ -24,7 +24,7 @@ #include "UseOrnamentDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "base/BaseProperties.h" @@ -38,34 +38,34 @@ #include <kcombobox.h> #include <kconfig.h> #include <kdialogbase.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -UseOrnamentDialog::UseOrnamentDialog(QWidget *parent, +UseOrnamentDialog::UseOrnamentDialog(TQWidget *parent, Composition *composition) : KDialogBase(parent, "useornamentdialog", true, i18n("Use Ornament"), Ok | Cancel, Ok), m_composition(composition) { - QVBox *vbox = makeVBoxMainWidget(); - QLabel *label; + TQVBox *vbox = makeVBoxMainWidget(); + TQLabel *label; - QGroupBox *notationBox = new QGroupBox(1, Horizontal, i18n("Notation"), vbox); + TQGroupBox *notationBox = new TQGroupBox(1, Horizontal, i18n("Notation"), vbox); - QFrame *frame = new QFrame(notationBox); - QGridLayout *layout = new QGridLayout(frame, 4, 1, 5, 5); + TQFrame *frame = new TQFrame(notationBox); + TQGridLayout *layout = new TQGridLayout(frame, 4, 1, 5, 5); - label = new QLabel(i18n("Display as: "), frame); + label = new TQLabel(i18n("Display as: "), frame); layout->addWidget(label, 0, 0); m_mark = new KComboBox(frame); @@ -80,7 +80,7 @@ UseOrnamentDialog::UseOrnamentDialog(QWidget *parent, m_marks.push_back(Marks::MordentLong); m_marks.push_back(Marks::MordentLongInverted); - const QString markLabels[] = { + const TQString markLabels[] = { i18n("Trill"), i18n("Trill with line"), i18n("Trill line only"), i18n("Turn"), i18n("Mordent"), i18n("Inverted mordent"), i18n("Long mordent"), i18n("Long inverted mordent"), @@ -93,20 +93,20 @@ UseOrnamentDialog::UseOrnamentDialog(QWidget *parent, } m_mark->insertItem(i18n("Text mark")); - connect(m_mark, SIGNAL(activated(int)), this, SLOT(slotMarkChanged(int))); + connect(m_mark, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMarkChanged(int))); - m_textLabel = new QLabel(i18n(" Text: "), frame); + m_textLabel = new TQLabel(i18n(" Text: "), frame); layout->addWidget(m_textLabel, 0, 2); - m_text = new QLineEdit(frame); + m_text = new TQLineEdit(frame); layout->addWidget(m_text, 0, 3); - QGroupBox *performBox = new QGroupBox(1, Horizontal, i18n("Performance"), vbox); + TQGroupBox *performBox = new TQGroupBox(1, Horizontal, i18n("Performance"), vbox); - frame = new QFrame(performBox); - layout = new QGridLayout(frame, 3, 2, 5, 5); + frame = new TQFrame(performBox); + layout = new TQGridLayout(frame, 3, 2, 5, 5); - label = new QLabel(i18n("Perform using triggered segment: "), frame); + label = new TQLabel(i18n("Perform using triggered segment: "), frame); layout->addWidget(label, 0, 0); m_ornament = new KComboBox(frame); @@ -117,10 +117,10 @@ UseOrnamentDialog::UseOrnamentDialog(QWidget *parent, m_composition->getTriggerSegments().begin(); i != m_composition->getTriggerSegments().end(); ++i) { m_ornament->insertItem - (QString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); + (TQString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); } - label = new QLabel(i18n("Perform with timing: "), frame); + label = new TQLabel(i18n("Perform with timing: "), frame); layout->addWidget(label, 1, 0); m_adjustTime = new KComboBox(frame); @@ -131,7 +131,7 @@ UseOrnamentDialog::UseOrnamentDialog(QWidget *parent, m_adjustTime->insertItem(i18n("End at same time as note")); m_adjustTime->insertItem(i18n("Stretch or squash segment to note duration")); - m_retune = new QCheckBox(i18n("Adjust pitch to note"), frame); + m_retune = new TQCheckBox(i18n("Adjust pitch to note"), frame); m_retune->setChecked(true); layout->addWidget(m_retune, 2, 1); diff --git a/src/gui/dialogs/UseOrnamentDialog.h b/src/gui/dialogs/UseOrnamentDialog.h index d721329..17e82b9 100644 --- a/src/gui/dialogs/UseOrnamentDialog.h +++ b/src/gui/dialogs/UseOrnamentDialog.h @@ -33,10 +33,10 @@ #include <vector> -class QWidget; -class QLineEdit; -class QLabel; -class QCheckBox; +class TQWidget; +class TQLineEdit; +class TQLabel; +class TQCheckBox; class KComboBox; @@ -51,7 +51,7 @@ class UseOrnamentDialog : public KDialogBase Q_OBJECT public: - UseOrnamentDialog(QWidget *parent, Composition *); + UseOrnamentDialog(TQWidget *parent, Composition *); TriggerSegmentId getId() const; Mark getMark() const; @@ -70,9 +70,9 @@ protected: Composition *m_composition; KComboBox *m_ornament; KComboBox *m_mark; - QLabel *m_textLabel; - QLineEdit *m_text; - QCheckBox *m_retune; + TQLabel *m_textLabel; + TQLineEdit *m_text; + TQCheckBox *m_retune; KComboBox *m_adjustTime; }; diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp index 13bd294..cdf73cc 100644 --- a/src/gui/editors/eventlist/EventView.cpp +++ b/src/gui/editors/eventlist/EventView.cpp @@ -68,23 +68,23 @@ #include <klineeditdlg.h> #include <klistview.h> #include <kxmlguiclient.h> -#include <qbuttongroup.h> -#include <qcanvas.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcanvas.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> @@ -97,7 +97,7 @@ EventView::m_lastSetEventFilter = -1; EventView::EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent): + TQWidget *parent): EditViewBase(doc, segments, 2, parent, "eventview"), m_eventFilter(Note | Text | SystemExclusive | Controller | ProgramChange | PitchBend | Indication | Other), @@ -126,25 +126,25 @@ EventView::EventView(RosegardenGUIDoc *doc, // define some note filtering buttons in a group // m_filterGroup = - new QButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); - - m_noteCheckBox = new QCheckBox(i18n("Note"), m_filterGroup); - m_programCheckBox = new QCheckBox(i18n("Program Change"), m_filterGroup); - m_controllerCheckBox = new QCheckBox(i18n("Controller"), m_filterGroup); - m_pitchBendCheckBox = new QCheckBox(i18n("Pitch Bend"), m_filterGroup); - m_sysExCheckBox = new QCheckBox(i18n("System Exclusive"), m_filterGroup); - m_keyPressureCheckBox = new QCheckBox(i18n("Key Pressure"), m_filterGroup); - m_channelPressureCheckBox = new QCheckBox(i18n("Channel Pressure"), m_filterGroup); - m_restCheckBox = new QCheckBox(i18n("Rest"), m_filterGroup); - m_indicationCheckBox = new QCheckBox(i18n("Indication"), m_filterGroup); - m_textCheckBox = new QCheckBox(i18n("Text"), m_filterGroup); - m_otherCheckBox = new QCheckBox(i18n("Other"), m_filterGroup); + new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); + + m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup); + m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup); + m_controllerCheckBox = new TQCheckBox(i18n("Controller"), m_filterGroup); + m_pitchBendCheckBox = new TQCheckBox(i18n("Pitch Bend"), m_filterGroup); + m_sysExCheckBox = new TQCheckBox(i18n("System Exclusive"), m_filterGroup); + m_keyPressureCheckBox = new TQCheckBox(i18n("Key Pressure"), m_filterGroup); + m_channelPressureCheckBox = new TQCheckBox(i18n("Channel Pressure"), m_filterGroup); + m_restCheckBox = new TQCheckBox(i18n("Rest"), m_filterGroup); + m_indicationCheckBox = new TQCheckBox(i18n("Indication"), m_filterGroup); + m_textCheckBox = new TQCheckBox(i18n("Text"), m_filterGroup); + m_otherCheckBox = new TQCheckBox(i18n("Other"), m_filterGroup); m_grid->addWidget(m_filterGroup, 2, 0); // Connect up // - connect(m_filterGroup, SIGNAL(released(int)), - SLOT(slotModifyFilter(int))); + connect(m_filterGroup, TQT_SIGNAL(released(int)), + TQT_SLOT(slotModifyFilter(int))); m_eventList = new KListView(getCentralWidget()); m_eventList->setItemsRenameable(true); @@ -157,41 +157,41 @@ EventView::EventView(RosegardenGUIDoc *doc, TriggerSegmentRec *rec = segments[0]->getComposition()->getTriggerSegmentRec(id); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); - QFrame *frame = new QFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 5, 3, 5, 5); + TQFrame *frame = new TQFrame(groupBox); + TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5); - layout->addWidget(new QLabel(i18n("Label: "), frame), 0, 0); - QString label = strtoqstr(segments[0]->getLabel()); + layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); + TQString label = strtoqstr(segments[0]->getLabel()); if (label == "") label = i18n("<no label>"); - m_triggerName = new QLabel(label, frame); + m_triggerName = new TQLabel(label, frame); layout->addWidget(m_triggerName, 0, 1); - QPushButton *editButton = new QPushButton(i18n("edit"), frame); + TQPushButton *editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 0, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerName())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName())); - layout->addWidget(new QLabel(i18n("Base pitch: "), frame), 1, 0); - m_triggerPitch = new QLabel(QString("%1").arg(rec->getBasePitch()), frame); + layout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); + m_triggerPitch = new TQLabel(TQString("%1").arg(rec->getBasePitch()), frame); layout->addWidget(m_triggerPitch, 1, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 1, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerPitch())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch())); - layout->addWidget(new QLabel(i18n("Base velocity: "), frame), 2, 0); - m_triggerVelocity = new QLabel(QString("%1").arg(rec->getBaseVelocity()), frame); + layout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); + m_triggerVelocity = new TQLabel(TQString("%1").arg(rec->getBaseVelocity()), frame); layout->addWidget(m_triggerVelocity, 2, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 2, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerVelocity())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity())); /*!!! Comment out these two options, which are not yet used anywhere else -- intended for use with library ornaments, not yet implemented - layout->addWidget(new QLabel(i18n("Default timing: "), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); KComboBox *adjust = new KComboBox(frame); layout->addMultiCellWidget(adjust, 3, 3, 1, 2); @@ -211,11 +211,11 @@ EventView::EventView(RosegardenGUIDoc *doc, adjust->setCurrentItem(2); } - connect(adjust, SIGNAL(activated(int)), this, SLOT(slotTriggerTimeAdjustChanged(int))); + connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int))); - QCheckBox *retune = new QCheckBox(i18n("Adjust pitch to trigger note by default"), frame); + TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame); retune->setChecked(rec->getDefaultRetune()); - connect(retune, SIGNAL(clicked()), this, SLOT(slotTriggerRetuneChanged())); + connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged())); layout->addMultiCellWidget(retune, 4, 4, 1, 2); */ @@ -232,15 +232,15 @@ EventView::EventView(RosegardenGUIDoc *doc, // Connect double clicker // - connect(m_eventList, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotPopupEventEditor(QListViewItem*))); + connect(m_eventList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotPopupEventEditor(TQListViewItem*))); connect(m_eventList, - SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), - SLOT(slotPopupMenu(QListViewItem*, const QPoint&, int))); + TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)), + TQT_SLOT(slotPopupMenu(TQListViewItem*, const TQPoint&, int))); m_eventList->setAllColumnsShowFocus(true); - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); m_eventList->addColumn(i18n("Time ")); m_eventList->addColumn(i18n("Duration ")); @@ -299,11 +299,11 @@ EventView::applyLayout(int /*staffNo*/) // of the view. // if (m_listSelection.size() == 0) { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -327,11 +327,11 @@ EventView::applyLayout(int /*staffNo*/) timeT eventTime = helper.getSoundingAbsoluteTime(it); - QString velyStr; - QString pitchStr; - QString data1Str = ""; - QString data2Str = ""; - QString durationStr; + TQString velyStr; + TQString pitchStr; + TQString data1Str = ""; + TQString data2Str = ""; + TQString durationStr; // Event filters // @@ -386,14 +386,14 @@ EventView::applyLayout(int /*staffNo*/) if ((*it)->has(BaseProperties::PITCH)) { int p = (*it)->get <Int>(BaseProperties::PITCH); - pitchStr = QString("%1 %2 ") + pitchStr = TQString("%1 %2 ") .arg(p).arg(MidiPitchLabel(p).getQString()); } else if ((*it)->isa(Note::EventType)) { pitchStr = "<not set>"; } if ((*it)->has(BaseProperties::VELOCITY)) { - velyStr = QString("%1 "). + velyStr = TQString("%1 "). arg((*it)->get <Int>(BaseProperties::VELOCITY)); } else if ((*it)->isa(Note::EventType)) { @@ -401,60 +401,60 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(Controller::NUMBER)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(Controller::NUMBER)); } else if ((*it)->has(Text::TextTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextTypePropertyName))); } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Indication:: IndicationTypePropertyName))); } else if ((*it)->has(::Rosegarden::Key::KeyPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (::Rosegarden::Key::KeyPropertyName))); } else if ((*it)->has(Clef::ClefPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Clef::ClefPropertyName))); } else if ((*it)->has(PitchBend::MSB)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::MSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_TYPE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (BaseProperties::BEAMED_GROUP_TYPE))); } if ((*it)->has(Controller::VALUE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(Controller::VALUE)); } else if ((*it)->has(Text::TextPropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextPropertyName))); /*!!! } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get<Int>(Indication:: IndicationDurationPropertyName)); */ } else if ((*it)->has(PitchBend::LSB)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::LSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_ID)) { @@ -464,26 +464,26 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(ProgramChange::PROGRAM)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ProgramChange::PROGRAM) + 1); } if ((*it)->has(ChannelPressure::PRESSURE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ChannelPressure::PRESSURE)); } if ((*it)->isa(KeyPressure::EventType) && (*it)->has(KeyPressure::PITCH)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PITCH)); } if ((*it)->has(KeyPressure::PRESSURE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PRESSURE)); } @@ -497,7 +497,7 @@ EventView::applyLayout(int /*staffNo*/) timeMode); } - QString timeStr = makeTimeString(eventTime, timeMode); + TQString timeStr = makeTimeString(eventTime, timeMode); new EventViewItem(m_segments[i], *it, @@ -515,15 +515,15 @@ EventView::applyLayout(int /*staffNo*/) if (m_eventList->childCount() == 0) { if (m_segments.size()) - new QListViewItem(m_eventList, + new TQListViewItem(m_eventList, i18n("<no events at this filter level>")); else - new QListViewItem(m_eventList, i18n("<no events>")); + new TQListViewItem(m_eventList, i18n("<no events>")); - m_eventList->setSelectionMode(QListView::NoSelection); + m_eventList->setSelectionMode(TQListView::NoSelection); stateChanged("have_selection", KXMLGUIClient::StateReverse); } else { - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); // If no selection then select the first event if (m_listSelection.size() == 0) @@ -566,7 +566,7 @@ EventView::makeInitialSelection(timeT time) int i = 0; - for (QListViewItem *child = m_eventList->firstChild(); + for (TQListViewItem *child = m_eventList->firstChild(); child; child = child->nextSibling()) { @@ -612,7 +612,7 @@ EventView::makeTimeString(timeT time, int timeMode) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (time, bar, beat, fraction, remainder); ++bar; - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -628,12 +628,12 @@ EventView::makeTimeString(timeT time, int timeMode) { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(time); + return TQString("%1 ").arg(time); } } @@ -648,7 +648,7 @@ EventView::makeDurationString(timeT time, int bar, beat, fraction, remainder; getDocument()->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time, RealTime rt = getDocument()->getComposition().getRealTimeDifference (time, time + duration); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(duration); + return TQString("%1 ").arg(duration); } } @@ -693,7 +693,7 @@ void EventView::slotEditTriggerName() { bool ok = false; - QString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), + TQString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), strtoqstr(m_segments[0]->getLabel()), &ok, this); @@ -716,10 +716,10 @@ EventView::slotEditTriggerPitch() PitchDialog *dlg = new PitchDialog(this, i18n("Base pitch"), rec->getBasePitch()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBasePitchCommand (&getDocument()->getComposition(), id, dlg->getPitch())); - m_triggerPitch->setText(QString("%1").arg(dlg->getPitch())); + m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch())); } } @@ -734,10 +734,10 @@ EventView::slotEditTriggerVelocity() TrivialVelocityDialog *dlg = new TrivialVelocityDialog (this, i18n("Base velocity"), rec->getBaseVelocity()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand (&getDocument()->getComposition(), id, dlg->getVelocity())); - m_triggerVelocity->setText(QString("%1").arg(dlg->getVelocity())); + m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity())); } } @@ -789,7 +789,7 @@ EventView::slotTriggerRetuneChanged() void EventView::slotEditCut() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -797,8 +797,8 @@ EventView::slotEditCut() RG_DEBUG << "EventView::slotEditCut - cutting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *cutSelection = 0; int itemIndex = -1; @@ -833,7 +833,7 @@ EventView::slotEditCut() void EventView::slotEditCopy() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -841,8 +841,8 @@ EventView::slotEditCopy() RG_DEBUG << "EventView::slotEditCopy - copying " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *copySelection = 0; @@ -883,7 +883,7 @@ EventView::slotEditPaste() timeT insertionTime = 0; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { EventViewItem *item = dynamic_cast<EventViewItem*>(selection.at(0)); @@ -894,8 +894,8 @@ EventView::slotEditPaste() // m_listSelection.clear(); - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -920,15 +920,15 @@ EventView::slotEditPaste() void EventView::slotEditDelete() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; RG_DEBUG << "EventView::slotEditDelete - deleting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *deleteSelection = 0; int itemIndex = -1; @@ -974,7 +974,7 @@ EventView::slotEditInsert() timeT insertTime = m_segments[0]->getStartTime(); timeT insertDuration = 960; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -999,7 +999,7 @@ EventView::slotEditInsert() SimpleEventEditDialog dialog(this, getDocument(), *event, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { EventInsertionCommand *command = new EventInsertionCommand(*m_segments[0], new Event(dialog.getEvent())); @@ -1012,7 +1012,7 @@ EventView::slotEditEvent() { RG_DEBUG << "EventView::slotEditEvent" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1022,7 +1022,7 @@ EventView::slotEditEvent() Event *event = item->getEvent(); SimpleEventEditDialog dialog(this, getDocument(), *event, false); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1039,7 +1039,7 @@ EventView::slotEditEventAdvanced() { RG_DEBUG << "EventView::slotEditEventAdvanced" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1049,7 +1049,7 @@ EventView::slotEditEventAdvanced() Event *event = item->getEvent(); EventEditDialog dialog(this, *event); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1084,15 +1084,15 @@ void EventView::slotFilterSelection() { m_listSelection.clear(); - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { @@ -1117,45 +1117,45 @@ EventView::setupActions() { EditViewBase::setupActions("eventlist.rc"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert.png")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); new KAction(i18n("&Insert Event"), icon, Key_I, this, - SLOT(slotEditInsert()), actionCollection(), + TQT_SLOT(slotEditInsert()), actionCollection(), "insert"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); + icon = TQIconSet(pixmap); new KAction(i18n("&Delete Event"), icon, Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Edit Event"), icon, Key_E, this, - SLOT(slotEditEvent()), actionCollection(), + TQT_SLOT(slotEditEvent()), actionCollection(), "edit_simple"); pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this, - SLOT(slotEditEventAdvanced()), actionCollection(), + TQT_SLOT(slotEditEventAdvanced()), actionCollection(), "edit_advanced"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); m_config->setGroup(EventViewConfigGroup); @@ -1164,30 +1164,30 @@ EventView::setupActions() KRadioAction *action; pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -1211,8 +1211,8 @@ EventView::initStatusBar() KStatusBar* sb = statusBar(); /* - m_hoveredOverNoteName = new QLabel(sb); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); m_hoveredOverAbsoluteTime->setMinimumWidth(160); @@ -1226,7 +1226,7 @@ EventView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - //m_selectionCounter = new QLabel(sb); + //m_selectionCounter = new TQLabel(sb); //sb->addWidget(m_selectionCounter); } @@ -1237,7 +1237,7 @@ EventView::getViewSize() } void -EventView::setViewSize(QSize s) +EventView::setViewSize(TQSize s) { m_eventList->setFixedSize(s); } @@ -1271,7 +1271,7 @@ EventView::getCurrentSegment() void EventView::slotModifyFilter(int button) { - QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); if (checkBox == 0) return ; @@ -1468,7 +1468,7 @@ EventView::slotRawTime() } void -EventView::slotPopupEventEditor(QListViewItem *item) +EventView::slotPopupEventEditor(TQListViewItem *item) { EventViewItem *eItem = dynamic_cast<EventViewItem*>(item); @@ -1479,7 +1479,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1492,7 +1492,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) } void -EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) +EventView::slotPopupMenu(TQListViewItem *item, const TQPoint &pos, int) { if (!item) return ; @@ -1505,7 +1505,7 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) createMenu(); if (m_menu) - //m_menu->exec(QCursor::pos()); + //m_menu->exec(TQCursor::pos()); m_menu->exec(pos); else RG_DEBUG << "EventView::showMenu() : no menu to show\n"; @@ -1514,12 +1514,12 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) void EventView::createMenu() { - m_menu = new QPopupMenu(this); + m_menu = new TQPopupMenu(this); m_menu->insertItem(i18n("Open in Event Editor"), 0); m_menu->insertItem(i18n("Open in Expert Event Editor"), 1); - connect(m_menu, SIGNAL(activated(int)), - SLOT(slotMenuActivated(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotMenuActivated(int))); } void @@ -1536,7 +1536,7 @@ EventView::slotMenuActivated(int value) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1554,7 +1554,7 @@ EventView::slotMenuActivated(int value) Event *event = eItem->getEvent(); EventEditDialog *dialog = new EventEditDialog(this, *event); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, diff --git a/src/gui/editors/eventlist/EventView.h b/src/gui/editors/eventlist/EventView.h index 4c540e6..fc4719a 100644 --- a/src/gui/editors/eventlist/EventView.h +++ b/src/gui/editors/eventlist/EventView.h @@ -31,19 +31,19 @@ #include "base/Segment.h" #include "gui/general/EditViewBase.h" #include <set> -#include <qsize.h> -#include <qstring.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QPopupMenu; -class QPoint; -class QListViewItem; -class QLabel; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQPopupMenu; +class TQPoint; +class TQListViewItem; +class TQLabel; +class TQCheckBox; +class TQButtonGroup; class KListView; @@ -80,7 +80,7 @@ class EventView : public EditViewBase, public SegmentObserver public: EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent); + TQWidget *parent); virtual ~EventView(); @@ -94,8 +94,8 @@ public: virtual void setupActions(); virtual void initStatusBar(); - virtual QSize getViewSize(); - virtual void setViewSize(QSize); + virtual TQSize getViewSize(); + virtual void setViewSize(TQSize); // Set the button states to the current filter positions // @@ -128,12 +128,12 @@ public slots: // Show RMB menu // - void slotPopupMenu(QListViewItem*, const QPoint&, int); + void slotPopupMenu(TQListViewItem*, const TQPoint&, int); void slotMenuActivated(int); // on double click on the event list // - void slotPopupEventEditor(QListViewItem*); + void slotPopupEventEditor(TQListViewItem*); // Change filter parameters // @@ -160,8 +160,8 @@ protected: virtual void readOptions(); void makeInitialSelection(timeT); - QString makeTimeString(timeT time, int timeMode); - QString makeDurationString(timeT time, + TQString makeTimeString(timeT time, int timeMode); + TQString makeDurationString(timeT time, timeT duration, int timeMode); virtual Segment *getCurrentSegment(); @@ -170,32 +170,32 @@ protected: //--------------- Data members --------------------------------- bool m_isTriggerSegment; - QLabel *m_triggerName; - QLabel *m_triggerPitch; - QLabel *m_triggerVelocity; + TQLabel *m_triggerName; + TQLabel *m_triggerPitch; + TQLabel *m_triggerVelocity; KListView *m_eventList; int m_eventFilter; static int m_lastSetEventFilter; - QButtonGroup *m_filterGroup; - QCheckBox *m_noteCheckBox; - QCheckBox *m_textCheckBox; - QCheckBox *m_sysExCheckBox; - QCheckBox *m_programCheckBox; - QCheckBox *m_controllerCheckBox; - QCheckBox *m_restCheckBox; - QCheckBox *m_pitchBendCheckBox; - QCheckBox *m_keyPressureCheckBox; - QCheckBox *m_channelPressureCheckBox; - QCheckBox *m_indicationCheckBox; - QCheckBox *m_otherCheckBox; + TQButtonGroup *m_filterGroup; + TQCheckBox *m_noteCheckBox; + TQCheckBox *m_textCheckBox; + TQCheckBox *m_sysExCheckBox; + TQCheckBox *m_programCheckBox; + TQCheckBox *m_controllerCheckBox; + TQCheckBox *m_restCheckBox; + TQCheckBox *m_pitchBendCheckBox; + TQCheckBox *m_keyPressureCheckBox; + TQCheckBox *m_channelPressureCheckBox; + TQCheckBox *m_indicationCheckBox; + TQCheckBox *m_otherCheckBox; std::vector<int> m_listSelection; std::set<Event *> m_deletedEvents; // deleted since last refresh - QPopupMenu *m_menu; + TQPopupMenu *m_menu; }; diff --git a/src/gui/editors/eventlist/EventViewItem.cpp b/src/gui/editors/eventlist/EventViewItem.cpp index 4435a2b..b5f4d38 100644 --- a/src/gui/editors/eventlist/EventViewItem.cpp +++ b/src/gui/editors/eventlist/EventViewItem.cpp @@ -30,13 +30,13 @@ namespace Rosegarden // Reimplementation of sort for numeric columns - taking the // right hand argument from the left is equivalent to the -// the QString compare(). +// the TQString compare(). // int -EventViewItem::compare(QListViewItem *i, int col, bool ascending) const +EventViewItem::compare(TQListViewItem *i, int col, bool ascending) const { EventViewItem *ei = dynamic_cast<EventViewItem *>(i); - if (!ei) return QListViewItem::compare(i, col, ascending); + if (!ei) return TQListViewItem::compare(i, col, ascending); if (col == 0) { // time Rosegarden::Event &e1 = *m_event; diff --git a/src/gui/editors/eventlist/EventViewItem.h b/src/gui/editors/eventlist/EventViewItem.h index 832e652..a94e29f 100644 --- a/src/gui/editors/eventlist/EventViewItem.h +++ b/src/gui/editors/eventlist/EventViewItem.h @@ -33,7 +33,7 @@ namespace Rosegarden class Segment; class Event; -// EventView specialisation of a QListViewItem with the +// EventView specialisation of a TQListViewItem with the // addition of a segment pointer // class EventViewItem : public KListViewItem @@ -55,14 +55,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - QListView *parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null) : + TQListView *parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -70,14 +70,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null) : + KListViewItem *parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -88,7 +88,7 @@ public: // Reimplement so that we can sort numerically // - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp index 4e609d4..6b9f748 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp @@ -24,18 +24,18 @@ #include "TrivialVelocityDialog.h" -#include <qspinbox.h> -#include <qlabel.h> -#include <qhbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqhbox.h> namespace Rosegarden { -TrivialVelocityDialog::TrivialVelocityDialog(QWidget *parent, QString label, int deft) : +TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *parent, TQString label, int deft) : KDialogBase(parent, 0, true, label, Ok | Cancel) { - QHBox *hbox = makeHBoxMainWidget(); - new QLabel(label, hbox); - m_spin = new QSpinBox(0, 127, 1, hbox); + TQHBox *hbox = makeHBoxMainWidget(); + new TQLabel(label, hbox); + m_spin = new TQSpinBox(0, 127, 1, hbox); m_spin->setValue(deft); } diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.h b/src/gui/editors/eventlist/TrivialVelocityDialog.h index ca19de9..c164110 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.h +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.h @@ -27,20 +27,20 @@ #include <kdialogbase.h> -class QHBox; -class QSpinBox; +class TQHBox; +class TQSpinBox; namespace Rosegarden { class TrivialVelocityDialog : public KDialogBase { public: - TrivialVelocityDialog(QWidget *parent, QString label, int deft); + TrivialVelocityDialog(TQWidget *parent, TQString label, int deft); int getVelocity(); protected: - QSpinBox *m_spin; + TQSpinBox *m_spin; }; } diff --git a/src/gui/editors/guitar/Chord.cpp b/src/gui/editors/guitar/Chord.cpp index 23efe7d..c697e96 100644 --- a/src/gui/editors/guitar/Chord.cpp +++ b/src/gui/editors/guitar/Chord.cpp @@ -25,7 +25,7 @@ #include "Chord.h" #include "base/Event.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { @@ -44,13 +44,13 @@ Chord::Chord() { } -Chord::Chord(const QString& root, const QString& ext) +Chord::Chord(const TQString& root, const TQString& ext) : m_root(root), m_ext(ext), m_isUserChord(false) { if (m_ext.isEmpty()) - m_ext = QString::null; + m_ext = TQString::null; } Chord::Chord(const Event& e) @@ -66,15 +66,15 @@ Chord::Chord(const Event& e) ok = e.get<String>(ExtPropertyName, f); if (ok) { if (f.length() == 0) - m_ext = QString::null; + m_ext = TQString::null; else m_ext = f; } ok = e.get<String>(FingeringPropertyName, f); if (ok) { - QString qf(f); - QString errString; + TQString qf(f); + TQString errString; Fingering fingering = Fingering::parseFingering(qf, errString); setFingering(fingering); @@ -90,7 +90,7 @@ Event* Chord::getAsEvent(timeT absoluteTime) const return e; } -const QRegExp Chord::ALT_BASS_REGEXP("/[A-G]"); +const TQRegExp Chord::ALT_BASS_REGEXP("/[A-G]"); bool operator<(const Chord& a, const Chord& b) { diff --git a/src/gui/editors/guitar/Chord.h b/src/gui/editors/guitar/Chord.h index 9e84cc3..f519c9c 100644 --- a/src/gui/editors/guitar/Chord.h +++ b/src/gui/editors/guitar/Chord.h @@ -30,8 +30,8 @@ #include "misc/Debug.h" #include <vector> -#include <qstring.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqregexp.h> namespace Rosegarden { @@ -53,7 +53,7 @@ public: static const PropertyName FingeringPropertyName; Chord(); - Chord(const QString& root, const QString& ext = QString::null); + Chord(const TQString& root, const TQString& ext = TQString::null); Chord(const Event&); Event* getAsEvent(timeT absoluteTime) const; @@ -64,11 +64,11 @@ public: bool isUserChord() const { return m_isUserChord; } void setUserChord(bool c) { m_isUserChord = c; } - QString getRoot() const { return m_root; } - void setRoot(QString r) { m_root = r; } + TQString getRoot() const { return m_root; } + void setRoot(TQString r) { m_root = r; } - QString getExt() const { return m_ext; } - void setExt(QString r) { m_ext = r.isEmpty() ? QString::null : r; } + TQString getExt() const { return m_ext; } + void setExt(TQString r) { m_ext = r.isEmpty() ? TQString::null : r; } bool hasAltBass() const { return m_ext.contains(ALT_BASS_REGEXP); } @@ -87,10 +87,10 @@ public: protected: - static const QRegExp ALT_BASS_REGEXP; + static const TQRegExp ALT_BASS_REGEXP; - QString m_root; - QString m_ext; + TQString m_root; + TQString m_ext; Fingering m_fingering; diff --git a/src/gui/editors/guitar/ChordMap.cpp b/src/gui/editors/guitar/ChordMap.cpp index 06662d9..207a336 100644 --- a/src/gui/editors/guitar/ChordMap.cpp +++ b/src/gui/editors/guitar/ChordMap.cpp @@ -25,8 +25,8 @@ #include "misc/Debug.h" #include "ChordMap.h" -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> namespace Rosegarden { @@ -47,7 +47,7 @@ void ChordMap::insert(const Chord& c) ChordMap::chordarray -ChordMap::getChords(const QString& root, const QString& ext) const +ChordMap::getChords(const TQString& root, const TQString& ext) const { chordarray res; @@ -74,15 +74,15 @@ ChordMap::getChords(const QString& root, const QString& ext) const QStringList ChordMap::getRootList() const { - static QStringList rootNotes; + static TQStringList rootNotes; if (rootNotes.count() == 0) { - rootNotes = QStringList::split(QString(","), "A,A#/Bb,B,C,C#/Db,D,D#/Eb,E,F,F#/Gb,G,G#/Ab"); + rootNotes = TQStringList::split(TQString(","), "A,A#/Bb,B,C,C#/Db,D,D#/Eb,E,F,F#/Gb,G,G#/Ab"); } // extract roots from map itself - not a very good idea // -// QString currentRoot; +// TQString currentRoot; // // for(chordset::const_iterator i = m_map.begin(); i != m_map.end(); ++i) { // const Chord& chord = *i; @@ -96,10 +96,10 @@ ChordMap::getRootList() const } QStringList -ChordMap::getExtList(const QString& root) const +ChordMap::getExtList(const TQString& root) const { - QStringList extList; - QString currentExt = "ZZ"; + TQStringList extList; + TQString currentExt = "ZZ"; Chord tmp(root); @@ -134,14 +134,14 @@ ChordMap::remove(const Chord& c) m_needSave = true; } -bool ChordMap::saveDocument(const QString& filename, bool userChordsOnly, QString& errMsg) +bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQString& errMsg) { - QFile file(filename); + TQFile file(filename); file.open(IO_WriteOnly); - QTextStream outStream(&file); + TQTextStream outStream(&file); - outStream.setEncoding(QTextStream::UnicodeUTF8); + outStream.setEncoding(TQTextStream::UnicodeUTF8); outStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<!DOCTYPE rosegarden-chord-data>\n" @@ -153,7 +153,7 @@ bool ChordMap::saveDocument(const QString& filename, bool userChordsOnly, QStrin outStream << "<chords>\n"; - QString currentExt, currentRoot; + TQString currentExt, currentRoot; for(iterator i = begin(); i != end(); ++i) { const Chord& chord = *i; diff --git a/src/gui/editors/guitar/ChordMap.h b/src/gui/editors/guitar/ChordMap.h index 5b7488d..7c7ba04 100644 --- a/src/gui/editors/guitar/ChordMap.h +++ b/src/gui/editors/guitar/ChordMap.h @@ -27,7 +27,7 @@ #include "Chord.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <set> namespace Rosegarden @@ -56,17 +56,17 @@ public: void substitute(const Chord& oldChord, const Chord& newChord); void remove(const Chord&); - chordarray getChords(const QString& root, const QString& ext) const; + chordarray getChords(const TQString& root, const TQString& ext) const; - QStringList getRootList() const; - QStringList getExtList(const QString& root) const; + TQStringList getRootList() const; + TQStringList getExtList(const TQString& root) const; void debugDump() const; bool needSave() const { return m_needSave; } void clearNeedSave() { m_needSave = false; } - bool saveDocument(const QString& filename, bool userChordsOnly, QString& errMsg); + bool saveDocument(const TQString& filename, bool userChordsOnly, TQString& errMsg); iterator begin() { return m_map.begin(); } iterator end() { return m_map.end(); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.cpp b/src/gui/editors/guitar/ChordXmlHandler.cpp index 701c43c..6802485 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.cpp +++ b/src/gui/editors/guitar/ChordXmlHandler.cpp @@ -41,12 +41,12 @@ bool ChordXmlHandler::startDocument() return true; } -bool ChordXmlHandler::startElement(const QString& namespaceURI, - const QString& localName, - const QString& qName, - const QXmlAttributes& atts) +bool ChordXmlHandler::startElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName, + const TQXmlAttributes& atts) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "chordset") { // start new chord set @@ -60,7 +60,7 @@ bool ChordXmlHandler::startElement(const QString& namespaceURI, m_currentChord.setExt(atts.value("ext").stripWhiteSpace()); if (atts.index("user") >= 0) { - QString userVal = atts.value("user").stripWhiteSpace().lower(); + TQString userVal = atts.value("user").stripWhiteSpace().lower(); bool res = (userVal == "yes" || userVal == "1" || userVal == "true"); m_currentChord.setUserChord(res); } else { @@ -74,11 +74,11 @@ bool ChordXmlHandler::startElement(const QString& namespaceURI, return true; } -bool ChordXmlHandler::endElement(const QString& namespaceURI, - const QString& localName, - const QString& qName) +bool ChordXmlHandler::endElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "fingering") { @@ -97,9 +97,9 @@ bool ChordXmlHandler::endElement(const QString& namespaceURI, return true; } -bool ChordXmlHandler::characters(const QString& ch) +bool ChordXmlHandler::characters(const TQString& ch) { - QString ch2 = ch.simplifyWhiteSpace(); + TQString ch2 = ch.simplifyWhiteSpace(); if (!ch2.isEmpty() && m_inFingering) { if (!parseFingering(ch2)) @@ -114,9 +114,9 @@ bool ChordXmlHandler::endDocument() return true; } -bool ChordXmlHandler::parseFingering(const QString& ch) { +bool ChordXmlHandler::parseFingering(const TQString& ch) { - QString errString; + TQString errString; Guitar::Fingering fingering = Guitar::Fingering::parseFingering(ch, errString); @@ -131,23 +131,23 @@ bool ChordXmlHandler::parseFingering(const QString& ch) { } bool -ChordXmlHandler::error(const QXmlParseException& exception) +ChordXmlHandler::error(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3") + m_errorString = TQString("%1 at line %2, column %3") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - return QXmlDefaultHandler::error( exception ); + return TQXmlDefaultHandler::error( exception ); } bool -ChordXmlHandler::fatalError(const QXmlParseException& exception) +ChordXmlHandler::fatalError(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3") + m_errorString = TQString("%1 at line %2, column %3") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()); - return QXmlDefaultHandler::fatalError( exception ); + return TQXmlDefaultHandler::fatalError( exception ); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.h b/src/gui/editors/guitar/ChordXmlHandler.h index ca25168..f9c2e8b 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.h +++ b/src/gui/editors/guitar/ChordXmlHandler.h @@ -30,7 +30,7 @@ #include "Chord.h" #include "ChordMap.h" -#include <qxml.h> +#include <tqxml.h> namespace Rosegarden @@ -44,31 +44,31 @@ public: /// overloaded handler functions virtual bool startDocument(); - virtual bool startElement(const QString& namespaceURI, - const QString& localName, - const QString& qName, - const QXmlAttributes& atts); + virtual bool startElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName, + const TQXmlAttributes& atts); - virtual bool endElement(const QString& namespaceURI, - const QString& localName, - const QString& qName); + virtual bool endElement(const TQString& namespaceURI, + const TQString& localName, + const TQString& qName); - virtual bool characters(const QString& ch); + virtual bool characters(const TQString& ch); virtual bool endDocument (); /// Return the error string set during the parsing (if any) - QString errorString() { return m_errorString; } - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + TQString errorString() { return m_errorString; } + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); protected: - bool parseFingering(const QString& ch); + bool parseFingering(const TQString& ch); Guitar::Chord m_currentChord; - QString m_currentRoot; - QString m_errorString; + TQString m_currentRoot; + TQString m_errorString; bool m_inFingering; Guitar::ChordMap& m_chordMap; }; diff --git a/src/gui/editors/guitar/Fingering.cpp b/src/gui/editors/guitar/Fingering.cpp index dd1edbd..59459e9 100644 --- a/src/gui/editors/guitar/Fingering.cpp +++ b/src/gui/editors/guitar/Fingering.cpp @@ -26,7 +26,7 @@ #include "misc/Debug.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <sstream> #include <algorithm> #include <klocale.h> @@ -42,9 +42,9 @@ Fingering::Fingering(unsigned int nbStrings) : { } -Fingering::Fingering(QString s) +Fingering::Fingering(TQString s) { - QString errString; + TQString errString; Fingering t = parseFingering(s, errString); m_strings = t.m_strings; } @@ -97,15 +97,15 @@ Fingering::getBarre() const } Fingering -Fingering::parseFingering(const QString& ch, QString& errorString) +Fingering::parseFingering(const TQString& ch, TQString& errorString) { - QStringList tokens = QStringList::split(' ', ch); + TQStringList tokens = TQStringList::split(' ', ch); unsigned int idx = 0; Fingering fingering; - for(QStringList::iterator i = tokens.begin(); i != tokens.end() && idx < fingering.getNbStrings(); ++i, ++idx) { - QString t = *i; + for(TQStringList::iterator i = tokens.begin(); i != tokens.end() && idx < fingering.getNbStrings(); ++i, ++idx) { + TQString t = *i; bool b = false; unsigned int fn = t.toUInt(&b); if (b) { diff --git a/src/gui/editors/guitar/Fingering.h b/src/gui/editors/guitar/Fingering.h index 41d9799..32693dd 100644 --- a/src/gui/editors/guitar/Fingering.h +++ b/src/gui/editors/guitar/Fingering.h @@ -26,7 +26,7 @@ #define _RG_FINGERING_H_ #include <vector> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" namespace Rosegarden @@ -52,7 +52,7 @@ public: static const unsigned int DEFAULT_NB_STRINGS = 6; Fingering(unsigned int nbStrings = DEFAULT_NB_STRINGS); - Fingering(QString); + Fingering(TQString); enum { MUTED = -1, OPEN = 0 }; @@ -78,7 +78,7 @@ public: const_iterator begin() const { return m_strings.begin(); } const_iterator end() const { return m_strings.end(); } - static Fingering parseFingering(const QString&, QString& errorString); + static Fingering parseFingering(const TQString&, TQString& errorString); std::string toString() const; protected: diff --git a/src/gui/editors/guitar/FingeringBox.cpp b/src/gui/editors/guitar/FingeringBox.cpp index 885ba83..6695a66 100644 --- a/src/gui/editors/guitar/FingeringBox.cpp +++ b/src/gui/editors/guitar/FingeringBox.cpp @@ -31,8 +31,8 @@ namespace Rosegarden { -FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, QWidget *parent, const char* name) - : QFrame(parent, name), +FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name) + : TQFrame(parent, name), m_nbFretsDisplayed(nbFrets), m_startFret(1), m_nbStrings(nbStrings), @@ -44,8 +44,8 @@ FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool ed init(); } -FingeringBox::FingeringBox(bool editable, QWidget *parent, const char* name) - : QFrame(parent, name), +FingeringBox::FingeringBox(bool editable, TQWidget *parent, const char* name) + : TQFrame(parent, name), m_nbFretsDisplayed(DEFAULT_NB_DISPLAYED_FRETS), m_startFret(1), m_nbStrings(Guitar::Fingering::DEFAULT_NB_STRINGS), @@ -58,7 +58,7 @@ FingeringBox::FingeringBox(bool editable, QWidget *parent, const char* name) void FingeringBox::init() { - setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); setFixedSize(IMG_WIDTH, IMG_HEIGHT); setBackgroundMode(PaletteBase); if (m_editable) @@ -67,7 +67,7 @@ FingeringBox::init() } void -FingeringBox::drawContents(QPainter* p) +FingeringBox::drawContents(TQPainter* p) { // NOTATION_DEBUG << "FingeringBox::drawContents()" << endl; @@ -140,7 +140,7 @@ FingeringBox::setFingering(const Guitar::Fingering& f) { } unsigned int -FingeringBox::getStringNumber(const QPoint& pos) +FingeringBox::getStringNumber(const TQPoint& pos) { PositionPair result = m_noteSymbols.getStringNumber(maximumHeight(), pos.x(), @@ -156,7 +156,7 @@ FingeringBox::getStringNumber(const QPoint& pos) } unsigned int -FingeringBox::getFretNumber(const QPoint& pos) +FingeringBox::getFretNumber(const TQPoint& pos) { unsigned int fretNum = 0; @@ -178,7 +178,7 @@ FingeringBox::getFretNumber(const QPoint& pos) } void -FingeringBox::mousePressEvent(QMouseEvent *event) +FingeringBox::mousePressEvent(TQMouseEvent *event) { if (!m_editable) return; @@ -194,7 +194,7 @@ FingeringBox::mousePressEvent(QMouseEvent *event) } void -FingeringBox::mouseReleaseEvent(QMouseEvent *event) +FingeringBox::mouseReleaseEvent(TQMouseEvent *event) { if(!m_editable) return ; @@ -250,7 +250,7 @@ FingeringBox::processMouseRelease(unsigned int release_string_num, void -FingeringBox::mouseMoveEvent( QMouseEvent *event ) +FingeringBox::mouseMoveEvent( TQMouseEvent *event ) { if (!m_editable) return; @@ -261,12 +261,12 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) if (transientStringNb != m_transientStringNb || transientFretNb != m_transientFretNb) { - QRect r1 = m_noteSymbols.getTransientNoteSymbolRect(size(), + TQRect r1 = m_noteSymbols.getTransientNoteSymbolRect(size(), m_transientStringNb, m_transientFretNb - (m_startFret - 1)); m_transientStringNb = transientStringNb; m_transientFretNb = transientFretNb; - QRect r2 = m_noteSymbols.getTransientNoteSymbolRect(size(), + TQRect r2 = m_noteSymbols.getTransientNoteSymbolRect(size(), m_transientStringNb, m_transientFretNb - (m_startFret - 1)); @@ -275,7 +275,7 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) // RG_DEBUG << "Fingering::updateTransientPos r1 = " << r1 << " - r2 = " << r2 << endl; -// QRect updateRect = r1 | r2; +// TQRect updateRect = r1 | r2; // update(updateRect); update(); @@ -285,7 +285,7 @@ FingeringBox::mouseMoveEvent( QMouseEvent *event ) } void -FingeringBox::leaveEvent(QEvent*) +FingeringBox::leaveEvent(TQEvent*) { update(); } diff --git a/src/gui/editors/guitar/FingeringBox.h b/src/gui/editors/guitar/FingeringBox.h index b54c0a8..aa76e52 100644 --- a/src/gui/editors/guitar/FingeringBox.h +++ b/src/gui/editors/guitar/FingeringBox.h @@ -27,7 +27,7 @@ #ifndef _RG_FINGERINGBOX_H_ #define _RG_FINGERINGBOX_H_ -#include <qframe.h> +#include <tqframe.h> #include "NoteSymbols.h" #include "Fingering.h" @@ -43,8 +43,8 @@ class FingeringBox : public QFrame static const unsigned int IMG_HEIGHT = 200; public: - FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, QWidget *parent, const char* name = 0); - FingeringBox(bool editable, QWidget *parent, const char* name = 0); + FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name = 0); + FingeringBox(bool editable, TQWidget *parent, const char* name = 0); void setStartFret(unsigned int f) { m_startFret = f; update(); } unsigned int getStartFret() const { return m_startFret; } @@ -59,20 +59,20 @@ public: protected: void init(); - virtual void drawContents(QPainter*); + virtual void drawContents(TQPainter*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void leaveEvent(QEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void leaveEvent(TQEvent*); void processMouseRelease( unsigned int release_string_num, unsigned int release_fret_num); typedef std::pair<bool, unsigned int> PositionPair; - unsigned int getStringNumber(const QPoint&); + unsigned int getStringNumber(const TQPoint&); - unsigned int getFretNumber(const QPoint&); + unsigned int getFretNumber(const TQPoint&); //! Maximum number of frets displayed by FingeringBox unsigned int m_nbFretsDisplayed; @@ -98,7 +98,7 @@ protected: Guitar::NoteSymbols m_noteSymbols; - QRect m_r1, m_r2; + TQRect m_r1, m_r2; }; } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.cpp b/src/gui/editors/guitar/FingeringListBoxItem.cpp index 31b92e9..aeb8fcd 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.cpp +++ b/src/gui/editors/guitar/FingeringListBoxItem.cpp @@ -27,8 +27,8 @@ namespace Rosegarden { -FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, QListBox* parent, QPixmap pixmap, QString fingeringString) - : QListBoxPixmap(parent, pixmap, fingeringString), +FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString) + : TQListBoxPixmap(parent, pixmap, fingeringString), m_chord(chord) { } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.h b/src/gui/editors/guitar/FingeringListBoxItem.h index b7625e2..8b0a81a 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.h +++ b/src/gui/editors/guitar/FingeringListBoxItem.h @@ -26,7 +26,7 @@ #ifndef _RG_FINGERINGLISTBOXITEM_H_ #define _RG_FINGERINGLISTBOXITEM_H_ -#include <qlistbox.h> +#include <tqlistbox.h> #include "Chord.h" namespace Rosegarden { @@ -34,7 +34,7 @@ namespace Rosegarden { class FingeringListBoxItem : public QListBoxPixmap { public: - FingeringListBoxItem(const Guitar::Chord& chord, QListBox* parent, QPixmap pixmap, QString fingeringString); + FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString); const Guitar::Chord& getChord() { return m_chord; } protected: diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp index 60da8b6..8a4fb3e 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp @@ -28,42 +28,42 @@ #include "ChordMap.h" #include <klineedit.h> -#include <qcombobox.h> -#include <qspinbox.h> +#include <tqcombobox.h> +#include <tqspinbox.h> #include <klocale.h> #include <kmessagebox.h> #include <kstddirs.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> namespace Rosegarden { -GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, QWidget *parent) +GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *parent) : KDialogBase(parent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), m_chord(chord), m_chordMap(chordMap) { - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QGridLayout *topLayout = new QGridLayout(page, 7, 2, spacingHint()); + TQGridLayout *topLayout = new TQGridLayout(page, 7, 2, spacingHint()); - topLayout->addWidget(new QLabel(i18n("Start fret"), page), 0, 1); - m_startFret = new QSpinBox(1, 24, 1, page); + topLayout->addWidget(new TQLabel(i18n("Start fret"), page), 0, 1); + m_startFret = new TQSpinBox(1, 24, 1, page); topLayout->addWidget(m_startFret, 1, 1); - connect(m_startFret, SIGNAL(valueChanged(int)), - this, SLOT(slotStartFretChanged(int))); + connect(m_startFret, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotStartFretChanged(int))); - topLayout->addWidget(new QLabel(i18n("Root"), page), 2, 1); - m_rootNotesList = new QComboBox(page); + topLayout->addWidget(new TQLabel(i18n("Root"), page), 2, 1); + m_rootNotesList = new TQComboBox(page); topLayout->addWidget(m_rootNotesList, 3, 1); - topLayout->addWidget(new QLabel(i18n("Extension"), page), 4, 1); - m_ext = new QComboBox(true, page); + topLayout->addWidget(new TQLabel(i18n("Extension"), page), 4, 1); + m_ext = new TQComboBox(true, page); topLayout->addWidget(m_ext, 5, 1); - topLayout->addItem(new QSpacerItem(1, 1), 6, 1); + topLayout->addItem(new TQSpacerItem(1, 1), 6, 1); m_fingeringBox = new FingeringBox(true, page); m_fingeringBox->setFingering(m_chord.getFingering()); @@ -72,13 +72,13 @@ GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Gui NOTATION_DEBUG << "GuitarChordEditorDialog : chord = " << m_chord << endl; - QStringList rootList = m_chordMap.getRootList(); + TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); m_rootNotesList->setCurrentItem(rootList.findIndex(m_chord.getRoot())); } - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); if (extList.count() > 0) { m_ext->insertStringList(extList); m_ext->setCurrentItem(extList.findIndex(m_chord.getExt())); diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.h b/src/gui/editors/guitar/GuitarChordEditorDialog.h index fc01605..f26fcd3 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.h +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.h @@ -30,8 +30,8 @@ #include "Chord.h" #include "ChordMap.h" -class QComboBox; -class QSpinBox; +class TQComboBox; +class TQSpinBox; namespace Rosegarden { @@ -44,7 +44,7 @@ class GuitarChordEditorDialog : public KDialogBase Q_OBJECT public: - GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, QWidget *parent=0); + GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *parent=0); protected slots: void slotStartFretChanged(int); @@ -52,12 +52,12 @@ protected slots: protected: - void populateExtensions(const QStringList&); + void populateExtensions(const TQStringList&); FingeringBox* m_fingeringBox; - QComboBox* m_rootNotesList; - QSpinBox* m_startFret; - QComboBox* m_ext; + TQComboBox* m_rootNotesList; + TQSpinBox* m_startFret; + TQComboBox* m_ext; Guitar::Chord& m_chord; const Guitar::ChordMap& m_chordMap; }; diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp index bd62c1f..5430098 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp @@ -29,11 +29,11 @@ #include "FingeringListBoxItem.h" #include "misc/Debug.h" -#include <qlistbox.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqlistbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> #include <klocale.h> #include <kmessagebox.h> #include <kstddirs.h> @@ -41,34 +41,34 @@ namespace Rosegarden { -GuitarChordSelectorDialog::GuitarChordSelectorDialog(QWidget *parent) +GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *parent) : KDialogBase(parent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) { - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - QGridLayout *topLayout = new QGridLayout(page, 3, 4, spacingHint()); + TQGridLayout *topLayout = new TQGridLayout(page, 3, 4, spacingHint()); - topLayout->addWidget(new QLabel(i18n("Root"), page), 0, 0); - m_rootNotesList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Root"), page), 0, 0); + m_rootNotesList = new TQListBox(page); topLayout->addWidget(m_rootNotesList, 1, 0); - topLayout->addWidget(new QLabel(i18n("Extension"), page), 0, 1); - m_chordExtList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Extension"), page), 0, 1); + m_chordExtList = new TQListBox(page); topLayout->addWidget(m_chordExtList, 1, 1); - m_newFingeringButton = new QPushButton(i18n("New"), page); - m_deleteFingeringButton = new QPushButton(i18n("Delete"), page); - m_editFingeringButton = new QPushButton(i18n("Edit"), page); + m_newFingeringButton = new TQPushButton(i18n("New"), page); + m_deleteFingeringButton = new TQPushButton(i18n("Delete"), page); + m_editFingeringButton = new TQPushButton(i18n("Edit"), page); - m_chordComplexityCombo = new QComboBox(page); + m_chordComplexityCombo = new TQComboBox(page); m_chordComplexityCombo->insertItem(i18n("beginner")); m_chordComplexityCombo->insertItem(i18n("common")); m_chordComplexityCombo->insertItem(i18n("all")); - connect(m_chordComplexityCombo, SIGNAL(activated(int)), - this, SLOT(slotComplexityChanged(int))); + connect(m_chordComplexityCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotComplexityChanged(int))); - QVBoxLayout* vboxLayout = new QVBoxLayout(page, 5); + TQVBoxLayout* vboxLayout = new TQVBoxLayout(page, 5); topLayout->addMultiCellLayout(vboxLayout, 1, 3, 2, 2); vboxLayout->addWidget(m_chordComplexityCombo); vboxLayout->addStretch(10); @@ -76,26 +76,26 @@ GuitarChordSelectorDialog::GuitarChordSelectorDialog(QWidget *parent) vboxLayout->addWidget(m_deleteFingeringButton); vboxLayout->addWidget(m_editFingeringButton); - connect(m_newFingeringButton, SIGNAL(clicked()), - this, SLOT(slotNewFingering())); - connect(m_deleteFingeringButton, SIGNAL(clicked()), - this, SLOT(slotDeleteFingering())); - connect(m_editFingeringButton, SIGNAL(clicked()), - this, SLOT(slotEditFingering())); + connect(m_newFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewFingering())); + connect(m_deleteFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteFingering())); + connect(m_editFingeringButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditFingering())); - topLayout->addWidget(new QLabel(i18n("Fingerings"), page), 0, 3); - m_fingeringsList = new QListBox(page); + topLayout->addWidget(new TQLabel(i18n("Fingerings"), page), 0, 3); + m_fingeringsList = new TQListBox(page); topLayout->addMultiCellWidget(m_fingeringsList, 1, 2, 3, 3); m_fingeringBox = new FingeringBox(false, page); topLayout->addMultiCellWidget(m_fingeringBox, 2, 2, 0, 1); - connect(m_rootNotesList, SIGNAL(highlighted(int)), - this, SLOT(slotRootHighlighted(int))); - connect(m_chordExtList, SIGNAL(highlighted(int)), - this, SLOT(slotChordExtHighlighted(int))); - connect(m_fingeringsList, SIGNAL(highlighted(QListBoxItem*)), - this, SLOT(slotFingeringHighlighted(QListBoxItem*))); + connect(m_rootNotesList, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotRootHighlighted(int))); + connect(m_chordExtList, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotChordExtHighlighted(int))); + connect(m_fingeringsList, TQT_SIGNAL(highlighted(TQListBoxItem*)), + this, TQT_SLOT(slotFingeringHighlighted(TQListBoxItem*))); } void @@ -103,7 +103,7 @@ GuitarChordSelectorDialog::init() { // populate the listboxes // - std::vector<QString> chordFiles = getAvailableChordFiles(); + std::vector<TQString> chordFiles = getAvailableChordFiles(); parseChordFiles(chordFiles); @@ -115,11 +115,11 @@ GuitarChordSelectorDialog::init() void GuitarChordSelectorDialog::populate() { - QStringList rootList = m_chordMap.getRootList(); + TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); - QStringList extList = m_chordMap.getExtList(rootList.first()); + TQStringList extList = m_chordMap.getExtList(rootList.first()); populateExtensions(extList); Guitar::ChordMap::chordarray chords = m_chordMap.getChords(rootList.first(), extList.first()); @@ -156,7 +156,7 @@ GuitarChordSelectorDialog::slotRootHighlighted(int i) m_chord.setRoot(m_rootNotesList->text(i)); - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); populateExtensions(extList); if (m_chordExtList->count() > 0) m_chordExtList->setCurrentItem(0); @@ -176,7 +176,7 @@ GuitarChordSelectorDialog::slotChordExtHighlighted(int i) } void -GuitarChordSelectorDialog::slotFingeringHighlighted(QListBoxItem* listBoxItem) +GuitarChordSelectorDialog::slotFingeringHighlighted(TQListBoxItem* listBoxItem) { NOTATION_DEBUG << "GuitarChordSelectorDialog::slotFingeringHighlighted\n"; @@ -193,7 +193,7 @@ GuitarChordSelectorDialog::slotComplexityChanged(int) { // simply repopulate the extension list box // - QStringList extList = m_chordMap.getExtList(m_chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); populateExtensions(extList); if (m_chordExtList->count() > 0) m_chordExtList->setCurrentItem(0); @@ -210,7 +210,7 @@ GuitarChordSelectorDialog::slotNewFingering() GuitarChordEditorDialog* chordEditorDialog = new GuitarChordEditorDialog(newChord, m_chordMap, this); - if (chordEditorDialog->exec() == QDialog::Accepted) { + if (chordEditorDialog->exec() == TQDialog::Accepted) { m_chordMap.insert(newChord); // populate lists // @@ -245,7 +245,7 @@ GuitarChordSelectorDialog::slotEditFingering() Guitar::Chord newChord = m_chord; GuitarChordEditorDialog* chordEditorDialog = new GuitarChordEditorDialog(newChord, m_chordMap, this); - if (chordEditorDialog->exec() == QDialog::Accepted) { + if (chordEditorDialog->exec() == TQDialog::Accepted) { NOTATION_DEBUG << "GuitarChordSelectorDialog::slotEditFingering() - current map state :\n"; m_chordMap.debugDump(); m_chordMap.substitute(m_chord, newChord); @@ -280,13 +280,13 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) // select the chord's root // m_rootNotesList->setCurrentItem(0); - QListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); + TQListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); if (correspondingRoot) m_rootNotesList->setSelected(correspondingRoot, true); // update the dialog's complexity setting if needed, then populate the extension list // - QString chordExt = chord.getExt(); + TQString chordExt = chord.getExt(); int complexityLevel = m_chordComplexityCombo->currentItem(); int chordComplexity = evaluateChordComplexity(chordExt); @@ -294,7 +294,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) m_chordComplexityCombo->setCurrentItem(chordComplexity); } - QStringList extList = m_chordMap.getExtList(chord.getRoot()); + TQStringList extList = m_chordMap.getExtList(chord.getRoot()); populateExtensions(extList); // select the chord's extension @@ -303,7 +303,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) chordExt = ""; m_chordExtList->setSelected(0, true); } else { - QListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); + TQListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); if (correspondingExt) m_chordExtList->setSelected(correspondingExt, true); } @@ -321,9 +321,9 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray for(Guitar::ChordMap::chordarray::const_iterator i = chords.begin(); i != chords.end(); ++i) { const Guitar::Chord& chord = *i; - QString fingeringString = chord.getFingering().toString(); + TQString fingeringString = chord.getFingering().toString(); NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings " << chord << endl; - QPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); + TQPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); FingeringListBoxItem *item = new FingeringListBoxItem(chord, m_fingeringsList, fingeringPixmap, fingeringString); if (refFingering == chord.getFingering()) { NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings - fingering found " << fingeringString << endl; @@ -337,11 +337,11 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray QPixmap GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering) const { - QPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); + TQPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); pixmap.fill(); - QPainter pp(&pixmap); - QPainter *p = &pp; + TQPainter pp(&pixmap); + TQPainter *p = &pp; p->setViewport(FINGERING_PIXMAP_H_MARGIN, FINGERING_PIXMAP_W_MARGIN, FINGERING_PIXMAP_WIDTH - FINGERING_PIXMAP_W_MARGIN, @@ -353,7 +353,7 @@ GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering } void -GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) +GuitarChordSelectorDialog::populateExtensions(const TQStringList& extList) { m_chordExtList->clear(); @@ -361,8 +361,8 @@ GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) // some filtering needs to be done int complexityLevel = m_chordComplexityCombo->currentItem(); - QStringList filteredList; - for(QStringList::const_iterator i = extList.constBegin(); i != extList.constEnd(); ++i) { + TQStringList filteredList; + for(TQStringList::const_iterator i = extList.constBegin(); i != extList.constEnd(); ++i) { if (evaluateChordComplexity((*i).lower().stripWhiteSpace()) <= complexityLevel) { NOTATION_DEBUG << "GuitarChordSelectorDialog::populateExtensions - adding '" << *i << "'\n"; filteredList.append(*i); @@ -377,7 +377,7 @@ GuitarChordSelectorDialog::populateExtensions(const QStringList& extList) } int -GuitarChordSelectorDialog::evaluateChordComplexity(const QString& ext) +GuitarChordSelectorDialog::evaluateChordComplexity(const TQString& ext) { if (ext.isEmpty() || ext == "7" || @@ -402,24 +402,24 @@ GuitarChordSelectorDialog::evaluateChordComplexity(const QString& ext) } void -GuitarChordSelectorDialog::parseChordFiles(const std::vector<QString>& chordFiles) +GuitarChordSelectorDialog::parseChordFiles(const std::vector<TQString>& chordFiles) { - for(std::vector<QString>::const_iterator i = chordFiles.begin(); i != chordFiles.end(); ++i) { + for(std::vector<TQString>::const_iterator i = chordFiles.begin(); i != chordFiles.end(); ++i) { parseChordFile(*i); } } void -GuitarChordSelectorDialog::parseChordFile(const QString& chordFileName) +GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) { ChordXmlHandler handler(m_chordMap); - QFile chordFile(chordFileName); + TQFile chordFile(chordFileName); bool ok = chordFile.open(IO_ReadOnly); if (!ok) KMessageBox::error(0, i18n("couldn't open file '%1'").arg(handler.errorString())); - QXmlInputSource source(chordFile); - QXmlSimpleReader reader; + TQXmlInputSource source(chordFile); + TQXmlSimpleReader reader; reader.setContentHandler(&handler); reader.setErrorHandler(&handler); NOTATION_DEBUG << "GuitarChordSelectorDialog::parseChordFile() parsing " << chordFileName << endl; @@ -436,15 +436,15 @@ GuitarChordSelectorDialog::setEditionEnabled(bool enabled) m_editFingeringButton->setEnabled(enabled); } -std::vector<QString> +std::vector<TQString> GuitarChordSelectorDialog::getAvailableChordFiles() { - std::vector<QString> names; + std::vector<TQString> names; // Read config for default directory - QStringList chordDictFiles = KGlobal::dirs()->findAllResources("appdata", "chords/*.xml"); + TQStringList chordDictFiles = KGlobal::dirs()->findAllResources("appdata", "chords/*.xml"); - for(QStringList::iterator i = chordDictFiles.begin(); i != chordDictFiles.end(); ++i) { + for(TQStringList::iterator i = chordDictFiles.begin(); i != chordDictFiles.end(); ++i) { NOTATION_DEBUG << "GuitarChordSelectorDialog::getAvailableChordFiles : adding file " << *i << endl; names.push_back(*i); } @@ -456,12 +456,12 @@ bool GuitarChordSelectorDialog::saveUserChordMap() { // Read config for user directory - QString userDir = KGlobal::dirs()->saveLocation("appdata", "chords/"); + TQString userDir = KGlobal::dirs()->saveLocation("appdata", "chords/"); - QString userChordDictPath = userDir + "/user_chords.xml"; + TQString userChordDictPath = userDir + "/user_chords.xml"; NOTATION_DEBUG << "GuitarChordSelectorDialog::saveUserChordMap() : saving user chord map to " << userChordDictPath << endl; - QString errMsg; + TQString errMsg; m_chordMap.saveDocument(userChordDictPath, true, errMsg); diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.h b/src/gui/editors/guitar/GuitarChordSelectorDialog.h index 6c8f1ad..17b1eff 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.h +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.h @@ -30,13 +30,13 @@ #include "ChordMap.h" #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QListBox; -class QListBoxItem; -class QComboBox; -class QPushButton; +class TQListBox; +class TQListBoxItem; +class TQComboBox; +class TQPushButton; namespace Rosegarden { @@ -50,7 +50,7 @@ class GuitarChordSelectorDialog : public KDialogBase enum { COMPLEXITY_BEGINNER, COMPLEXITY_COMMON, COMPLEXITY_ALL }; public: - GuitarChordSelectorDialog(QWidget *parent=0); + GuitarChordSelectorDialog(TQWidget *parent=0); void init(); @@ -61,7 +61,7 @@ public: protected slots: void slotRootHighlighted(int); void slotChordExtHighlighted(int); - void slotFingeringHighlighted(QListBoxItem*); + void slotFingeringHighlighted(TQListBoxItem*); void slotComplexityChanged(int); void slotNewFingering(); @@ -72,10 +72,10 @@ protected slots: protected: - void parseChordFiles(const std::vector<QString>& chordFiles); - void parseChordFile(const QString& chordFileName); + void parseChordFiles(const std::vector<TQString>& chordFiles); + void parseChordFile(const TQString& chordFileName); void populateFingerings(const Guitar::ChordMap::chordarray&, const Guitar::Fingering& refFingering=Guitar::Fingering(0)); - void populateExtensions(const QStringList& extList); + void populateExtensions(const TQStringList& extList); /// set enabled state of edit/delete buttons void setEditionEnabled(bool); @@ -85,12 +85,12 @@ protected: void refresh(); bool saveUserChordMap(); - int evaluateChordComplexity(const QString& ext); + int evaluateChordComplexity(const TQString& ext); - QPixmap getFingeringPixmap(const Guitar::Fingering& fingering) const; + TQPixmap getFingeringPixmap(const Guitar::Fingering& fingering) const; /// Find all chord list files on the system - std::vector<QString> getAvailableChordFiles(); + std::vector<TQString> getAvailableChordFiles(); Guitar::ChordMap m_chordMap; @@ -98,15 +98,15 @@ protected: Guitar::Chord m_chord; // Chord data - QListBox* m_rootNotesList; - QListBox* m_chordExtList; - QListBox* m_fingeringsList; + TQListBox* m_rootNotesList; + TQListBox* m_chordExtList; + TQListBox* m_fingeringsList; FingeringBox* m_fingeringBox; - QComboBox* m_chordComplexityCombo; - QPushButton* m_newFingeringButton; - QPushButton* m_deleteFingeringButton; - QPushButton* m_editFingeringButton; + TQComboBox* m_chordComplexityCombo; + TQPushButton* m_newFingeringButton; + TQPushButton* m_deleteFingeringButton; + TQPushButton* m_editFingeringButton; static const unsigned int FINGERING_PIXMAP_HEIGHT = 75; static const unsigned int FINGERING_PIXMAP_WIDTH = 75; diff --git a/src/gui/editors/guitar/NoteSymbols.cpp b/src/gui/editors/guitar/NoteSymbols.cpp index 14379de..b7ed8f4 100644 --- a/src/gui/editors/guitar/NoteSymbols.cpp +++ b/src/gui/editors/guitar/NoteSymbols.cpp @@ -63,10 +63,10 @@ NoteSymbols::getY ( int imgHeight, unsigned int fretNb, unsigned int nbOfFrets ) } void -NoteSymbols::drawMuteSymbol ( QPainter* p, +NoteSymbols::drawMuteSymbol ( TQPainter* p, unsigned int position ) const { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), position, m_nbOfStrings ); unsigned int y_pos = getTopBorder( v.height() ) / 2; @@ -89,10 +89,10 @@ NoteSymbols::drawMuteSymbol ( QPainter* p, } void -NoteSymbols::drawOpenSymbol ( QPainter* p, +NoteSymbols::drawOpenSymbol ( TQPainter* p, unsigned int position ) const { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), position, m_nbOfStrings ); unsigned int y_pos = getTopBorder( v.height() ) / 2; double columnWidth = x_pos.second; @@ -101,7 +101,7 @@ NoteSymbols::drawOpenSymbol ( QPainter* p, //std::cout << "NoteSymbols::drawOpenSymbol - drawing Open symbol at string #" << position //<< std::endl; - p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); p->drawEllipse( x_pos.first - ( radius / 2 ), y_pos - ( radius / 2 ), radius, @@ -109,14 +109,14 @@ NoteSymbols::drawOpenSymbol ( QPainter* p, } void -NoteSymbols::drawNoteSymbol ( QPainter* p, +NoteSymbols::drawNoteSymbol ( TQPainter* p, unsigned int stringNb, int fretNb, bool transient ) const { // NOTATION_DEBUG << "NoteSymbols::drawNoteSymbol - string: " << stringNb << ", fret:" << fretNb << endl; - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair x_pos = getX ( v.width(), stringNb, m_nbOfStrings ); posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets ); double columnWidth = x_pos.second; @@ -124,10 +124,10 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, if (transient) { radius = static_cast<unsigned int>( columnWidth /* * 0.9 */ ); - p->setBrush( QBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); } else { radius = static_cast<unsigned int>( columnWidth * 0.7 ); - p->setBrush( QBrush(p->brush().color(), Qt::SolidPattern) ); + p->setBrush( TQBrush(p->brush().color(), Qt::SolidPattern) ); } int x = x_pos.first - ( radius / 2 ), @@ -135,7 +135,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, // y = y_pos.first - (radius / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN; -// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << QRect(x,y, radius, radius) << endl; +// RG_DEBUG << "NoteSymbols::drawNoteSymbol : rect = " << TQRect(x,y, radius, radius) << endl; p->drawEllipse( x, y, @@ -149,7 +149,7 @@ NoteSymbols::drawNoteSymbol ( QPainter* p, } void -NoteSymbols::drawBarreSymbol ( QPainter* p, +NoteSymbols::drawBarreSymbol ( TQPainter* p, int fretNb, unsigned int start, unsigned int end ) const @@ -160,7 +160,7 @@ NoteSymbols::drawBarreSymbol ( QPainter* p, drawNoteSymbol ( p, start, fretNb ); if ( ( end - start ) >= 1 ) { - QRect v = p->viewport(); + TQRect v = p->viewport(); posPair startXPos = getX ( v.width(), start, m_nbOfStrings ); posPair endXPos = getX ( v.width(), end, m_nbOfStrings ); posPair y_pos = getY ( v.height(), fretNb, m_nbOfFrets ); @@ -177,20 +177,20 @@ NoteSymbols::drawBarreSymbol ( QPainter* p, } void -NoteSymbols::drawFretNumber ( QPainter* p, +NoteSymbols::drawFretNumber ( TQPainter* p, unsigned int fret_num ) const { if ( fret_num > 1 ) { - QRect v = p->viewport(); + TQRect v = p->viewport(); unsigned int imgWidth = v.width(); unsigned int imgHeight = v.height(); p->save(); - QFont font; + TQFont font; font.setPixelSize(getFontPixelSize(v.width(), v.height())); p->setFont(font); - QString tmp; + TQString tmp; tmp.setNum( fret_num ); // Use NoteSymbols to grab X and Y for first fret @@ -205,7 +205,7 @@ NoteSymbols::drawFretNumber ( QPainter* p, } void -NoteSymbols::drawFrets ( QPainter* p ) const +NoteSymbols::drawFrets ( TQPainter* p ) const { /* std::cout << "NoteSymbols::drawFretHorizontalLines" << std::endl @@ -214,7 +214,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const << " max string: " << maxStringNum << std::endl; */ - QRect v = p->viewport(); + TQRect v = p->viewport(); unsigned int imgWidth = v.width(); unsigned int imgHeight = v.height(); //unsigned int endXPos = getGuitarChordWidth(imgWidth) + getLeftBorder(imgWidth); @@ -223,7 +223,7 @@ NoteSymbols::drawFrets ( QPainter* p ) const unsigned int yGuitarChord = getGuitarChordHeight( imgHeight ); unsigned int rowHeight = yGuitarChord / m_nbOfFrets; - QPen pen(p->pen()); + TQPen pen(p->pen()); pen.setWidth(imgHeight >= 100 ? FRET_PEN_WIDTH : FRET_PEN_WIDTH / 2); p->save(); p->setPen(pen); @@ -239,8 +239,8 @@ NoteSymbols::drawFrets ( QPainter* p ) const y_pos, endXPos.first, y_pos); -// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << QPoint(getLeftBorder(imgWidth), y_pos) -// << " to " << QPoint(endXPos.first, y_pos) << endl; +// NOTATION_DEBUG << "NoteSymbols::drawFrets : " << TQPoint(getLeftBorder(imgWidth), y_pos) +// << " to " << TQPoint(endXPos.first, y_pos) << endl; y_pos += rowHeight; @@ -251,10 +251,10 @@ NoteSymbols::drawFrets ( QPainter* p ) const } void -NoteSymbols::drawStrings ( QPainter* p ) const +NoteSymbols::drawStrings ( TQPainter* p ) const { // Vertical lines - QRect v = p->viewport(); + TQRect v = p->viewport(); int imgHeight = v.height(); int imgWidth = v.width(); @@ -266,7 +266,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const unsigned int x_pos = (getX ( imgWidth, 0, m_nbOfStrings )).first; - QPen pen(p->pen()); + TQPen pen(p->pen()); pen.setWidth(imgWidth >= 100 ? STRING_PEN_WIDTH : STRING_PEN_WIDTH / 2); p->save(); p->setPen(pen); @@ -286,7 +286,7 @@ NoteSymbols::drawStrings ( QPainter* p ) const } -QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize, +TQRect NoteSymbols::getTransientNoteSymbolRect(TQSize guitarChordSize, unsigned int stringNb, int fretNb) const { @@ -298,7 +298,7 @@ QRect NoteSymbols::getTransientNoteSymbolRect(QSize guitarChordSize, int x = x_pos.first - ( radius / 2 ), y = y_pos.first + ( (y_pos.second - radius) / 2) - y_pos.second + TOP_GUITAR_CHORD_MARGIN; - return QRect(x, y, radius, radius); + return TQRect(x, y, radius, radius); } unsigned int @@ -438,7 +438,7 @@ NoteSymbols::getFretNumber ( int imgHeight, } void -NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, QPainter *p) +NoteSymbols::drawFingeringPixmap(const Guitar::Fingering& fingering, const Guitar::NoteSymbols& noteSymbols, TQPainter *p) { unsigned int startFret = fingering.getStartFret(); diff --git a/src/gui/editors/guitar/NoteSymbols.h b/src/gui/editors/guitar/NoteSymbols.h index f90fefb..9222a9a 100644 --- a/src/gui/editors/guitar/NoteSymbols.h +++ b/src/gui/editors/guitar/NoteSymbols.h @@ -27,8 +27,8 @@ #ifndef _RG_SYMBOLS_H_ #define _RG_SYMBOLS_H_ -#include <qbrush.h> -#include <qpainter.h> +#include <tqbrush.h> +#include <tqpainter.h> namespace Rosegarden { @@ -105,40 +105,40 @@ public: m_nbOfStrings(nbOfStrings), m_nbOfFrets(nbOfFrets) {}; - //! Display a mute symbol in the QPainter object + //! Display a mute symbol in the TQPainter object void - drawMuteSymbol ( QPainter* p, + drawMuteSymbol ( TQPainter* p, unsigned int position ) const; /* This code borrowed from KGuitar 0.5 */ - //! Display a open symbol in the QPainter object (KGuitar) - void drawOpenSymbol ( QPainter* p, + //! Display a open symbol in the TQPainter object (KGuitar) + void drawOpenSymbol ( TQPainter* p, unsigned int position ) const; /* This code borrowed from KGuitar 0.5 */ - //! Display a note symbol in the QPainter object (KGuitar) - void drawNoteSymbol ( QPainter* p, + //! Display a note symbol in the TQPainter object (KGuitar) + void drawNoteSymbol ( TQPainter* p, unsigned int stringNb, int fretNb, bool transient = false ) const; /* This code borrowed from KGuitar 0.5 */ /** - * Display a bar symbol in the QPainter object (KGuitar) + * Display a bar symbol in the TQPainter object (KGuitar) * The code from the KGuitar project was modified to display a bar. This feature was not * available in that project */ - void drawBarreSymbol ( QPainter* p, + void drawBarreSymbol ( TQPainter* p, int fretNb, unsigned int start, unsigned int end ) const; - void drawFretNumber ( QPainter* p, + void drawFretNumber ( TQPainter* p, unsigned int fret_num ) const; - void drawFrets ( QPainter* p ) const; + void drawFrets ( TQPainter* p ) const; - void drawStrings ( QPainter* p ) const; + void drawStrings ( TQPainter* p ) const; unsigned int getTopBorder ( unsigned int imgHeight ) const; @@ -164,11 +164,11 @@ public: unsigned int y_pos, unsigned int maxFretNum ) const; - QRect getTransientNoteSymbolRect(QSize guitarChordSize, + TQRect getTransientNoteSymbolRect(TQSize guitarChordSize, unsigned int stringNb, int fretNb) const; - static void drawFingeringPixmap(const Fingering& fingering, const NoteSymbols& noteSymbols, QPainter *p); + static void drawFingeringPixmap(const Fingering& fingering, const NoteSymbols& noteSymbols, TQPainter *p); private: diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp index c92b4aa..f97ceaf 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.cpp +++ b/src/gui/editors/matrix/MatrixCanvasView.cpp @@ -32,9 +32,9 @@ #include "MatrixStaff.h" #include "QCanvasMatrixRectangle.h" #include "QCanvasMatrixDiamond.h" -#include <qcanvas.h> -#include <qpoint.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqpoint.h> +#include <tqwidget.h> #include "misc/Debug.h" @@ -45,7 +45,7 @@ namespace Rosegarden MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, SnapGrid *snapGrid, bool drumMode, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_staff(staff), @@ -65,9 +65,9 @@ MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, MatrixCanvasView::~MatrixCanvasView() {} -void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); updateGridSnap(e); @@ -95,14 +95,14 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView::contentsMousePressEvent() at pitch " // << evPitch << ", time " << evTime << std::endl; - QCanvasItemList itemList = canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; @@ -117,9 +117,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: point is " << p.x() << "," << p.y()<< std::endl; - QRect rect = mRect->rect(); + TQRect rect = mRect->rect(); if (dynamic_cast<QCanvasMatrixDiamond*>(mRect)) { - rect = QRect(rect.x() - rect.height()/2, + rect = TQRect(rect.x() - rect.height()/2, rect.y(), rect.width(), rect.height()); @@ -127,7 +127,7 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: adjusted rect " << rect.x() << "," << rect.y() << " (" << rect.width() << "x" << rect.height() << ")" << std::endl; - // QCanvas::collisions() can be a bit optimistic and report + // TQCanvas::collisions() can be a bit optimistic and report // items which are close to the point but not actually under it. // So a little sanity check helps. if (!rect.contains(p, true)) continue; @@ -154,9 +154,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) m_ignoreClick = true; } -void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); /* if (m_snapGrid->getSnapTime(double(p.x()))) m_lastSnap = m_snapGrid->getSnapTime(double(p.x())); @@ -188,13 +188,13 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) m_previousEvTime = evTime; } - QCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList itemList = canvas()->collisions(p); MatrixElement* mel = 0; - for (QCanvasItemList::iterator it = itemList.begin(); + for (TQCanvasItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { @@ -223,9 +223,9 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) } -void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) +void MatrixCanvasView::contentsMouseDoubleClickEvent (TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (!m_staff.containsCanvasCoords(p.x(), p.y())) { m_ignoreClick = true; @@ -235,9 +235,9 @@ void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) contentsMousePressEvent(e); } -void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseReleaseEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (m_ignoreClick) { m_ignoreClick = false; @@ -261,12 +261,12 @@ void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) m_mouseWasPressed = false; } -void MatrixCanvasView::slotExternalWheelEvent(QWheelEvent* e) +void MatrixCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } -void MatrixCanvasView::updateGridSnap(QMouseEvent *e) +void MatrixCanvasView::updateGridSnap(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -288,12 +288,12 @@ void MatrixCanvasView::updateGridSnap(QMouseEvent *e) } } -void MatrixCanvasView::enterEvent(QEvent *e) +void MatrixCanvasView::enterEvent(TQEvent *e) { emit mouseEntered(); } -void MatrixCanvasView::leaveEvent(QEvent *e) +void MatrixCanvasView::leaveEvent(TQEvent *e) { emit mouseLeft(); } diff --git a/src/gui/editors/matrix/MatrixCanvasView.h b/src/gui/editors/matrix/MatrixCanvasView.h index 2ec4c7e..694856e 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.h +++ b/src/gui/editors/matrix/MatrixCanvasView.h @@ -30,11 +30,11 @@ #include "base/Event.h" -class QWidget; -class QWheelEvent; -class QMouseEvent; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQWheelEvent; +class TQMouseEvent; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -53,8 +53,8 @@ public: MatrixCanvasView(MatrixStaff&, SnapGrid *, bool drumMode, - QCanvas *viewing, - QWidget *parent=0, const char *name=0, WFlags f=0); + TQCanvas *viewing, + TQWidget *parent=0, const char *name=0, WFlags f=0); ~MatrixCanvasView(); @@ -64,12 +64,12 @@ public: signals: /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** * Emitted when the mouse cursor moves to a different height @@ -88,33 +88,33 @@ signals: void hoveredOverAbsoluteTimeChanged(unsigned int time); void mousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void mouseMoved(timeT time, int pitch, QMouseEvent*); + void mouseMoved(timeT time, int pitch, TQMouseEvent*); - void mouseReleased(timeT time, int pitch, QMouseEvent*); + void mouseReleased(timeT time, int pitch, TQMouseEvent*); void mouseEntered(); void mouseLeft(); public slots: - void slotExternalWheelEvent(QWheelEvent*); + void slotExternalWheelEvent(TQWheelEvent*); protected: /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse double-click event in the canvas @@ -122,10 +122,10 @@ protected: * NOTE: a double click event is always preceded by a mouse press * event */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); /** * Update the value of snap grid according to the button's state @@ -136,7 +136,7 @@ protected: * @see #setSmoothModifier * @see #getSmoothModifier */ - void updateGridSnap(QMouseEvent *e); + void updateGridSnap(TQMouseEvent *e); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixElement.cpp b/src/gui/editors/matrix/MatrixElement.cpp index 1101284..c706c87 100644 --- a/src/gui/editors/matrix/MatrixElement.cpp +++ b/src/gui/editors/matrix/MatrixElement.cpp @@ -32,9 +32,9 @@ #include "gui/general/GUIPalette.h" #include "QCanvasMatrixDiamond.h" #include "QCanvasMatrixRectangle.h" -#include <qbrush.h> -#include <qcanvas.h> -#include <qcolor.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcolor.h> namespace Rosegarden @@ -62,7 +62,7 @@ MatrixElement::~MatrixElement() removeOverlapRectangles(); } -void MatrixElement::setCanvas(QCanvas* c) +void MatrixElement::setCanvas(TQCanvas* c) { if (!m_canvasRect->canvas()) { @@ -86,10 +86,10 @@ void MatrixElement::drawOverlapRectangles() { if (m_overlapRectangles) removeOverlapRectangles(); - QRect elRect = m_canvasRect->rect(); + TQRect elRect = m_canvasRect->rect(); QCanvasItemList itemList = m_canvasRect->canvas()->collisions(elRect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; @@ -101,14 +101,14 @@ void MatrixElement::drawOverlapRectangles() // Element does'nt collide with itself if (mRect == m_canvasRect) continue; - QRect rect = mRect->rect() & elRect; + TQRect rect = mRect->rect() & elRect; if (!rect.isEmpty()) { if (!m_overlapRectangles) { m_overlapRectangles = new OverlapRectangles(); } - QCanvasRectangle * - overlap = new QCanvasRectangle(rect, m_canvasRect->canvas()); + TQCanvasRectangle * + overlap = new TQCanvasRectangle(rect, m_canvasRect->canvas()); overlap->setBrush(GUIPalette::getColour(GUIPalette::MatrixOverlapBlock)); overlap->setZ(getCanvasZ() + 1); overlap->show(); @@ -118,11 +118,11 @@ void MatrixElement::drawOverlapRectangles() } } -void MatrixElement::redrawOverlaps(QRect rect) +void MatrixElement::redrawOverlaps(TQRect rect) { QCanvasItemList itemList = m_canvasRect->canvas()->collisions(rect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { @@ -147,7 +147,7 @@ void MatrixElement::removeOverlapRectangles() m_overlapRectangles = NULL; } -bool MatrixElement::getVisibleRectangle(QRect &rectangle) +bool MatrixElement::getVisibleRectangle(TQRect &rectangle) { if (m_canvasRect && m_canvasRect->isVisible()) { rectangle = m_canvasRect->rect(); diff --git a/src/gui/editors/matrix/MatrixElement.h b/src/gui/editors/matrix/MatrixElement.h index d330991..921297c 100644 --- a/src/gui/editors/matrix/MatrixElement.h +++ b/src/gui/editors/matrix/MatrixElement.h @@ -27,11 +27,11 @@ #define _RG_MATRIXELEMENT_H_ #include "base/ViewElement.h" -#include <qbrush.h> -#include <qcanvas.h> +#include <tqbrush.h> +#include <tqcanvas.h> #include "QCanvasMatrixRectangle.h" -class QColor; +class TQColor; namespace Rosegarden @@ -42,7 +42,7 @@ class Event; class MatrixElement : public ViewElement { - typedef std::vector <QCanvasRectangle *> OverlapRectangles; + typedef std::vector <TQCanvasRectangle *> OverlapRectangles; public: @@ -50,7 +50,7 @@ public: virtual ~MatrixElement(); - void setCanvas(QCanvas* c); + void setCanvas(TQCanvas* c); /** * Returns the actual x coordinate of the element on the canvas @@ -94,8 +94,8 @@ public: /* * Set the colour of the element */ - void setColour(const QColor &colour) - { m_canvasRect->setBrush(QBrush(colour)); } + void setColour(const TQColor &colour) + { m_canvasRect->setBrush(TQBrush(colour)); } /** * Draws overlap rectangles (if any) @@ -112,12 +112,12 @@ public: * If element rectangle is currently visible gets its size and returns true. * Returns false if element rectangle is undefined or not visible. */ - bool getVisibleRectangle(QRect &rectangle); + bool getVisibleRectangle(TQRect &rectangle); /** * Redraw overlap rectangles of all matrix elements colliding with rect */ - void redrawOverlaps(QRect rect); + void redrawOverlaps(TQRect rect); protected: diff --git a/src/gui/editors/matrix/MatrixEraser.cpp b/src/gui/editors/matrix/MatrixEraser.cpp index 6c2373e..226c4a8 100644 --- a/src/gui/editors/matrix/MatrixEraser.cpp +++ b/src/gui/editors/matrix/MatrixEraser.cpp @@ -36,8 +36,8 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -47,26 +47,26 @@ MatrixEraser::MatrixEraser(MatrixView* parent) : MatrixTool("MatrixEraser", parent), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixeraser.rc"); @@ -75,7 +75,7 @@ MatrixEraser::MatrixEraser(MatrixView* parent) void MatrixEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el) { MATRIX_DEBUG << "MatrixEraser::handleLeftButtonPress : el = " @@ -105,6 +105,6 @@ void MatrixEraser::setBasicContextHelp() setContextHelp(i18n("Click on a note to delete it")); } -const QString MatrixEraser::ToolName = "eraser"; +const TQString MatrixEraser::ToolName = "eraser"; } diff --git a/src/gui/editors/matrix/MatrixEraser.h b/src/gui/editors/matrix/MatrixEraser.h index 4e3d65f..a79d70d 100644 --- a/src/gui/editors/matrix/MatrixEraser.h +++ b/src/gui/editors/matrix/MatrixEraser.h @@ -27,9 +27,9 @@ #define _RG_MATRIXERASER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -49,10 +49,10 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); - static const QString ToolName; + static const TQString ToolName; virtual void ready(); diff --git a/src/gui/editors/matrix/MatrixMover.cpp b/src/gui/editors/matrix/MatrixMover.cpp index d725f16..adf558d 100644 --- a/src/gui/editors/matrix/MatrixMover.cpp +++ b/src/gui/editors/matrix/MatrixMover.cpp @@ -45,9 +45,9 @@ #include "MatrixVLayout.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -60,26 +60,26 @@ MatrixMover::MatrixMover(MatrixView* parent) : m_currentStaff(0), m_lastPlayedPitch(-1) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixmover.rc"); @@ -95,7 +95,7 @@ void MatrixMover::handleEventRemoved(Event *event) void MatrixMover::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixMover::handleLeftButtonPress() : time = " << time << ", el = " << el << endl; @@ -177,7 +177,7 @@ void MatrixMover::handleLeftButtonPress(timeT time, } timeT -MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) +MatrixMover::getDragTime(TQMouseEvent *e, timeT candidate) { int x = m_mParentView->inverseMapPoint(e->pos()).x(); int xdiff = x - m_clickX; @@ -201,7 +201,7 @@ MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) int MatrixMover::handleMouseMove(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseMove() time = " << newTime << endl; @@ -280,7 +280,7 @@ int MatrixMover::handleMouseMove(timeT newTime, void MatrixMover::handleMouseRelease(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseRelease() - newPitch = " << newPitch << endl; @@ -322,7 +322,7 @@ void MatrixMover::handleMouseRelease(timeT newTime, m_lastPlayedPitch = newPitch; } - QString commandLabel; + TQString commandLabel; if (m_quickCopy) { if (selection->getAddedEvents() < 2) { commandLabel = i18n("Copy and Move Event"); @@ -420,20 +420,20 @@ void MatrixMover::handleMouseRelease(timeT newTime, void MatrixMover::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - connect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + connect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); m_mParentView->setCanvasCursor(Qt::sizeAllCursor); setBasicContextHelp(); } void MatrixMover::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - disconnect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + disconnect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); } void MatrixMover::slotMatrixScrolled(int newX, int newY) @@ -441,14 +441,14 @@ void MatrixMover::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint offset = newP1 - oldP1; + TQPoint offset = newP1 - oldP1; offset = m_mParentView->inverseMapPoint(offset); - QPoint p(m_currentElement->getCanvasX(), m_currentElement->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -475,7 +475,7 @@ void MatrixMover::setBasicContextHelp(bool ctrlPressed) } } -const QString MatrixMover::ToolName = "mover"; +const TQString MatrixMover::ToolName = "mover"; } #include "MatrixMover.moc" diff --git a/src/gui/editors/matrix/MatrixMover.h b/src/gui/editors/matrix/MatrixMover.h index ac95c5f..258b465 100644 --- a/src/gui/editors/matrix/MatrixMover.h +++ b/src/gui/editors/matrix/MatrixMover.h @@ -27,11 +27,11 @@ #define _RG_MATRIXMOVER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -93,7 +93,7 @@ protected: void setBasicContextHelp(bool ctrlPressed = false); - timeT getDragTime(QMouseEvent *e, timeT candidate); + timeT getDragTime(TQMouseEvent *e, timeT candidate); MatrixElement* m_currentElement; MatrixStaff* m_currentStaff; diff --git a/src/gui/editors/matrix/MatrixPainter.cpp b/src/gui/editors/matrix/MatrixPainter.cpp index be63bd7..11bbc0b 100644 --- a/src/gui/editors/matrix/MatrixPainter.cpp +++ b/src/gui/editors/matrix/MatrixPainter.cpp @@ -44,9 +44,9 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -58,32 +58,32 @@ MatrixPainter::MatrixPainter(MatrixView* parent) m_currentElement(0), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixpainter.rc"); } -MatrixPainter::MatrixPainter(QString name, MatrixView* parent) +MatrixPainter::MatrixPainter(TQString name, MatrixView* parent) : MatrixTool(name, parent), m_currentElement(0), m_currentStaff(0) @@ -99,13 +99,13 @@ void MatrixPainter::handleEventRemoved(Event *event) void MatrixPainter::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, ViewElement *element) { MATRIX_DEBUG << "MatrixPainter::handleLeftButtonPress : pitch = " << pitch << ", time : " << time << endl; - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -159,7 +159,7 @@ void MatrixPainter::handleLeftButtonPress(timeT time, int MatrixPainter::handleMouseMove(timeT time, int pitch, - QMouseEvent *e) + TQMouseEvent *e) { // sanity check if (!m_currentElement) @@ -175,7 +175,7 @@ int MatrixPainter::handleMouseMove(timeT time, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); time = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (time >= m_currentElement->getViewAbsoluteTime()) { time = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -226,7 +226,7 @@ int MatrixPainter::handleMouseMove(timeT time, void MatrixPainter::handleMouseRelease(timeT endTime, int, - QMouseEvent *e) + TQMouseEvent *e) { // This can happen in case of screen/window capture - // we only get a mouse release, the window snapshot tool @@ -238,7 +238,7 @@ void MatrixPainter::handleMouseRelease(timeT endTime, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (endTime >= m_currentElement->getViewAbsoluteTime()) { endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -320,8 +320,8 @@ void MatrixPainter::handleMouseRelease(timeT endTime, void MatrixPainter::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); m_mParentView->setCanvasCursor(Qt::crossCursor); @@ -330,8 +330,8 @@ void MatrixPainter::ready() void MatrixPainter::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixPainter::slotMatrixScrolled(int newX, int newY) @@ -339,14 +339,14 @@ void MatrixPainter::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint offset = newP1 - oldP1; + TQPoint offset = newP1 - oldP1; offset = m_mParentView->inverseMapPoint(offset); - QPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -364,7 +364,7 @@ void MatrixPainter::setBasicContextHelp() } } -const QString MatrixPainter::ToolName = "painter"; +const TQString MatrixPainter::ToolName = "painter"; } #include "MatrixPainter.moc" diff --git a/src/gui/editors/matrix/MatrixPainter.h b/src/gui/editors/matrix/MatrixPainter.h index 570243a..e04cda9 100644 --- a/src/gui/editors/matrix/MatrixPainter.h +++ b/src/gui/editors/matrix/MatrixPainter.h @@ -27,11 +27,11 @@ #define _RG_MATRIXPAINTER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -55,7 +55,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -63,16 +63,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -89,7 +89,7 @@ protected slots: protected: MatrixPainter(MatrixView*); - MatrixPainter(QString name, MatrixView*); + MatrixPainter(TQString name, MatrixView*); void setBasicContextHelp(); diff --git a/src/gui/editors/matrix/MatrixParameterBox.cpp b/src/gui/editors/matrix/MatrixParameterBox.cpp index c330b94..75228c3 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.cpp +++ b/src/gui/editors/matrix/MatrixParameterBox.cpp @@ -31,19 +31,19 @@ #include "document/RosegardenGUIDoc.h" #include "gui/editors/parameters/InstrumentParameterBox.h" #include <kcombobox.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlayout.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqwidget.h> namespace Rosegarden { MatrixParameterBox::MatrixParameterBox(RosegardenGUIDoc *doc, - QWidget *parent, const char* name): - QFrame(parent, name), + TQWidget *parent, const char* name): + TQFrame(parent, name), m_quantizations(BasicQuantizer::getStandardQuantizations()), m_doc(doc) { @@ -57,19 +57,19 @@ MatrixParameterBox::~MatrixParameterBox() void MatrixParameterBox::initBox() { - QFont boldFont; + TQFont boldFont; boldFont.setPointSize(int(boldFont.pointSize() * 9.5 / 10.0 + 0.5)); boldFont.setBold(true); - QFont plainFont; + TQFont plainFont; plainFont.setPointSize(plainFont.pointSize() * 9 / 10); - QFont font = plainFont; + TQFont font = plainFont; - QFontMetrics fontMetrics(font); + TQFontMetrics fontMetrics(font); // magic numbers: 13 is the height of the menu pixmaps, 10 is just 10 //int comboHeight = std::max(fontMetrics.height(), 13) + 10; - QGridLayout *gridLayout = new QGridLayout(this, 20, 3, 8, 1); + TQGridLayout *gridLayout = new TQGridLayout(this, 20, 3, 8, 1); m_instrumentParameterBox = new InstrumentParameterBox(m_doc, this); gridLayout->addMultiCellWidget(m_instrumentParameterBox, 0, 7, 0, 2); diff --git a/src/gui/editors/matrix/MatrixParameterBox.h b/src/gui/editors/matrix/MatrixParameterBox.h index d8d4a4d..036571b 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.h +++ b/src/gui/editors/matrix/MatrixParameterBox.h @@ -26,12 +26,12 @@ #ifndef _RG_MATRIXPARAMETERBOX_H_ #define _RG_MATRIXPARAMETERBOX_H_ -#include <qframe.h> +#include <tqframe.h> #include <vector> #include "base/Event.h" -class QWidget; +class TQWidget; class KComboBox; @@ -49,7 +49,7 @@ class MatrixParameterBox : public QFrame Q_OBJECT public: - MatrixParameterBox(RosegardenGUIDoc *doc=0, QWidget *parent=0, const char* name=0); + MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *parent=0, const char* name=0); ~MatrixParameterBox(); void initBox(); diff --git a/src/gui/editors/matrix/MatrixResizer.cpp b/src/gui/editors/matrix/MatrixResizer.cpp index 2fab5e8..fce4306 100644 --- a/src/gui/editors/matrix/MatrixResizer.cpp +++ b/src/gui/editors/matrix/MatrixResizer.cpp @@ -42,9 +42,9 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -56,24 +56,24 @@ MatrixResizer::MatrixResizer(MatrixView* parent) m_currentElement(0), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); createMenu("matrixresizer.rc"); @@ -89,7 +89,7 @@ void MatrixResizer::handleEventRemoved(Event *event) void MatrixResizer::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixResizer::handleLeftButtonPress() : el = " @@ -130,7 +130,7 @@ void MatrixResizer::handleLeftButtonPress(timeT, int MatrixResizer::handleMouseMove(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { setBasicContextHelp(); @@ -148,7 +148,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, // the closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -192,7 +192,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, void MatrixResizer::handleMouseRelease(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_currentElement || !m_currentStaff) return ; @@ -202,7 +202,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, // closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -215,7 +215,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, if (selection->getAddedEvents() == 0) return ; else { - QString commandLabel = i18n("Resize Event"); + TQString commandLabel = i18n("Resize Event"); if (selection->getAddedEvents() > 1) commandLabel = i18n("Resize Events"); @@ -289,24 +289,24 @@ void MatrixResizer::handleMouseRelease(timeT newTime, void MatrixResizer::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); m_mParentView->setCanvasCursor(Qt::sizeHorCursor); setBasicContextHelp(); } void MatrixResizer::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixResizer::slotMatrixScrolled(int newX, int newY) { - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint p(newX, newY); + TQPoint p(newX, newY); if (newP1.x() > oldP1.x()) { p.setX(newX + m_parentView->getCanvasView()->visibleWidth()); @@ -327,7 +327,7 @@ void MatrixResizer::setBasicContextHelp() } } -const QString MatrixResizer::ToolName = "resizer"; +const TQString MatrixResizer::ToolName = "resizer"; } #include "MatrixResizer.moc" diff --git a/src/gui/editors/matrix/MatrixResizer.h b/src/gui/editors/matrix/MatrixResizer.h index e623cac..f851fba 100644 --- a/src/gui/editors/matrix/MatrixResizer.h +++ b/src/gui/editors/matrix/MatrixResizer.h @@ -27,11 +27,11 @@ #define _RG_MATRIXRESIZER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp index fbb9689..ef553a5 100644 --- a/src/gui/editors/matrix/MatrixSelector.cpp +++ b/src/gui/editors/matrix/MatrixSelector.cpp @@ -50,10 +50,10 @@ #include <kglobal.h> #include <kapplication.h> #include <kconfig.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -71,27 +71,27 @@ MatrixSelector::MatrixSelector(MatrixView* view) m_matrixView(view), m_selectionToMerge(0) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixselector.rc"); @@ -114,7 +114,7 @@ void MatrixSelector::slotClickTimeout() void MatrixSelector::handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { MATRIX_DEBUG << "MatrixSelector::handleMousePress" << endl; @@ -125,7 +125,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, return ; } - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -220,7 +220,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, void MatrixSelector::handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { m_clickedElement = 0; // should be used for left-button clicks only @@ -240,7 +240,7 @@ void MatrixSelector::handleMidButtonPress(timeT time, void MatrixSelector::handleMouseDoubleClick(timeT , int , int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { /* @@ -272,7 +272,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , EventEditDialog dialog(m_mParentView, *m_clickedElement->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -287,7 +287,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , SimpleEventEditDialog dialog(m_mParentView, m_mParentView->getDocument(), *m_clickedElement->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -307,7 +307,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , else { - QRect rect = staff->getBarExtents(ev->x(), ev->y()); + TQRect rect = staff->getBarExtents(ev->x(), ev->y()); m_selectionRect->setX(rect.x() + 2); m_selectionRect->setY(rect.y()); @@ -317,15 +317,15 @@ void MatrixSelector::handleMouseDoubleClick(timeT , m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } */ } void MatrixSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { if (!m_justSelectedBar) @@ -355,9 +355,9 @@ void MatrixSelector::handleMouseTripleClick(timeT t, } int MatrixSelector::handleMouseMove(timeT time, int height, - QMouseEvent *e) + TQMouseEvent *e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); if (m_dispatchTool) { return m_dispatchTool->handleMouseMove(time, height, e); @@ -399,7 +399,7 @@ int MatrixSelector::handleMouseMove(timeT time, int height, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) +void MatrixSelector::handleMouseRelease(timeT time, int height, TQMouseEvent *e) { MATRIX_DEBUG << "MatrixSelector::handleMouseRelease" << endl; @@ -439,16 +439,16 @@ void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) void MatrixSelector::ready() { if (m_mParentView) { - m_selectionRect = new QCanvasRectangle(m_mParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_mParentView->canvas()); m_selectionRect->hide(); - m_selectionRect->setPen(QPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); + m_selectionRect->setPen(TQPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); m_mParentView->setCanvasCursor(Qt::arrowCursor); //m_mParentView->setPositionTracking(false); } - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); setContextHelp(i18n("Click and drag to select; middle-click and drag to draw new note")); } @@ -461,8 +461,8 @@ void MatrixSelector::stow() m_mParentView->canvas()->update(); } - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -527,13 +527,13 @@ EventSelection* MatrixSelector::getSelection() // get the selections // - QCanvasItemList l = m_selectionRect->collisions(true); + TQCanvasItemList l = m_selectionRect->collisions(true); if (l.count()) { - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *matrixRect = 0; if ((matrixRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) @@ -552,7 +552,7 @@ EventSelection* MatrixSelector::getSelection() } } -void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) +void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -561,14 +561,14 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) // same logic as in MatrixCanvasView::contentsMousePressEvent - QCanvasItemList itemList = m_mParentView->canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_mParentView->canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if (item->active()) { @@ -623,7 +623,7 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) } } -const QString MatrixSelector::ToolName = "selector"; +const TQString MatrixSelector::ToolName = "selector"; } #include "MatrixSelector.moc" diff --git a/src/gui/editors/matrix/MatrixSelector.h b/src/gui/editors/matrix/MatrixSelector.h index a1d1ca4..caa9e4f 100644 --- a/src/gui/editors/matrix/MatrixSelector.h +++ b/src/gui/editors/matrix/MatrixSelector.h @@ -27,12 +27,12 @@ #define _RG_MATRIXSELECTOR_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; namespace Rosegarden @@ -58,22 +58,22 @@ public: virtual void handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual void handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual int handleMouseMove(timeT time, int height, - QMouseEvent *event); + TQMouseEvent *event); virtual void handleMouseRelease(timeT, int height, - QMouseEvent *event); + TQMouseEvent *event); /** * Double-click: edit an event or make a whole-bar selection @@ -81,7 +81,7 @@ public: virtual void handleMouseDoubleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); /** @@ -90,7 +90,7 @@ public: virtual void handleMouseTripleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); @@ -122,7 +122,7 @@ public: */ virtual void handleEventRemoved(Event *event); - static const QString ToolName; + static const TQString ToolName; public slots: /** @@ -146,13 +146,13 @@ signals: protected: MatrixSelector(MatrixView*); - void setContextHelpFor(QPoint p, bool ctrlPressed = false); + void setContextHelpFor(TQPoint p, bool ctrlPressed = false); void setViewCurrentSelection(); //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; int m_clickedStaff; diff --git a/src/gui/editors/matrix/MatrixStaff.cpp b/src/gui/editors/matrix/MatrixStaff.cpp index b6be79f..55491d0 100644 --- a/src/gui/editors/matrix/MatrixStaff.cpp +++ b/src/gui/editors/matrix/MatrixStaff.cpp @@ -46,13 +46,13 @@ #include "MatrixElement.h" #include "MatrixView.h" #include "MatrixVLayout.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { -MatrixStaff::MatrixStaff(QCanvas *canvas, +MatrixStaff::MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, @@ -144,7 +144,7 @@ void MatrixStaff::positionElement(ViewElement* vel) // Memorize initial rectangle position. May be some overlap rectangles // belonging to other notes are here and should be refreshed after // current element is moved. - QRect initialRect; + TQRect initialRect; bool rectWasVisible; if (! m_view->isDrumMode()) rectWasVisible = el->getVisibleRectangle(initialRect); diff --git a/src/gui/editors/matrix/MatrixStaff.h b/src/gui/editors/matrix/MatrixStaff.h index cd0a9dc..24b9e57 100644 --- a/src/gui/editors/matrix/MatrixStaff.h +++ b/src/gui/editors/matrix/MatrixStaff.h @@ -31,7 +31,7 @@ #include "base/Event.h" -class QCanvas; +class TQCanvas; namespace Rosegarden @@ -49,7 +49,7 @@ class Event; class MatrixStaff : public LinedStaff { public: - MatrixStaff(QCanvas *canvas, + MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, diff --git a/src/gui/editors/matrix/MatrixTool.cpp b/src/gui/editors/matrix/MatrixTool.cpp index b036559..a478aa3 100644 --- a/src/gui/editors/matrix/MatrixTool.cpp +++ b/src/gui/editors/matrix/MatrixTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "MatrixView.h" #include <kaction.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -MatrixTool::MatrixTool(const QString& menuName, MatrixView* parent) +MatrixTool::MatrixTool(const TQString& menuName, MatrixView* parent) : EditTool(menuName, parent), m_mParentView(parent) {} diff --git a/src/gui/editors/matrix/MatrixTool.h b/src/gui/editors/matrix/MatrixTool.h index 5127f57..9972176 100644 --- a/src/gui/editors/matrix/MatrixTool.h +++ b/src/gui/editors/matrix/MatrixTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -61,7 +61,7 @@ protected slots: const SnapGrid &getSnapGrid() const; protected: - MatrixTool(const QString& menuName, MatrixView*); + MatrixTool(const TQString& menuName, MatrixView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixToolBox.cpp b/src/gui/editors/matrix/MatrixToolBox.cpp index 466cfea..dab9632 100644 --- a/src/gui/editors/matrix/MatrixToolBox.cpp +++ b/src/gui/editors/matrix/MatrixToolBox.cpp @@ -34,7 +34,7 @@ #include "MatrixMover.h" #include "MatrixResizer.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -45,11 +45,11 @@ MatrixToolBox::MatrixToolBox(MatrixView* parent) m_mParentView(parent) {} -EditTool* MatrixToolBox::createTool(const QString& toolName) +EditTool* MatrixToolBox::createTool(const TQString& toolName) { MatrixTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == MatrixPainter::ToolName) @@ -72,7 +72,7 @@ EditTool* MatrixToolBox::createTool(const QString& toolName) tool = new MatrixResizer(m_mParentView); else { - KMessageBox::error(0, QString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/matrix/MatrixToolBox.h b/src/gui/editors/matrix/MatrixToolBox.h index 3bf0818..4f28c57 100644 --- a/src/gui/editors/matrix/MatrixToolBox.h +++ b/src/gui/editors/matrix/MatrixToolBox.h @@ -28,7 +28,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -47,7 +47,7 @@ public: protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index 38abe20..66c1b0d 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -113,20 +113,20 @@ #include <kstatusbar.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qlayout.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qslider.h> -#include <qstring.h> -#include <qwidget.h> -#include <qwmatrix.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqlayout.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -137,7 +137,7 @@ static double xorigin = 0.0; MatrixView::MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool drumMode) : EditView(doc, segments, 3, parent, "matrixview"), m_hlayout(&doc->getComposition()), @@ -166,8 +166,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, { RG_DEBUG << "MatrixView ctor: drumMode " << drumMode << "\n"; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); - QPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); + TQPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); m_dockLeft = createDockWidget("params dock", matrixPixmap, 0L, i18n("Instrument Parameters")); @@ -175,14 +175,14 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, KDockWidget::DockLeft, // dock site 20); // relation target/this (in percent) - connect(m_dockLeft, SIGNAL(iMBeingClosed()), - this, SLOT(slotParametersClosed())); - connect(m_dockLeft, SIGNAL(hasUndocked()), - this, SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), + this, TQT_SLOT(slotParametersClosed())); // Apparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. - connect(m_mainDockWidget, SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), + this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); Composition &comp = doc->getComposition(); @@ -190,20 +190,20 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, initStatusBar(); - connect(m_toolBox, SIGNAL(showContextHelp(const QString &)), - this, SLOT(slotToolHelpChanged(const QString &))); + connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), + this, TQT_SLOT(slotToolHelpChanged(const TQString &))); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); m_config->setGroup(MatrixViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures-1.6-plus", true)) { - QPixmap background; - QString pixmapDir = + TQPixmap background; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // We now use a lined background for the non-percussion matrix, // suggested and supplied by Alessandro Preziosi - QString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; - if (background.load(QString("%1/misc/%2"). + TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; + if (background.load(TQString("%1/misc/%2"). arg(pixmapDir, backgroundPixmap))) { tCanvas->setBackgroundPixmap(background); } @@ -255,7 +255,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pianoView = new QDeferScrollView(getCentralWidget()); - QWidget* vport = m_pianoView->viewport(); + TQWidget* vport = m_pianoView->viewport(); if (isDrumMode() && mapping && !m_localMapping->getMap().empty()) { @@ -266,8 +266,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pitchRuler = new PianoKeyboard(vport); } - m_pianoView->setVScrollBarMode(QScrollView::AlwaysOff); - m_pianoView->setHScrollBarMode(QScrollView::AlwaysOff); + m_pianoView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_pianoView->setHScrollBarMode(TQScrollView::AlwaysOff); m_pianoView->addChild(m_pitchRuler); m_pianoView->setFixedWidth(m_pianoView->contentsWidth()); @@ -278,33 +278,33 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, RosegardenGUIApp *app = RosegardenGUIApp::self(); connect(app, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_parameterBox, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(app, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_parameterBox, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); connect(app, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_parameterBox, - SLOT(slotInstrumentParametersChanged(InstrumentId))); + TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), app, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), app, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_parameterBox, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), app, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); connect(parent, // RosegardenGUIView - SIGNAL(checkTrackAssignments()), + TQT_SIGNAL(checkTrackAssignments()), this, - SLOT(slotCheckTrackAssignments())); + TQT_SLOT(slotCheckTrackAssignments())); // Assign the instrument // @@ -312,9 +312,9 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, if (m_drumMode) { connect(m_parameterBox, - SIGNAL(instrumentPercussionSetChanged(Instrument *)), + TQT_SIGNAL(instrumentPercussionSetChanged(Instrument *)), this, - SLOT(slotPercussionSetChanged(Instrument *))); + TQT_SLOT(slotPercussionSetChanged(Instrument *))); } // Set the snap grid from the stored size in the segment @@ -352,83 +352,83 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Connect vertical scrollbars between matrix and piano // - connect(m_canvasView->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView, SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); - connect(m_canvasView, SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + connect(m_canvasView, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); + connect(m_canvasView, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - connect(m_pianoView, SIGNAL(gotWheelEvent(QWheelEvent*)), - m_canvasView, SLOT(slotExternalWheelEvent(QWheelEvent*))); + connect(m_pianoView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + m_canvasView, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // ensure the piano keyb keeps the right margins when the user toggles // the canvas view rulers // - connect(m_canvasView, SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(m_canvasView, TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); - connect(m_canvasView, SIGNAL(mouseEntered()), - this, SLOT(slotMouseEnteredCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseEntered()), + this, TQT_SLOT(slotMouseEnteredCanvasView())); - connect(m_canvasView, SIGNAL(mouseLeft()), - this, SLOT(slotMouseLeftCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseLeft()), + this, TQT_SLOT(slotMouseLeftCanvasView())); /* - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (activeItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (activeItemPressed(TQMouseEvent*, TQCanvasItem*))); */ - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mousePressed(timeT, - int, QMouseEvent*, MatrixElement*)), + TQT_SIGNAL(mousePressed(timeT, + int, TQMouseEvent*, MatrixElement*)), this, - SLOT(slotMousePressed(timeT, - int, QMouseEvent*, MatrixElement*))); + TQT_SLOT(slotMousePressed(timeT, + int, TQMouseEvent*, MatrixElement*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseMoved(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseMoved(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseMoved(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseMoved(timeT, int, TQMouseEvent*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseReleased(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseReleased(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseReleased(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseReleased(timeT, int, TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - this, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + this, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); - QObject::connect - (m_pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (m_pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); MATRIX_DEBUG << "MatrixView : applying layout\n"; @@ -463,34 +463,34 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Disconnect the default connections for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // Force height for the moment // @@ -568,9 +568,9 @@ MatrixView::~MatrixView() // This looks silly but the reason is that on destruction of the // MatrixCanvasView, setCanvas() is called (this is in - // ~QCanvasView so we can't do anything about it). This calls - // QCanvasView::updateContentsSize(), which in turn updates the - // view's scrollbars, hence calling QScrollBar::setValue(), and + // ~TQCanvasView so we can't do anything about it). This calls + // TQCanvasView::updateContentsSize(), which in turn updates the + // view's scrollbars, hence calling TQScrollBar::setValue(), and // sending the QSCrollbar::valueChanged() signal. But we have a // slot connected to that signal // (MatrixView::slotVerticalScrollPianoKeyboard), which scrolls @@ -635,224 +635,224 @@ void MatrixView::setupActions() // KRadioAction* toolAction = 0; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/select.xpm")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, SLOT(slotPaintSelected()), + this, TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, SLOT(slotMoveSelected()), + this, TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + icon = TQIconSet(pixmap); toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, - this, SLOT(slotResizeSelected()), + this, TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, - SLOT(slotTransformsRepeatQuantize()), actionCollection(), + TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("&Legato"), Key_Minus, this, - SLOT(slotTransformsLegato()), actionCollection(), + TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); new KAction(ChangeVelocityCommand::getGlobalName(10), 0, Key_Up + SHIFT, this, - SLOT(slotVelocityUp()), actionCollection(), + TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, Key_Down + SHIFT, this, - SLOT(slotVelocityDown()), actionCollection(), + TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); new KAction(i18n("Set to Current Velocity"), 0, this, - SLOT(slotSetVelocitiesToCurrent()), actionCollection(), + TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); new KAction(i18n("Set Event &Velocities..."), 0, this, - SLOT(slotSetVelocities()), actionCollection(), + TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); new KAction(i18n("Trigger Se&gment..."), 0, this, - SLOT(slotTriggerSegment()), actionCollection(), + TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); new KAction(i18n("Remove Triggers..."), 0, this, - SLOT(slotRemoveTriggers()), actionCollection(), + TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("&Delete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); timeT crotchetDuration = Note(Note::Crotchet).getDuration(); @@ -877,22 +877,22 @@ void MatrixView::setupActions() if (d == SnapGrid::NoSnap) { new KAction(i18n("&No Snap"), 0, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_none"); } else if (d == SnapGrid::SnapToUnit) { } else if (d == SnapGrid::SnapToBeat) { new KAction(i18n("Snap to Bea&t"), Key_1, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { new KAction(i18n("Snap to &Bar"), Key_5, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); KShortcut cut = 0; @@ -903,10 +903,10 @@ void MatrixView::setupActions() else if (d == crotchetDuration) cut = Key_4; else if (d == crotchetDuration * 2) cut = Key_2; - QString actionName = QString("snap_%1").arg(int((crotchetDuration * 4) / d)); + TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; new KAction(i18n("Snap to %1").arg(label), pixmap, cut, this, - SLOT(slotSetSnapFromAction()), actionCollection(), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName); } } @@ -915,16 +915,16 @@ void MatrixView::setupActions() // Settings menu // new KAction(i18n("Show Instrument Parameters"), 0, this, - SLOT(slotDockParametersBack()), + TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); createGUI(getRCFileName(), false); @@ -977,8 +977,8 @@ void MatrixView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverAbsoluteTime = new QLabel(sb); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(175); m_hoveredOverNoteName->setMinimumWidth(65); @@ -986,7 +986,7 @@ void MatrixView::initStatusBar() sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - m_insertModeLabel = new QLabel(sb); + m_insertModeLabel = new TQLabel(sb); m_insertModeLabel->setMinimumWidth(20); sb->addWidget(m_insertModeLabel); @@ -995,13 +995,13 @@ void MatrixView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); } -void MatrixView::slotToolHelpChanged(const QString &s) +void MatrixView::slotToolHelpChanged(const TQString &s) { - QString msg = " " + s; + TQString msg = " " + s; if (m_toolContextHelp == msg) return; m_toolContextHelp = msg; @@ -1081,12 +1081,12 @@ void MatrixView::refreshSegment(Segment *segment, repaintRulers(); } -QSize MatrixView::getViewSize() +TQSize MatrixView::getViewSize() { return canvas()->size(); } -void MatrixView::setViewSize(QSize s) +void MatrixView::setViewSize(TQSize s) { MATRIX_DEBUG << "MatrixView::setViewSize() w = " << s.width() << endl; @@ -1314,11 +1314,11 @@ void MatrixView::slotSelectSelected() { EditTool* selector = m_toolBox->getTool(MatrixSelector::ToolName); - connect(selector, SIGNAL(gotSelection()), - this, SLOT(slotNewSelection())); + connect(selector, TQT_SIGNAL(gotSelection()), + this, TQT_SLOT(slotNewSelection())); - connect(selector, SIGNAL(editTriggerSegment(int)), - this, SIGNAL(editTriggerSegment(int))); + connect(selector, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SIGNAL(editTriggerSegment(int))); setTool(selector); } @@ -1344,7 +1344,7 @@ void MatrixView::slotTransformsQuantize() QuantizeDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -1385,7 +1385,7 @@ void MatrixView::slotTransformsLegato() } void MatrixView::slotMousePressed(timeT time, int pitch, - QMouseEvent* e, MatrixElement* el) + TQMouseEvent* e, MatrixElement* el) { MATRIX_DEBUG << "MatrixView::mousePressed at pitch " << pitch << ", time " << time << endl; @@ -1406,7 +1406,7 @@ void MatrixView::slotMousePressed(timeT time, int pitch, //playPreview(pitch); } -void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseMoved(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1434,7 +1434,7 @@ void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) } -void MatrixView::slotMouseReleased(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseReleased(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1473,14 +1473,14 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, getDocument()->getComposition().getElapsedRealTime(evTime); long ms = rt.msec(); - QString msg = i18n("Note: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString msg = i18n("Note: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(msg); } @@ -1503,7 +1503,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y) if (evPitch != m_previousEvPitch) { MidiPitchLabel label(evPitch); - m_hoveredOverNoteName->setText(QString("%1 (%2)"). + m_hoveredOverNoteName->setText(TQString("%1 (%2)"). arg(label.getQString()).arg(evPitch)); m_previousEvPitch = evPitch; } @@ -1524,18 +1524,18 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getElapsedRealTime(t); long ms = rt.msec(); - // At the advice of doc.trolltech.com/3.0/qstring.html#sprintf - // we replaced this QString format("%ld (%ld.%03lds)"); + // At the advice of doc.trolltech.com/3.0/tqstring.html#sprintf + // we replaced this TQString format("%ld (%ld.%03lds)"); // to support Unicode - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString message = i18n("Time: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -1810,8 +1810,8 @@ void MatrixView::slotVerticalScrollPianoKeyboard(int y) void MatrixView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = *getCurrentSegment(); int pitch = 0; @@ -2017,8 +2017,8 @@ MatrixView::slotSetSnapFromIndex(int s) void MatrixView::slotSetSnapFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(5) == "snap_") { int snap = name.right(name.length() - 5).toInt(); @@ -2117,10 +2117,10 @@ MatrixView::initActionsToolbar() // The SnapGrid combo and Snap To... menu items // - QLabel *sLabel = new QLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); + TQLabel *sLabel = new TQLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); sLabel->setIndent(10); - QPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); m_snapGridCombo = new KComboBox(actionsToolbar); @@ -2138,8 +2138,8 @@ MatrixView::initActionsToolbar() m_snapGridCombo->insertItem(i18n("Bar")); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); m_snapGridCombo->insertItem((err ? noMap : pixmap), label); } @@ -2149,25 +2149,25 @@ MatrixView::initActionsToolbar() } } - connect(m_snapGridCombo, SIGNAL(activated(int)), - this, SLOT(slotSetSnapFromIndex(int))); + connect(m_snapGridCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetSnapFromIndex(int))); // Velocity combo. Not a spin box, because the spin box is too // slow to use unless we make it typeable into, and then it takes // focus away from our more important widgets - QLabel *vlabel = new QLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); + TQLabel *vlabel = new TQLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); vlabel->setIndent(10); m_velocityCombo = new KComboBox(actionsToolbar); for (int i = 0; i <= 127; ++i) { - m_velocityCombo->insertItem(QString("%1").arg(i)); + m_velocityCombo->insertItem(TQString("%1").arg(i)); } m_velocityCombo->setCurrentItem(100); //!!! associate with segment // Quantize combo // - QLabel *qLabel = new QLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); + TQLabel *qLabel = new TQLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); qLabel->setIndent(10); m_quantizeCombo = new KComboBox(actionsToolbar); @@ -2176,15 +2176,15 @@ MatrixView::initActionsToolbar() timeT time = m_quantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeCombo->insertItem(error ? noMap : pmap, label); } m_quantizeCombo->insertItem(noMap, i18n("Off")); - connect(m_quantizeCombo, SIGNAL(activated(int)), - this, SLOT(slotQuantizeSelection(int))); + connect(m_quantizeCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotQuantizeSelection(int))); } void @@ -2217,17 +2217,17 @@ MatrixView::initZoomToolbar() } m_hZoomSlider = new ZoomSlider<double> - (zoomSizes, -1, QSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); m_hZoomSlider->setTracking(true); - m_hZoomSlider->setFocusPolicy(QWidget::NoFocus); + m_hZoomSlider->setFocusPolicy(TQWidget::NoFocus); - m_zoomLabel = new QLabel(zoomToolbar, "kde toolbar widget"); + m_zoomLabel = new TQLabel(zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); m_zoomLabel->setFixedWidth(80); connect(m_hZoomSlider, - SIGNAL(valueChanged(int)), - SLOT(slotChangeHorizontalZoom(int))); + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChangeHorizontalZoom(int))); } @@ -2251,7 +2251,7 @@ MatrixView::slotChangeHorizontalZoom(int) // Set zoom matrix // - QWMatrix zoomMatrix; + TQWMatrix zoomMatrix; zoomMatrix.scale(zoomValue, 1.0); m_canvasView->setWorldMatrix(zoomMatrix); @@ -2521,7 +2521,7 @@ void MatrixView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -2572,7 +2572,7 @@ MatrixView::readjustCanvasSize() int newWidth = computePostLayoutWidth(); // now get the EditView to do the biz - readjustViewSize(QSize(newWidth, maxHeight), true); + readjustViewSize(TQSize(newWidth, maxHeight), true); repaintRulers(); } @@ -2612,7 +2612,7 @@ MatrixView::slotSetVelocities() BaseProperties::VELOCITY, getCurrentVelocity()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Setting Velocities..."), this); addCommandToHistory(new SelectionPropertyCommand (m_currentEventSelection, @@ -2643,7 +2643,7 @@ MatrixView::slotTriggerSegment() return ; TriggerSegmentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -2678,7 +2678,7 @@ MatrixView::slotToggleTempoRuler() } void -MatrixView::paintEvent(QPaintEvent* e) +MatrixView::paintEvent(TQPaintEvent* e) { //!!! There's a lot of code shared between matrix and notation for // dealing with step recording (the insertable note event stuff). @@ -2706,7 +2706,7 @@ MatrixView::updateViewCaption() { // Set client label // - QString view = i18n("Matrix"); + TQString view = i18n("Matrix"); if (isDrumMode()) view = i18n("Percussion"); @@ -2930,7 +2930,7 @@ MatrixView::slotToggleStepByStep() void MatrixView::slotUpdateInsertModeStatus() { - QString message; + TQString message; if (isInChordMode()) { message = i18n(" Chord "); } else { @@ -2940,7 +2940,7 @@ MatrixView::slotUpdateInsertModeStatus() } void -MatrixView::slotStepByStepTargetRequested(QObject *obj) +MatrixView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -3010,7 +3010,7 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) delete m_pitchRuler; - QWidget *vport = m_pianoView->viewport(); + TQWidget *vport = m_pianoView->viewport(); // Create a new pitchruler widget PitchRuler *pitchRuler; @@ -3024,21 +3024,21 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) } - QObject::connect - (pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); // Replace the old pitchruler widget m_pitchRuler = pitchRuler; diff --git a/src/gui/editors/matrix/MatrixView.h b/src/gui/editors/matrix/MatrixView.h index 49e0358..0951c8c 100644 --- a/src/gui/editors/matrix/MatrixView.h +++ b/src/gui/editors/matrix/MatrixView.h @@ -35,20 +35,20 @@ #include "MatrixVLayout.h" #include "MatrixCanvasView.h" #include <kdockwidget.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqpoint.h> +#include <tqsize.h> #include <vector> #include "base/Event.h" #include "document/ConfigGroups.h" -class QWidget; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvas; +class TQWidget; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvas; class KComboBox; @@ -88,7 +88,7 @@ class MatrixView : public EditView public: MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, bool drumMode); + TQWidget *parent, bool drumMode); virtual ~MatrixView(); @@ -100,9 +100,9 @@ public: timeT startTime = 0, timeT endTime = 0); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -194,7 +194,7 @@ public: double getXbyInverseWorldMatrix(double value) { return m_canvasView->inverseWorldMatrix().m11() * value; } - QPoint inverseMapPoint(const QPoint& p) { return m_canvasView->inverseMapPoint(p); } + TQPoint inverseMapPoint(const TQPoint& p) { return m_canvasView->inverseMapPoint(p); } /* * Repaint the control rulers @@ -240,7 +240,7 @@ signals: void jumpPlaybackTo(timeT); void panic(); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void editTriggerSegment(int); @@ -316,10 +316,10 @@ public slots: * or somewhere on the staff */ void slotMousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void slotMouseMoved(timeT time, int pitch, QMouseEvent*); - void slotMouseReleased(timeT time, int pitch, QMouseEvent*); + void slotMouseMoved(timeT time, int pitch, TQMouseEvent*); + void slotMouseReleased(timeT time, int pitch, TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -468,8 +468,8 @@ public slots: /// Note-on or note-off received asynchronously -- as above void slotInsertableNoteEventReceived(int pitch, int velocity, bool noteOn); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); void slotInstrumentLevelsChanged(InstrumentId, const LevelInfo &); @@ -506,7 +506,7 @@ protected slots: */ void slotCheckTrackAssignments(); - void slotToolHelpChanged(const QString &); + void slotToolHelpChanged(const TQString &); void slotMouseEnteredCanvasView(); void slotMouseLeftCanvasView(); @@ -547,12 +547,12 @@ protected: /** * Return the size of the MatrixCanvasView */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Set the size of the MatrixCanvasView */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); virtual MatrixCanvasView *getCanvasView(); @@ -571,7 +571,7 @@ protected: */ bool canPreviewAnotherNote(); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); virtual void updateViewCaption(); @@ -600,10 +600,10 @@ protected: timeT m_lastEndMarkerTime; // Status bar elements - QLabel* m_hoveredOverAbsoluteTime; - QLabel* m_hoveredOverNoteName; - QLabel *m_selectionCounter; - QLabel *m_insertModeLabel; + TQLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverNoteName; + TQLabel *m_selectionCounter; + TQLabel *m_insertModeLabel; bool m_haveHoveredOverNote; /** @@ -642,7 +642,7 @@ protected: KComboBox *m_snapGridCombo; ZoomSlider<double> *m_hZoomSlider; ZoomSlider<double> *m_vZoomSlider; - QLabel *m_zoomLabel; + TQLabel *m_zoomLabel; // Hold our matrix quantization values and snap values // @@ -652,7 +652,7 @@ protected: std::vector<std::pair<PropertyViewRuler*, PropertyBox*> > m_propertyViewRulers; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; // ruler used to scale tempo and chord name ruler ZoomableMatrixHLayoutRulerScale* m_referenceRuler; @@ -664,7 +664,7 @@ protected: bool m_drumMode; bool m_mouseInCanvasView; - QString m_toolContextHelp; + TQString m_toolContextHelp; }; // Commented this out - was a MatrixView inner class, but we get a warning diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index e4641d0..47f8413 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -31,13 +31,13 @@ #include "gui/rulers/PitchRuler.h" #include "MatrixStaff.h" #include "MatrixView.h" -#include <qcolor.h> -#include <qcursor.h> -#include <qevent.h> -#include <qfont.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden @@ -46,32 +46,32 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(QWidget *parent, int keys) +PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) : PitchRuler(parent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), m_mouseDown(false), - m_hoverHighlight(new QWidget(this)), + m_hoverHighlight(new TQWidget(this)), m_lastHoverHighlight(0), m_lastKeyPressed(0) { m_hoverHighlight->hide(); m_hoverHighlight->setPaletteBackgroundColor(GUIPalette::getColour(GUIPalette::MatrixKeyboardFocus)); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); computeKeyPos(); setMouseTracking(true); } -QSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::sizeHint() const { - return QSize(m_keySize.width(), + return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -QSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::minimumSizeHint() const { return m_keySize; } @@ -125,15 +125,15 @@ void PianoKeyboard::computeKeyPos() } } -void PianoKeyboard::paintEvent(QPaintEvent*) +void PianoKeyboard::paintEvent(TQPaintEvent*) { - static QFont *pFont = 0; + static TQFont *pFont = 0; if (!pFont) { - pFont = new QFont(); + pFont = new TQFont(); pFont->setPixelSize(9); } - QPainter paint(this); + TQPainter paint(this); paint.setFont(*pFont); @@ -161,12 +161,12 @@ void PianoKeyboard::paintEvent(QPaintEvent*) m_blackKeySize.width(), m_blackKeySize.height()); } -void PianoKeyboard::enterEvent(QEvent *) +void PianoKeyboard::enterEvent(TQEvent *) { //drawHoverNote(e->y()); } -void PianoKeyboard::leaveEvent(QEvent*) +void PianoKeyboard::leaveEvent(TQEvent*) { m_hoverHighlight->hide(); @@ -241,7 +241,7 @@ void PianoKeyboard::drawHoverNote(int evPitch) } -void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) +void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) { // The routine to work out where this should appear doesn't coincide with the note // that we send to the sequencer - hence this is a bit pointless and crap at the moment. @@ -270,7 +270,7 @@ void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PianoKeyboard::mousePressEvent(QMouseEvent *e) +void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -286,7 +286,7 @@ void PianoKeyboard::mousePressEvent(QMouseEvent *e) } } -void PianoKeyboard::mouseReleaseEvent(QMouseEvent *e) +void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; diff --git a/src/gui/editors/matrix/PianoKeyboard.h b/src/gui/editors/matrix/PianoKeyboard.h index e8b06bb..82c2be6 100644 --- a/src/gui/editors/matrix/PianoKeyboard.h +++ b/src/gui/editors/matrix/PianoKeyboard.h @@ -27,14 +27,14 @@ #define _RG_PIANOKEYBOARD_H_ #include "gui/rulers/PitchRuler.h" -#include <qsize.h> +#include <tqsize.h> #include <vector> -class QWidget; -class QPaintEvent; -class QMouseEvent; -class QEvent; +class TQWidget; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; namespace Rosegarden @@ -46,10 +46,10 @@ class PianoKeyboard : public PitchRuler { Q_OBJECT public: - PianoKeyboard(QWidget *parent, int keys = 88); + PianoKeyboard(TQWidget *parent, int keys = 88); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /* * We want to be able to call this from the matrix view @@ -96,21 +96,21 @@ signals: protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); // compute all key positions and store them // void computeKeyPos(); //--------------- Data members --------------------------------- - QSize m_keySize; - QSize m_blackKeySize; + TQSize m_keySize; + TQSize m_blackKeySize; unsigned int m_nbKeys; std::vector<unsigned int> m_whiteKeyPos; @@ -122,7 +122,7 @@ protected: bool m_selecting; // highlight element on the keyboard - QWidget *m_hoverHighlight; + TQWidget *m_hoverHighlight; int m_lastHoverHighlight; int m_lastKeyPressed; }; diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 582b53a..128d3f9 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -27,17 +27,17 @@ #include "MatrixElement.h" #include "QCanvasMatrixRectangle.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpointarray.h> -#include <qpoint.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpointarray.h> +#include <tqpoint.h> namespace Rosegarden { QCanvasMatrixDiamond::QCanvasMatrixDiamond(MatrixElement &n, - QCanvas* canvas) : + TQCanvas* canvas) : QCanvasMatrixRectangle(n, canvas) {} @@ -46,34 +46,34 @@ QCanvasMatrixDiamond::~QCanvasMatrixDiamond() hide(); } -QPointArray QCanvasMatrixDiamond::areaPoints() const +TQPointArray QCanvasMatrixDiamond::areaPoints() const { - QPointArray pa(4); + TQPointArray pa(4); int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; if ( pen() == NoPen ) pw = 0; - pa[0] = QPoint((int)x() - height() / 2 - pw, (int)y() - pw); - pa[1] = pa[0] + QPoint(height() + pw * 2, 0); - pa[2] = pa[1] + QPoint(0, height() + pw * 2); - pa[3] = pa[0] + QPoint(0, height() + pw * 2); + pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); + pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); + pa[2] = pa[1] + TQPoint(0, height() + pw * 2); + pa[3] = pa[0] + TQPoint(0, height() + pw * 2); return pa; } -void QCanvasMatrixDiamond::drawShape(QPainter & p) +void QCanvasMatrixDiamond::drawShape(TQPainter & p) { p.save(); p.setWorldXForm(false); - QPointArray pa(4); + TQPointArray pa(4); int q = height() / 2 + 2; - QPoint mapPos = p.worldMatrix().map(QPoint(int(x()), int(y()))); + TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); - pa[0] = QPoint(mapPos.x(), mapPos.y() - 3); - pa[1] = QPoint(mapPos.x() + q, mapPos.y() - 3 + q); - pa[2] = pa[0] + QPoint(0, q * 2); - pa[3] = pa[1] - QPoint(q * 2, 0); + pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); + pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); + pa[2] = pa[0] + TQPoint(0, q * 2); + pa[3] = pa[1] - TQPoint(q * 2, 0); p.drawConvexPolygon(pa); p.restore(); diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.h b/src/gui/editors/matrix/QCanvasMatrixDiamond.h index 5163b12..547d7f1 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.h +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.h @@ -27,11 +27,11 @@ #define _RG_QCANVASMATRIXDIAMOND_H_ #include "QCanvasMatrixRectangle.h" -#include <qpointarray.h> +#include <tqpointarray.h> -class QPainter; -class QCanvas; +class TQPainter; +class TQCanvas; namespace Rosegarden @@ -41,18 +41,18 @@ class MatrixElement; /** - * A QCanvas diamond shape referencing a MatrixElement + * A TQCanvas diamond shape referencing a MatrixElement */ class QCanvasMatrixDiamond : public QCanvasMatrixRectangle { public: - QCanvasMatrixDiamond(MatrixElement&, QCanvas *); + QCanvasMatrixDiamond(MatrixElement&, TQCanvas *); ~QCanvasMatrixDiamond(); - QPointArray areaPoints() const; + TQPointArray areaPoints() const; protected: - void drawShape(QPainter &); + void drawShape(TQPainter &); }; diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp index a27b480..bbee6de 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp @@ -26,15 +26,15 @@ #include "QCanvasMatrixRectangle.h" #include "MatrixElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { QCanvasMatrixRectangle::QCanvasMatrixRectangle(MatrixElement& n, - QCanvas* canvas) - : QCanvasRectangle(canvas), + TQCanvas* canvas) + : TQCanvasRectangle(canvas), m_matrixElement(n) {} diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.h b/src/gui/editors/matrix/QCanvasMatrixRectangle.h index 64b6e65..6ef7ed8 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.h +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.h @@ -26,7 +26,7 @@ #ifndef _RG_QCANVASMATRIXRECTANGLE_H_ #define _RG_QCANVASMATRIXRECTANGLE_H_ -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden @@ -36,12 +36,12 @@ class MatrixElement; /** - * A QCanvasRectangle referencing a MatrixElement + * A TQCanvasRectangle referencing a MatrixElement */ class QCanvasMatrixRectangle : public QCanvasRectangle { public: - QCanvasMatrixRectangle(MatrixElement&, QCanvas*); + QCanvasMatrixRectangle(MatrixElement&, TQCanvas*); virtual ~QCanvasMatrixRectangle(); diff --git a/src/gui/editors/notation/ClefInserter.cpp b/src/gui/editors/notation/ClefInserter.cpp index f39327e..5e324a9 100644 --- a/src/gui/editors/notation/ClefInserter.cpp +++ b/src/gui/editors/notation/ClefInserter.cpp @@ -37,8 +37,8 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -48,21 +48,21 @@ ClefInserter::ClefInserter(NotationView* view) : NotationTool("ClefInserter", view), m_clef(Clef::Treble) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("clefinserter.rc"); @@ -97,7 +97,7 @@ void ClefInserter::setClef(std::string clefType) void ClefInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -126,7 +126,7 @@ void ClefInserter::handleLeftButtonPress(timeT, m_nParentView->setSingleSelectedEvent(staffNo, event); } -const QString ClefInserter::ToolName = "clefinserter"; +const TQString ClefInserter::ToolName = "clefinserter"; } #include "ClefInserter.moc" diff --git a/src/gui/editors/notation/ClefInserter.h b/src/gui/editors/notation/ClefInserter.h index 460bfa5..427f885 100644 --- a/src/gui/editors/notation/ClefInserter.h +++ b/src/gui/editors/notation/ClefInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -59,9 +59,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp index ab0498f..d2a668f 100644 --- a/src/gui/editors/notation/FontViewFrame.cpp +++ b/src/gui/editors/notation/FontViewFrame.cpp @@ -28,12 +28,12 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> -#include <qpainter.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpainter.h> #ifdef HAVE_XFT #include <ft2build.h> @@ -46,8 +46,8 @@ namespace Rosegarden { -FontViewFrame::FontViewFrame( int pixelSize, QWidget* parent, const char* name ) : - QFrame(parent, name), +FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) : + TQFrame(parent, name), m_fontSize(pixelSize), m_tableFont(0) { @@ -63,7 +63,7 @@ FontViewFrame::~FontViewFrame() } void -FontViewFrame::setFont(QString font) +FontViewFrame::setFont(TQString font) { m_fontName = font; loadFont(); @@ -104,9 +104,9 @@ FontViewFrame::loadFont() FcChar8 *matchFamily; FcPatternGetString(match, FC_FAMILY, 0, &matchFamily); - if (QString((const char *)matchFamily).lower() != m_fontName.lower()) { + if (TQString((const char *)matchFamily).lower() != m_fontName.lower()) { KMessageBox::sorry(this, i18n("Warning: No good match for font name %1 (best is %2)"). - arg(m_fontName).arg(QString((const char *)matchFamily))); + arg(m_fontName).arg(TQString((const char *)matchFamily))); m_fontName = (const char *)matchFamily; } @@ -114,7 +114,7 @@ FontViewFrame::loadFont() if (!m_tableFont) { KMessageBox::error(this, i18n("Error: Unable to open best-match font %1"). - arg(QString((const char *)matchFamily))); + arg(TQString((const char *)matchFamily))); } #endif } @@ -125,46 +125,46 @@ void FontViewFrame::setGlyphs(bool glyphs) update(); } -QSize FontViewFrame::sizeHint() const +TQSize FontViewFrame::sizeHint() const { - return QSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), + return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); } -QSize FontViewFrame::cellSize() const +TQSize FontViewFrame::cellSize() const { - QFontMetrics fm = fontMetrics(); - return QSize( fm.maxWidth(), fm.lineSpacing() + 1 ); + TQFontMetrics fm = fontMetrics(); + return TQSize( fm.maxWidth(), fm.lineSpacing() + 1 ); } -void FontViewFrame::paintEvent( QPaintEvent* e ) +void FontViewFrame::paintEvent( TQPaintEvent* e ) { #ifdef HAVE_XFT if (!m_tableFont) return ; - QFrame::paintEvent(e); - QPainter p(this); + TQFrame::paintEvent(e); + TQPainter p(this); int ll = 25; int ml = frameWidth() + margin() + ll + 1; int mt = frameWidth() + margin(); - QSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); + TQSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); if ( !cell.width() || !cell.height() ) return ; - QColor body(255, 255, 192); - QColor negative(255, 192, 192); - QColor positive(192, 192, 255); - QColor rnegative(255, 128, 128); - QColor rpositive(128, 128, 255); + TQColor body(255, 255, 192); + TQColor negative(255, 192, 192); + TQColor positive(192, 192, 255); + TQColor rnegative(255, 128, 128); + TQColor rpositive(128, 128, 255); Drawable drawable = (Drawable)handle(); XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable, (Visual *)x11Visual(), x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -185,18 +185,18 @@ void FontViewFrame::paintEvent( QPaintEvent* e ) if (j == 0) continue; p.setFont(kapp->font()); - QFontMetrics afm(kapp->font()); - QString s = QString("%1").arg(m_row * 256 + (j - 1) * 16); + TQFontMetrics afm(kapp->font()); + TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16); p.drawText(x - afm.width(s), y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(0, y, width(), y); p.setPen(Qt::black); continue; } else if (j == 0) { p.setFont(kapp->font()); - QString s = QString("%1").arg(i - 1); + TQString s = TQString("%1").arg(i - 1); p.drawText(x, y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(x, 0, x, height()); p.setPen(Qt::black); continue; diff --git a/src/gui/editors/notation/FontViewFrame.h b/src/gui/editors/notation/FontViewFrame.h index 8a1a946..a344fc1 100644 --- a/src/gui/editors/notation/FontViewFrame.h +++ b/src/gui/editors/notation/FontViewFrame.h @@ -26,13 +26,13 @@ #ifndef _RG_FONTVIEWFRAME_H_ #define _RG_FONTVIEWFRAME_H_ -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -45,24 +45,24 @@ class FontViewFrame : public QFrame Q_OBJECT public: - FontViewFrame(int pixelSize, QWidget *parent = 0, const char *name = 0); + FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); virtual ~FontViewFrame(); - QSize sizeHint() const; + TQSize sizeHint() const; bool hasRow(int row) const; public slots: - void setFont(QString name); + void setFont(TQString name); void setRow(int); void setGlyphs(bool glyphs); protected: - QSize cellSize() const; - void paintEvent( QPaintEvent* ); + TQSize cellSize() const; + void paintEvent( TQPaintEvent* ); void loadFont(); private: - QString m_fontName; + TQString m_fontName; int m_fontSize; void *m_tableFont; int m_row; diff --git a/src/gui/editors/notation/GuitarChordInserter.cpp b/src/gui/editors/notation/GuitarChordInserter.cpp index 2482b87..b4f6839 100644 --- a/src/gui/editors/notation/GuitarChordInserter.cpp +++ b/src/gui/editors/notation/GuitarChordInserter.cpp @@ -41,9 +41,9 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -53,15 +53,15 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) : NotationTool("GuitarChordInserter", view), m_guitarChordSelector(0) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet @@ -69,7 +69,7 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNoteSelected()), actionCollection(), + TQT_SLOT(slotNoteSelected()), actionCollection(), "notes"); m_guitarChordSelector = new GuitarChordSelectorDialog(m_nParentView); @@ -96,7 +96,7 @@ void GuitarChordInserter::slotSelectSelected() void GuitarChordInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "GuitarChordInserter::handleLeftButtonPress" << endl; @@ -119,7 +119,7 @@ bool GuitarChordInserter::processDialog( Staff* staff, { bool result = false; - if (m_guitarChordSelector->exec() == QDialog::Accepted) { + if (m_guitarChordSelector->exec() == TQDialog::Accepted) { Guitar::Chord chord = m_guitarChordSelector->getChord(); GuitarChordInsertionCommand *command = @@ -159,7 +159,7 @@ void GuitarChordInserter::handleSelectedGuitarChord (ViewElement* element, Staff } catch (Exception e) {} } -void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, QMouseEvent* e) +void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, TQMouseEvent* e) { NOTATION_DEBUG << "GuitarChordInserter::createNewGuitarChord" << endl; Event *clef = 0, *key = 0; @@ -179,7 +179,7 @@ void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *sta processDialog( staff, insertionTime ); } -const QString GuitarChordInserter::ToolName = "guitarchordinserter"; +const TQString GuitarChordInserter::ToolName = "guitarchordinserter"; } #include "GuitarChordInserter.moc" diff --git a/src/gui/editors/notation/GuitarChordInserter.h b/src/gui/editors/notation/GuitarChordInserter.h index 3bd5660..d66174b 100644 --- a/src/gui/editors/notation/GuitarChordInserter.h +++ b/src/gui/editors/notation/GuitarChordInserter.h @@ -27,11 +27,11 @@ #define _RG_GUITAR_CHORD_INSERTER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,17 +56,17 @@ public: virtual void handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element); /* virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); */ - static const QString ToolName; + static const TQString ToolName; protected slots: void slotGuitarChordSelected(); @@ -84,7 +84,7 @@ private: void createNewGuitarChord (ViewElement* element, Staff *staff, - QMouseEvent* e); + TQMouseEvent* e); bool processDialog (Staff *staff, timeT& insertionTime); diff --git a/src/gui/editors/notation/HeadersGroup.cpp b/src/gui/editors/notation/HeadersGroup.cpp index c0a2de0..f7dcc82 100644 --- a/src/gui/editors/notation/HeadersGroup.cpp +++ b/src/gui/editors/notation/HeadersGroup.cpp @@ -27,10 +27,10 @@ #include <limits> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> +#include <tqlabel.h> #include "HeadersGroup.h" #include "TrackHeader.h" @@ -43,8 +43,8 @@ namespace Rosegarden HeadersGroup:: -HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp) : - QVBox(parent), +HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp) : + TQVBox(parent), m_notationView(nv), m_composition(comp), m_usedHeight(0), @@ -83,7 +83,7 @@ void HeadersGroup::completeToHeight(int height) { if (height > m_usedHeight) { - if (!m_filler) m_filler = new QLabel(this); + if (!m_filler) m_filler = new TQLabel(this); m_filler->setFixedHeight(height - m_usedHeight); } } @@ -149,7 +149,7 @@ HeadersGroup::setCurrent(TrackId trackId) } void -HeadersGroup::resizeEvent(QResizeEvent * ev) +HeadersGroup::resizeEvent(TQResizeEvent * ev) { // Needed to avoid gray zone at the right of headers // when width is decreasing diff --git a/src/gui/editors/notation/HeadersGroup.h b/src/gui/editors/notation/HeadersGroup.h index 22d25da..b2a9edb 100644 --- a/src/gui/editors/notation/HeadersGroup.h +++ b/src/gui/editors/notation/HeadersGroup.h @@ -33,13 +33,13 @@ #include "base/Track.h" #include <vector> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> -class QLabel; -class QResizeEvent; +class TQLabel; +class TQResizeEvent; namespace Rosegarden @@ -58,7 +58,7 @@ public: /** * Create an empty headers group */ - HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp); + HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp); void removeAllHeaders(); @@ -123,7 +123,7 @@ signals : void headersResized(int newWidth); private: - void resizeEvent(QResizeEvent * ev); + void resizeEvent(TQResizeEvent * ev); NotationView * m_notationView; Composition * m_composition; @@ -132,7 +132,7 @@ private: TrackHeaderVector m_headers; int m_usedHeight; - QLabel * m_filler; + TQLabel * m_filler; int m_lastX; int m_lastWidth; diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp index 55e63ac..fb7d2d9 100644 --- a/src/gui/editors/notation/NotationCanvasView.cpp +++ b/src/gui/editors/notation/NotationCanvasView.cpp @@ -34,22 +34,22 @@ #include "NotationElement.h" #include "NotationProperties.h" #include "NotationStaff.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_linedStaffManager(staffmgr), @@ -74,11 +74,11 @@ NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, m_vert1 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert1->setPoints(0, 0, 0, 8); - m_vert1->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert1->setPen(TQPen(TQColor(64, 64, 64), 1)); m_vert2 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert2->setPoints(17, 0, 17, 8); - m_vert2->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert2->setPen(TQPen(TQColor(64, 64, 64), 1)); m_heightMarker->hide(); } @@ -99,13 +99,13 @@ NotationCanvasView::setHeightTracking(bool t) } void -NotationCanvasView::contentsMouseReleaseEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseReleaseEvent(TQMouseEvent *e) { emit mouseReleased(e); } void -NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) { NotationStaff *prevStaff = m_currentStaff; int prevHeight = m_currentHeight; @@ -115,7 +115,7 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) if (!m_currentStaff) { - emit hoveredOverNoteChanged(QString::null); + emit hoveredOverNoteChanged(TQString::null); if (prevStaff) { m_heightMarker->hide(); canvas()->update(); @@ -156,13 +156,13 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) emit mouseMoved(e); } -void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) +void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e) { NOTATION_DEBUG << "NotationCanvasView::contentsMousePressEvent() - btn : " << e->button() << " - state : " << e->state() << endl; - QCanvasItemList itemList = canvas()->collisions(e->pos()); + TQCanvasItemList itemList = canvas()->collisions(e->pos()); // We don't want to use m_currentStaff/Height, because we want // to make sure the event happens at the point we clicked at @@ -172,7 +172,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; NotationElement *clickedNote = 0; NotationElement *clickedVagueNote = 0; NotationElement *clickedNonNote = 0; @@ -197,7 +197,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) if (dynamic_cast<QCanvasNonElementSprite *>(*it)) { emit nonNotationItemPressed(e, *it); return ; - } else if (dynamic_cast<QCanvasText *>(*it)) { + } else if (dynamic_cast<TQCanvasText *>(*it)) { emit textItemPressed(e, *it); return ; } @@ -267,7 +267,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) handleMousePress(clickHeight, staffNo, e); } -void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) +void NotationCanvasView::contentsMouseDoubleClickEvent(TQMouseEvent* e) { NOTATION_DEBUG << "NotationCanvasView::contentsMouseDoubleClickEvent()\n"; @@ -275,15 +275,15 @@ void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) } void -NotationCanvasView::processActiveItems(QMouseEvent* e, - QCanvasItemList itemList) +NotationCanvasView::processActiveItems(TQMouseEvent* e, + TQCanvasItemList itemList) { - QCanvasItem* pressedItem = 0; - QCanvasItemList::Iterator it; + TQCanvasItem* pressedItem = 0; + TQCanvasItemList::Iterator it; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if (item->active() && !pressedItem) { NOTATION_DEBUG << "mousepress : got active item\n"; pressedItem = item; @@ -298,7 +298,7 @@ NotationCanvasView::processActiveItems(QMouseEvent* e, void NotationCanvasView::handleMousePress(int height, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, NotationElement *el) { NOTATION_DEBUG << "NotationCanvasView::handleMousePress() at height " @@ -308,7 +308,7 @@ NotationCanvasView::handleMousePress(int height, } bool -NotationCanvasView::posIsTooFarFromStaff(const QPoint &pos) +NotationCanvasView::posIsTooFarFromStaff(const TQPoint &pos) { // return true if pos.y is more than m_staffLineThreshold away from // the last pos for which a collision was detected @@ -339,7 +339,7 @@ NotationCanvasView::getLegerLineCount(int height, bool &offset) } void -NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) +NotationCanvasView::setHeightMarkerHeight(TQMouseEvent *e) { NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); @@ -381,7 +381,7 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) QCanvasLineGroupable *line = new QCanvasLineGroupable(canvas(), m_heightMarker); - line->setPen(QPen(QColor(64, 64, 64), 1)); + line->setPen(TQPen(TQColor(64, 64, 64), 1)); int y = (int)m_heightMarker->y() + (above ? -1 : 1) * (i * (spacing + 1)); @@ -403,20 +403,20 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) } NotationElement * -NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element +NotationCanvasView::getElementAtXCoord(TQMouseEvent *e) // any old element { - QRect threshold(e->pos(), QSize(4, 100)); //!!! + TQRect threshold(e->pos(), TQSize(4, 100)); //!!! threshold.moveCenter(e->pos()); - QCanvasItemList itemList = canvas()->collisions(threshold); + TQCanvasItemList itemList = canvas()->collisions(threshold); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; QCanvasNotationSprite* sprite = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if ((sprite = dynamic_cast<QCanvasNotationSprite*>(item))) { return & (sprite->getNotationElement()); @@ -427,7 +427,7 @@ NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element } void -NotationCanvasView::viewportPaintEvent(QPaintEvent *e) +NotationCanvasView::viewportPaintEvent(TQPaintEvent *e) { int cx(e->rect().x()), cy(e->rect().y()), @@ -435,7 +435,7 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) ch(e->rect().height())*/; // NOTATION_DEBUG << "NotationCanvasView::viewportPaintEvent: (" << cx << "," // << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::viewportPaintEvent(e); + TQCanvasView::viewportPaintEvent(e); cx += contentsX(); cy += contentsY(); @@ -445,14 +445,14 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) } void -NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) +NotationCanvasView::drawContents(TQPainter *p, int cx, int cy, int cw, int ch) { /* - m_lastRender = QRect(cx, cy, cw, ch); + m_lastRender = TQRect(cx, cy, cw, ch); NOTATION_DEBUG << "NotationCanvasView::drawContents: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; */ - QCanvasView::drawContents(p, cx, cy, cw, ch); + TQCanvasView::drawContents(p, cx, cy, cw, ch); /* emit renderRequired(std::min(contentsX(), cx), std::max(contentsX() + visibleWidth(), cx + cw)); @@ -462,21 +462,21 @@ NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) void NotationCanvasView::slotRenderComplete() { - /* QPainter painter(viewport()); + /* TQPainter painter(viewport()); int cx(m_lastRender.x()), cy(m_lastRender.y()), cw(m_lastRender.width()), ch(m_lastRender.height()); NOTATION_DEBUG << "NotationCanvasView::slotRenderComplete: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::drawContents(&painter, cx, cy, cw, ch); + TQCanvasView::drawContents(&painter, cx, cy, cw, ch); */ - QPaintEvent ev(m_lastRender); - QCanvasView::viewportPaintEvent(&ev); + TQPaintEvent ev(m_lastRender); + TQCanvasView::viewportPaintEvent(&ev); } void -NotationCanvasView::slotExternalWheelEvent(QWheelEvent* e) +NotationCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } diff --git a/src/gui/editors/notation/NotationCanvasView.h b/src/gui/editors/notation/NotationCanvasView.h index 5c88fb0..3c26ded 100644 --- a/src/gui/editors/notation/NotationCanvasView.h +++ b/src/gui/editors/notation/NotationCanvasView.h @@ -27,20 +27,20 @@ #define _RG_NOTATIONCANVASVIEW_H_ #include "gui/general/RosegardenCanvasView.h" -#include <qrect.h> +#include <tqrect.h> #include <vector> -class QWidget; -class QString; -class QPoint; -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQWidget; +class TQString; +class TQPoint; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; class QCanvasLineGroupable; class QCanvasItemGroup; -class QCanvasItem; -class QCanvas; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -69,7 +69,7 @@ class NotationCanvasView : public RosegardenCanvasView public: NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent=0, + TQCanvas *viewing, TQWidget *parent=0, const char *name=0, WFlags f=0); ~NotationCanvasView(); @@ -86,30 +86,30 @@ signals: * \a el points to the NotationElement which was clicked on, if any */ void itemPressed(int pitch, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* el); /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** - * Emitted when the user clicks on a QCanvasItem which is neither + * Emitted when the user clicks on a TQCanvasItem which is neither * active nor a notation element */ - void nonNotationItemPressed(QMouseEvent *, - QCanvasItem *); + void nonNotationItemPressed(TQMouseEvent *, + TQCanvasItem *); /** - * Emitted when the user clicks on a QCanvasItem which is a + * Emitted when the user clicks on a TQCanvasItem which is a * plain QCanvasText */ - void textItemPressed(QMouseEvent *, - QCanvasItem *); + void textItemPressed(TQMouseEvent *, + TQCanvasItem *); /** * Emitted when the mouse cursor moves to a different height @@ -117,7 +117,7 @@ signals: * * \a noteName contains the MIDI name of the corresponding note */ - void hoveredOverNoteChanged(const QString ¬eName); + void hoveredOverNoteChanged(const TQString ¬eName); /** * Emitted when the mouse cursor moves to a note which is at a @@ -131,12 +131,12 @@ signals: /** * Emitted when the mouse cursor moves (used by the selection tool) */ - void mouseMoved(QMouseEvent*); + void mouseMoved(TQMouseEvent*); /** * Emitted when the mouse button is released */ - void mouseReleased(QMouseEvent*); + void mouseReleased(TQMouseEvent*); /** * Emitted when a region is about to be drawn by the canvas view. @@ -148,48 +148,48 @@ signals: public slots: void slotRenderComplete(); - void slotExternalWheelEvent(QWheelEvent* e); + void slotExternalWheelEvent(TQWheelEvent* e); protected: - virtual void viewportPaintEvent(QPaintEvent *e); - virtual void drawContents(QPainter *p, int cx, int cy, int cw, int ch); + virtual void viewportPaintEvent(TQPaintEvent *e); + virtual void drawContents(TQPainter *p, int cx, int cy, int cw, int ch); const LinedStaffManager &m_linedStaffManager; /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse double click event in the canvas */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - void processActiveItems(QMouseEvent*, QCanvasItemList); + void processActiveItems(TQMouseEvent*, TQCanvasItemList); void handleMousePress(int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* pressedNotationElement = 0); - bool posIsTooFarFromStaff(const QPoint &pos); + bool posIsTooFarFromStaff(const TQPoint &pos); int getLegerLineCount(int height, bool &offset); - void setHeightMarkerHeight(QMouseEvent *e); + void setHeightMarkerHeight(TQMouseEvent *e); - NotationElement *getElementAtXCoord(QMouseEvent *e); + NotationElement *getElementAtXCoord(TQMouseEvent *e); //--------------- Data members --------------------------------- @@ -208,7 +208,7 @@ protected: bool m_heightTracking; - QRect m_lastRender; + TQRect m_lastRender; }; diff --git a/src/gui/editors/notation/NotationElement.cpp b/src/gui/editors/notation/NotationElement.cpp index 7df1cd5..c23ebd6 100644 --- a/src/gui/editors/notation/NotationElement.cpp +++ b/src/gui/editors/notation/NotationElement.cpp @@ -32,7 +32,7 @@ #include "base/NotationTypes.h" #include "base/ViewElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -118,7 +118,7 @@ NotationElement::isGrace() const } void -NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { removeCanvasItem(); m_recentlyRegenerated = true; @@ -127,7 +127,7 @@ NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) } void -NotationElement::addCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { if (!m_canvasItem) { std::cerr << "ERROR: Attempt to add extra canvas item to element without main canvas item:"; diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index c756641..2bb036f 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -32,7 +32,7 @@ #include "base/Event.h" -class QCanvasItem; +class TQCanvasItem; class ItemList; @@ -45,7 +45,7 @@ class Event; /** * The Notation H and V layout is performed on a * NotationElementList. Once this is done, each NotationElement is - * affected a QCanvasItem which is set at these coords. + * affected a TQCanvasItem which is set at these coords. * * @see NotationView#showElements() */ @@ -105,7 +105,7 @@ public: * * NOTE: The object takes ownership of its canvas item. */ - void setCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Add an extra canvas item associated with this element, for @@ -115,7 +115,7 @@ public: * The element will take ownership of these canvas items and * delete them when it deletes the main canvas item. */ - void addCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Remove the main canvas item and any additional ones. @@ -151,7 +151,7 @@ public: void setIsColliding(bool value) { m_isColliding = value; } /// Returns the associated canvas item - QCanvasItem* getCanvasItem() { return m_canvasItem; } + TQCanvasItem* getCanvasItem() { return m_canvasItem; } protected: //--------------- Data members --------------------------------- @@ -161,9 +161,9 @@ protected: bool m_recentlyRegenerated; bool m_isColliding; - QCanvasItem *m_canvasItem; + TQCanvasItem *m_canvasItem; - typedef std::vector<QCanvasItem *> ItemList; + typedef std::vector<TQCanvasItem *> ItemList; ItemList *m_extraItems; }; diff --git a/src/gui/editors/notation/NotationEraser.cpp b/src/gui/editors/notation/NotationEraser.cpp index 4124e44..856a622 100644 --- a/src/gui/editors/notation/NotationEraser.cpp +++ b/src/gui/editors/notation/NotationEraser.cpp @@ -36,8 +36,8 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kconfig.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,20 +52,20 @@ NotationEraser::NotationEraser(NotationView* view) m_collapseRest = config->readBoolEntry("collapse", false); new KToggleAction(i18n("Collapse rests after erase"), 0, this, - SLOT(slotToggleRestCollapse()), actionCollection(), + TQT_SLOT(slotToggleRestCollapse()), actionCollection(), "toggle_rest_collapse"); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); createMenu("notationeraser.rc"); @@ -80,7 +80,7 @@ void NotationEraser::ready() void NotationEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* element) { if (!element || staffNo < 0) @@ -109,7 +109,7 @@ void NotationEraser::slotSelectSelected() m_parentView->actionCollection()->action("select")->activate(); } -const QString NotationEraser::ToolName = "notationeraser"; +const TQString NotationEraser::ToolName = "notationeraser"; } #include "NotationEraser.moc" diff --git a/src/gui/editors/notation/NotationEraser.h b/src/gui/editors/notation/NotationEraser.h index 9efdd13..b13ed89 100644 --- a/src/gui/editors/notation/NotationEraser.h +++ b/src/gui/editors/notation/NotationEraser.h @@ -27,11 +27,11 @@ #define _RG_NOTATIONERASER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; public slots: void slotToggleRestCollapse(); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 1b13765..4d891a6 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -47,7 +47,7 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kconfig.h> -#include <qobject.h> +#include <tqobject.h> #include <cmath> namespace Rosegarden @@ -58,7 +58,7 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 9d7366b..878dc17 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -36,7 +36,7 @@ class TieMap; -class QObject; +class TQObject; namespace Rosegarden @@ -68,7 +68,7 @@ public: NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationHLayout(); diff --git a/src/gui/editors/notation/NotationSelectionPaster.cpp b/src/gui/editors/notation/NotationSelectionPaster.cpp index 3b008f2..96d894c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.cpp +++ b/src/gui/editors/notation/NotationSelectionPaster.cpp @@ -55,7 +55,7 @@ NotationSelectionPaster::~NotationSelectionPaster() void NotationSelectionPaster::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) diff --git a/src/gui/editors/notation/NotationSelectionPaster.h b/src/gui/editors/notation/NotationSelectionPaster.h index e6a80dd..110ed6c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.h +++ b/src/gui/editors/notation/NotationSelectionPaster.h @@ -30,7 +30,7 @@ #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -52,7 +52,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); protected: diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp index 221fbe3..2a28545 100644 --- a/src/gui/editors/notation/NotationSelector.cpp +++ b/src/gui/editors/notation/NotationSelector.cpp @@ -49,11 +49,11 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qapplication.h> -#include <qiconset.h> -#include <qrect.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqiconset.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqtimer.h> namespace Rosegarden @@ -71,68 +71,68 @@ NotationSelector::NotationSelector(NotationView* view) m_justSelectedBar(false), m_wholeStaffSelectionComplete(false) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); - connect(this, SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), - m_parentView, SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); + connect(this, TQT_SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), + m_parentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KToggleAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); // (this crashed, and it might be superfluous with ^N anyway, so I'm // commenting it out, but leaving it here in case I change my mind about // fooling with it.) (DMM) // new KAction(i18n("Normalize Rests"), 0, 0, this, - // SLOT(slotCollapseRests()), actionCollection(), + // TQT_SLOT(slotCollapseRests()), actionCollection(), // "collapse_rests"); new KAction(i18n("Collapse Rests"), 0, 0, this, - SLOT(slotCollapseRestsHard()), actionCollection(), + TQT_SLOT(slotCollapseRestsHard()), actionCollection(), "collapse_rests_aggressively"); new KAction(i18n("Respell as Flat"), 0, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); new KAction(i18n("Respell as Sharp"), 0, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); new KAction(i18n("Respell as Natural"), 0, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); new KAction(i18n("Collapse Notes"), 0, 0, this, - SLOT(slotCollapseNotes()), actionCollection(), + TQT_SLOT(slotCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("Interpret"), 0, 0, this, - SLOT(slotInterpret()), actionCollection(), + TQT_SLOT(slotInterpret()), actionCollection(), "interpret"); new KAction(i18n("Move to Staff Above"), 0, 0, this, - SLOT(slotStaffAbove()), actionCollection(), + TQT_SLOT(slotStaffAbove()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, 0, this, - SLOT(slotStaffBelow()), actionCollection(), + TQT_SLOT(slotStaffBelow()), actionCollection(), "move_events_down_staff"); new KAction(i18n("Make Invisible"), 0, 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make Visible"), 0, 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); createMenu("notationselector.rc"); @@ -146,7 +146,7 @@ NotationSelector::~NotationSelector() void NotationSelector::handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleMousePress: time is " << t << ", staffNo is " @@ -194,7 +194,7 @@ void NotationSelector::handleLeftButtonPress(timeT t, void NotationSelector::handleRightButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleRightButtonPress" << std::endl; @@ -228,7 +228,7 @@ void NotationSelector::slotClickTimeout() void NotationSelector::handleMouseDoubleClick(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "NotationSelector::handleMouseDoubleClick" << endl; @@ -247,7 +247,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, } else { - QRect rect = staff->getBarExtents(e->x(), e->y()); + TQRect rect = staff->getBarExtents(e->x(), e->y()); m_selectionRect->setX(rect.x() + 1); m_selectionRect->setY(rect.y()); @@ -257,8 +257,8 @@ void NotationSelector::handleMouseDoubleClick(timeT, m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } return ; @@ -267,7 +267,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, void NotationSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (!m_justSelectedBar) @@ -305,7 +305,7 @@ void NotationSelector::handleMouseTripleClick(timeT t, } int NotationSelector::handleMouseMove(timeT, int, - QMouseEvent* e) + TQMouseEvent* e) { if (!m_updateRect) return RosegardenCanvasView::NoFollow; @@ -345,7 +345,7 @@ int NotationSelector::handleMouseMove(timeT, int, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void NotationSelector::handleMouseRelease(timeT, int, QMouseEvent *e) +void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e) { NOTATION_DEBUG << "NotationSelector::handleMouseRelease" << endl; m_updateRect = false; @@ -706,7 +706,7 @@ void NotationSelector::dragFine(int x, int y, bool final) void NotationSelector::ready() { - m_selectionRect = new QCanvasRectangle(m_nParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_nParentView->canvas()); m_selectionRect->hide(); m_selectionRect->setPen(GUIPalette::getColour(GUIPalette::SelectionRectangle)); @@ -834,10 +834,10 @@ EventSelection* NotationSelector::getSelection() m_selectionRect->height() > -3 && m_selectionRect->height() < 3) return 0; - QCanvasItemList itemList = m_selectionRect->collisions(false); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_selectionRect->collisions(false); + TQCanvasItemList::Iterator it; - QRect rect = m_selectionRect->rect().normalize(); + TQRect rect = m_selectionRect->rect().normalize(); QCanvasNotationSprite *sprite = 0; if (!m_selectedStaff) { @@ -951,7 +951,7 @@ EventSelection* NotationSelector::getSelection() } } -const QString NotationSelector::ToolName = "notationselector"; +const TQString NotationSelector::ToolName = "notationselector"; } #include "NotationSelector.moc" diff --git a/src/gui/editors/notation/NotationSelector.h b/src/gui/editors/notation/NotationSelector.h index 7266fd5..6f9494a 100644 --- a/src/gui/editors/notation/NotationSelector.h +++ b/src/gui/editors/notation/NotationSelector.h @@ -28,12 +28,12 @@ #include "NotationTool.h" #include "NotationElement.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; class m_clickedElement; @@ -64,33 +64,33 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual void handleRightButtonPress(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual void handleMouseTripleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -125,7 +125,7 @@ public: } } - static const QString ToolName; + static const TQString ToolName; signals: void editElement(NotationStaff *, NotationElement *, bool advanced); @@ -173,7 +173,7 @@ protected: //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; NotationStaff *m_selectedStaff; diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index c5219b4..717e418 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -64,16 +64,16 @@ #include "NoteStyleFactory.h" #include <kconfig.h> #include <kmessagebox.h> -#include <qcanvas.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqrect.h> namespace Rosegarden { -NotationStaff::NotationStaff(QCanvas *canvas, Segment *segment, +NotationStaff::NotationStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, NotationView *view, std::string fontName, int resolution) : @@ -148,7 +148,7 @@ NotationStaff::insertTimeSignature(double layoutX, return ; m_notePixmapFactory->setSelected(false); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); QCanvasTimeSigSprite *sprite = new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); @@ -201,7 +201,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -220,7 +220,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -242,7 +242,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); - QCanvasRectangle *rect = new QCanvasRectangle(coords.first, coords.second, + TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); rect->setPen(Qt::black); rect->setBrush(Qt::white); @@ -276,7 +276,7 @@ NotationStaff::drawStaffName() getSegment().getComposition()-> getTrackById(getSegment().getTrack())->getLabel(); - QCanvasPixmap *map = + TQCanvasPixmap *map = m_notePixmapFactory->makeTextPixmap (Text(m_staffNameText, Text::StaffName)); @@ -942,7 +942,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, try { - QCanvasPixmap *pixmap = 0; + TQCanvasPixmap *pixmap = 0; m_notePixmapFactory->setSelected(selected); m_notePixmapFactory->setShaded(invisible); @@ -1343,7 +1343,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, } double -NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, +NotationStaff::setPainterClipping(TQPainter *painter, double lx, int ly, double dx, double w, LinedStaffCoords &coords, FitPolicy policy) { @@ -1369,9 +1369,9 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, clipWidth += clipLeft; clipLeft = 0; } - QRect clip(clipLeft, coords.second - getRowSpacing() / 2, + TQRect clip(clipLeft, coords.second - getRowSpacing() / 2, clipWidth, getRowSpacing()); - painter->setClipRect(clip, QPainter::CoordPainter); + painter->setClipRect(clip, TQPainter::CoordPainter); coords.first -= dx; } if (fit) { @@ -1392,7 +1392,7 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, } void -NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, +NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { double layoutX = elt->getLayoutX(); @@ -1408,7 +1408,7 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, double canvasX = coords.first; int canvasY = coords.second; - QCanvasItem *item = 0; + TQCanvasItem *item = 0; if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { @@ -1428,15 +1428,15 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, // NOTATION_DEBUG << "splitting at " << (rightMargin-canvasX) << endl; - std::pair<QPixmap, QPixmap> split = + std::pair<TQPixmap, TQPixmap> split = PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - QCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap - (split.first, QPoint(pixmap->offsetX(), pixmap->offsetY())); + TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - QCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap - (split.second, QPoint(0, pixmap->offsetY())); + TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + (split.second, TQPoint(0, pixmap->offsetY())); item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); @@ -1736,18 +1736,18 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) // The normal on-screen case bool collision = false; - QCanvasItem * haloItem = 0; + TQCanvasItem * haloItem = 0; if (m_showCollisions) { collision = elt->isColliding(); if (collision) { // Make collision halo - QCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); + TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } - QCanvasPixmap *pixmap = factory->makeNotePixmap(params); + TQCanvasPixmap *pixmap = factory->makeNotePixmap(params); int z = 0; if (factory->isSelected()) @@ -1991,7 +1991,7 @@ NotationStaff::markChanged(timeT from, timeT to, bool movedOnly) } void -NotationStaff::setPrintPainter(QPainter *painter) +NotationStaff::setPrintPainter(TQPainter *painter) { m_printPainter = painter; } diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index 4a0302c..f58e77d 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -38,10 +38,10 @@ #include "NotationElement.h" -class QPainter; -class QCanvasPixmap; -class QCanvasItem; -class QCanvas; +class TQPainter; +class TQCanvasPixmap; +class TQCanvasItem; +class TQCanvas; class LinedStaffCoords; @@ -82,7 +82,7 @@ public: * Creates a new NotationStaff for the specified Segment * \a id is the id of the staff in the NotationView */ - NotationStaff(QCanvas *, Segment *, SnapGrid *, + NotationStaff(TQCanvas *, Segment *, SnapGrid *, int id, NotationView *view, std::string fontName, int resolution); virtual ~NotationStaff(); @@ -210,7 +210,7 @@ public: * painter; those that can, will be rendered by renderPrintable() * instead. */ - virtual void setPrintPainter(QPainter *painter); + virtual void setPrintPainter(TQPainter *painter); /** * Render to the current print painter those elements that can be @@ -423,7 +423,7 @@ protected: * This function calls painter.save(), and the caller must call * painter.restore() after use. */ - virtual double setPainterClipping(QPainter *, double layoutX, int layoutY, + virtual double setPainterClipping(TQPainter *, double layoutX, int layoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy); @@ -432,7 +432,7 @@ protected: * bits if it overruns the end of a row and set the bits * separately. */ - virtual void setPixmap(NotationElement *, QCanvasPixmap *, int z, + virtual void setPixmap(NotationElement *, TQCanvasPixmap *, int z, FitPolicy policy); bool isSelected(NotationElementList::iterator); @@ -440,7 +440,7 @@ protected: typedef std::set<QCanvasSimpleSprite *> SpriteSet; SpriteSet m_timeSigs; - typedef std::set<QCanvasItem *> ItemSet; + typedef std::set<TQCanvasItem *> ItemSet; ItemSet m_repeatedClefsAndKeys; typedef std::pair<int, Clef> ClefChange; @@ -471,7 +471,7 @@ protected: bool m_showCollisions; int m_keySigCancelMode; - QPainter *m_printPainter; + TQPainter *m_printPainter; enum BarStatus { UnRendered = 0, Rendered, Positioned }; typedef std::map<int, BarStatus> BarStatusMap; diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6f8defd..6065323 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -33,14 +33,14 @@ #include "base/NotationTypes.h" #include "gui/configuration/GeneralConfigurationPage.h" #include <kconfig.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { QString -NotationStrings::addDots(QString s, int dots, +NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { if (!dots) @@ -61,14 +61,14 @@ NotationStrings::addDots(QString s, int dots, } else { if (dots > 1) { if (hyphenate) - return QString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").arg(dots).arg(s); else - return QString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").arg(dots).arg(s); } else { if (hyphenate) - return QString("dotted-%1").arg(s); + return TQString("dotted-%1").arg(s); else - return QString("dotted %1").arg(s); + return TQString("dotted %1").arg(s); } } } @@ -79,13 +79,13 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("sixty-fourth note"), i18n("thirty-second note"), i18n("sixteenth note"), i18n("eighth note"), i18n("quarter note"), i18n("half note"), i18n("whole note"), i18n("double whole note") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("sixty-fourth notes"), i18n("thirty-second notes"), i18n("sixteenth notes"), i18n("eighth notes"), i18n("quarter notes"), i18n("half notes"), @@ -109,13 +109,13 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "sixty-fourth note", "thirty-second note", "sixteenth note", "eighth note", "quarter note", "half note", "whole note", "double whole note" }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { "sixty-fourth notes", "thirty-second notes", "sixteenth notes", "eighth notes", "quarter notes", "half notes", @@ -123,11 +123,11 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(QString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(QString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } @@ -139,12 +139,12 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("64th"), i18n("32nd"), i18n("16th"), i18n("8th"), i18n("quarter"), i18n("half"), i18n("whole"), i18n("double whole") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("64ths"), i18n("32nds"), i18n("16ths"), i18n("8ths"), i18n("quarters"), i18n("halves"), i18n("wholes"), i18n("double wholes") @@ -167,19 +167,19 @@ NotationStrings::getReferenceName(Note note, bool isRest) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "hemidemisemi", "demisemi", "semiquaver", "quaver", "crotchet", "minim", "semibreve", "breve" }; - QString name(names[type]); + TQString name(names[type]); if (isRest) name = "rest-" + name; return addDots(name, dots, true, false); } Note -NotationStrings::getNoteForName(QString name) +NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); int pos = name.find('-'); @@ -271,16 +271,16 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return QString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").arg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return QString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").arg(duration / wholeNote); } else { return i18n("%1 ticks").arg(duration); plural = false; } } else { - QString noteName; + TQString noteName; switch (noteNameStyle) { diff --git a/src/gui/editors/notation/NotationStrings.h b/src/gui/editors/notation/NotationStrings.h index d79dff3..d058734 100644 --- a/src/gui/editors/notation/NotationStrings.h +++ b/src/gui/editors/notation/NotationStrings.h @@ -28,7 +28,7 @@ #include "base/Exception.h" #include "base/NotationTypes.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -58,7 +58,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getNoteName(Note note, + static TQString getNoteName(Note note, bool plural = false, bool triplet = false); /** @@ -66,7 +66,7 @@ public: * useful if the user has specified that they'd prefer American * names to local names. */ - static QString getAmericanName(Note note, + static TQString getAmericanName(Note note, bool plural = false, bool triplet = false); /** @@ -76,7 +76,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getShortNoteName(Note note, + static TQString getShortNoteName(Note note, bool plural = false, bool triplet = false); @@ -85,7 +85,7 @@ public: * formal name used to name pixmap files and the like, so the exact * values of these strings are pretty sensitive. */ - static QString getReferenceName(Note note, bool isRest = false); + static TQString getReferenceName(Note note, bool isRest = false); typedef Exception MalformedNoteName; @@ -94,7 +94,7 @@ public: * reference name or an untranslated British, American or short name. * May throw MalformedNoteName. */ - static Note getNoteForName(QString name); + static Note getNoteForName(TQString name); /** * Construct a label to describe the given duration as a note name in @@ -102,7 +102,7 @@ public: * and returns a non-zero value in errorReturn if it was not an exact * match for the required duration. */ - static QString makeNoteMenuLabel(timeT duration, + static TQString makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, bool plural = false); @@ -111,7 +111,7 @@ private: /** * Return a string representing the dotted version of the input str. */ - static QString addDots(QString s, int dots, + static TQString addDots(TQString s, int dots, bool hyphenate, bool internationalize); }; diff --git a/src/gui/editors/notation/NotationTool.cpp b/src/gui/editors/notation/NotationTool.cpp index 8e82107..b187fbb 100644 --- a/src/gui/editors/notation/NotationTool.cpp +++ b/src/gui/editors/notation/NotationTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "NotationView.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -NotationTool::NotationTool(const QString& menuName, NotationView* view) +NotationTool::NotationTool(const TQString& menuName, NotationView* view) : EditTool(menuName, view), m_nParentView(view) {} diff --git a/src/gui/editors/notation/NotationTool.h b/src/gui/editors/notation/NotationTool.h index ab1020a..da9f50d 100644 --- a/src/gui/editors/notation/NotationTool.h +++ b/src/gui/editors/notation/NotationTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -79,7 +79,7 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - NotationTool(const QString& menuName, NotationView*); + NotationTool(const TQString& menuName, NotationView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationToolBox.cpp b/src/gui/editors/notation/NotationToolBox.cpp index 769bcaf..7632413 100644 --- a/src/gui/editors/notation/NotationToolBox.cpp +++ b/src/gui/editors/notation/NotationToolBox.cpp @@ -36,7 +36,7 @@ #include "NotationEraser.h" #include "NotationSelector.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -49,11 +49,11 @@ NotationToolBox::NotationToolBox(NotationView *parent) //m_tools.setAutoDelete(true); } -EditTool* NotationToolBox::createTool(const QString& toolName) +EditTool* NotationToolBox::createTool(const TQString& toolName) { NotationTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == NoteInserter::ToolName) @@ -88,7 +88,7 @@ EditTool* NotationToolBox::createTool(const QString& toolName) tool = new NotationSelector(m_nParentView); else { - KMessageBox::error(0, QString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/notation/NotationToolBox.h b/src/gui/editors/notation/NotationToolBox.h index 48b1202..d6765e6 100644 --- a/src/gui/editors/notation/NotationToolBox.h +++ b/src/gui/editors/notation/NotationToolBox.h @@ -29,7 +29,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -51,7 +51,7 @@ public: NotationToolBox(NotationView* parent); protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index c746a30..5be5532 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -42,9 +42,9 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kmessagebox.h> -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -55,7 +55,7 @@ using namespace BaseProperties; NotationVLayout::NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), m_composition(c), m_npf(npf), @@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) if (!(*chord[j])->event()->get <Int> (m_properties.HEIGHT_ON_STAFF, height)) { - std::cerr << QString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; + std::cerr << TQString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; (*chord[j])->event()->dump(std::cerr); } h.push_back(height); @@ -490,7 +490,7 @@ NotationVLayout::positionSlur(NotationStaff &staff, if (!event->get <Int>(m_properties.HEIGHT_ON_STAFF, h)) { KMessageBox::sorry - ((QWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); + ((TQWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); event->dump(std::cerr); } diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index 83a16c1..2e718c7 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -36,7 +36,7 @@ class SlurList; -class QObject; +class TQObject; namespace Rosegarden @@ -63,7 +63,7 @@ class NotationVLayout : public ProgressReporter, public: NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationVLayout(); diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index 66cb4b3..b3db080 100644 --- a/src/gui/editors/notation/NotationView.cpp +++ b/src/gui/editors/notation/NotationView.cpp @@ -25,7 +25,7 @@ #include "NotationView.h" #include <list> -#include <qlayout.h> +#include <tqlayout.h> #include "misc/Debug.h" #include <kapplication.h> @@ -194,32 +194,32 @@ #include <ktempfile.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qbrush.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpaintdevicemetrics.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qprinter.h> -#include <qrect.h> -#include <qregexp.h> -#include <qsize.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qvalidator.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpaintdevicemetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqprinter.h> +#include <tqrect.h> +#include <tqregexp.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqvalidator.h> #include <algorithm> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> namespace Rosegarden @@ -229,17 +229,17 @@ class NoteActionData { public: NoteActionData(); - NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, + NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, int _dots); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool rest; Note::Type noteType; @@ -257,9 +257,9 @@ NoteActionData::NoteActionData() { } -NoteActionData::NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteActionData::NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, @@ -279,16 +279,16 @@ class NoteChangeActionData { public: NoteChangeActionData(); - NoteChangeActionData(const QString &_title, - QString _actionName, - QString _pixmapName, + NoteChangeActionData(const TQString &_title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool notationOnly; Note::Type noteType; @@ -304,9 +304,9 @@ NoteChangeActionData::NoteChangeActionData() { } -NoteChangeActionData::NoteChangeActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteChangeActionData::NoteChangeActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType) @@ -328,8 +328,8 @@ public: actionName(0), keycode(0) { } - MarkActionData(const QString &_title, - QString _actionName, + MarkActionData(const TQString &_title, + TQString _actionName, int _keycode, Mark _mark) : title(_title), @@ -337,8 +337,8 @@ public: keycode(_keycode), mark(_mark) { } - QString title; - QString actionName; + TQString title; + TQString actionName; int keycode; Mark mark; }; @@ -346,7 +346,7 @@ public: NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive) : EditView(doc, segments, 2, parent, "notationview"), m_properties(getViewLocalPropertyPrefix()), @@ -452,7 +452,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -498,28 +498,28 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // HeadersGroup ctor must not be called before m_staffs initialization m_headersGroupView = new QDeferScrollView(getCentralWidget()); - QWidget * vport = m_headersGroupView->viewport(); + TQWidget * vport = m_headersGroupView->viewport(); m_headersGroup = new HeadersGroup(vport, this, &doc->getComposition()); - m_headersGroupView->setVScrollBarMode(QScrollView::AlwaysOff); - m_headersGroupView->setHScrollBarMode(QScrollView::AlwaysOff); + m_headersGroupView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_headersGroupView->setHScrollBarMode(TQScrollView::AlwaysOff); m_headersGroupView->setFixedWidth(m_headersGroupView->contentsWidth()); m_canvasView->setLeftFixedWidget(m_headersGroupView); // Add a close button just above the track headers. // The grid layout is only here to maintain the button in a // right place - m_headersTopFrame = new QFrame(getCentralWidget()); - QGridLayout * headersTopGrid - = new QGridLayout(m_headersTopFrame, 2, 2); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); - QPushButton * hideHeadersButton - = new QPushButton(m_headersTopFrame); + m_headersTopFrame = new TQFrame(getCentralWidget()); + TQGridLayout * headersTopGrid + = new TQGridLayout(m_headersTopFrame, 2, 2); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); + TQPushButton * hideHeadersButton + = new TQPushButton(m_headersTopFrame); headersTopGrid->addWidget(hideHeadersButton, 1, 1, Qt::AlignRight | Qt::AlignBottom); - hideHeadersButton->setIconSet(QIconSet(pixmap)); + hideHeadersButton->setIconSet(TQIconSet(pixmap)); hideHeadersButton->setFlat(true); - QToolTip::add(hideHeadersButton, i18n("Close track headers")); + TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, @@ -528,19 +528,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); // Following connection have to be done before calling setPageMode()) - connect(m_headersGroup, SIGNAL(headersResized(int)), - this, SLOT(slotHeadersWidthChanged(int))); + connect(m_headersGroup, TQT_SIGNAL(headersResized(int)), + this, TQT_SLOT(slotHeadersWidthChanged(int))); // @@ -616,9 +616,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Connect signals // - QObject::connect - (getCanvasView(), SIGNAL(renderRequired(double, double)), - this, SLOT(slotCheckRendered(double, double))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(renderRequired(double, double)), + this, TQT_SLOT(slotCheckRendered(double, double))); m_topStandardRuler->connectRulerToDocPointer(doc); m_bottomStandardRuler->connectRulerToDocPointer(doc); @@ -626,104 +626,104 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Disconnect the default connection for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (m_topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (getCanvasView(), SIGNAL(itemPressed(int, int, QMouseEvent*, NotationElement*)), - this, SLOT (slotItemPressed(int, int, QMouseEvent*, NotationElement*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(itemPressed(int, int, TQMouseEvent*, NotationElement*)), + this, TQT_SLOT (slotItemPressed(int, int, TQMouseEvent*, NotationElement*))); - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotActiveItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotActiveItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(nonNotationItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotNonNotationItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(nonNotationItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotNonNotationItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(textItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotTextItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(textItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotTextItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseMoved(QMouseEvent*)), - this, SLOT (slotMouseMoved(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseMoved(TQMouseEvent*)), + this, TQT_SLOT (slotMouseMoved(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseReleased(QMouseEvent*)), - this, SLOT (slotMouseReleased(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseReleased(TQMouseEvent*)), + this, TQT_SLOT (slotMouseReleased(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(const QString&)), - this, SLOT (slotHoveredOverNoteChanged(const QString&))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(const TQString&)), + this, TQT_SLOT (slotHoveredOverNoteChanged(const TQString&))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (getCanvasView(), SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); - QObject::connect - (getCanvasView(), SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - QObject::connect - (m_pannerDialog->scrollbox(), SIGNAL(valueChanged(const QPoint &)), - getCanvasView(), SLOT(slotSetScrollPos(const QPoint &))); + TQObject::connect + (m_pannerDialog->scrollbox(), TQT_SIGNAL(valueChanged(const TQPoint &)), + getCanvasView(), TQT_SLOT(slotSetScrollPos(const TQPoint &))); - QObject::connect - (getCanvasView()->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewX(int))); + TQObject::connect + (getCanvasView()->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewX(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewY(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewY(int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // // Connect vertical scrollbars between canvas and notation header - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (m_headersGroupView, SIGNAL(gotWheelEvent(QWheelEvent*)), - getCanvasView(), SLOT(slotExternalWheelEvent(QWheelEvent*))); + TQObject::connect + (m_headersGroupView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + getCanvasView(), TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // Ensure notation header keeps the right bottom margin when user // toggles the canvas view bottom rulers - connect(getCanvasView(), SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(getCanvasView(), TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); // Signal canvas horizontal scroll to notation header - QObject::connect - (getCanvasView(), SIGNAL(contentsMoving(int, int)), - this, SLOT(slotUpdateHeaders(int, int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotUpdateHeaders(int, int))); // Connect the close notation headers button - QObject::connect(hideHeadersButton, SIGNAL(clicked()), - this, SLOT(slotHideHeadersGroup())); + TQObject::connect(hideHeadersButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotHideHeadersGroup())); stateChanged("have_selection", KXMLGUIClient::StateReverse); stateChanged("have_notes_in_selection", KXMLGUIClient::StateReverse); @@ -764,17 +764,17 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // getCanvasView()->repaintContents(); updateView(); - QObject::connect - (this, SIGNAL(renderComplete()), - getCanvasView(), SLOT(slotRenderComplete())); + TQObject::connect + (this, TQT_SIGNAL(renderComplete()), + getCanvasView(), TQT_SLOT(slotRenderComplete())); if (parent) { const TrackButtons * trackLabels = ((RosegardenGUIView*)parent)->getTrackEditor()->getTrackButtons(); - QObject::connect - (trackLabels, SIGNAL(nameChanged()), - this, SLOT(slotUpdateStaffName())); + TQObject::connect + (trackLabels, TQT_SIGNAL(nameChanged()), + this, TQT_SLOT(slotUpdateStaffName())); } setConfigDialogPageIndex(3); @@ -796,7 +796,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView) : EditView(doc, segments, 1, 0, "printview"), m_properties(getViewLocalPropertyPrefix()), @@ -889,7 +889,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); //!!! setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -1046,16 +1046,16 @@ void NotationView::positionStaffs() const Configuration &metadata = getDocument()->getComposition().getMetadata(); - QFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); + TQFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); m_config->setGroup(NotationViewConfigGroup); - QFont font = m_config->readFontEntry("textfont", &defaultFont); + TQFont font = m_config->readFontEntry("textfont", &defaultFont); font.setPixelSize(m_fontSize * 5); - QFontMetrics metrics(font); + TQFontMetrics metrics(font); if (metadata.has(CompositionMetadataKeys::Title)) { - QString title(strtoqstr(metadata.get<String> + TQString title(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Title))); - m_title = new QCanvasText(title, font, canvas()); + m_title = new TQCanvasText(title, font, canvas()); m_title->setX(m_leftGutter + pageWidth / 2 - metrics.width(title) / 2); m_title->setY(20 + topMargin / 4 + metrics.ascent()); m_title->show(); @@ -1063,12 +1063,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 3); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Subtitle)) { - QString subtitle(strtoqstr(metadata.get<String> + TQString subtitle(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Subtitle))); - m_subtitle = new QCanvasText(subtitle, font, canvas()); + m_subtitle = new TQCanvasText(subtitle, font, canvas()); m_subtitle->setX(m_leftGutter + pageWidth / 2 - metrics.width(subtitle) / 2); m_subtitle->setY(20 + titleHeight + metrics.ascent()); m_subtitle->show(); @@ -1076,9 +1076,9 @@ void NotationView::positionStaffs() } if (metadata.has(CompositionMetadataKeys::Composer)) { - QString composer(strtoqstr(metadata.get<String> + TQString composer(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Composer))); - m_composer = new QCanvasText(composer, font, canvas()); + m_composer = new TQCanvasText(composer, font, canvas()); m_composer->setX(m_leftGutter + pageWidth - metrics.width(composer) - leftMargin); m_composer->setY(20 + titleHeight + metrics.ascent()); m_composer->show(); @@ -1086,12 +1086,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 2); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Copyright)) { - QString copyright(strtoqstr(metadata.get<String> + TQString copyright(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Copyright))); - m_copyright = new QCanvasText(copyright, font, canvas()); + m_copyright = new TQCanvasText(copyright, font, canvas()); m_copyright->setX(m_leftGutter + leftMargin); m_copyright->setY(20 + pageHeight - topMargin - metrics.descent()); m_copyright->show(); @@ -1328,20 +1328,20 @@ void NotationView::positionPages() if (m_printMode) return ; - QPixmap background; - QPixmap deskBackground; + TQPixmap background; + TQPixmap deskBackground; bool haveBackground = false; m_config->setGroup(NotationViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures", true)) { - QString pixmapDir = + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - if (background.load(QString("%1/misc/bg-paper-cream.xpm"). + if (background.load(TQString("%1/misc/bg-paper-cream.xpm"). arg(pixmapDir))) { haveBackground = true; } // we're happy to ignore errors from this one: - deskBackground.load(QString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); + deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); } int pageWidth = getPageWidth(); @@ -1378,9 +1378,9 @@ void NotationView::positionPages() getCanvasView()->setErasePixmap(background); } - QFont pageNumberFont; + TQFont pageNumberFont; pageNumberFont.setPixelSize(m_fontSize * 2); - QFontMetrics pageNumberMetrics(pageNumberFont); + TQFontMetrics pageNumberMetrics(pageNumberFont); for (int page = 0; page < maxPageCount; ++page) { @@ -1389,17 +1389,17 @@ void NotationView::positionPages() int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); - QCanvasText *text = new QCanvasText(str, pageNumberFont, canvas()); + TQString str = TQString("%1").arg(page + 1); + TQCanvasText *text = new TQCanvasText(str, pageNumberFont, canvas()); text->setX(m_leftGutter + pageWidth * page + pageWidth - pageNumberMetrics.width(str) - leftMargin); text->setY(y + h - pageNumberMetrics.descent() - topMargin); text->setZ( -999); text->show(); m_pageNumbers.push_back(text); - QCanvasRectangle *rect = new QCanvasRectangle(x, y, w, h, canvas()); + TQCanvasRectangle *rect = new TQCanvasRectangle(x, y, w, h, canvas()); if (haveBackground) - rect->setBrush(QBrush(Qt::white, background)); + rect->setBrush(TQBrush(Qt::white, background)); rect->setPen(Qt::black); rect->setZ( -1000); rect->show(); @@ -1440,7 +1440,7 @@ void NotationView::setOneToolbar(const char *actionName, std::cerr << "WARNING: No such action as " << actionName << std::endl; return ; } - QWidget *toolbar = toolBar(toolbarName); + TQWidget *toolbar = toolBar(toolbarName); if (!toolbar) { std::cerr << "WARNING: No such toolbar as " << toolbarName << std::endl; return ; @@ -1493,16 +1493,16 @@ void NotationView::readOptions() void NotationView::setupActions() { - KStdAction::print(this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview(this, SLOT(slotFilePrintPreview()), + KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview(this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); new KAction(i18n("Print &with LilyPond..."), 0, 0, this, - SLOT(slotPrintLilyPond()), actionCollection(), + TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, - SLOT(slotPreviewLilyPond()), actionCollection(), + TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); EditViewBase::setupActions("notation.rc"); @@ -1522,11 +1522,11 @@ void NotationView::setupActions() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); KToggleAction *fontAction = new KToggleAction - (fontQName, 0, this, SLOT(slotChangeFontFromAction()), + (fontQName, 0, this, TQT_SLOT(slotChangeFontFromAction()), actionCollection(), "note_font_" + fontQName); fontAction->setChecked(*i == m_fontName); @@ -1543,7 +1543,7 @@ void NotationView::setupActions() m_showHeadersMenuEntry = new KAction(i18n("Show Track Headers"), 0, this, - SLOT(slotShowHeadersGroup()), + TQT_SLOT(slotShowHeadersGroup()), actionCollection(), "show_track_headers"); KActionMenu *spacingActionMenu = @@ -1557,9 +1557,9 @@ void NotationView::setupActions() KToggleAction *spacingAction = new KToggleAction - (QString("%1%").arg(*i), 0, this, - SLOT(slotChangeSpacingFromAction()), - actionCollection(), QString("spacing_%1").arg(*i)); + (TQString("%1%").arg(*i), 0, this, + TQT_SLOT(slotChangeSpacingFromAction()), + actionCollection(), TQString("spacing_%1").arg(*i)); spacingAction->setExclusiveGroup("spacing"); spacingAction->setChecked(*i == defaultSpacing); @@ -1577,15 +1577,15 @@ void NotationView::setupActions() for (std::vector<int>::iterator i = proportions.begin(); i != proportions.end(); ++i) { - QString name = QString("%1%").arg(*i); + TQString name = TQString("%1%").arg(*i); if (*i == 0) name = i18n("None"); KToggleAction *proportionAction = new KToggleAction (name, 0, this, - SLOT(slotChangeProportionFromAction()), - actionCollection(), QString("proportion_%1").arg(*i)); + TQT_SLOT(slotChangeProportionFromAction()), + actionCollection(), TQString("proportion_%1").arg(*i)); proportionAction->setExclusiveGroup("proportion"); proportionAction->setChecked(*i == defaultProportion); @@ -1603,11 +1603,11 @@ void NotationView::setupActions() for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - QString styleQName(strtoqstr(*i)); + TQString styleQName(strtoqstr(*i)); KAction *styleAction = new KAction - (styleQName, 0, this, SLOT(slotSetStyleFromAction()), + (styleQName, 0, this, TQT_SLOT(slotSetStyleFromAction()), actionCollection(), "style_" + styleQName); styleActionMenu->insert(styleAction); @@ -1621,22 +1621,22 @@ void NotationView::setupActions() new KAction - (i18n("Insert Rest"), Key_P, this, SLOT(slotInsertRest()), - actionCollection(), QString("insert_rest")); + (i18n("Insert Rest"), Key_P, this, TQT_SLOT(slotInsertRest()), + actionCollection(), TQString("insert_rest")); new KAction (i18n("Switch from Note to Rest"), Key_T, this, - SLOT(slotSwitchFromNoteToRest()), - actionCollection(), QString("switch_from_note_to_rest")); + TQT_SLOT(slotSwitchFromNoteToRest()), + actionCollection(), TQString("switch_from_note_to_rest")); new KAction (i18n("Switch from Rest to Note"), Key_Y, this, - SLOT(slotSwitchFromRestToNote()), - actionCollection(), QString("switch_from_rest_to_note")); + TQT_SLOT(slotSwitchFromRestToNote()), + actionCollection(), TQString("switch_from_rest_to_note")); // setup Notes menu & toolbar - QIconSet icon; + TQIconSet icon; for (NoteActionDataMap::Iterator actionDataIter = m_noteActionDataMap->begin(); actionDataIter != m_noteActionDataMap->end(); @@ -1651,7 +1651,7 @@ void NotationView::setupActions() icon, noteActionData.keycode, this, - SLOT(slotNoteAction()), + TQT_SLOT(slotNoteAction()), actionCollection(), noteActionData.actionName); noteAction->setExclusiveGroup("notes"); @@ -1677,7 +1677,7 @@ void NotationView::setupActions() icon, data.keycode, this, - SLOT(slotNoteChangeAction()), + TQT_SLOT(slotNoteChangeAction()), actionCollection(), data.actionName); } @@ -1685,7 +1685,7 @@ void NotationView::setupActions() // // Accidentals // - static QString actionsAccidental[][4] = + static TQString actionsAccidental[][4] = { { i18n("No accidental"), "1slotNoAccidental()", "no_accidental", "accidental-none" }, { i18n("Follow previous accidental"), "1slotFollowAccidental()", "follow_accidental", "accidental-follow" }, @@ -1699,7 +1699,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap (actionsAccidental[i][3]))); noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, this, actionsAccidental[i][1], @@ -1713,49 +1713,49 @@ void NotationView::setupActions() // // Treble - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, this, - SLOT(slotTrebleClef()), + TQT_SLOT(slotTrebleClef()), actionCollection(), "treble_clef"); noteAction->setExclusiveGroup("notes"); // Alto - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, this, - SLOT(slotAltoClef()), + TQT_SLOT(slotAltoClef()), actionCollection(), "alto_clef"); noteAction->setExclusiveGroup("notes"); // Tenor - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, this, - SLOT(slotTenorClef()), + TQT_SLOT(slotTenorClef()), actionCollection(), "tenor_clef"); noteAction->setExclusiveGroup("notes"); // Bass - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, this, - SLOT(slotBassClef()), + TQT_SLOT(slotBassClef()), actionCollection(), "bass_clef"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, this, - SLOT(slotText()), + TQT_SLOT(slotText()), actionCollection(), "text"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, this, - SLOT(slotGuitarChord()), + TQT_SLOT(slotGuitarChord()), actionCollection(), "guitarchord"); noteAction->setExclusiveGroup("notes"); - /* icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); + /* icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, this, - SLOT(slotLilyPondDirective()), + TQT_SLOT(slotLilyPondDirective()), actionCollection(), "lilypond_directive"); noteAction->setExclusiveGroup("notes"); */ @@ -1764,53 +1764,53 @@ void NotationView::setupActions() // Edition tools (eraser, selector...) // noteAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); noteAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); // Edit menu new KAction(i18n("Select from Sta&rt"), 0, this, - SLOT(slotEditSelectFromStart()), actionCollection(), + TQT_SLOT(slotEditSelectFromStart()), actionCollection(), "select_from_start"); new KAction(i18n("Select to &End"), 0, this, - SLOT(slotEditSelectToEnd()), actionCollection(), + TQT_SLOT(slotEditSelectToEnd()), actionCollection(), "select_to_end"); new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, this, - SLOT(slotEditSelectWholeStaff()), actionCollection(), + TQT_SLOT(slotEditSelectWholeStaff()), actionCollection(), "select_whole_staff"); new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, this, - SLOT(slotEditCutAndClose()), actionCollection(), + TQT_SLOT(slotEditCutAndClose()), actionCollection(), "cut_and_close"); new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, this, - SLOT(slotEditGeneralPaste()), actionCollection(), + TQT_SLOT(slotEditGeneralPaste()), actionCollection(), "general_paste"); new KAction(i18n("De&lete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Move to Staff Above"), 0, this, - SLOT(slotMoveEventsUpStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsUpStaff()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, this, - SLOT(slotMoveEventsDownStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsDownStaff()), actionCollection(), "move_events_down_staff"); // @@ -1818,56 +1818,56 @@ void NotationView::setupActions() // int layoutMode = m_config->readNumEntry("layoutmode", 0); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); + icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction - (i18n("&Linear Layout"), icon, 0, this, SLOT(slotLinearMode()), + (i18n("&Linear Layout"), icon, 0, this, TQT_SLOT(slotLinearMode()), actionCollection(), "linear_mode"); linearModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 0) linearModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/continuous-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *continuousPageModeAction = new KRadioAction - (i18n("&Continuous Page Layout"), icon, 0, this, SLOT(slotContinuousPageMode()), + (i18n("&Continuous Page Layout"), icon, 0, this, TQT_SLOT(slotContinuousPageMode()), actionCollection(), "continuous_page_mode"); continuousPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 1) continuousPageModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/multi-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *multiPageModeAction = new KRadioAction - (i18n("&Multiple Page Layout"), icon, 0, this, SLOT(slotMultiPageMode()), + (i18n("&Multiple Page Layout"), icon, 0, this, TQT_SLOT(slotMultiPageMode()), actionCollection(), "multi_page_mode"); multiPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 2) multiPageModeAction->setChecked(true); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, this, - SLOT(slotToggleRawNoteRuler()), + TQT_SLOT(slotToggleRawNoteRuler()), actionCollection(), "show_raw_note_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); new KToggleAction(i18n("Show &Annotations"), 0, this, - SLOT(slotToggleAnnotations()), + TQT_SLOT(slotToggleAnnotations()), actionCollection(), "show_annotations"); new KToggleAction(i18n("Show Lily&Pond Directives"), 0, this, - SLOT(slotToggleLilyPondDirectives()), + TQT_SLOT(slotToggleLilyPondDirectives()), actionCollection(), "show_lilypond_directives"); - new KAction(i18n("Open L&yric Editor"), 0, this, SLOT(slotEditLyrics()), + new KAction(i18n("Open L&yric Editor"), 0, this, TQT_SLOT(slotEditLyrics()), actionCollection(), "lyric_editor"); // @@ -1878,53 +1878,53 @@ void NotationView::setupActions() ("group-beam"))); new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, this, - SLOT(slotGroupBeam()), actionCollection(), "beam"); + TQT_SLOT(slotGroupBeam()), actionCollection(), "beam"); new KAction(AutoBeamCommand::getGlobalName(), 0, this, - SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); + TQT_SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-unbeam"))); new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, this, - SLOT(slotGroupBreak()), actionCollection(), "break_group"); + TQT_SLOT(slotGroupBreak()), actionCollection(), "break_group"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-simple-tuplet"))); new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, this, - SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); + TQT_SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-tuplet"))); new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, this, - SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); + TQT_SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); new KAction(UnTupletCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); + TQT_SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("triplet"))); (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "triplet_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("group-grace"))); (new KToggleAction(i18n("Grace Insert Mode"), icon, 0, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "grace_mode"))-> setChecked(false); /*!!! @@ -1933,10 +1933,10 @@ void NotationView::setupActions() ("group-grace"))); new KAction(GraceCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupGrace()), actionCollection(), "grace"); + TQT_SLOT(slotGroupGrace()), actionCollection(), "grace"); new KAction(UnGraceCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); + TQT_SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); */ icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1944,11 +1944,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Slur), icon, Key_ParenRight, this, - SLOT(slotGroupSlur()), actionCollection(), "slur"); + TQT_SLOT(slotGroupSlur()), actionCollection(), "slur"); new KAction(AddIndicationCommand::getGlobalName (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, this, - SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); + TQT_SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1956,7 +1956,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Glissando), icon, 0, this, - SLOT(slotGroupGlissando()), actionCollection(), "glissando"); + TQT_SLOT(slotGroupGlissando()), actionCollection(), "glissando"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1964,7 +1964,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Crescendo), icon, Key_Less, this, - SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); + TQT_SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1972,11 +1972,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Decrescendo), icon, Key_Greater, this, - SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); + TQT_SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaUp), 0, 0, this, - SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); + TQT_SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1984,33 +1984,33 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaUp), icon, 0, this, - SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); + TQT_SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaDown), 0, 0, this, - SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); + TQT_SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaDown), 0, 0, this, - SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); + TQT_SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-chord"))); new KAction(MakeChordCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); + TQT_SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); // setup Transforms menu new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, this, - SLOT(slotTransformsNormalizeRests()), actionCollection(), + TQT_SLOT(slotTransformsNormalizeRests()), actionCollection(), "normalize_rests"); new KAction(CollapseRestsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsCollapseRests()), actionCollection(), + TQT_SLOT(slotTransformsCollapseRests()), actionCollection(), "collapse_rests_aggressively"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); icon = QIconSet @@ -2018,15 +2018,15 @@ void NotationView::setupActions() ("transforms-tie"))); new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, this, - SLOT(slotTransformsTieNotes()), actionCollection(), + TQT_SLOT(slotTransformsTieNotes()), actionCollection(), "tie_notes"); new KAction(UntieNotesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsUntieNotes()), actionCollection(), + TQT_SLOT(slotTransformsUntieNotes()), actionCollection(), "untie_notes"); new KAction(MakeNotesViableCommand::getGlobalName(), 0, this, - SLOT(slotTransformsMakeNotesViable()), actionCollection(), + TQT_SLOT(slotTransformsMakeNotesViable()), actionCollection(), "make_notes_viable"); icon = QIconSet @@ -2034,49 +2034,49 @@ void NotationView::setupActions() ("transforms-decounterpoint"))); new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, this, - SLOT(slotTransformsDeCounterpoint()), actionCollection(), + TQT_SLOT(slotTransformsDeCounterpoint()), actionCollection(), "de_counterpoint"); new KAction(ChangeStemsCommand::getGlobalName(true), 0, Key_PageUp + CTRL, this, - SLOT(slotTransformsStemsUp()), actionCollection(), + TQT_SLOT(slotTransformsStemsUp()), actionCollection(), "stems_up"); new KAction(ChangeStemsCommand::getGlobalName(false), 0, Key_PageDown + CTRL, this, - SLOT(slotTransformsStemsDown()), actionCollection(), + TQT_SLOT(slotTransformsStemsDown()), actionCollection(), "stems_down"); new KAction(RestoreStemsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreStems()), actionCollection(), + TQT_SLOT(slotTransformsRestoreStems()), actionCollection(), "restore_stems"); new KAction(ChangeSlurPositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsSlursAbove()), actionCollection(), + TQT_SLOT(slotTransformsSlursAbove()), actionCollection(), "slurs_above"); new KAction(ChangeSlurPositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsSlursBelow()), actionCollection(), + TQT_SLOT(slotTransformsSlursBelow()), actionCollection(), "slurs_below"); new KAction(RestoreSlursCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreSlurs()), actionCollection(), + TQT_SLOT(slotTransformsRestoreSlurs()), actionCollection(), "restore_slurs"); new KAction(ChangeTiePositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsTiesAbove()), actionCollection(), + TQT_SLOT(slotTransformsTiesAbove()), actionCollection(), "ties_above"); new KAction(ChangeTiePositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsTiesBelow()), actionCollection(), + TQT_SLOT(slotTransformsTiesBelow()), actionCollection(), "ties_below"); new KAction(RestoreTiesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreTies()), actionCollection(), + TQT_SLOT(slotTransformsRestoreTies()), actionCollection(), "restore_ties"); icon = QIconSet @@ -2086,7 +2086,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleFlat), icon, 0, this, - SLOT(slotRespellDoubleFlat()), actionCollection(), + TQT_SLOT(slotRespellDoubleFlat()), actionCollection(), "respell_doubleflat"); icon = QIconSet @@ -2096,7 +2096,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Flat), icon, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); icon = QIconSet @@ -2106,7 +2106,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Natural), icon, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); icon = QIconSet @@ -2116,7 +2116,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Sharp), icon, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); icon = QIconSet @@ -2126,35 +2126,35 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleSharp), icon, 0, this, - SLOT(slotRespellDoubleSharp()), actionCollection(), + TQT_SLOT(slotRespellDoubleSharp()), actionCollection(), "respell_doublesharp"); new KAction(RespellCommand::getGlobalName (RespellCommand::Up, Accidentals::NoAccidental), Key_Up + CTRL + SHIFT, this, - SLOT(slotRespellUp()), actionCollection(), + TQT_SLOT(slotRespellUp()), actionCollection(), "respell_up"); new KAction(RespellCommand::getGlobalName (RespellCommand::Down, Accidentals::NoAccidental), Key_Down + CTRL + SHIFT, this, - SLOT(slotRespellDown()), actionCollection(), + TQT_SLOT(slotRespellDown()), actionCollection(), "respell_down"); new KAction(RespellCommand::getGlobalName (RespellCommand::Restore, Accidentals::NoAccidental), 0, this, - SLOT(slotRespellRestore()), actionCollection(), + TQT_SLOT(slotRespellRestore()), actionCollection(), "respell_restore"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(true), 0, this, - SLOT(slotShowCautionary()), actionCollection(), + TQT_SLOT(slotShowCautionary()), actionCollection(), "show_cautionary"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(false), 0, this, - SLOT(slotCancelCautionary()), actionCollection(), + TQT_SLOT(slotCancelCautionary()), actionCollection(), "cancel_cautionary"); icon = QIconSet @@ -2162,37 +2162,37 @@ void NotationView::setupActions() ("quantize"))); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(FixNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsFixQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), "fix_quantization"); new KAction(RemoveNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsRemoveQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), "remove_quantization"); new KAction(InterpretCommand::getGlobalName(), 0, - this, SLOT(slotTransformsInterpret()), actionCollection(), + this, TQT_SLOT(slotTransformsInterpret()), actionCollection(), "interpret"); new KAction(i18n("&Dump selected events to stderr"), 0, this, - SLOT(slotDebugDump()), actionCollection(), "debug_dump"); + TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump"); for (MarkActionDataMap::Iterator i = m_markActionDataMap->begin(); i != m_markActionDataMap->end(); ++i) { const MarkActionData &markActionData = **i; - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeMarkMenuPixmap(markActionData.mark))); new KAction(markActionData.title, icon, markActionData.keycode, this, - SLOT(slotAddMark()), + TQT_SLOT(slotAddMark()), actionCollection(), markActionData.actionName); } @@ -2202,97 +2202,97 @@ void NotationView::setupActions() ("text-mark"))); new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, this, - SLOT(slotMarksAddTextMark()), actionCollection(), + TQT_SLOT(slotMarksAddTextMark()), actionCollection(), "add_text_mark"); new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_0"); new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_1"); new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_2"); new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_3"); new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_4"); new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_5"); new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_plus"); new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, this, - SLOT(slotMarksAddFingeringMark()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMark()), actionCollection(), "add_fingering_mark"); new KAction(RemoveMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveMarks()), actionCollection(), "remove_marks"); new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), "remove_fingering_marks"); new KAction(i18n("Ma&ke Ornament..."), 0, this, - SLOT(slotMakeOrnament()), actionCollection(), + TQT_SLOT(slotMakeOrnament()), actionCollection(), "make_ornament"); new KAction(i18n("Trigger &Ornament..."), 0, this, - SLOT(slotUseOrnament()), actionCollection(), + TQT_SLOT(slotUseOrnament()), actionCollection(), "use_ornament"); new KAction(i18n("Remove Ornament..."), 0, this, - SLOT(slotRemoveOrnament()), actionCollection(), + TQT_SLOT(slotRemoveOrnament()), actionCollection(), "remove_ornament"); - static QString slashTitles[] = { + static TQString slashTitles[] = { i18n("&None"), "&1", "&2", "&3", "&4", "&5" }; for (int i = 0; i <= 5; ++i) { new KAction(slashTitles[i], 0, this, - SLOT(slotAddSlashes()), actionCollection(), - QString("slashes_%1").arg(i)); + TQT_SLOT(slotAddSlashes()), actionCollection(), + TQString("slashes_%1").arg(i)); } new KAction(ClefInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddClef()), actionCollection(), + TQT_SLOT(slotEditAddClef()), actionCollection(), "add_clef"); new KAction(KeyInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddKeySignature()), actionCollection(), + TQT_SLOT(slotEditAddKeySignature()), actionCollection(), "add_key_signature"); new KAction(SustainInsertionCommand::getGlobalName(true), 0, this, - SLOT(slotEditAddSustainDown()), actionCollection(), + TQT_SLOT(slotEditAddSustainDown()), actionCollection(), "add_sustain_down"); new KAction(SustainInsertionCommand::getGlobalName(false), 0, this, - SLOT(slotEditAddSustainUp()), actionCollection(), + TQT_SLOT(slotEditAddSustainUp()), actionCollection(), "add_sustain_up"); new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, this, - SLOT(slotEditTranspose()), actionCollection(), + TQT_SLOT(slotEditTranspose()), actionCollection(), "transpose_segment"); new KAction(i18n("Convert Notation For..."), 0, this, - SLOT(slotEditSwitchPreset()), actionCollection(), + TQT_SLOT(slotEditSwitchPreset()), actionCollection(), "switch_preset"); // setup Settings menu - static QString actionsToolbars[][4] = + static TQString actionsToolbars[][4] = { { i18n("Show T&ools Toolbar"), "1slotToggleToolsToolBar()", "show_tools_toolbar", "palette-tools" }, { i18n("Show &Notes Toolbar"), "1slotToggleNotesToolBar()", "show_notes_toolbar", "palette-notes" }, @@ -2315,7 +2315,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); new KToggleAction(actionsToolbars[i][0], icon, 0, this, actionsToolbars[i][1], @@ -2323,193 +2323,193 @@ void NotationView::setupActions() } new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); /*!!! not here yet new KAction(i18n("Move Selection Left"), Key_Minus, this, - SLOT(slotMoveSelectionLeft()), actionCollection(), + TQT_SLOT(slotMoveSelectionLeft()), actionCollection(), "move_selection_left"); */ new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, this, - SLOT(slotCurrentStaffUp()), actionCollection(), + TQT_SLOT(slotCurrentStaffUp()), actionCollection(), "cursor_up_staff"); new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, this, - SLOT(slotCurrentStaffDown()), actionCollection(), + TQT_SLOT(slotCurrentStaffDown()), actionCollection(), "cursor_down_staff"); new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, this, - SLOT(slotCurrentSegmentPrior()), actionCollection(), + TQT_SLOT(slotCurrentSegmentPrior()), actionCollection(), "cursor_prior_segment"); new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, this, - SLOT(slotCurrentSegmentNext()), actionCollection(), + TQT_SLOT(slotCurrentSegmentNext()), actionCollection(), "cursor_next_segment"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // QString pixmapDir = + // TQString pixmapDir = // KGlobal::dirs()->findResource("appdata", "pixmaps/"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Push &Left"), 0, this, - SLOT(slotFinePositionLeft()), actionCollection(), + TQT_SLOT(slotFinePositionLeft()), actionCollection(), "fine_position_left"); new KAction(i18n("Push &Right"), 0, this, - SLOT(slotFinePositionRight()), actionCollection(), + TQT_SLOT(slotFinePositionRight()), actionCollection(), "fine_position_right"); new KAction(i18n("Push &Up"), 0, this, - SLOT(slotFinePositionUp()), actionCollection(), + TQT_SLOT(slotFinePositionUp()), actionCollection(), "fine_position_up"); new KAction(i18n("Push &Down"), 0, this, - SLOT(slotFinePositionDown()), actionCollection(), + TQT_SLOT(slotFinePositionDown()), actionCollection(), "fine_position_down"); new KAction(i18n("&Restore Positions"), 0, this, - SLOT(slotFinePositionRestore()), actionCollection(), + TQT_SLOT(slotFinePositionRestore()), actionCollection(), "fine_position_restore"); new KAction(i18n("Make &Invisible"), 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make &Visible"), 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); new KAction(i18n("Toggle Dot"), Key_Period, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL, this, - SLOT(slotAddDot()), actionCollection(), + TQT_SLOT(slotAddDot()), actionCollection(), "add_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, this, - SLOT(slotAddDotNotationOnly()), actionCollection(), + TQT_SLOT(slotAddDotNotationOnly()), actionCollection(), "add_notation_dot"); createGUI(getRCFileName(), false); @@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { KAction *action = actionCollection()->action - (QString("note_font_size_%1").arg(sizes[i])); + (TQString("note_font_size_%1").arg(sizes[i])); m_fontSizeActionMenu->remove (action); @@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { - QString actionName = QString("note_font_size_%1").arg(sizes[i]); + TQString actionName = TQString("note_font_size_%1").arg(sizes[i]); KToggleAction *sizeAction = dynamic_cast<KToggleAction *> (actionCollection()->action(actionName)); @@ -2569,7 +2569,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) sizeAction = new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), 0, this, - SLOT(slotChangeFontSizeFromAction()), + TQT_SLOT(slotChangeFontSizeFromAction()), actionCollection(), actionName); } @@ -2616,7 +2616,7 @@ void NotationView::initLayoutToolbar() return ; } - new QLabel(i18n(" Font: "), layoutToolbar, "font label"); + new TQLabel(i18n(" Font: "), layoutToolbar, "font label"); // // font combo @@ -2633,7 +2633,7 @@ void NotationView::initLayoutToolbar() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); m_fontCombo->insertItem(fontQName); if (fontQName.lower() == strtoqstr(m_fontName).lower()) { @@ -2649,12 +2649,12 @@ void NotationView::initLayoutToolbar() m_fontName = NoteFontFactory::getDefaultFontName(); } - connect(m_fontCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotChangeFont(const QString &))); + connect(m_fontCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotChangeFont(const TQString &))); - new QLabel(i18n(" Size: "), layoutToolbar, "size label"); + new TQLabel(i18n(" Size: "), layoutToolbar, "size label"); - QString value; + TQString value; // // font size combo @@ -2671,10 +2671,10 @@ void NotationView::initLayoutToolbar() value.setNum(m_fontSize); m_fontSizeCombo->setCurrentText(value); - connect(m_fontSizeCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeFontSizeFromStringValue(const QString&))); + connect(m_fontSizeCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeFontSizeFromStringValue(const TQString&))); - new QLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); + new TQLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); // // spacing combo @@ -2694,29 +2694,29 @@ void NotationView::initLayoutToolbar() value += "%"; m_spacingCombo->setCurrentText(value); - connect(m_spacingCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeSpacingFromStringValue(const QString&))); + connect(m_spacingCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeSpacingFromStringValue(const TQString&))); } void NotationView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(160); sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - QHBox *hbox = new QHBox(sb); - m_currentNotePixmap = new QLabel(hbox); + TQHBox *hbox = new TQHBox(sb); + m_currentNotePixmap = new TQLabel(hbox); m_currentNotePixmap->setMinimumWidth(20); - m_insertModeLabel = new QLabel(hbox); - m_annotationsLabel = new QLabel(hbox); - m_lilyPondDirectivesLabel = new QLabel(hbox); + m_insertModeLabel = new TQLabel(hbox); + m_annotationsLabel = new TQLabel(hbox); + m_lilyPondDirectivesLabel = new TQLabel(hbox); sb->addWidget(hbox); sb->insertItem(KTmpStatusMsg::getDefaultMsg(), @@ -2724,7 +2724,7 @@ void NotationView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); m_progressBar = new ProgressBar(100, true, sb); @@ -2732,12 +2732,12 @@ void NotationView::initStatusBar() sb->addWidget(m_progressBar); } -QSize NotationView::getViewSize() +TQSize NotationView::getViewSize() { return canvas()->size(); } -void NotationView::setViewSize(QSize s) +void NotationView::setViewSize(TQSize s) { canvas()->resize(s.width(), s.height()); @@ -2916,7 +2916,7 @@ NotationView::getHLayout() } void -NotationView::paintEvent(QPaintEvent *e) +NotationView::paintEvent(TQPaintEvent *e) { m_inPaintEvent = true; @@ -3534,18 +3534,18 @@ void NotationView::print(bool previewOnly) maxPageCount = pageCount; } - KPrinter printer(true, QPrinter::HighResolution); + KPrinter printer(true, TQPrinter::HighResolution); printer.setPageSelection(KPrinter::ApplicationSide); printer.setMinMax(1, maxPageCount + 1); if (previewOnly) printer.setPreviewOnly(true); - else if (!printer.setup((QWidget *)parent())) + else if (!printer.setup((TQWidget *)parent())) return ; - QPaintDeviceMetrics pdm(&printer); - QPainter printpainter(&printer); + TQPaintDeviceMetrics pdm(&printer); + TQPainter printpainter(&printer); // Ideally we should aim to retain the aspect ratio and to move the // staffs so as to be centred after scaling. But because we haven't @@ -3562,9 +3562,9 @@ void NotationView::print(bool previewOnly) // (double)pdm.height() / (double)(pageHeight - topMargin*2)); printpainter.translate( -leftMargin, -topMargin); - QValueList<int> pages = printer.pageList(); + TQValueList<int> pages = printer.pageList(); - for (QValueList<int>::Iterator pli = pages.begin(); + for (TQValueList<int>::Iterator pli = pages.begin(); pli != pages.end(); ) { // incremented just below int page = *pli - 1; @@ -3574,7 +3574,7 @@ void NotationView::print(bool previewOnly) NOTATION_DEBUG << "Printing page " << page << endl; - QRect pageRect(m_leftGutter + leftMargin + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin + pageWidth * page, topMargin, pageWidth - leftMargin, pageHeight - topMargin); @@ -3604,10 +3604,10 @@ void NotationView::print(bool previewOnly) m_config->setGroup(NotationViewConfigGroup); - NOTATION_DEBUG << "NotationView::print: calling QCanvas::drawArea" << endl; + NOTATION_DEBUG << "NotationView::print: calling TQCanvas::drawArea" << endl; { - Profiler profiler("NotationView::print(QCanvas::drawArea)"); + Profiler profiler("NotationView::print(TQCanvas::drawArea)"); if (m_config->readBoolEntry("forcedoublebufferprinting", false)) { getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); @@ -3623,7 +3623,7 @@ void NotationView::print(bool previewOnly) } - NOTATION_DEBUG << "NotationView::print: QCanvas::drawArea done" << endl; + NOTATION_DEBUG << "NotationView::print: TQCanvas::drawArea done" << endl; for (size_t i = 0; i < m_staffs.size(); ++i) { @@ -3685,10 +3685,10 @@ NotationView::updateThumbnails(bool complete) } int thumbScale = 20; - QPixmap thumbnail(canvas()->width() / thumbScale, + TQPixmap thumbnail(canvas()->width() / thumbScale, canvas()->height() / thumbScale); thumbnail.fill(Qt::white); - QPainter thumbPainter(&thumbnail); + TQPainter thumbPainter(&thumbnail); if (complete) { @@ -3697,8 +3697,8 @@ NotationView::updateThumbnails(bool complete) thumbPainter.setBrush(Qt::white); /* - QCanvas *canvas = getCanvasView()->canvas(); - canvas->drawArea(QRect(0, 0, canvas->width(), canvas->height()), + TQCanvas *canvas = getCanvasView()->canvas(); + canvas->drawArea(TQRect(0, 0, canvas->width(), canvas->height()), &thumbPainter, false); */ // hide small texts, as we get a crash in Xft when trying to @@ -3719,12 +3719,12 @@ NotationView::updateThumbnails(bool complete) if (havePageNumber) m_pageNumbers[page]->hide(); - QRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, topMargin * 2, pageWidth - leftMargin*3, pageHeight - topMargin*3); - QCanvas *canvas = getCanvasView()->canvas(); + TQCanvas *canvas = getCanvasView()->canvas(); canvas->drawArea(pageRect, &thumbPainter, false); if (havePageNumber) @@ -3751,7 +3751,7 @@ NotationView::updateThumbnails(bool complete) int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); + TQString str = TQString("%1").arg(page + 1); thumbPainter.drawRect(x / thumbScale, y / thumbScale, w / thumbScale, h / thumbScale); @@ -3927,7 +3927,7 @@ void NotationView::readjustCanvasSize() } // now get the EditView to do the biz - readjustViewSize(QSize(int(maxWidth), maxHeight), true); + readjustViewSize(TQSize(int(maxWidth), maxHeight), true); UPDATE_PROGRESS(2); @@ -3941,11 +3941,11 @@ void NotationView::readjustCanvasSize() m_pannerDialog->show(); m_pannerDialog->setPageSize - (QSize(canvas()->width(), + (TQSize(canvas()->width(), canvas()->height())); m_pannerDialog->scrollbox()->setViewSize - (QSize(getCanvasView()->width(), + (TQSize(getCanvasView()->width(), getCanvasView()->height())); } } @@ -3958,7 +3958,7 @@ void NotationView::readjustCanvasSize() void NotationView::slotNoteAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteActionDataMap::Iterator noteAct = m_noteActionDataMap->find(sigSender->name()); @@ -3989,7 +3989,7 @@ void NotationView::slotLastNoteAction() void NotationView::slotAddMark() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; @@ -4003,7 +4003,7 @@ void NotationView::slotAddMark() void NotationView::slotNoteChangeAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteChangeActionDataMap::Iterator noteAct = m_noteChangeActionDataMap->find(sigSender->name()); @@ -4034,20 +4034,20 @@ void NotationView::initActionDataMaps() if (dots && (type == Note::Longest)) continue; - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, dots), rest == 1)); - QString shortName(refName); - shortName.replace(QRegExp("-"), "_"); + TQString shortName(refName); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, dots))); titleName = titleName.left(1).upper() + titleName.right(titleName.length() - 1); if (rest) { - titleName.replace(QRegExp(i18n("note")), i18n("rest")); + titleName.replace(TQRegExp(i18n("note")), i18n("rest")); } int keycode = keys[type - Note::Shortest]; @@ -4069,14 +4069,14 @@ void NotationView::initActionDataMaps() for (int notationOnly = 0; notationOnly <= 1; ++notationOnly) { for (int type = Note::Longest; type >= Note::Shortest; --type) { - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, 0), false)); - QString shortName(QString("change_%1%2") + TQString shortName(TQString("change_%1%2") .arg(notationOnly ? "notation_" : "").arg(refName)); - shortName.replace(QRegExp("-"), "_"); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, 0))); titleName = titleName.left(1).upper() + @@ -4100,8 +4100,8 @@ void NotationView::initActionDataMaps() for (unsigned int i = 0; i < marks.size(); ++i) { Mark mark = marks[i]; - QString markName(strtoqstr(mark)); - QString actionName = QString("add_%1").arg(markName); + TQString markName(strtoqstr(mark)); + TQString actionName = TQString("add_%1").arg(markName); m_markActionDataMap->insert (actionName, new MarkActionData @@ -4116,24 +4116,24 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_hlayout, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_hlayout, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_hlayout, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); - connect(this, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(this, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(this, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(this, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_staffs[i], TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_staffs[i], SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_staffs[i], TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); } } @@ -4147,28 +4147,28 @@ void NotationView::setupProgress(ProgressDialog* dialog) if (dialog) { setupProgress(dialog->progressBar()); - connect(dialog, SIGNAL(cancelClicked()), - m_hlayout, SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_hlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setOperationName(QString)), - this, SLOT(slotSetOperationNameAndStatus(QString))); + connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), + this, TQT_SLOT(slotSetOperationNameAndStatus(TQString))); - connect(dialog, SIGNAL(cancelClicked()), - m_staffs[i], SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_staffs[i], TQT_SLOT(slotCancel())); } - connect(this, SIGNAL(setOperationName(QString)), - dialog, SLOT(slotSetOperationName(QString))); + connect(this, TQT_SIGNAL(setOperationName(TQString)), + dialog, TQT_SLOT(slotSetOperationName(TQString))); m_progressDisplayer = PROGRESS_DIALOG; } } -void NotationView::slotSetOperationNameAndStatus(QString name) +void NotationView::slotSetOperationNameAndStatus(TQString name) { emit setOperationName(name); - statusBar()->changeItem(QString(" %1").arg(name), + statusBar()->changeItem(TQString(" %1").arg(name), KTmpStatusMsg::getDefaultId()); } @@ -4177,9 +4177,9 @@ void NotationView::disconnectProgress() NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; m_hlayout->disconnect(); - disconnect(SIGNAL(setProgress(int))); - disconnect(SIGNAL(incrementProgress(int))); - disconnect(SIGNAL(setOperationName(QString))); + disconnect(TQT_SIGNAL(setProgress(int))); + disconnect(TQT_SIGNAL(incrementProgress(int))); + disconnect(TQT_SIGNAL(setOperationName(TQString))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->disconnect(); @@ -4238,10 +4238,10 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0; void NotationView::slotUpdateInsertModeStatus() { - QString tripletMessage = i18n("Triplet"); - QString chordMessage = i18n("Chord"); - QString graceMessage = i18n("Grace"); - QString message; + TQString tripletMessage = i18n("Triplet"); + TQString chordMessage = i18n("Chord"); + TQString graceMessage = i18n("Grace"); + TQString message; if (isInTripletMode()) { message = i18n("%1 %2").arg(message).arg(tripletMessage); @@ -4301,7 +4301,7 @@ NotationView::slotUpdateLilyPondDirectivesStatus() } void -NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) +NotationView::slotChangeSpacingFromStringValue(const TQString& spacingT) { // spacingT has a '%' at the end // @@ -4312,8 +4312,8 @@ NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) void NotationView::slotChangeSpacingFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(8) == "spacing_") { int spacing = name.right(name.length() - 8).toInt(); @@ -4338,7 +4338,7 @@ NotationView::slotChangeSpacing(int spacing) // m_spacingSlider->setSize(spacing); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("spacing_%1").arg(spacing))); + (actionCollection()->action(TQString("spacing_%1").arg(spacing))); if (action) action->setChecked(true); else { @@ -4372,8 +4372,8 @@ NotationView::slotChangeProportionFromIndex(int n) void NotationView::slotChangeProportionFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(11) == "proportion_") { int proportion = name.right(name.length() - 11).toInt(); @@ -4396,7 +4396,7 @@ NotationView::slotChangeProportion(int proportion) // m_proportionSlider->setSize(proportion); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("proportion_%1").arg(proportion))); + (actionCollection()->action(TQString("proportion_%1").arg(proportion))); if (action) action->setChecked(true); else { @@ -4421,8 +4421,8 @@ NotationView::slotChangeProportion(int proportion) void NotationView::slotChangeFontFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(10) == "note_font_") { name = name.right(name.length() - 10); slotChangeFont(name); @@ -4435,8 +4435,8 @@ NotationView::slotChangeFontFromAction() void NotationView::slotChangeFontSizeFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(15) == "note_font_size_") { name = name.right(name.length() - 15); @@ -4455,7 +4455,7 @@ NotationView::slotChangeFontSizeFromAction() } void -NotationView::slotChangeFont(const QString &newName) +NotationView::slotChangeFont(const TQString &newName) { NOTATION_DEBUG << "changeFont: " << newName << endl; slotChangeFont(std::string(newName.utf8())); @@ -4488,7 +4488,7 @@ NotationView::slotChangeFontSize(int newSize) } void -NotationView::slotChangeFontSizeFromStringValue(const QString& sizeT) +NotationView::slotChangeFontSizeFromStringValue(const TQString& sizeT) { int size = sizeT.toInt(); slotChangeFont(m_fontName, size); @@ -4566,7 +4566,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) std::vector<int> sizes = NoteFontFactory::getScreenSizes(m_fontName); m_fontSizeCombo->clear(); - QString value; + TQString value; for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { value.setNum(*i); m_fontSizeCombo->insertItem(value); @@ -4619,7 +4619,7 @@ NotationView::slotFilePrint() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print : operation cancelled\n"; @@ -4636,7 +4636,7 @@ NotationView::slotFilePrintPreview() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print preview : operation cancelled\n"; @@ -4651,7 +4651,7 @@ std::map<KProcess *, KTempFile *> NotationView::m_lilyTempFileMap; void NotationView::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4666,8 +4666,8 @@ void NotationView::slotPrintLilyPond() *proc << "--graphical"; *proc << "--print"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4675,7 +4675,7 @@ void NotationView::slotPrintLilyPond() void NotationView::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4690,8 +4690,8 @@ void NotationView::slotPreviewLilyPond() *proc << "--graphical"; *proc << "--pdf"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4703,16 +4703,16 @@ void NotationView::slotLilyPondViewProcessExited(KProcess *p) delete p; } -bool NotationView::exportLilyPondFile(QString file, bool forPreview) +bool NotationView::exportLilyPondFile(TQString file, bool forPreview) { - QString caption = "", heading = ""; + TQString caption = "", heading = ""; if (forPreview) { caption = i18n("LilyPond Preview Options"); heading = i18n("LilyPond preview options"); } LilyPondOptionsDialog dialog(this, m_doc, caption, heading); - if (dialog.exec() != QDialog::Accepted) { + if (dialog.exec() != TQDialog::Accepted) { return false; } @@ -4720,13 +4720,13 @@ bool NotationView::exportLilyPondFile(QString file, bool forPreview) 100, this); - LilyPondExporter e(this, m_doc, std::string(QFile::encodeName(file))); + LilyPondExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { // CurrentProgressDialog::freeze(); @@ -4776,7 +4776,7 @@ void NotationView::slotEditCutAndClose() getDocument()->getClipboard())); } -static const QString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( +static const TQString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( "The Restricted paste type requires enough empty " \ "space (containing only rests) at the paste position " \ "to hold all of the events to be pasted.\n" \ @@ -4855,7 +4855,7 @@ void NotationView::slotEditGeneralPaste() PasteNotationDialog dialog(this, defaultType); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { PasteEventsCommand::PasteType type = dialog.getPasteType(); if (dialog.setAsDefault()) { @@ -5006,7 +5006,7 @@ void NotationView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { NOTATION_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -5150,7 +5150,7 @@ void NotationView::slotToggleTransportToolBar() toggleNamedToolBar("Transport Toolbar"); } -void NotationView::toggleNamedToolBar(const QString& toolBarName, bool* force) +void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force) { KToolBar *namedToolBar = toolBar(toolBarName); @@ -5238,7 +5238,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType, duration); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5267,7 +5267,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5350,7 +5350,7 @@ void NotationView::slotGroupOctave2Down() slotAddIndication(Indication::QuindicesimaDown, i18n("ottava")); } -void NotationView::slotAddIndication(std::string type, QString desc) +void NotationView::slotAddIndication(std::string type, TQString desc) { if (!m_currentEventSelection) return ; @@ -5565,8 +5565,8 @@ void NotationView::slotTransformsRemoveQuantization() void NotationView::slotSetStyleFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (!m_currentEventSelection) return ; @@ -5588,8 +5588,8 @@ void NotationView::slotSetStyleFromAction() void NotationView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = m_staffs[m_currentStaff]->getSegment(); @@ -5663,7 +5663,7 @@ void NotationView::slotSwitchFromRestToNote() Note note(restInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, false); + TQString actionName = NotationStrings::getReferenceName(note, false); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5698,7 +5698,7 @@ void NotationView::slotSwitchFromNoteToRest() Note note(noteInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, true); + TQString actionName = NotationStrings::getReferenceName(note, true); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5865,7 +5865,7 @@ void NotationView::slotTransformsQuantize() QuantizeDialog dialog(this, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -5880,7 +5880,7 @@ void NotationView::slotTransformsInterpret() InterpretDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Interpreting selection..."), this); addCommandToHistory(new InterpretCommand (*m_currentEventSelection, @@ -5915,11 +5915,11 @@ void NotationView::slotAddDotNotationOnly() void NotationView::slotAddSlashes() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; - QString name = s->name(); + TQString name = s->name(); int slashes = name.right(1).toInt(); addCommandToHistory(new AddSlashesCommand @@ -5931,7 +5931,7 @@ void NotationView::slotMarksAddTextMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddTextMarkCommand @@ -5945,7 +5945,7 @@ void NotationView::slotMarksAddFingeringMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddFingeringMarkCommand @@ -5956,12 +5956,12 @@ void NotationView::slotMarksAddFingeringMark() void NotationView::slotMarksAddFingeringMarkFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(14) == "add_fingering_") { - QString fingering = name.right(name.length() - 14); + TQString fingering = name.right(name.length() - 14); if (fingering == "plus") fingering = "+"; @@ -6030,16 +6030,16 @@ NotationView::slotMakeOrnament() Track *track = segment.getComposition()->getTrackById(segment.getTrack()); - QString name; + TQString name; int barNo = segment.getComposition()->getBarNumber(absTime); if (track) { - name = QString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); + name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); } else { - name = QString(i18n("Ornament bar %1").arg(barNo + 1)); + name = TQString(i18n("Ornament bar %1").arg(barNo + 1)); } MakeOrnamentDialog dialog(this, name, basePitch); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; name = dialog.getName(); @@ -6076,7 +6076,7 @@ NotationView::slotUseOrnament() return ; UseOrnamentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -6109,7 +6109,7 @@ void NotationView::slotEditAddClef() ClefDialog dialog(this, m_notePixmapFactory, lastClef); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); @@ -6144,7 +6144,7 @@ void NotationView::slotEditAddKeySignature() (this, m_notePixmapFactory, clef, key, true, true, i18n("Estimated key signature shown")); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6251,7 +6251,7 @@ void NotationView::slotEditSwitchPreset() { PresetHandlerDialog dialog(this, true); - if (dialog.exec() != QDialog::Accepted) return; + if (dialog.exec() != TQDialog::Accepted) return; if (dialog.getConvertAllSegments()) { // get all segments for this track and convert them. @@ -6296,7 +6296,7 @@ void NotationView::slotEditElement(NotationStaff *staff, EventEditDialog dialog(this, *element->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6313,7 +6313,7 @@ void NotationView::slotEditElement(NotationStaff *staff, ClefDialog dialog(this, m_notePixmapFactory, Clef(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); bool shouldChangeOctave = (conversion != ClefDialog::NoConversion); @@ -6338,7 +6338,7 @@ void NotationView::slotEditElement(NotationStaff *staff, (this, m_notePixmapFactory, clef, Rosegarden::Key(*element->event()), false, true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6365,7 +6365,7 @@ void NotationView::slotEditElement(NotationStaff *staff, try { TextEventDialog dialog (this, m_notePixmapFactory, Text(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { TextInsertionCommand *command = new TextInsertionCommand (staff->getSegment(), element->event()->getAbsoluteTime(), @@ -6395,7 +6395,7 @@ void NotationView::slotEditElement(NotationStaff *staff, SimpleEventEditDialog dialog(this, getDocument(), *element->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6835,7 +6835,7 @@ NotationView::doDeferredCursorMove() } } - QScrollBar* hbar = getCanvasView()->horizontalScrollBar(); + TQScrollBar* hbar = getCanvasView()->horizontalScrollBar(); hbar->setValue(int(hbar->value() - (m_deferredCursorScrollToX - ccx))); } @@ -7024,7 +7024,7 @@ void NotationView::slotEditLyrics() LyricEditDialog dialog(this, &segment); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KMacroCommand *macro = new KMacroCommand (SetLyricsCommand::getGlobalName()); @@ -7040,7 +7040,7 @@ void NotationView::slotEditLyrics() } void NotationView::slotItemPressed(int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, NotationElement* el) { NOTATION_DEBUG << "NotationView::slotItemPressed(height = " @@ -7073,7 +7073,7 @@ void NotationView::slotItemPressed(int height, int staffNo, timeT unknownTime = 0; - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { m_tool->handleMouseDoubleClick(unknownTime, height, staffNo, e, el); } else { @@ -7083,9 +7083,9 @@ void NotationView::slotItemPressed(int height, int staffNo, } } -void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; Staff *staff = getStaffForCanvasCoords(e->x(), e->y()); @@ -7101,10 +7101,10 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) getTrackById(staff->getSegment().getTrack())->getLabel(); bool ok = false; - QRegExpValidator validator(QRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK - QString newText = KLineEditDlg::getText(QString("Change staff name"), - QString("Enter new staff name"), + TQString newText = KLineEditDlg::getText(TQString("Change staff name"), + TQString("Enter new staff name"), strtoqstr(name), &ok, this, @@ -7126,9 +7126,9 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) } } -void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; if (it == m_title) { @@ -7146,7 +7146,7 @@ void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) positionStaffs(); } -void NotationView::slotMouseMoved(QMouseEvent *e) +void NotationView::slotMouseMoved(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseMove(e); @@ -7169,7 +7169,7 @@ void NotationView::slotMouseMoved(QMouseEvent *e) } } -void NotationView::slotMouseReleased(QMouseEvent *e) +void NotationView::slotMouseReleased(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseRelease(e); @@ -7181,9 +7181,9 @@ void NotationView::slotMouseReleased(QMouseEvent *e) } void -NotationView::slotHoveredOverNoteChanged(const QString ¬eName) +NotationView::slotHoveredOverNoteChanged(const TQString ¬eName) { - m_hoveredOverNoteName->setText(QString(" ") + noteName); + m_hoveredOverNoteName->setText(TQString(" ") + noteName); } void @@ -7198,19 +7198,19 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (t, bar, beat, fraction, remainder); - // QString message; - // QString format("%ld (%ld.%03lds)"); + // TQString message; + // TQString format("%ld (%ld.%03lds)"); // format = i18n("Time: %1").arg(format); // message.sprintf(format, t, rt.sec, ms); - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString message = i18n("Time: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -7374,7 +7374,7 @@ NotationView::slotToggleStepByStep() } void -NotationView::slotStepByStepTargetRequested(QObject *obj) +NotationView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -7414,8 +7414,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) emit renderComplete(); if (m_renderTimer) delete m_renderTimer; - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); } @@ -7433,8 +7433,8 @@ NotationView::slotRenderSomething() clock_t now = clock(); long elapsed = ((now - lastWork) * 1000 / CLOCKS_PER_SEC); if (elapsed < 70) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } @@ -7444,8 +7444,8 @@ NotationView::slotRenderSomething() if (m_staffs[i]->doRenderWork(m_staffs[i]->getSegment().getStartTime(), m_staffs[i]->getSegment().getEndTime())) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 7678f8a..356960c 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -35,23 +35,23 @@ #include <string> #include <kprocess.h> #include <ktempfile.h> -#include <qmap.h> -#include <qsize.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" #include "gui/general/ClefIndex.h" -class QWidget; -class QTimer; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQTimer; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvasItem; +class TQCanvas; class KProgress; class KComboBox; class KActionMenu; @@ -113,7 +113,7 @@ class NotationView : public EditView, public: explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive); // update during initial render? /** @@ -124,7 +124,7 @@ public: */ explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView); ~NotationView(); @@ -170,9 +170,9 @@ public: /// Return true if the staff at the specified index is the current one bool isCurrentStaff(int i); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -358,7 +358,7 @@ public slots: /** * export a LilyPond file */ - bool exportLilyPondFile(QString url, bool forPreview = false); + bool exportLilyPondFile(TQString url, bool forPreview = false); /** * Export to a temporary file and process @@ -545,7 +545,7 @@ public slots: void slotGroupOctaveUp(); void slotGroupOctaveDown(); void slotGroupOctave2Down(); - void slotAddIndication(std::string type, QString cat); + void slotAddIndication(std::string type, TQString cat); /// transforms slots void slotTransformsNormalizeRests(); @@ -630,20 +630,20 @@ public slots: * Called when a mouse press occurred on a notation element * or somewhere on a staff */ - void slotItemPressed(int height, int staffNo, QMouseEvent*, NotationElement*); + void slotItemPressed(int height, int staffNo, TQMouseEvent*, NotationElement*); /** * Called when a mouse press occurred on a non-notation element */ - void slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *i); /** * Called when a mouse press occurred on a QCanvasText */ - void slotTextItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *i); - void slotMouseMoved(QMouseEvent*); - void slotMouseReleased(QMouseEvent*); + void slotMouseMoved(TQMouseEvent*); + void slotMouseReleased(TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -651,7 +651,7 @@ public slots: * * @see NotationCanvasView#hoveredOverNoteChange() */ - void slotHoveredOverNoteChanged(const QString&); + void slotHoveredOverNoteChanged(const TQString&); /** * Called when the mouse cursor moves over a note which is at a @@ -755,7 +755,7 @@ public slots: void slotChangeFont(std::string newFont, int newSize); /// Changes the font of the staffs on the view - void slotChangeFont(const QString &newFont); + void slotChangeFont(const TQString &newFont); /// Changes the font size of the staffs on the view void slotChangeFontSize(int newSize); @@ -764,7 +764,7 @@ public slots: void slotChangeFontSizeFromAction(); /// Changes the font size of the staffs on the view to the nth size in the available size list - void slotChangeFontSizeFromStringValue(const QString&); + void slotChangeFontSizeFromStringValue(const TQString&); /// Changes to the next font size up void slotZoomIn(); @@ -776,7 +776,7 @@ public slots: void slotChangeSpacing(int newSpacing); /// Changes the hlayout spacing of the staffs on the view - void slotChangeSpacingFromStringValue(const QString&); + void slotChangeSpacingFromStringValue(const TQString&); /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); @@ -802,8 +802,8 @@ public slots: /// A timer set when a note-on event was received has elapsed void slotInsertableTimerElapsed(); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); /// Do on-demand rendering for a region. void slotCheckRendered(double cx0, double cx1); @@ -811,7 +811,7 @@ public slots: /// Do some background rendering work. void slotRenderSomething(); - void slotSetOperationNameAndStatus(QString); + void slotSetOperationNameAndStatus(TQString); // Update notation view based on track/staff name change void slotUpdateStaffName(); @@ -849,23 +849,23 @@ signals: /// progress Report void setProgress(int); void incrementProgress(int); - void setOperationName(QString); + void setOperationName(TQString); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void renderComplete(); void editTimeSignature(timeT); - void editMetadata(QString); + void editMetadata(TQString); void editTriggerSegment(int); - void staffLabelChanged(TrackId id, QString label); + void staffLabelChanged(TrackId id, TQString label); protected: - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); /** * init the action maps for notes, marks etc @@ -937,7 +937,7 @@ protected: * If \a force point to a bool, then the bool's value * is used to show/hide the toolbar. */ - void toggleNamedToolBar(const QString& toolBarName, bool* force = 0); + void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); /// Calls all the relevant preparse and layout methods virtual bool applyLayout(int staffNo = -1, @@ -957,13 +957,13 @@ protected: * Override from EditView * @see EditView#getViewSize */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Override from EditView * @see EditView#setViewSize */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); /** * Set the note pixmap factory @@ -1020,39 +1020,39 @@ protected: NotationProperties m_properties; /// Displayed in the status bar, shows number of events selected - QLabel *m_selectionCounter; + TQLabel *m_selectionCounter; /// Displayed in the status bar, shows insertion mode - QLabel *m_insertModeLabel; + TQLabel *m_insertModeLabel; /// Displayed in the status bar, shows when annotations are hidden - QLabel *m_annotationsLabel; + TQLabel *m_annotationsLabel; /// Displayed in the status bar, shows when LilyPond directives are hidden - QLabel *m_lilyPondDirectivesLabel; + TQLabel *m_lilyPondDirectivesLabel; /// Displayed in the status bar, shows progress of current operation ProgressBar *m_progressBar; /// Displayed in the status bar, holds the pixmap of the current note - QLabel* m_currentNotePixmap; + TQLabel* m_currentNotePixmap; /// Displayed in the status bar, shows the pitch the cursor is at - QLabel* m_hoveredOverNoteName; + TQLabel* m_hoveredOverNoteName; /// Displayed in the status bar, shows the absolute time the cursor is at - QLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverAbsoluteTime; std::vector<NotationStaff*> m_staffs; int m_currentStaff; int m_lastFinishingStaff; - QCanvasItem *m_title; - QCanvasItem *m_subtitle; - QCanvasItem *m_composer; - QCanvasItem *m_copyright; - std::vector<QCanvasItem *> m_pages; - std::vector<QCanvasItem *> m_pageNumbers; + TQCanvasItem *m_title; + TQCanvasItem *m_subtitle; + TQCanvasItem *m_composer; + TQCanvasItem *m_copyright; + std::vector<TQCanvasItem *> m_pages; + std::vector<TQCanvasItem *> m_pageNumbers; timeT m_insertionTime; enum DeferredCursorMoveType { @@ -1064,7 +1064,7 @@ protected: DeferredCursorMoveType m_deferredCursorMove; double m_deferredCursorScrollToX; - QString m_lastNoteAction; + TQString m_lastNoteAction; std::string m_fontName; int m_fontSize; @@ -1077,20 +1077,20 @@ protected: NotationVLayout* m_vlayout; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; RawNoteRuler *m_rawNoteRuler; bool m_annotationsVisible; bool m_lilyPondDirectivesVisible; KAction* m_selectDefaultNote; - typedef QMap<QString, NoteActionData *> NoteActionDataMap; + typedef TQMap<TQString, NoteActionData *> NoteActionDataMap; static NoteActionDataMap* m_noteActionDataMap; - typedef QMap<QString, NoteChangeActionData *> NoteChangeActionDataMap; + typedef TQMap<TQString, NoteChangeActionData *> NoteChangeActionDataMap; static NoteChangeActionDataMap* m_noteChangeActionDataMap; - typedef QMap<QString, MarkActionData *> MarkActionDataMap; + typedef TQMap<TQString, MarkActionData *> MarkActionDataMap; static MarkActionDataMap *m_markActionDataMap; KComboBox *m_fontCombo; @@ -1098,7 +1098,7 @@ protected: KComboBox *m_spacingCombo; KActionMenu *m_fontSizeActionMenu; ScrollBoxDialog *m_pannerDialog; - QTimer *m_renderTimer; + TQTimer *m_renderTimer; bool m_playTracking; @@ -1119,7 +1119,7 @@ protected: int m_showHeadersGroup; QDeferScrollView * m_headersGroupView; HeadersGroup * m_headersGroup; - QFrame * m_headersTopFrame; + TQFrame * m_headersTopFrame; KAction * m_showHeadersMenuEntry; diff --git a/src/gui/editors/notation/NoteCharacter.cpp b/src/gui/editors/notation/NoteCharacter.cpp index fdcb578..2fcff18 100644 --- a/src/gui/editors/notation/NoteCharacter.cpp +++ b/src/gui/editors/notation/NoteCharacter.cpp @@ -25,11 +25,11 @@ #include "NoteCharacter.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qcanvas.h> -#include <qbitmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqcanvas.h> +#include <tqbitmap.h> namespace Rosegarden @@ -37,20 +37,20 @@ namespace Rosegarden NoteCharacter::NoteCharacter() : m_hotspot(0, 0), - m_pixmap(new QPixmap()), + m_pixmap(new TQPixmap()), m_rep(0) {} -NoteCharacter::NoteCharacter(QPixmap pixmap, - QPoint hotspot, NoteCharacterDrawRep *rep) : +NoteCharacter::NoteCharacter(TQPixmap pixmap, + TQPoint hotspot, NoteCharacterDrawRep *rep) : m_hotspot(hotspot), - m_pixmap(new QPixmap(pixmap)), + m_pixmap(new TQPixmap(pixmap)), m_rep(rep) {} NoteCharacter::NoteCharacter(const NoteCharacter &c) : m_hotspot(c.m_hotspot), - m_pixmap(new QPixmap(*c.m_pixmap)), + m_pixmap(new TQPixmap(*c.m_pixmap)), m_rep(c.m_rep) { // nothing else @@ -62,7 +62,7 @@ NoteCharacter::operator=(const NoteCharacter &c) if (&c == this) return * this; m_hotspot = c.m_hotspot; - m_pixmap = new QPixmap(*c.m_pixmap); + m_pixmap = new TQPixmap(*c.m_pixmap); m_rep = c.m_rep; return *this; } @@ -90,20 +90,20 @@ NoteCharacter::getHotspot() const return m_hotspot; } -QPixmap * +TQPixmap * NoteCharacter::getPixmap() const { return m_pixmap; } -QCanvasPixmap * +TQCanvasPixmap * NoteCharacter::getCanvasPixmap() const { - return new QCanvasPixmap(*m_pixmap, m_hotspot); + return new TQCanvasPixmap(*m_pixmap, m_hotspot); } void -NoteCharacter::draw(QPainter *painter, int x, int y) const +NoteCharacter::draw(TQPainter *painter, int x, int y) const { if (!m_rep) { @@ -114,7 +114,7 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const NoteCharacterDrawRep a(m_rep->size()); for (unsigned int i = 0; i < m_rep->size(); ++i) { - QPoint p(m_rep->point(i)); + TQPoint p(m_rep->point(i)); a.setPoint(i, p.x() + x, p.y() + y); } @@ -123,10 +123,10 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const } void -NoteCharacter::drawMask(QPainter *painter, int x, int y) const +NoteCharacter::drawMask(TQPainter *painter, int x, int y) const { - if (!m_rep && m_pixmap->mask()) { - painter->drawPixmap(x, y, *(m_pixmap->mask())); + if (!m_rep && m_pixmap->tqmask()) { + painter->drawPixmap(x, y, *(m_pixmap->tqmask())); } } diff --git a/src/gui/editors/notation/NoteCharacter.h b/src/gui/editors/notation/NoteCharacter.h index bc9359e..3b27e87 100644 --- a/src/gui/editors/notation/NoteCharacter.h +++ b/src/gui/editors/notation/NoteCharacter.h @@ -26,13 +26,13 @@ #ifndef _RG_NOTECHARACTER_H_ #define _RG_NOTECHARACTER_H_ -#include <qpixmap.h> -#include <qpoint.h> -#include <qpointarray.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpointarray.h> -class QPainter; -class QCanvasPixmap; +class TQPainter; +class TQCanvasPixmap; namespace Rosegarden { @@ -40,13 +40,13 @@ namespace Rosegarden class NoteCharacterDrawRep : public QPointArray { public: - NoteCharacterDrawRep(int size = 0) : QPointArray(size) { } + NoteCharacterDrawRep(int size = 0) : TQPointArray(size) { } }; /** * NoteCharacter knows how to draw a character from a font. It may be - * optimised for screen (using QPixmap underneath to produce + * optimised for screen (using TQPixmap underneath to produce * low-resolution colour or greyscale glyphs) or printer (using some * internal representation to draw in high-resolution monochrome on a * print device). You can use screen characters on a printer and vice @@ -67,20 +67,20 @@ public: int getWidth() const; int getHeight() const; - QPoint getHotspot() const; + TQPoint getHotspot() const; - QPixmap *getPixmap() const; - QCanvasPixmap *getCanvasPixmap() const; + TQPixmap *getPixmap() const; + TQCanvasPixmap *getCanvasPixmap() const; - void draw(QPainter *painter, int x, int y) const; - void drawMask(QPainter *painter, int x, int y) const; + void draw(TQPainter *painter, int x, int y) const; + void drawMask(TQPainter *painter, int x, int y) const; private: friend class NoteFont; - NoteCharacter(QPixmap pixmap, QPoint hotspot, NoteCharacterDrawRep *rep); + NoteCharacter(TQPixmap pixmap, TQPoint hotspot, NoteCharacterDrawRep *rep); - QPoint m_hotspot; - QPixmap *m_pixmap; // I own this + TQPoint m_hotspot; + TQPixmap *m_pixmap; // I own this NoteCharacterDrawRep *m_rep; // I don't own this, it's a reference to a static in the NoteFont }; diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp index 95746c3..3a0ea18 100644 --- a/src/gui/editors/notation/NoteFont.cpp +++ b/src/gui/editors/notation/NoteFont.cpp @@ -32,14 +32,14 @@ #include "NoteCharacter.h" #include "NoteFontMap.h" #include "SystemFont.h" -#include <qbitmap.h> -#include <qgarray.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqbitmap.h> +#include <tqgarray.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -48,7 +48,7 @@ namespace Rosegarden NoteFont::FontPixmapMap *NoteFont::m_fontPixmapMap = 0; NoteFont::DrawRepMap *NoteFont::m_drawRepMap = 0; -QPixmap *NoteFont::m_blankPixmap = 0; +TQPixmap *NoteFont::m_blankPixmap = 0; NoteFont::NoteFont(std::string fontName, int size) : @@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) : if (size > 0) { if (sizes.find(size) == sizes.end()) { - throw BadNoteFont(qstrtostr(QString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); + throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); } else { m_size = size; } @@ -79,13 +79,13 @@ NoteFont::NoteFont(std::string fontName, int size) : } if (m_blankPixmap == 0) { - m_blankPixmap = new QPixmap(10, 10); - m_blankPixmap->setMask(QBitmap(10, 10, TRUE)); + m_blankPixmap = new TQPixmap(10, 10); + m_blankPixmap->setMask(TQBitmap(10, 10, TRUE)); } // Locate our font's pixmap map in the font map, create if necessary - std::string fontKey = qstrtostr(QString("__%1__%2__") + std::string fontKey = qstrtostr(TQString("__%1__%2__") .arg(strtoqstr(m_fontMap.getName())) .arg(m_size)); @@ -146,7 +146,7 @@ NoteFont::getLegerLineThickness(unsigned int &thickness) const } bool -NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const +NoteFont::lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -167,7 +167,7 @@ NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const void NoteFont::add -(CharName charName, bool inverted, QPixmap *pixmap) const +(CharName charName, bool inverted, TQPixmap *pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -188,7 +188,7 @@ NoteFont::add } NoteCharacterDrawRep * -NoteFont::lookupDrawRep(QPixmap *pixmap) const +NoteFont::lookupDrawRep(TQPixmap *pixmap) const { if (!m_drawRepMap) m_drawRepMap = new DrawRepMap(); @@ -199,7 +199,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } else { - QImage image = pixmap->convertToImage(); + TQImage image = pixmap->convertToImage(); if (image.isNull()) return 0; @@ -220,7 +220,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const bool pixel = false; if (xi < image.width()) { - if (image.bitOrder() == QImage::LittleEndian) { + if (image.bitOrder() == TQImage::LittleEndian) { if (*(line + (xi >> 3)) & 1 << (xi & 7)) pixel = true; } else { @@ -231,7 +231,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const if (!pixel) { if (startx < xi) { - a->resize(a->size() + 2, QGArray::SpeedOptim); + a->resize(a->size() + 2, TQGArray::SpeedOptim); a->setPoint(a->size() - 2, startx, yi); a->setPoint(a->size() - 1, xi - 1, yi); } @@ -246,9 +246,9 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } bool -NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const +NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const { - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -263,7 +263,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (inverted && !m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -281,11 +281,11 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const NOTATION_DEBUG << "NoteFont::getPixmap: Loading \"" << src << "\"" << endl; - found = new QPixmap(strtoqstr(src)); + found = new TQPixmap(strtoqstr(src)); if (!found->isNull()) { - if (found->mask() == 0) { + if (found->tqmask() == 0) { std::cerr << "NoteFont::getPixmap: Warning: No automatic mask " << "for character \"" << charName << "\"" << (inverted ? " (inverted)" : "") << " in font \"" @@ -332,7 +332,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (!inverted && m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -351,7 +351,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const m_fontMap.getStrategy(m_size, charName); bool success; - found = new QPixmap(systemFont->renderChar(charName, + found = new TQPixmap(systemFont->renderChar(charName, glyph, code + charBase, strategy, @@ -374,12 +374,12 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const } bool -NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap, int hue, int minValue, bool inverted) const { CharName charName(getNameWithColour(baseCharName, hue)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -391,7 +391,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -408,12 +408,12 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } bool -NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap, bool inverted) const { CharName charName(getNameShaded(baseCharName)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -425,7 +425,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -434,7 +434,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, return false; } - found = new QPixmap(PixmapFunctions::shadePixmap(basePixmap)); + found = new TQPixmap(PixmapFunctions::shadePixmap(basePixmap)); add(charName, inverted, found); pixmap = *found; return ok; @@ -443,19 +443,19 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, CharName NoteFont::getNameWithColour(CharName base, int hue) const { - return qstrtostr(QString("%1__%2").arg(hue).arg(strtoqstr(base))); + return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base))); } CharName NoteFont::getNameShaded(CharName base) const { - return qstrtostr(QString("shaded__%1").arg(strtoqstr(base))); + return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base))); } bool NoteFont::getDimensions(CharName charName, int &x, int &y, bool inverted) const { - QPixmap pixmap; + TQPixmap pixmap; bool ok = getPixmap(charName, pixmap, inverted); x = pixmap.width(); y = pixmap.height(); @@ -502,7 +502,7 @@ NoteFont::getHotspot(CharName charName, bool inverted) const { int x, y; (void)getHotspot(charName, x, y, inverted); - return QPoint(x, y); + return TQPoint(x, y); } bool @@ -511,7 +511,7 @@ NoteFont::getCharacter(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getPixmap(charName, pixmap, inverted)) return false; @@ -524,7 +524,7 @@ NoteFont::getCharacter(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; bool found = lookup(charName, inverted, pmapptr); NoteCharacterDrawRep *rep = 0; @@ -556,7 +556,7 @@ NoteFont::getCharacterColoured(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getColouredPixmap(charName, pixmap, hue, minValue, inverted)) { return false; } @@ -572,7 +572,7 @@ NoteFont::getCharacterColoured(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameWithColour(charName, hue)); bool found = lookup(cCharName, inverted, pmapptr); @@ -605,7 +605,7 @@ NoteFont::getCharacterShaded(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getShadedPixmap(charName, pixmap, inverted)) { return false; } @@ -621,7 +621,7 @@ NoteFont::getCharacterShaded(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameShaded(charName)); bool found = lookup(cCharName, inverted, pmapptr); diff --git a/src/gui/editors/notation/NoteFont.h b/src/gui/editors/notation/NoteFont.h index 81a3b19..5bdef07 100644 --- a/src/gui/editors/notation/NoteFont.h +++ b/src/gui/editors/notation/NoteFont.h @@ -32,12 +32,12 @@ #include "NoteFontMap.h" #include <set> #include <string> -#include <qpoint.h> +#include <tqpoint.h> #include <utility> #include "gui/editors/notation/NoteCharacterNames.h" -class QPixmap; +class TQPixmap; class PixmapMap; class NoteCharacterDrawRep; class FontPixmapMap; @@ -130,39 +130,39 @@ public: bool inverted = false) const; /// Ignores problems, returns centre-left of pixmap if necessary - QPoint getHotspot(CharName charName, bool inverted = false) const; + TQPoint getHotspot(CharName charName, bool inverted = false) const; private: /// Returns false + blank pixmap if it can't find the right one - bool getPixmap(CharName charName, QPixmap &pixmap, + bool getPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getColouredPixmap(CharName charName, QPixmap &pixmap, + bool getColouredPixmap(CharName charName, TQPixmap &pixmap, int hue, int minValue, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getShadedPixmap(CharName charName, QPixmap &pixmap, + bool getShadedPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; friend class NoteFontFactory; NoteFont(std::string fontName, int size = 0); std::set<int> getSizes() const { return m_fontMap.getSizes(); } - bool lookup(CharName charName, bool inverted, QPixmap *&pixmap) const; - void add(CharName charName, bool inverted, QPixmap *pixmap) const; + bool lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const; + void add(CharName charName, bool inverted, TQPixmap *pixmap) const; - NoteCharacterDrawRep *lookupDrawRep(QPixmap *pixmap) const; + NoteCharacterDrawRep *lookupDrawRep(TQPixmap *pixmap) const; CharName getNameWithColour(CharName origName, int hue) const; CharName getNameShaded(CharName origName) const; - typedef std::pair<QPixmap *, QPixmap *> PixmapPair; + typedef std::pair<TQPixmap *, TQPixmap *> PixmapPair; typedef std::map<CharName, PixmapPair> PixmapMap; typedef std::map<std::string, PixmapMap *> FontPixmapMap; - typedef std::map<QPixmap *, NoteCharacterDrawRep *> DrawRepMap; + typedef std::map<TQPixmap *, NoteCharacterDrawRep *> DrawRepMap; //--------------- Data members --------------------------------- @@ -174,7 +174,7 @@ private: static FontPixmapMap *m_fontPixmapMap; static DrawRepMap *m_drawRepMap; - static QPixmap *m_blankPixmap; + static TQPixmap *m_blankPixmap; }; diff --git a/src/gui/editors/notation/NoteFontFactory.cpp b/src/gui/editors/notation/NoteFontFactory.cpp index 2decce4..80e0772 100644 --- a/src/gui/editors/notation/NoteFontFactory.cpp +++ b/src/gui/editors/notation/NoteFontFactory.cpp @@ -38,9 +38,9 @@ #include <kconfig.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qdir.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <algorithm> @@ -60,31 +60,31 @@ NoteFontFactory::getFontNames(bool forceRescan) KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); - QString fontNameList = ""; + TQString fontNameList = ""; if (!forceRescan) { fontNameList = config->readEntry("notefontlist"); } NOTATION_DEBUG << "NoteFontFactory::getFontNames: read from cache: " << fontNameList << endl; - QStringList names = QStringList::split(",", fontNameList); + TQStringList names = TQStringList::split(",", fontNameList); if (names.empty()) { NOTATION_DEBUG << "NoteFontFactory::getFontNames: No names available, rescanning..." << endl; - QString mappingDir = + TQString mappingDir = KGlobal::dirs()->findResource("appdata", "fonts/mappings/"); - QDir dir(mappingDir); + TQDir dir(mappingDir); if (!dir.exists()) { std::cerr << "NoteFontFactory::getFontNames: mapping directory \"" << mappingDir << "\" not found" << std::endl; return m_fontNames; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4).lower() == ".xml") { @@ -103,9 +103,9 @@ NoteFontFactory::getFontNames(bool forceRescan) } } - QString savedNames = ""; + TQString savedNames = ""; - for (QStringList::Iterator i = names.begin(); i != names.end(); ++i) { + for (TQStringList::Iterator i = names.begin(); i != names.end(); ++i) { m_fontNames.insert(qstrtostr(*i)); if (i != names.begin()) savedNames += ","; @@ -197,7 +197,7 @@ NoteFontFactory::getDefaultFontName() else if (fontNames.size() > 0) defaultFont = *fontNames.begin(); else { - QString message = i18n("Can't obtain a default font -- no fonts found"); + TQString message = i18n("Can't obtain a default font -- no fonts found"); KStartupLogo::hideIfStillThere(); KMessageBox::error(0, message); throw NoFontsAvailable(qstrtostr(message)); diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp index e11c126..9640087 100644 --- a/src/gui/editors/notation/NoteFontMap.cpp +++ b/src/gui/editors/notation/NoteFontMap.cpp @@ -32,12 +32,12 @@ #include "base/Exception.h" #include "SystemFont.h" #include <kglobal.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpixmap.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpixmap.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -54,23 +54,23 @@ NoteFontMap::NoteFontMap(std::string name) : { m_fontDirectory = KGlobal::dirs()->findResource("appdata", "fonts/"); - QString mapFileName; + TQString mapFileName; - QString mapFileMixedName = QString("%1/mappings/%2.xml") + TQString mapFileMixedName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(strtoqstr(name)); - QFileInfo mapFileMixedInfo(mapFileMixedName); + TQFileInfo mapFileMixedInfo(mapFileMixedName); if (!mapFileMixedInfo.isReadable()) { - QString lowerName = strtoqstr(name).lower(); - lowerName.replace(QRegExp(" "), "_"); - QString mapFileLowerName = QString("%1/mappings/%2.xml") + TQString lowerName = strtoqstr(name).lower(); + lowerName.replace(TQRegExp(" "), "_"); + TQString mapFileLowerName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(lowerName); - QFileInfo mapFileLowerInfo(mapFileLowerName); + TQFileInfo mapFileLowerInfo(mapFileLowerName); if (!mapFileLowerInfo.isReadable()) { if (mapFileLowerName != mapFileMixedName) { @@ -89,10 +89,10 @@ NoteFontMap::NoteFontMap(std::string name) : mapFileName = mapFileMixedName; } - QFile mapFile(mapFileName); + TQFile mapFile(mapFileName); - QXmlInputSource source(mapFile); - QXmlSimpleReader reader; + TQXmlInputSource source(mapFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -112,7 +112,7 @@ NoteFontMap::~NoteFontMap() } bool -NoteFontMap::characters(QString &chars) +NoteFontMap::characters(TQString &chars) { if (!m_characterDestination) return true; @@ -131,11 +131,11 @@ NoteFontMap::toSize(int baseSize, double factor, bool limitAtOne) } bool -NoteFontMap::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteFontMap::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); m_characterDestination = 0; // The element names are actually unique within the whole file; @@ -144,7 +144,7 @@ NoteFontMap::startElement(const QString &, const QString &, if (lcName == "rosegarden-font-encoding") { - QString s; + TQString s; s = attributes.value("name"); if (s) { @@ -154,7 +154,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-information") { - QString s; + TQString s; s = attributes.value("origin"); if (s) @@ -185,7 +185,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-size") { - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of font-size"; return false; @@ -247,7 +247,7 @@ NoteFontMap::startElement(const QString &, const QString &, double legerLineThickness = -1.0; double stemThickness = -1.0; - QString s; + TQString s; s = attributes.value("font-height"); if (s) @@ -334,7 +334,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "src-directory") { - QString d = attributes.value("name"); + TQString d = attributes.value("name"); if (!d) { m_errorString = "name is a required attribute of src-directory"; return false; @@ -346,7 +346,7 @@ NoteFontMap::startElement(const QString &, const QString &, int bn = 0, fn = 0; bool ok; - QString base = attributes.value("base"); + TQString base = attributes.value("base"); if (!base) { m_errorString = "base is a required attribute of codebase"; return false; @@ -354,12 +354,12 @@ NoteFontMap::startElement(const QString &, const QString &, bn = base.toInt(&ok); if (!ok || bn < 0) { m_errorString = - QString("invalid base attribute \"%1\" (must be integer >= 0)"). + TQString("invalid base attribute \"%1\" (must be integer >= 0)"). arg(base); return false; } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (!fontId) { m_errorString = "font-id is a required attribute of codebase"; return false; @@ -367,7 +367,7 @@ NoteFontMap::startElement(const QString &, const QString &, fn = fontId.stripWhiteSpace().toInt(&ok); if (!ok || fn < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -376,16 +376,16 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "symbol") { - QString symbolName = attributes.value("name"); + TQString symbolName = attributes.value("name"); if (!symbolName) { m_errorString = "name is a required attribute of symbol"; return false; } SymbolData symbolData; - QString src = attributes.value("src"); - QString code = attributes.value("code"); - QString glyph = attributes.value("glyph"); + TQString src = attributes.value("src"); + TQString code = attributes.value("code"); + TQString glyph = attributes.value("glyph"); int icode = -1; bool ok = false; @@ -393,7 +393,7 @@ NoteFontMap::startElement(const QString &, const QString &, icode = code.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid code attribute \"%1\" (must be integer >= 0)"). arg(code); return false; } @@ -406,7 +406,7 @@ NoteFontMap::startElement(const QString &, const QString &, iglyph = glyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid glyph attribute \"%1\" (must be integer >= 0)"). arg(glyph); return false; } @@ -420,40 +420,40 @@ NoteFontMap::startElement(const QString &, const QString &, if (src) symbolData.setSrc(qstrtostr(src)); - QString inversionSrc = attributes.value("inversion-src"); + TQString inversionSrc = attributes.value("inversion-src"); if (inversionSrc) symbolData.setInversionSrc(qstrtostr(inversionSrc)); - QString inversionCode = attributes.value("inversion-code"); + TQString inversionCode = attributes.value("inversion-code"); if (inversionCode) { icode = inversionCode.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). arg(inversionCode); return false; } symbolData.setInversionCode(icode); } - QString inversionGlyph = attributes.value("inversion-glyph"); + TQString inversionGlyph = attributes.value("inversion-glyph"); if (inversionGlyph) { iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). arg(inversionGlyph); return false; } symbolData.setInversionGlyph(iglyph); } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (fontId) { int n = fontId.stripWhiteSpace().toInt(&ok); if (!ok || n < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -466,7 +466,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "hotspot") { - QString s = attributes.value("name"); + TQString s = attributes.value("name"); if (!s) { m_errorString = "name is a required attribute of hotspot"; return false; @@ -480,7 +480,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); double x = -1.0; if (s) x = qstrtodouble(s); @@ -507,7 +507,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); int x = 0; if (s) x = s.toInt(); @@ -532,7 +532,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of when"; return false; @@ -563,14 +563,14 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-requirement") { - QString id = attributes.value("font-id"); + TQString id = attributes.value("font-id"); int n = -1; bool ok = false; if (id) { n = id.stripWhiteSpace().toInt(&ok); if (!ok) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(id); return false; } @@ -579,8 +579,8 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString name = attributes.value("name"); - QString names = attributes.value("names"); + TQString name = attributes.value("name"); + TQString names = attributes.value("names"); if (name) { if (names) { @@ -595,15 +595,15 @@ NoteFontMap::startElement(const QString &, const QString &, m_systemFontNames[n] = name; delete font; } else { - std::cerr << QString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; + std::cerr << TQString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; m_ok = false; } } else if (names) { bool have = false; - QStringList list = QStringList::split(",", names, false); - for (QStringList::Iterator i = list.begin(); i != list.end(); ++i) { + TQStringList list = TQStringList::split(",", names, false); + for (TQStringList::Iterator i = list.begin(); i != list.end(); ++i) { SystemFont *font = SystemFont::loadSystemFont (SystemFontSpec(*i, 12)); if (font) { @@ -614,7 +614,7 @@ NoteFontMap::startElement(const QString &, const QString &, } } if (!have) { - std::cerr << QString("Warning: Unable to load any of the fonts in \"%1\""). + std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). arg(names) << std::endl; m_ok = false; } @@ -624,7 +624,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("strategy").lower(); + TQString s = attributes.value("strategy").lower(); SystemFont::Strategy strategy = SystemFont::PreferGlyphs; if (s) { @@ -654,25 +654,25 @@ NoteFontMap::startElement(const QString &, const QString &, } bool -NoteFontMap::error(const QXmlParseException& exception) +NoteFontMap::error(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::error(exception); + return TQXmlDefaultHandler::error(exception); } bool -NoteFontMap::fatalError(const QXmlParseException& exception) +NoteFontMap::fatalError(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::fatalError(exception); + return TQXmlDefaultHandler::fatalError(exception); } std::set<int> @@ -704,23 +704,23 @@ NoteFontMap::getCharNames() const bool NoteFontMap::checkFile(int size, std::string &src) const { - QString pixmapFileMixedName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileMixedName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory)) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileMixedInfo(pixmapFileMixedName); + TQFileInfo pixmapFileMixedInfo(pixmapFileMixedName); if (!pixmapFileMixedInfo.isReadable()) { - QString pixmapFileLowerName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileLowerName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory).lower()) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileLowerInfo(pixmapFileLowerName); + TQFileInfo pixmapFileLowerInfo(pixmapFileLowerName); if (!pixmapFileLowerInfo.isReadable()) { if (pixmapFileMixedName != pixmapFileLowerName) { @@ -803,7 +803,7 @@ const SystemFontNameMap::const_iterator fni = m_systemFontNames.find(fontId); if (fontId < 0 || fni == m_systemFontNames.end()) return false; - QString fontName = fni->second; + TQString fontName = fni->second; CharBaseMap::const_iterator bi = m_bases.find(fontId); if (bi == m_bases.end()) @@ -994,7 +994,7 @@ NoteFontMap::HotspotData::getHotspot(int size, int width, int height, QStringList NoteFontMap::getSystemFontNames() const { - QStringList names; + TQStringList names; for (SystemFontNameMap::const_iterator i = m_systemFontNames.begin(); i != m_systemFontNames.end(); ++i) { names.append(i->second); diff --git a/src/gui/editors/notation/NoteFontMap.h b/src/gui/editors/notation/NoteFontMap.h index 119db76..52d87fa 100644 --- a/src/gui/editors/notation/NoteFontMap.h +++ b/src/gui/editors/notation/NoteFontMap.h @@ -31,15 +31,15 @@ #include <set> #include <string> #include "SystemFont.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <utility> -#include <qxml.h> +#include <tqxml.h> #include "gui/editors/notation/NoteCharacterNames.h" -class QXmlParseException; -class QXmlAttributes; +class TQXmlParseException; +class TQXmlAttributes; namespace Rosegarden @@ -97,18 +97,18 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); - virtual bool characters(QString &); + virtual bool characters(TQString &); - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); void dump() const; // Not for general use, but very handy for diagnostic display - QStringList getSystemFontNames() const; + TQStringList getSystemFontNames() const; // want this to be private, but need access from HotspotData static int toSize(int baseSize, double factor, bool limitAtOne); @@ -300,7 +300,7 @@ private: typedef std::map<int, SizeData> SizeDataMap; SizeDataMap m_sizes; - typedef std::map<int, QString> SystemFontNameMap; + typedef std::map<int, TQString> SystemFontNameMap; SystemFontNameMap m_systemFontNames; typedef std::map<int, SystemFont::Strategy> SystemFontStrategyMap; @@ -316,10 +316,10 @@ private: bool m_expectingCharacters; std::string *m_characterDestination; std::string m_hotspotCharName; - QString m_errorString; + TQString m_errorString; bool checkFile(int size, std::string &src) const; - QString m_fontDirectory; + TQString m_fontDirectory; bool m_ok; }; diff --git a/src/gui/editors/notation/NoteFontViewer.cpp b/src/gui/editors/notation/NoteFontViewer.cpp index 81f07e9..d3dc2a3 100644 --- a/src/gui/editors/notation/NoteFontViewer.cpp +++ b/src/gui/editors/notation/NoteFontViewer.cpp @@ -30,11 +30,11 @@ #include <kcombobox.h> #include <kdialogbase.h> #include <ktoolbar.h> -#include <qlabel.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -50,7 +50,7 @@ NoteFontViewer::slotViewChanged(int i) for (int r = 0; r < 256; ++r) { if (m_frame->hasRow(r)) { - m_rows->insertItem(QString("%1").arg(r)); + m_rows->insertItem(TQString("%1").arg(r)); if (firstRow < 0) firstRow = r; } @@ -66,7 +66,7 @@ NoteFontViewer::slotViewChanged(int i) } void -NoteFontViewer::slotRowChanged(const QString &s) +NoteFontViewer::slotRowChanged(const TQString &s) { bool ok; int i = s.toInt(&ok); @@ -75,48 +75,48 @@ NoteFontViewer::slotRowChanged(const QString &s) } void -NoteFontViewer::slotFontChanged(const QString &s) +NoteFontViewer::slotFontChanged(const TQString &s) { m_frame->setFont(s); slotViewChanged(m_view->currentItem()); } -NoteFontViewer::NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList fontNames, int pixelSize) : +NoteFontViewer::NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList fontNames, int pixelSize) : KDialogBase(parent, 0, true, i18n("Note Font Viewer: %1").arg(noteFontName), Close) { - QVBox *box = makeVBoxMainWidget(); + TQVBox *box = makeVBoxMainWidget(); KToolBar* controls = new KToolBar(box); controls->setMargin(3); - (void) new QLabel(i18n(" Component: "), controls); + (void) new TQLabel(i18n(" Component: "), controls); m_font = new KComboBox(controls); - for (QStringList::iterator i = fontNames.begin(); i != fontNames.end(); + for (TQStringList::iterator i = fontNames.begin(); i != fontNames.end(); ++i) { m_font->insertItem(*i); } - (void) new QLabel(i18n(" View: "), controls); + (void) new TQLabel(i18n(" View: "), controls); m_view = new KComboBox(controls); m_view->insertItem(i18n("Glyphs")); m_view->insertItem(i18n("Codes")); - (void) new QLabel(i18n(" Page: "), controls); + (void) new TQLabel(i18n(" Page: "), controls); m_rows = new KComboBox(controls); m_frame = new FontViewFrame(pixelSize, box); - connect(m_font, SIGNAL(activated(const QString &)), - this, SLOT(slotFontChanged(const QString &))); + connect(m_font, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotFontChanged(const TQString &))); - connect(m_view, SIGNAL(activated(int)), - this, SLOT(slotViewChanged(int))); + connect(m_view, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotViewChanged(int))); - connect(m_rows, SIGNAL(activated(const QString &)), - this, SLOT(slotRowChanged(const QString &))); + connect(m_rows, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotRowChanged(const TQString &))); slotFontChanged(m_font->currentText()); } diff --git a/src/gui/editors/notation/NoteFontViewer.h b/src/gui/editors/notation/NoteFontViewer.h index 31c8613..b31df03 100644 --- a/src/gui/editors/notation/NoteFontViewer.h +++ b/src/gui/editors/notation/NoteFontViewer.h @@ -27,11 +27,11 @@ #define _RG_NOTEFONTVIEWER_H_ #include <kdialogbase.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> -class QWidget; +class TQWidget; class KComboBox; @@ -46,13 +46,13 @@ class NoteFontViewer : public KDialogBase Q_OBJECT public: - NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList systemFontNames, int pixelSize); + NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList systemFontNames, int pixelSize); protected slots: - void slotFontChanged(const QString &); + void slotFontChanged(const TQString &); void slotViewChanged(int); - void slotRowChanged(const QString &); + void slotRowChanged(const TQString &); private: KComboBox *m_font; diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp index 66adafe..c2533e5 100644 --- a/src/gui/editors/notation/NoteInserter.cpp +++ b/src/gui/editors/notation/NoteInserter.cpp @@ -52,9 +52,9 @@ #include <kaction.h> #include <kcommand.h> #include <kconfig.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -69,7 +69,7 @@ NoteInserter::NoteInserter(NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - QIconSet icon; + TQIconSet icon; KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -80,7 +80,7 @@ NoteInserter::NoteInserter(NotationView* view) KToggleAction *autoBeamAction = new KToggleAction(i18n("Auto-Beam when appropriate"), 0, this, - SLOT(slotToggleAutoBeam()), actionCollection(), + TQT_SLOT(slotToggleAutoBeam()), actionCollection(), "toggle_auto_beam"); autoBeamAction->setChecked(m_autoBeam); @@ -101,33 +101,33 @@ NoteInserter::NoteInserter(NotationView* view) (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-crotchet"))); new KToggleAction(i18n("Dotted note"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("rest-crotchet"))); new KAction(i18n("Switch to Inserting Rests"), icon, 0, this, - SLOT(slotRestsSelected()), actionCollection(), + TQT_SLOT(slotRestsSelected()), actionCollection(), "rests"); createMenu("noteinserter.rc"); - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } -NoteInserter::NoteInserter(const QString& menuName, NotationView* view) +NoteInserter::NoteInserter(const TQString& menuName, NotationView* view) : NotationTool(menuName, view), m_noteType(Note::Quaver), m_noteDots(0), @@ -137,8 +137,8 @@ NoteInserter::NoteInserter(const QString& menuName, NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } NoteInserter::~NoteInserter() @@ -155,7 +155,7 @@ void NoteInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -166,7 +166,7 @@ NoteInserter::handleLeftButtonPress(timeT, int NoteInserter::handleMouseMove(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (m_clickHappened) { computeLocationAndPreview(e); @@ -178,7 +178,7 @@ NoteInserter::handleMouseMove(timeT, void NoteInserter::handleMouseRelease(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_clickHappened) return ; @@ -262,7 +262,7 @@ NoteInserter::insertNote(Segment &segment, timeT insertionTime, } bool -NoteInserter::computeLocationAndPreview(QMouseEvent *e) +NoteInserter::computeLocationAndPreview(TQMouseEvent *e) { double x = e->x(); int y = (int)e->y(); @@ -660,8 +660,8 @@ void NoteInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -688,8 +688,8 @@ void NoteInserter::slotSelectSelected() void NoteInserter::slotRestsSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -716,7 +716,7 @@ const char* NoteInserter::m_actionsAccidental[][4] = "accidental-doubleflat" } }; -const QString NoteInserter::ToolName = "noteinserter"; +const TQString NoteInserter::ToolName = "noteinserter"; } #include "NoteInserter.moc" diff --git a/src/gui/editors/notation/NoteInserter.h b/src/gui/editors/notation/NoteInserter.h index cb46b38..a2467a1 100644 --- a/src/gui/editors/notation/NoteInserter.h +++ b/src/gui/editors/notation/NoteInserter.h @@ -30,11 +30,11 @@ #include "NotationTool.h" #include "NotationElement.h" #include "NoteStyle.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -61,16 +61,16 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual int handleMouseMove(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void ready(); @@ -85,7 +85,7 @@ public: Accidental accidental, bool suppressPreview = false); - static const QString ToolName; + static const TQString ToolName; public slots: /// Set the type of note (quaver, breve...) which will be inserted @@ -101,7 +101,7 @@ protected: NoteInserter(NotationView*); /// this ctor is used by RestInserter - NoteInserter(const QString& menuName, NotationView*); + NoteInserter(const TQString& menuName, NotationView*); timeT getOffsetWithinRest(int staffNo, const NotationElementList::iterator&, @@ -115,7 +115,7 @@ protected: const Note &, int pitch, Accidental); - virtual bool computeLocationAndPreview(QMouseEvent *e); + virtual bool computeLocationAndPreview(TQMouseEvent *e); virtual void showPreview(); virtual void clearPreview(); diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp index c2a99ee..b41ecae 100644 --- a/src/gui/editors/notation/NotePixmapFactory.cpp +++ b/src/gui/editors/notation/NotePixmapFactory.cpp @@ -56,20 +56,20 @@ #include "NoteStyle.h" #include <kglobal.h> #include <kmessagebox.h> -#include <qbitmap.h> -#include <qcolor.h> -#include <qfile.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpointarray.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwmatrix.h> +#include <tqbitmap.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpointarray.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -82,7 +82,7 @@ static clock_t makeNotesTime = 0; static int drawBeamsCount = 0; static int drawBeamsBeamCount = 0; -class NotePixmapCache : public std::map<CharName, QCanvasPixmap*> +class NotePixmapCache : public std::map<CharName, TQCanvasPixmap*> { // nothing to add -- just so we can predeclare it in the header }; @@ -94,23 +94,23 @@ const char* const NotePixmapFactory::defaultTimeSigFontFamily = "Bitstream Vera NotePixmapFactory::NotePixmapFactory(std::string fontName, int size) : m_selected(false), m_shaded(false), - m_tupletCountFont(defaultSerifFontFamily, 8, QFont::Bold), + m_tupletCountFont(defaultSerifFontFamily, 8, TQFont::Bold), m_tupletCountFontMetrics(m_tupletCountFont), - m_textMarkFont(defaultSerifFontFamily, 8, QFont::Bold, true), + m_textMarkFont(defaultSerifFontFamily, 8, TQFont::Bold, true), m_textMarkFontMetrics(m_textMarkFont), - m_fingeringFont(defaultSerifFontFamily, 8, QFont::Bold), + m_fingeringFont(defaultSerifFontFamily, 8, TQFont::Bold), m_fingeringFontMetrics(m_fingeringFont), - m_timeSigFont(defaultTimeSigFontFamily, 8, QFont::Bold), + m_timeSigFont(defaultTimeSigFontFamily, 8, TQFont::Bold), m_timeSigFontMetrics(m_timeSigFont), - m_bigTimeSigFont(defaultTimeSigFontFamily, 12, QFont::Normal), + m_bigTimeSigFont(defaultTimeSigFontFamily, 12, TQFont::Normal), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -136,13 +136,13 @@ NotePixmapFactory::NotePixmapFactory(const NotePixmapFactory &npf) : m_timeSigFontMetrics(m_timeSigFont), m_bigTimeSigFont(npf.m_bigTimeSigFont), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -162,23 +162,23 @@ NotePixmapFactory::operator=(const NotePixmapFactory &npf) m_selected = npf.m_selected; m_shaded = npf.m_shaded; m_timeSigFont = npf.m_timeSigFont; - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = npf.m_bigTimeSigFont; - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = npf.m_tupletCountFont; - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = npf.m_textMarkFont; - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = npf.m_fingeringFont; - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = npf.m_ottavaFont; - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = npf.m_clefOttavaFont; - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = npf.m_trackHeaderFont; - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = npf.m_trackHeaderBoldFont; - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); init(npf.m_font->getName(), npf.m_font->getSize()); m_dottedRestCache->clear(); m_textFontCache.clear(); @@ -224,7 +224,7 @@ NotePixmapFactory::init(std::string fontName, int size) // Resize the fonts, because the original constructor used point // sizes only and we want pixels - QFont timeSigFont(defaultTimeSigFontFamily), + TQFont timeSigFont(defaultTimeSigFontFamily), textFont(defaultSerifFontFamily); KConfig* config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -232,43 +232,43 @@ NotePixmapFactory::init(std::string fontName, int size) m_timeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_timeSigFont.setBold(true); m_timeSigFont.setPixelSize(size * 5 / 2); - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_bigTimeSigFont.setPixelSize(size * 4 + 2); - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = config->readFontEntry("textfont", &textFont); m_tupletCountFont.setBold(true); m_tupletCountFont.setPixelSize(size * 2); - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = config->readFontEntry("textfont", &textFont); m_textMarkFont.setBold(true); m_textMarkFont.setItalic(true); m_textMarkFont.setPixelSize(size * 2); - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = config->readFontEntry("textfont", &textFont); m_fingeringFont.setBold(true); m_fingeringFont.setPixelSize(size * 5 / 3); - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = config->readFontEntry("textfont", &textFont); m_ottavaFont.setPixelSize(size * 2); - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = config->readFontEntry("textfont", &textFont); m_clefOttavaFont.setPixelSize(getLineSpacing() * 3 / 2); - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = config->readFontEntry("sansfont", &m_trackHeaderFont); m_trackHeaderFont.setPixelSize(12); - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = m_trackHeaderFont; m_trackHeaderBoldFont.setBold(true); - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); } NotePixmapFactory::~NotePixmapFactory() @@ -290,9 +290,9 @@ NotePixmapFactory::getSize() const } QPixmap -NotePixmapFactory::toQPixmap(QCanvasPixmap* cp) +NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp) { - QPixmap p = *cp; + TQPixmap p = *cp; delete cp; return p; } @@ -317,7 +317,7 @@ NotePixmapFactory::dumpStats(std::ostream &s) (void)s; // avoid warnings } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeNotePixmap"); @@ -325,7 +325,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) drawNoteAux(params, 0, 0, 0); - QPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); + TQPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); //#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY #ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY @@ -354,7 +354,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawNote"); m_inPrinterMethod = true; @@ -364,7 +364,7 @@ NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, void NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { NoteFont::CharacterType charType = m_inPrinterMethod ? NoteFont::Printer : NoteFont::Screen; @@ -471,7 +471,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } } - QPoint startPoint, endPoint; + TQPoint startPoint, endPoint; if (isStemmed && params.m_drawStem) { makeRoomForStemAndFlags(drawFlag ? flagCount : 0, stemLength, params, startPoint, endPoint); @@ -526,7 +526,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, params.m_inRange ? PlainColour : OutRangeColour, inverted); - QPoint bodyLocation(m_left - m_borderX, + TQPoint bodyLocation(m_left - m_borderX, m_above - m_borderY + getStaffLineThickness() / 2); if (params.m_shifted) { if (params.m_stemGoesUp) { @@ -603,7 +603,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) { int nbh0 = getNoteBodyHeight(); @@ -614,19 +614,19 @@ NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) createPixmapAndMask(nbw + nbw0, nbh + nbh0); drawNoteHalo(0, 0, nbw + nbw0, nbh + nbh0); - return makeCanvasPixmap(QPoint(nbw0 / 2, nbh0)); + return makeCanvasPixmap(TQPoint(nbw0 / 2, nbh0)); } void NotePixmapFactory::drawNoteHalo(int x, int y, int w, int h) { - m_p->painter().setPen(QPen(QColor(GUIPalette::CollisionHaloHue, + m_p->painter().setPen(TQPen(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv), 1)); - m_p->painter().setBrush(QColor(GUIPalette::CollisionHaloHue, + 255, TQColor::Hsv), 1)); + m_p->painter().setBrush(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv)); + 255, TQColor::Hsv)); m_p->drawEllipse(x, y, w, h); } @@ -699,7 +699,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter ac (m_font->getCharacter(m_style->getAccidentalCharName(a))); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); m_left += ac.getWidth() + (m_noteBodyWidth / 4 - m_borderX); @@ -725,7 +725,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter acSharp (m_font->getCharacter(m_style->getAccidentalCharName (Accidentals::Sharp))); - QPoint ahSharp + TQPoint ahSharp (m_font->getHotspot(m_style->getAccidentalCharName (Accidentals::Sharp))); step = std::max(step, acSharp.getWidth() - ahSharp.x()); @@ -753,7 +753,7 @@ NotePixmapFactory::drawAccidental(Accidental a, bool cautionary) NoteCharacter ac = getCharacter (m_style->getAccidentalCharName(a), PlainColour, false); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); int ax = 0; @@ -792,8 +792,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks, but // text marks are not all that common - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); height += bounds.height() + gap; if (bounds.width() > width) width = bounds.width(); @@ -836,8 +836,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); height += bounds.height() + gap + 3; if (bounds.width() > width) width = bounds.width(); @@ -888,8 +888,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } else { - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); m_p->painter().setFont(m_textMarkFont); if (!m_inPrinterMethod) @@ -973,8 +973,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } } else { - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); m_p->painter().setFont(m_fingeringFont); if (!m_inPrinterMethod) @@ -1107,7 +1107,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters ¶ms) void NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &s0, QPoint &s1) + TQPoint &s0, TQPoint &s1) { // The coordinates we set in s0 and s1 are relative to (m_above, m_left) @@ -1194,7 +1194,7 @@ NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, void NotePixmapFactory::drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &, const QPoint &s1) + const TQPoint &, const TQPoint &s1) { if (flagCount < 1) return ; @@ -1219,7 +1219,7 @@ NotePixmapFactory::drawFlags(int flagCount, return ; } - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); NoteCharacter oneFlagChar; bool foundOne = @@ -1270,7 +1270,7 @@ NotePixmapFactory::drawFlags(int flagCount, } else { // the normal case - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); int y = m_above + s1.y(); if (!params.m_stemGoesUp) @@ -1282,7 +1282,7 @@ NotePixmapFactory::drawFlags(int flagCount, void NotePixmapFactory::drawStem(const NotePixmapParameters ¶ms, - const QPoint &s0, const QPoint &s1, + const TQPoint &s0, const TQPoint &s1, int shortening) { if (params.m_stemGoesUp) @@ -1336,7 +1336,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } } else { Profiler profiler("NotePixmapFactory::drawShallowLine(polygon)"); - QPointArray qp(4); + TQPointArray qp(4); qp.setPoint(0, x0, y0); qp.setPoint(1, x0, y0 + thickness); qp.setPoint(2, x1, y1 + thickness); @@ -1352,14 +1352,14 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, int dv = y1 - y0; int dh = x1 - x0; - static std::vector<QColor> colours, selectedColours; + static std::vector<TQColor> colours, selectedColours; if (colours.size() == 0) { int h, s, v; - QColor c = GUIPalette::getColour(GUIPalette::SelectedElement); + TQColor c = GUIPalette::getColour(GUIPalette::SelectedElement); c.hsv(&h, &s, &v); for (int step = 0; step < 256; step += (step == 0 ? 63 : 64)) { - colours.push_back(QColor( -1, 0, step, QColor::Hsv)); - selectedColours.push_back(QColor(h, 255 - step, v, QColor::Hsv)); + colours.push_back(TQColor( -1, 0, step, TQColor::Hsv)); + selectedColours.push_back(TQColor(h, 255 - step, v, TQColor::Hsv)); } } @@ -1444,7 +1444,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } void -NotePixmapFactory::drawBeams(const QPoint &s1, +NotePixmapFactory::drawBeams(const TQPoint &s1, const NotePixmapParameters ¶ms, int beamCount) { @@ -1521,7 +1521,7 @@ NotePixmapFactory::drawBeams(const QPoint &s1, } void -NotePixmapFactory::drawSlashes(const QPoint &s0, +NotePixmapFactory::drawSlashes(const TQPoint &s0, const NotePixmapParameters ¶ms, int slashCount) { @@ -1587,9 +1587,9 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters ¶ms) int thickness = getStaffLineThickness() * 3 / 2; int countSpace = thickness * 2; - QString count; + TQString count; count.setNum(params.m_tupletCount); - QRect cr = m_tupletCountFontMetrics.boundingRect(count); + TQRect cr = m_tupletCountFontMetrics.boundingRect(count); int tlw = params.m_tuplingLineWidth; int indent = m_noteBodyWidth / 2; @@ -1722,7 +1722,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) // We can't request a smooth slur here, because that always involves // creating a new pixmap - QPoint hotspot; + TQPoint hotspot; drawSlurAux(length, 0, above, false, true, false, hotspot, &m_p->painter(), x, @@ -1733,7 +1733,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) #endif } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeRestPixmap"); @@ -1759,19 +1759,19 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) NotePixmapCache::iterator ci(m_dottedRestCache->find(charName)); if (ci != m_dottedRestCache->end()) return new QCanvasPixmap - (*ci->second, QPoint(ci->second->offsetX(), + (*ci->second, TQPoint(ci->second->offsetX(), ci->second->offsetY())); else encache = true; } } - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); drawRestAux(params, hotspot, 0, 0, 0); - QCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); + TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); if (encache) { - m_dottedRestCache->insert(std::pair<CharName, QCanvasPixmap*> + m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*> (charName, new QCanvasPixmap (*canvasMap, hotspot))); } @@ -1780,18 +1780,18 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawRest(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawRest"); m_inPrinterMethod = true; - QPoint hotspot; // unused + TQPoint hotspot; // unused drawRestAux(params, hotspot, &painter, x, y); m_inPrinterMethod = false; } void NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { CharName charName(m_style->getRestCharName(params.m_noteType, params.m_restOutsideStave)); @@ -1862,7 +1862,7 @@ NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefPixmap(const Clef &clef) { Profiler profiler("NotePixmapFactory::makeClefPixmap"); @@ -1880,8 +1880,8 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); createPixmapAndMask(plain.getWidth(), plain.getHeight() + rect.height()); @@ -1901,26 +1901,26 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) rect.height(), text); m_p->painter().setPen(Qt::black); - QPoint hotspot(plain.getHotspot()); + TQPoint hotspot(plain.getHotspot()); if (oct > 0) hotspot.setY(hotspot.y() + rect.height()); return makeCanvasPixmap(hotspot, true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalDownPixmap() { return getCharacter(NoteCharacterNames::PEDAL_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalUpPixmap() { return getCharacter(NoteCharacterNames::PEDAL_UP_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeUnknownPixmap() { Profiler profiler("NotePixmapFactory::makeUnknownPixmap"); @@ -1928,26 +1928,26 @@ NotePixmapFactory::makeUnknownPixmap() .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeToolbarPixmap(const char *name, bool menuSize) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString fileBase = pixmapDir + "/toolbar/"; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileBase = pixmapDir + "/toolbar/"; if (menuSize) fileBase += "menu-"; fileBase += name; - if (QFile(fileBase + ".png").exists()) { - return new QCanvasPixmap(fileBase + ".png"); - } else if (QFile(fileBase + ".xpm").exists()) { - return new QCanvasPixmap(fileBase + ".xpm"); + if (TQFile(fileBase + ".png").exists()) { + return new TQCanvasPixmap(fileBase + ".png"); + } else if (TQFile(fileBase + ".xpm").exists()) { + return new TQCanvasPixmap(fileBase + ".xpm"); } else if (menuSize) { return makeToolbarPixmap(name, false); } else { // this will fail, but we don't want to return a null pointer - return new QCanvasPixmap(fileBase + ".png"); + return new TQCanvasPixmap(fileBase + ".png"); } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteMenuPixmap(timeT duration, timeT &errorReturn) { @@ -1965,14 +1965,14 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration, } } - QString noteName = NotationStrings::getReferenceName(nearestNote); + TQString noteName = NotationStrings::getReferenceName(nearestNote); if (triplet) noteName = "3-" + noteName; noteName = "menu-" + noteName; return makeToolbarPixmap(noteName); } -QCanvasPixmap * +TQCanvasPixmap * NotePixmapFactory::makeMarkMenuPixmap(Mark mark) { if (mark == Marks::Sforzando || @@ -1995,7 +1995,7 @@ NotePixmapFactory::makeMarkMenuPixmap(Mark mark) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey) @@ -2090,10 +2090,10 @@ NotePixmapFactory::makeKeyPixmap(const Key &key, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) { - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = clefPixmap->width() + 6 * getNoteBodyWidth(); @@ -2115,7 +2115,7 @@ NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) { std::vector<int> ah = key.getAccidentalHeights(clef); @@ -2124,9 +2124,9 @@ NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) NoteCharacterNames::SHARP : NoteCharacterNames::FLAT); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); - QPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); - QPoint hotspot(m_font->getHotspot(charName)); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); + TQPoint hotspot(m_font->getHotspot(charName)); int lw = getLineSpacing(); int delta = accidentalPixmap.width() - hotspot.x(); @@ -2176,7 +2176,7 @@ NotePixmapFactory::getClefAndKeyWidth(const Key &key, const Clef &clef) return width; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTrackHeaderPixmap( int width, int height, TrackHeader *header) { @@ -2188,14 +2188,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lw = getLineSpacing(); int h; - QColor colour; + TQColor colour; int maxDelta = getAccidentalWidth(Sharp); // Staff Y position inside the whole header int offset = (height - 10 * lw -1) / 2; // Draw staff lines - m_p->painter().setPen(QPen(Qt::black, getStaffLineThickness())); + m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness())); for (h = 0; h <= 8; h += 2) { int y = (lw * 3) + ((8 - h) * lw) / 2; m_p->drawLine(maxDelta/2, y + offset, m_generatedWidth - maxDelta/2, y + offset); @@ -2228,8 +2228,8 @@ NotePixmapFactory::makeTrackHeaderPixmap( else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); m_p->painter().setPen(colour); @@ -2258,7 +2258,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( NoteCharacter accident = m_font->getCharacterColoured(charName, hue, val, NoteFont::Screen, false); - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); int delta = accident.getWidth() - hotspot.x(); int x = clefChar.getWidth() + maxDelta; @@ -2275,14 +2275,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( m_p->painter().setFont(m_trackHeaderFont); // m_p->maskPainter().setFont(m_trackHeaderFont); - QString text; - QString textLine; + TQString text; + TQString textLine; int charHeight = m_trackHeaderFontMetrics.height(); int charWidth = m_trackHeaderFontMetrics.maxWidth(); - const QString transposeText = header->getTransposeText(); - QRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); + const TQString transposeText = header->getTransposeText(); + TQRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); int transposeWidth = bounds.width(); @@ -2338,7 +2338,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lowerTextY = m_generatedHeight - 4 // -4 : adjust - (numberOfTextLines - l) * getTrackHeaderTextLineSpacing(); - QString textLine = getOneLine(text, width - charWidth / 2); + TQString textLine = getOneLine(text, width - charWidth / 2); if (textLine.isEmpty()) break; if ((l == numberOfTextLines) && !text.isEmpty()) { @@ -2363,9 +2363,9 @@ NotePixmapFactory::getTrackHeaderNTL(int height) } int -NotePixmapFactory::getTrackHeaderTextWidth(QString str) +NotePixmapFactory::getTrackHeaderTextWidth(TQString str) { - QRect bounds = m_trackHeaderFontMetrics.boundingRect(str); + TQRect bounds = m_trackHeaderFontMetrics.boundingRect(str); return bounds.width(); } @@ -2377,17 +2377,17 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing() } QString -NotePixmapFactory::getOneLine(QString &text, int width) +NotePixmapFactory::getOneLine(TQString &text, int width) { - QString str; + TQString str; int n; // Immediately stop if string is empty or only contains white spaces ... - if (text.stripWhiteSpace().isEmpty()) return QString(""); + if (text.stripWhiteSpace().isEmpty()) return TQString(""); // ... or if width is too small. if (width < m_trackHeaderFontMetrics.boundingRect(text.left(1)).width()) - return QString(""); + return TQString(""); // Get a first approx. string length int totalLength = text.length(); @@ -2399,7 +2399,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) if (n == 0) { str = text; - text = QString(""); + text = TQString(""); } else { str = text.left(n); text.remove(0, n); @@ -2408,7 +2408,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) return str; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, bool useSharps) { @@ -2418,7 +2418,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental(pitch.getAccidental(useSharps)); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2438,7 +2438,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2473,7 +2473,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, int octave, int step) { @@ -2483,7 +2483,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental = pitch.getDisplayAccidental(Key("C major")); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2505,7 +2505,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2540,17 +2540,17 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeHairpinPixmap(int length, bool isCrescendo) { Profiler profiler("NotePixmapFactory::makeHairpinPixmap"); drawHairpinAux(length, isCrescendo, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight / 2)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight / 2)); } void NotePixmapFactory::drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawHairpin"); m_inPrinterMethod = true; @@ -2560,7 +2560,7 @@ NotePixmapFactory::drawHairpin(int length, bool isCrescendo, void NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int nbh = getNoteBodyHeight(); int nbw = getNoteBodyWidth(); @@ -2610,7 +2610,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) { Profiler profiler("NotePixmapFactory::makeSlurPixmap"); @@ -2619,7 +2619,7 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) // sizing so that any horizontal part was rescaled down to exactly // 1 pixel wide instead of blurring bool smooth = m_font->isSmooth() && getNoteBodyHeight() > 5; - QPoint hotspot; + TQPoint hotspot; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; drawSlurAux(length, dy, above, smooth, false, phrasing, hotspot, 0, 0, 0); @@ -2628,22 +2628,22 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) if (smooth) { - QImage i = m_generatedPixmap->convertToImage(); + TQImage i = m_generatedPixmap->convertToImage(); if (i.depth() == 1) i = i.convertDepth(32); i = i.smoothScale(i.width() / 2, i.height() / 2); delete m_generatedPixmap; delete m_generatedMask; - QPixmap newPixmap(i); - QCanvasPixmap *p = new QCanvasPixmap(newPixmap, hotspot); + TQPixmap newPixmap(i); + TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(newPixmap, Qt::white.rgb())); return p; } else { - QCanvasPixmap *p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap, Qt::white.rgb())); delete m_generatedPixmap; @@ -2654,10 +2654,10 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) void NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawSlur"); - QPoint hotspot; + TQPoint hotspot; m_inPrinterMethod = true; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; @@ -2668,10 +2668,10 @@ NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, void NotePixmapFactory::drawSlurAux(int length, int dy, bool above, bool smooth, bool flat, bool phrasing, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { - QWMatrix::TransformationMode mode = QWMatrix::transformationMode(); - QWMatrix::setTransformationMode(QWMatrix::Points); + TQWMatrix::TransformationMode mode = TQWMatrix::transformationMode(); + TQWMatrix::setTransformationMode(TQWMatrix::Points); int thickness = getStaffLineThickness() * 2; if (phrasing) @@ -2707,7 +2707,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, my = -my; bool havePixmap = false; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; if (smooth) thickness += 2; @@ -2717,31 +2717,31 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, Spline::PointList pl; if (!phrasing) { - pl.push_back(QPoint(length / 6, my)); - pl.push_back(QPoint(length - length / 6, my)); + pl.push_back(TQPoint(length / 6, my)); + pl.push_back(TQPoint(length - length / 6, my)); } else { - pl.push_back(QPoint(abs(my) / 4, my / 3)); - pl.push_back(QPoint(length / 6, my)); + pl.push_back(TQPoint(abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length / 6, my)); if (theta > 1) { - pl.push_back(QPoint(length * 3 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 3 / 8, my * 3 / 2)); } else if (theta < -1) { - pl.push_back(QPoint(length * 5 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 5 / 8, my * 3 / 2)); } else { - pl.push_back(QPoint(length / 2, my * 4 / 3)); + pl.push_back(TQPoint(length / 2, my * 4 / 3)); } - pl.push_back(QPoint(length - length / 6, my)); - pl.push_back(QPoint(length - abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length - length / 6, my)); + pl.push_back(TQPoint(length - abs(my) / 4, my / 3)); } Spline::PointList *polyPoints = Spline::calculate - (QPoint(0, y0), QPoint(length - 1, y0), pl, topLeft, bottomRight); + (TQPoint(0, y0), TQPoint(length - 1, y0), pl, topLeft, bottomRight); if (!havePixmap) { int width = bottomRight.x() - topLeft.x(); int height = bottomRight.y() - topLeft.y() + thickness - 1 + abs(dy); - hotspot = QPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); + hotspot = TQPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); // NOTATION_DEBUG << "slur: bottomRight (" << bottomRight.x() << "," << bottomRight.y() << "), topLeft (" << topLeft.x() << "," << topLeft.y() << "), width " << width << ", height " << height << ", hotspot (" << hotspot.x() << "," << hotspot.y() << "), dy " << dy << ", thickness " << thickness << endl; @@ -2773,7 +2773,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, smooth ? height*2 + thickness*2 : height + thickness, width, height); - QWMatrix m; + TQWMatrix m; if (smooth) m.translate(2 * hotspot.x(), 2 * hotspot.y()); else @@ -2800,7 +2800,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } */ int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); for (int j = 0; j < ppc; ++j) { qp.setPoint(j, (*polyPoints)[j].x(), (*polyPoints)[j].y()); @@ -2838,7 +2838,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, m_p->painter().setPen(Qt::black); } - QWMatrix::setTransformationMode(mode); + TQWMatrix::setTransformationMode(mode); if (painter) { painter->restore(); @@ -2847,18 +2847,18 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeOttavaPixmap(int length, int octavesUp) { Profiler profiler("NotePixmapFactory::makeOttavaPixmap"); m_inPrinterMethod = false; drawOttavaAux(length, octavesUp, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight - 1)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight - 1)); } void NotePixmapFactory::drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawOttava"); m_inPrinterMethod = true; @@ -2868,12 +2868,12 @@ NotePixmapFactory::drawOttava(int length, int octavesUp, void NotePixmapFactory::drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int height = m_ottavaFontMetrics.height(); int backpedal = 0; - QString label; - QRect r; + TQString label; + TQRect r; if (octavesUp == 2 || octavesUp == -2) { label = "15ma "; @@ -2895,7 +2895,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, } int thickness = getStemThickness(); - QPen pen(Qt::black, thickness, Qt::DotLine); + TQPen pen(Qt::black, thickness, Qt::DotLine); if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); @@ -2931,9 +2931,9 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->drawLine(x1, y0, x1, y1); - m_p->painter().setPen(QPen()); + m_p->painter().setPen(TQPen()); if (!m_inPrinterMethod) - m_p->maskPainter().setPen(QPen()); + m_p->maskPainter().setPen(TQPen()); if (painter) { painter->restore(); @@ -2962,13 +2962,13 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) if (left) moff = -moff; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; for (int i = 0; i < thickness; ++i) { Spline::PointList pl; - pl.push_back(QPoint((int)moff, m1)); - pl.push_back(QPoint((int)moff, m2)); + pl.push_back(TQPoint((int)moff, m1)); + pl.push_back(TQPoint((int)moff, m2)); /* NOTATION_DEBUG << "bracket spline controls: " << moff << "," << m1 << ", " << moff << "," << m2 << "; end points " @@ -2976,10 +2976,10 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) << endl; */ Spline::PointList *polyPoints = Spline::calculate - (QPoint(off0, 0), QPoint(off0, length - 1), pl, topLeft, bottomRight); + (TQPoint(off0, 0), TQPoint(off0, length - 1), pl, topLeft, bottomRight); int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); /* NOTATION_DEBUG << "bracket spline polypoints: " << endl; for (int j = 0; j < ppc; ++j) { @@ -3007,7 +3007,7 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) { Profiler profiler("NotePixmapFactory::makeTimeSigPixmap"); @@ -3026,11 +3026,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (getCharacter(charName, character, PlainColour, false)) { createPixmapAndMask(character.getWidth(), character.getHeight()); m_p->drawNoteCharacter(0, 0, character); - return makeCanvasPixmap(QPoint(0, character.getHeight() / 2)); + return makeCanvasPixmap(TQPoint(0, character.getHeight() / 2)); } - QString c("c"); - QRect r = m_bigTimeSigFontMetrics.boundingRect(c); + TQString c("c"); + TQRect r = m_bigTimeSigFontMetrics.boundingRect(c); int dy = getLineSpacing() / 4; createPixmapAndMask(r.width(), r.height() + dy*2); @@ -3057,14 +3057,14 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) } m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, r.height() / 2 + dy)); + return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy)); } else { int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); @@ -3104,11 +3104,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) denominator /= 10; } - return makeCanvasPixmap(QPoint(0, height / 2)); + return makeCanvasPixmap(TQPoint(0, height / 2)); } - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; int x; @@ -3132,7 +3132,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, denomR.height() + + return makeCanvasPixmap(TQPoint(0, denomR.height() + (getNoteBodyHeight() / 4) - 1), true); } @@ -3142,7 +3142,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const { if (sig.isCommon()) { - QRect r(m_bigTimeSigFontMetrics.boundingRect("c")); + TQRect r(m_bigTimeSigFontMetrics.boundingRect("c")); return r.width() + 2; } else { @@ -3150,13 +3150,13 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; return width; @@ -3189,7 +3189,7 @@ NotePixmapFactory::getTextFont(const Text &text) const * LilyPondDirective: Very small sans-serif, in a green box */ - int weight = QFont::Normal; + int weight = TQFont::Normal; bool italic = false; bool large = false; bool tiny = false; @@ -3199,7 +3199,7 @@ NotePixmapFactory::getTextFont(const Text &text) const type == Text::LocalTempo || type == Text::LocalDirection || type == Text::Chord) { - weight = QFont::Bold; + weight = TQFont::Bold; } if (type == Text::Dynamic || @@ -3221,18 +3221,18 @@ NotePixmapFactory::getTextFont(const Text &text) const KConfig* config = kapp->config(); - QFont textFont; + TQFont textFont; if (serif) { - textFont = QFont(defaultSerifFontFamily); + textFont = TQFont(defaultSerifFontFamily); textFont = config->readFontEntry("textfont", &textFont); } else { - textFont = QFont(defaultSansSerifFontFamily); + textFont = TQFont(defaultSansSerifFontFamily); textFont = config->readFontEntry("sansfont", &textFont); } - textFont.setStyleStrategy(QFont::StyleStrategy(QFont::PreferDefault | - QFont::PreferMatch)); + textFont.setStyleStrategy(TQFont::StyleStrategy(TQFont::PreferDefault | + TQFont::PreferMatch)); int size; if (large) @@ -3245,7 +3245,7 @@ NotePixmapFactory::getTextFont(const Text &text) const size = (getLineSpacing() * 3) / 2; textFont.setPixelSize(size); - textFont.setStyleHint(serif ? QFont::Serif : QFont::SansSerif); + textFont.setStyleHint(serif ? TQFont::Serif : TQFont::SansSerif); textFont.setWeight(weight); textFont.setItalic(italic); @@ -3260,7 +3260,7 @@ NotePixmapFactory::getTextFont(const Text &text) const return textFont; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTextPixmap(const Text &text) { Profiler profiler("NotePixmapFactory::makeTextPixmap"); @@ -3273,10 +3273,10 @@ NotePixmapFactory::makeTextPixmap(const Text &text) } drawTextAux(text, 0, 0, 0); - return makeCanvasPixmap(QPoint(2, 2), true); + return makeCanvasPixmap(TQPoint(2, 2), true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y) @@ -3300,12 +3300,12 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS); Guitar::NoteSymbols::drawFingeringPixmap(fingering, ns, &(m_p->painter())); - return makeCanvasPixmap(QPoint (x, y), true); + return makeCanvasPixmap(TQPoint (x, y), true); } void NotePixmapFactory::drawText(const Text &text, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawText"); @@ -3316,7 +3316,7 @@ NotePixmapFactory::drawText(const Text &text, if (type == Text::Annotation || type == Text::LilyPondDirective) { - QCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); + TQCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); painter.drawPixmap(x, y, *map); return ; } @@ -3328,11 +3328,11 @@ NotePixmapFactory::drawText(const Text &text, void NotePixmapFactory::drawTextAux(const Text &text, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { - QString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQString s(strtoqstr(text.getText())); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int offset = 2; int width = textMetrics.width(s) + 2 * offset; @@ -3364,19 +3364,19 @@ NotePixmapFactory::drawTextAux(const Text &text, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text) { return makeAnnotationPixmap(text, false); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective) { - QString s(strtoqstr(text.getText())); + TQString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int annotationWidth = getLineSpacing() * 16; int annotationHeight = getLineSpacing() * 6; @@ -3385,7 +3385,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD int bottomGap = getLineSpacing() / 3 + 1; int sideGap = getLineSpacing() / 4 + 1; - QRect r = textMetrics.boundingRect + TQRect r = textMetrics.boundingRect (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s); int pixmapWidth = r.width() + sideGap * 2; @@ -3411,18 +3411,18 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD m_p->drawRect(0, 0, pixmapWidth, pixmapHeight); m_p->painter().setBrush(Qt::black); - m_p->painter().drawText(QRect(sideGap, topGap, + m_p->painter().drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, pixmapHeight - bottomGap), Qt::WordBreak, s); /* unnecessary following the rectangle draw - m_pm.drawText(QRect(sideGap, topGap, + m_pm.drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, annotationHeight + topGap), Qt::WordBreak, s); */ - return makeCanvasPixmap(QPoint(0, 0)); + return makeCanvasPixmap(TQPoint(0, 0)); } void @@ -3436,8 +3436,8 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_generatedWidth = width; m_generatedHeight = height; - m_generatedPixmap = new QPixmap(width, height); - m_generatedMask = new QBitmap(maskWidth, maskHeight); + m_generatedPixmap = new TQPixmap(width, height); + m_generatedMask = new TQBitmap(maskWidth, maskHeight); static unsigned long total = 0; total += width * height; @@ -3456,12 +3456,12 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_p->maskPainter().setBrush(Qt::white); } -QCanvasPixmap* -NotePixmapFactory::makeCanvasPixmap(QPoint hotspot, bool generateMask) +TQCanvasPixmap* +NotePixmapFactory::makeCanvasPixmap(TQPoint hotspot, bool generateMask) { m_p->end(); - QCanvasPixmap* p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap* p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); if (generateMask) { p->setMask(PixmapFunctions::generateMask(*p)); @@ -3682,7 +3682,7 @@ int NotePixmapFactory::getKeyWidth(const Key &key, int NotePixmapFactory::getTextWidth(const Text &text) const { - QFontMetrics metrics(getTextFont(text)); + TQFontMetrics metrics(getTextFont(text)); return metrics.boundingRect(strtoqstr(text.getText())).width() + 4; } diff --git a/src/gui/editors/notation/NotePixmapFactory.h b/src/gui/editors/notation/NotePixmapFactory.h index 14b4773..20d2ae6 100644 --- a/src/gui/editors/notation/NotePixmapFactory.h +++ b/src/gui/editors/notation/NotePixmapFactory.h @@ -29,17 +29,17 @@ #include <map> #include "NoteCharacter.h" #include <string> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpixmap.h> -#include <qpoint.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpixmap.h> +#include <tqpoint.h> #include "base/Event.h" #include "gui/editors/notation/NoteCharacterNames.h" -class QPainter; -class QCanvasPixmap; -class QBitmap; +class TQPainter; +class TQCanvasPixmap; +class TQBitmap; namespace Rosegarden @@ -83,61 +83,61 @@ public: // Display methods -- create canvas pixmaps: - QCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeClefPixmap(const Clef &clef); - QCanvasPixmap* makeKeyPixmap(const Key &key, + TQCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeClefPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey = Key::DefaultKey); - QCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); - QCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); - QCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); - QCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); - QCanvasPixmap* makePedalDownPixmap(); - QCanvasPixmap* makePedalUpPixmap(); - QCanvasPixmap* makeUnknownPixmap(); - QCanvasPixmap* makeTextPixmap(const Text &text); - QCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, + TQCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); + TQCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); + TQCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); + TQCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); + TQCanvasPixmap* makePedalDownPixmap(); + TQCanvasPixmap* makePedalUpPixmap(); + TQCanvasPixmap* makeUnknownPixmap(); + TQCanvasPixmap* makeTextPixmap(const Text &text); + TQCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y); - QCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); // Printing methods -- draw direct to a paint device: void drawNote(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawRest(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawText(const Text &text, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); // Other support methods for producing pixmaps for other contexts: - static QCanvasPixmap *makeToolbarPixmap(const char *name, + static TQCanvasPixmap *makeToolbarPixmap(const char *name, bool menuSize = false); - static QCanvasPixmap *makeNoteMenuPixmap(timeT duration, + static TQCanvasPixmap *makeNoteMenuPixmap(timeT duration, timeT &errorReturn); - static QCanvasPixmap *makeMarkMenuPixmap(Mark); + static TQCanvasPixmap *makeMarkMenuPixmap(Mark); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, bool useSharps); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, int octave, int step); - QCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); - QCanvasPixmap* makeKeyDisplayPixmap(const Key &key, + TQCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyDisplayPixmap(const Key &key, const Clef &clef); - QCanvasPixmap* makeTrackHeaderPixmap(int width, int height, + TQCanvasPixmap* makeTrackHeaderPixmap(int width, int height, TrackHeader *header); // Bounding box and other geometry methods: @@ -183,7 +183,7 @@ public: /** * Returns the width of a text string written in a track header. */ - int getTrackHeaderTextWidth(QString str); + int getTrackHeaderTextWidth(TQString str); /** * Returns the spacing of a text lines written in a track header. @@ -195,19 +195,19 @@ public: * "width" (when written with m_trackHeaderFont) and removes it * from "text". */ - QString getOneLine(QString &text, int width); + TQString getOneLine(TQString &text, int width); /** * We need this function because as of Qt 3.1, QCanvasPixmap - * is no longer copyable by value, while QPixmap still is. + * is no longer copyable by value, while TQPixmap still is. * - * So all the makeXXPixmap are now returning QCanvasPixmap* - * instead of QCanvasPixmap, but we need an easy way to - * convert them to QPixmap, since we use them that + * So all the makeXXPixmap are now returning TQCanvasPixmap* + * instead of TQCanvasPixmap, but we need an easy way to + * convert them to TQPixmap, since we use them that * way quite often (to generate toolbar button icons for instance). */ - static QPixmap toQPixmap(QCanvasPixmap*); + static TQPixmap toQPixmap(TQCanvasPixmap*); static void dumpStats(std::ostream &); @@ -221,18 +221,18 @@ protected: void initMaybe() { if (!m_font) init("", -1); } void drawNoteAux(const NotePixmapParameters ¶meters, - QPainter *painter, int x, int y); - void drawRestAux(const NotePixmapParameters ¶meters, QPoint &hotspot, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); + void drawRestAux(const NotePixmapParameters ¶meters, TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawSlurAux(int length, int dy, bool above, bool smooth, bool tie, bool phrasing, - QPoint &hotspot, - QPainter *painter, int x, int y); + TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawTextAux(const Text &text, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); int getStemLength(const NotePixmapParameters &) const; @@ -247,18 +247,18 @@ protected: void makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &startPoint, QPoint &endPoint); + TQPoint &startPoint, TQPoint &endPoint); void drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint); + const TQPoint &startPoint, const TQPoint &endPoint); void drawStem(const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint, + const TQPoint &startPoint, const TQPoint &endPoint, int shortening); void makeRoomForBeams(const NotePixmapParameters ¶ms); - void drawBeams(const QPoint &, const NotePixmapParameters ¶ms, + void drawBeams(const TQPoint &, const NotePixmapParameters ¶ms, int beamCount); - void drawSlashes(const QPoint &, const NotePixmapParameters ¶ms, + void drawSlashes(const TQPoint &, const NotePixmapParameters ¶ms, int slashCount); void makeRoomForTuplingLine(const NotePixmapParameters ¶ms); @@ -270,15 +270,15 @@ protected: void drawBracket(int length, bool left, bool curly, int x, int y); - QFont getTextFont(const Text &text) const; + TQFont getTextFont(const Text &text) const; - QCanvasPixmap* makeAnnotationPixmap(const Text &text); - QCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); void createPixmapAndMask(int width, int height, int maskWidth = -1, int maskHeight = -1); - QCanvasPixmap* makeCanvasPixmap(QPoint hotspot, bool generateMask = false); + TQCanvasPixmap* makeCanvasPixmap(TQPoint hotspot, bool generateMask = false); enum ColourType { PlainColour, @@ -307,35 +307,35 @@ protected: int m_left, m_right, m_above, m_below; int m_borderX, m_borderY; - QFont m_tupletCountFont; - QFontMetrics m_tupletCountFontMetrics; + TQFont m_tupletCountFont; + TQFontMetrics m_tupletCountFontMetrics; - QFont m_textMarkFont; - QFontMetrics m_textMarkFontMetrics; + TQFont m_textMarkFont; + TQFontMetrics m_textMarkFontMetrics; - QFont m_fingeringFont; - QFontMetrics m_fingeringFontMetrics; + TQFont m_fingeringFont; + TQFontMetrics m_fingeringFontMetrics; - QFont m_timeSigFont; - QFontMetrics m_timeSigFontMetrics; + TQFont m_timeSigFont; + TQFontMetrics m_timeSigFontMetrics; - QFont m_bigTimeSigFont; - QFontMetrics m_bigTimeSigFontMetrics; + TQFont m_bigTimeSigFont; + TQFontMetrics m_bigTimeSigFontMetrics; - QFont m_ottavaFont; - QFontMetrics m_ottavaFontMetrics; + TQFont m_ottavaFont; + TQFontMetrics m_ottavaFontMetrics; - QFont m_clefOttavaFont; - QFontMetrics m_clefOttavaFontMetrics; + TQFont m_clefOttavaFont; + TQFontMetrics m_clefOttavaFontMetrics; - QFont m_trackHeaderFont; - QFontMetrics m_trackHeaderFontMetrics; + TQFont m_trackHeaderFont; + TQFontMetrics m_trackHeaderFontMetrics; - QFont m_trackHeaderBoldFont; - QFontMetrics m_trackHeaderBoldFontMetrics; + TQFont m_trackHeaderBoldFont; + TQFontMetrics m_trackHeaderBoldFontMetrics; - QPixmap *m_generatedPixmap; - QBitmap *m_generatedMask; + TQPixmap *m_generatedPixmap; + TQBitmap *m_generatedMask; int m_generatedWidth; int m_generatedHeight; @@ -345,10 +345,10 @@ protected: mutable NotePixmapCache *m_dottedRestCache; - typedef std::map<const char *, QFont> TextFontCache; + typedef std::map<const char *, TQFont> TextFontCache; mutable TextFontCache m_textFontCache; - static QPoint m_pointZero; + static TQPoint m_pointZero; }; diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ed9d541..ff8edae 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -26,7 +26,7 @@ #ifndef _RG_NOTEPIXMAPPAINTER_H_ #define _RG_NOTEPIXMAPPAINTER_H_ -#include <qpainter.h> +#include <tqpainter.h> namespace Rosegarden { @@ -40,12 +40,12 @@ public: NotePixmapPainter() : m_painter(&m_myPainter) { } - void beginExternal(QPainter *painter) { + void beginExternal(TQPainter *painter) { m_externalPainter = painter; m_useMask = false; - painter->setPen(QPen(Qt::black, 1, Qt::SolidLine, + painter->setPen(TQPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); if (m_externalPainter) { @@ -55,7 +55,7 @@ public: } } - bool begin(QPaintDevice *device, QPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { m_externalPainter = 0; @@ -75,11 +75,11 @@ public: return m_painter->end(); } - QPainter &painter() { + TQPainter &painter() { return *m_painter; } - QPainter &maskPainter() { + TQPainter &maskPainter() { return m_maskPainter; } @@ -103,24 +103,24 @@ public: if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); } - void drawPolygon(const QPointArray &a, bool winding = false, + void drawPolygon(const TQPointArray &a, bool winding = false, int index = 0, int n = -1) { m_painter->drawPolygon(a, winding, index, n); if (m_useMask) m_maskPainter.drawPolygon(a, winding, index, n); } - void drawPolyline(const QPointArray &a, int index = 0, int n = -1) { + void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) { m_painter->drawPolyline(a, index, n); if (m_useMask) m_maskPainter.drawPolyline(a, index, n); } - void drawPixmap(int x, int y, const QPixmap &pm, + void drawPixmap(int x, int y, const TQPixmap &pm, int sx = 0, int sy = 0, int sw = -1, int sh = -1) { m_painter->drawPixmap(x, y, pm, sx, sy, sw, sh); if (m_useMask) m_maskPainter.drawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh); } - void drawText(int x, int y, const QString &string) { + void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); if (m_useMask) m_maskPainter.drawText(x, y, string); } @@ -137,10 +137,10 @@ public: private: bool m_useMask; - QPainter m_myPainter; - QPainter m_maskPainter; - QPainter *m_externalPainter; - QPainter *m_painter; + TQPainter m_myPainter; + TQPainter m_maskPainter; + TQPainter *m_externalPainter; + TQPainter *m_painter; }; } diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp index d4a8be8..f585117 100644 --- a/src/gui/editors/notation/NoteStyleFactory.cpp +++ b/src/gui/editors/notation/NoteStyleFactory.cpp @@ -33,10 +33,10 @@ #include "NoteStyle.h" #include "NoteStyleFileReader.h" #include <kglobal.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -49,21 +49,21 @@ NoteStyleFactory::getAvailableStyleNames() { std::vector<NoteStyleName> names; - QString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); - QDir dir(styleDir); + TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); + TQDir dir(styleDir); if (!dir.exists()) { std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir << "\" not found" << std::endl; return names; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); bool foundDefault = false; - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4) == ".xml") { - QFileInfo fileInfo(QString("%1/%2").arg(styleDir).arg(*i)); + TQFileInfo fileInfo(TQString("%1/%2").arg(styleDir).arg(*i)); if (fileInfo.exists() && fileInfo.isReadable()) { std::string styleName = qstrtostr((*i).left((*i).length() - 4)); if (styleName == DefaultStyle) diff --git a/src/gui/editors/notation/NoteStyleFileReader.cpp b/src/gui/editors/notation/NoteStyleFileReader.cpp index b3f3464..41da5ed 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -26,8 +26,8 @@ #include <string> #include "NoteStyle.h" -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kglobal.h> #include <kstddirs.h> @@ -44,23 +44,23 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : m_style(new NoteStyle(name)), m_haveNote(false) { - QString styleDirectory = + TQString styleDirectory = KGlobal::dirs()->findResource("appdata", "styles/"); - QString styleFileName = - QString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString styleFileName = + TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); - QFileInfo fileInfo(styleFileName); + TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); } - QFile styleFile(styleFileName); + TQFile styleFile(styleFileName); - QXmlInputSource source(styleFile); - QXmlSimpleReader reader; + TQXmlInputSource source(styleFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -72,22 +72,22 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : } bool -NoteStyleFileReader::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteStyleFileReader::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "rosegarden-note-style") { - QString s = attributes.value("base-style"); + TQString s = attributes.value("base-style"); if (s) m_style->setBaseStyle(qstrtostr(s)); } else if (lcName == "note") { m_haveNote = true; - QString s = attributes.value("type"); + TQString s = attributes.value("type"); if (!s) { m_errorString = i18n("type is a required attribute of note"); return false; @@ -120,9 +120,9 @@ NoteStyleFileReader::startElement(const QString &, const QString &, bool NoteStyleFileReader::setFromAttributes(Note::Type type, - const QXmlAttributes &attributes) + const TQXmlAttributes &attributes) { - QString s; + TQString s; bool haveShape = false; s = attributes.value("shape"); diff --git a/src/gui/editors/notation/NoteStyleFileReader.h b/src/gui/editors/notation/NoteStyleFileReader.h index d3dfbbe..8584ce8 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.h +++ b/src/gui/editors/notation/NoteStyleFileReader.h @@ -25,7 +25,7 @@ #ifndef _RG_NOTESTYLEFILEREADER_H_ #define _RG_NOTESTYLEFILEREADER_H_ -#include <qxml.h> +#include <tqxml.h> #include "NoteStyle.h" @@ -43,13 +43,13 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); private: - bool setFromAttributes(Note::Type type, const QXmlAttributes &attributes); + bool setFromAttributes(Note::Type type, const TQXmlAttributes &attributes); - QString m_errorString; + TQString m_errorString; NoteStyle *m_style; bool m_haveNote; }; diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp index 399cf2d..e9b6bdb 100644 --- a/src/gui/editors/notation/RestInserter.cpp +++ b/src/gui/editors/notation/RestInserter.cpp @@ -41,9 +41,9 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kcommand.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -54,30 +54,30 @@ using namespace BaseProperties; RestInserter::RestInserter(NotationView* view) : NoteInserter("RestInserter", view) { - QIconSet icon; + TQIconSet icon; icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-rest-crotchet"))); new KToggleAction(i18n("Dotted rest"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("restinserter.rc"); @@ -126,8 +126,8 @@ void RestInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -139,12 +139,12 @@ void RestInserter::slotToggleDot() void RestInserter::slotNotesSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp(" "), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp(" "), "_"); m_parentView->actionCollection()->action(actionName)->activate(); } -const QString RestInserter::ToolName = "restinserter"; +const TQString RestInserter::ToolName = "restinserter"; } #include "RestInserter.moc" diff --git a/src/gui/editors/notation/RestInserter.h b/src/gui/editors/notation/RestInserter.h index 90239fb..94834d2 100644 --- a/src/gui/editors/notation/RestInserter.h +++ b/src/gui/editors/notation/RestInserter.h @@ -27,7 +27,7 @@ #define _RG_RESTINSERTER_H_ #include "NoteInserter.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -53,7 +53,7 @@ class RestInserter : public NoteInserter public: - static const QString ToolName; + static const TQString ToolName; protected: RestInserter(NotationView*); diff --git a/src/gui/editors/notation/SystemFont.cpp b/src/gui/editors/notation/SystemFont.cpp index 71f0ce7..62b4280 100644 --- a/src/gui/editors/notation/SystemFont.cpp +++ b/src/gui/editors/notation/SystemFont.cpp @@ -22,6 +22,7 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> #include "SystemFont.h" #include "SystemFontQt.h" @@ -31,10 +32,10 @@ #include <kstddirs.h> #include "NoteFontMap.h" -#include <qfont.h> -#include <qfontinfo.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqfont.h> +#include <tqfontinfo.h> +#include <tqpixmap.h> +#include <tqstring.h> namespace Rosegarden @@ -43,13 +44,13 @@ namespace Rosegarden SystemFont * SystemFont::loadSystemFont(const SystemFontSpec &spec) { - QString name = spec.first; + TQString name = spec.first; int size = spec.second; NOTATION_DEBUG << "SystemFont::loadSystemFont: name is " << name << ", size " << size << endl; if (name == "DEFAULT") { - QFont font; + TQFont font; font.setPixelSize(size); return new SystemFontQt(font); } @@ -61,7 +62,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) FcChar8 *matchFamily; XftFont *xfont = 0; - Display *dpy = QPaintDevice::x11AppDisplay(); + Display *dpy = TQPaintDevice::x11AppDisplay(); static bool haveFcDirectory = false; if (!dpy) { @@ -70,7 +71,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) } if (!haveFcDirectory) { - QString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); + TQString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); if (!FcConfigAppFontAddDir(FcConfigGetCurrent(), (const FcChar8 *)fontDir.latin1())) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Failed to add font directory " << fontDir << " to fontconfig, continuing without it" << endl; @@ -90,7 +91,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!match || result != FcResultMatch) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: No match for font " << name << " (result is " << result - << "), falling back on QFont" << endl; + << "), falling back on TQFont" << endl; if (match) FcPatternDestroy(match); goto qfont; @@ -100,8 +101,8 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: match family is " << (char *)matchFamily << endl; - if (QString((char *)matchFamily).lower() != name.lower()) { - NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on QFont" << endl; + if (TQString((char *)matchFamily).lower() != name.lower()) { + NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on TQFont" << endl; FcPatternDestroy(match); goto qfont; } @@ -110,7 +111,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!xfont) { FcPatternDestroy(match); NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Unable to load font " - << name << " via Xft, falling back on QFont" << endl; + << name << " via Xft, falling back on TQFont" << endl; goto qfont; } @@ -124,10 +125,10 @@ qfont: #endif - QFont qfont(name, size, QFont::Normal); + TQFont qfont(name, size, TQFont::Normal); qfont.setPixelSize(size); - QFontInfo info(qfont); + TQFontInfo info(qfont); NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: have family " << info.family() << " (exactMatch " << info.exactMatch() << ")" << endl; @@ -135,7 +136,7 @@ qfont: // The Qt documentation says: // - // bool QFontInfo::exactMatch() const + // bool TQFontInfo::exactMatch() const // Returns TRUE if the matched window system font is exactly the // same as the one specified by the font; otherwise returns FALSE. // @@ -146,7 +147,7 @@ qfont: // "Fughetta [macromedia]", and exactMatch returns false. Just as // useless, but in a different way. - QString family = info.family().lower(); + TQString family = info.family().lower(); if (family == name.lower()) return new SystemFontQt(qfont); diff --git a/src/gui/editors/notation/SystemFont.h b/src/gui/editors/notation/SystemFont.h index 0acc2dd..a7ae521 100644 --- a/src/gui/editors/notation/SystemFont.h +++ b/src/gui/editors/notation/SystemFont.h @@ -26,7 +26,7 @@ #ifndef _RG_SYSTEMFONT_H_ #define _RG_SYSTEMFONT_H_ -#include <qpixmap.h> +#include <tqpixmap.h> #include "gui/editors/notation/NoteCharacterNames.h" @@ -36,7 +36,7 @@ class SystemFontSpec; namespace Rosegarden { -typedef std::pair<QString, int> SystemFontSpec; +typedef std::pair<TQString, int> SystemFontSpec; class SystemFont @@ -46,7 +46,7 @@ public: PreferGlyphs, PreferCodes, OnlyGlyphs, OnlyCodes }; - virtual QPixmap renderChar(CharName charName, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) = 0; diff --git a/src/gui/editors/notation/SystemFontQt.cpp b/src/gui/editors/notation/SystemFontQt.cpp index f9c99b1..ad969e8 100644 --- a/src/gui/editors/notation/SystemFontQt.cpp +++ b/src/gui/editors/notation/SystemFontQt.cpp @@ -27,10 +27,10 @@ #include "misc/Debug.h" #include "gui/general/PixmapFunctions.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> namespace Rosegarden { @@ -42,29 +42,29 @@ SystemFontQt::renderChar(CharName charName, int glyph, int code, if (strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by Qt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0) { NOTATION_DEBUG << "SystemFontQt::renderChar: Can't render using Qt with only glyph value (" << glyph << ") for character " << charName.getName() << ", need a code point" << endl; - return QPixmap(); + return TQPixmap(); } - QFontMetrics metrics(m_font); - QChar qc(code); + TQFontMetrics metrics(m_font); + TQChar qc(code); - QPixmap map; - map = QPixmap(metrics.width(qc), metrics.height()); + TQPixmap map; + map = TQPixmap(metrics.width(qc), metrics.height()); map.fill(); - QPainter painter; + TQPainter painter; painter.begin(&map); painter.setFont(m_font); painter.setPen(Qt::black); NOTATION_DEBUG << "NoteFont: Drawing character code " << code << " for " << charName.getName() - << " using QFont" << endl; + << " using TQFont" << endl; painter.drawText(0, metrics.ascent(), qc); diff --git a/src/gui/editors/notation/SystemFontQt.h b/src/gui/editors/notation/SystemFontQt.h index ea8f5f2..a3698f9 100644 --- a/src/gui/editors/notation/SystemFontQt.h +++ b/src/gui/editors/notation/SystemFontQt.h @@ -22,26 +22,26 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SYSTEMFONTQT_H_ -#define _RG_SYSTEMFONTQT_H_ +#ifndef _RG_SYSTEMFONQT_H_ +#define _RG_SYSTEMFONQT_H_ #include "SystemFont.h" -#include <qfont.h> +#include <tqfont.h> namespace Rosegarden { class SystemFontQt : public SystemFont { public: - SystemFontQt(QFont &font) : m_font(font) { } + SystemFontQt(TQFont &font) : m_font(font) { } virtual ~SystemFontQt() { } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: - QFont m_font; + TQFont m_font; }; } diff --git a/src/gui/editors/notation/SystemFontXft.cpp b/src/gui/editors/notation/SystemFontXft.cpp index ce42f61..6388167 100644 --- a/src/gui/editors/notation/SystemFontXft.cpp +++ b/src/gui/editors/notation/SystemFontXft.cpp @@ -22,6 +22,8 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> + #include "SystemFontXft.h" #ifdef HAVE_XFT @@ -71,17 +73,17 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, if (glyph < 0 && code < 0) { NOTATION_DEBUG << "SystemFontXft::renderChar: Have neither glyph nor code point for character " << charName.getName() << ", can't render" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0 && strategy == OnlyCodes) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyCodes but no code point provided for character " << charName.getName() << " (glyph is " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (glyph < 0 && strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyGlyphs but no glyph index provided for character " << charName.getName() << " (code is " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } XGlyphInfo extents; @@ -100,7 +102,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } } else { FcChar32 char32(code); @@ -109,11 +111,11 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (code " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } } - QPixmap map(extents.width, extents.height); + TQPixmap map(extents.width, extents.height); map.fill(); Drawable drawable = (Drawable)map.handle(); @@ -127,7 +129,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, (Visual *)map.x11Visual(), map.x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; diff --git a/src/gui/editors/notation/SystemFontXft.h b/src/gui/editors/notation/SystemFontXft.h index b1487c4..c522086 100644 --- a/src/gui/editors/notation/SystemFontXft.h +++ b/src/gui/editors/notation/SystemFontXft.h @@ -43,7 +43,7 @@ public: SystemFontXft(Display *dpy, XftFont *font) : m_dpy(dpy), m_font(font) { } virtual ~SystemFontXft() { if (m_font) XftFontClose(m_dpy, m_font); } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: diff --git a/src/gui/editors/notation/TextInserter.cpp b/src/gui/editors/notation/TextInserter.cpp index aa8e1ff..f862b88 100644 --- a/src/gui/editors/notation/TextInserter.cpp +++ b/src/gui/editors/notation/TextInserter.cpp @@ -40,9 +40,9 @@ #include "NotePixmapFactory.h" #include "NotationElement.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,21 +52,21 @@ TextInserter::TextInserter(NotationView* view) : NotationTool("TextInserter", view), m_text("", Text::Dynamic) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("textinserter.rc"); @@ -96,7 +96,7 @@ void TextInserter::ready() void TextInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (staffNo < 0) @@ -137,7 +137,7 @@ void TextInserter::handleLeftButtonPress(timeT, TextEventDialog *dialog = new TextEventDialog (m_nParentView, m_nParentView->getNotePixmapFactory(), defaultText); - if (dialog->exec() == QDialog::Accepted) { + if (dialog->exec() == TQDialog::Accepted) { m_text = dialog->getText(); @@ -163,7 +163,7 @@ void TextInserter::handleLeftButtonPress(timeT, delete dialog; } -const QString TextInserter::ToolName = "textinserter"; +const TQString TextInserter::ToolName = "textinserter"; } #include "TextInserter.moc" diff --git a/src/gui/editors/notation/TextInserter.h b/src/gui/editors/notation/TextInserter.h index 3b4821b..f71ddc7 100644 --- a/src/gui/editors/notation/TextInserter.h +++ b/src/gui/editors/notation/TextInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/TrackHeader.cpp b/src/gui/editors/notation/TrackHeader.cpp index 32fab2f..f2793ab 100644 --- a/src/gui/editors/notation/TrackHeader.cpp +++ b/src/gui/editors/notation/TrackHeader.cpp @@ -50,15 +50,15 @@ #include <kapplication.h> #include <klocale.h> -#include <qsize.h> -#include <qwidget.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqtooltip.h> namespace Rosegarden @@ -75,22 +75,22 @@ const int TrackHeader::INCONSISTENT_TRANSPOSITIONS = 1 << 5; const int TrackHeader::BEFORE_FIRST_SEGMENT = 1 << 6; -TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) : - QLabel(parent), +TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos) : + TQLabel(parent), m_track(trackId), m_height(height), m_ypos(ypos), m_lastClef(Clef()), m_lastKey(Rosegarden::Key()), - m_lastLabel(QString("")), + m_lastLabel(TQString("")), m_lastTranspose(0), - m_lastUpperText(QString("")), + m_lastUpperText(TQString("")), m_neverUpdated(true), m_isCurrent(true), m_lastStatusPart(0), m_lastWidth(0), m_key(Rosegarden::Key()), - m_label(QString("")), + m_label(TQString("")), m_transpose(0), m_status(0), m_current(false) @@ -98,7 +98,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) m_notationView = static_cast<HeadersGroup *>(parent)->getNotationView(); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setCurrent(false); @@ -110,15 +110,15 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); - QString toolTipText = QString(i18n("Track %1 : \"%2\"") + TQString toolTipText = TQString(i18n("Track %1 : \"%2\"") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); - QString preset = track->getPresetLabel(); - if (preset != QString("")) - toolTipText += QString(i18n("\nNotate for: %1").arg(preset)); + TQString preset = track->getPresetLabel(); + if (preset != TQString("")) + toolTipText += TQString(i18n("\nNotate for: %1").arg(preset)); - QString notationSize = i18n("normal"); + TQString notationSize = i18n("normal"); switch (track->getStaffSize()) { case StaffTypes::Small: notationSize = i18n("small"); @@ -128,7 +128,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - QString bracketText = i18n("--"); + TQString bracketText = i18n("--"); switch (track->getStaffBracket()) { case Brackets::SquareOn: bracketText = "[-"; @@ -153,7 +153,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - toolTipText += QString(i18n("\nSize: %1, Bracket: %2 ")) + toolTipText += TQString(i18n("\nSize: %1, Bracket: %2 ")) .arg(notationSize) .arg(bracketText); @@ -178,16 +178,16 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) int transpose = (*i)->getTranspose(); if (transpose) { - QString transposeName; + TQString transposeName; transposeValueToName(transpose, transposeName); - toolTipText += QString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) .arg(barStart) .arg(barEnd) .arg(transposeName) .arg(transpose) .arg(strtoqstr((*i)->getLabel())); } else { - toolTipText += QString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) .arg(barStart) .arg(barEnd) .arg(transpose) @@ -195,7 +195,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) } } - QToolTip::add(this, toolTipText); + TQToolTip::add(this, toolTipText); m_firstSeg = *segments.begin(); m_firstSegStartTime = m_firstSeg->getStartTime(); @@ -217,17 +217,17 @@ TrackHeader::setCurrent(bool current) if (current) { setLineWidth(2); setMargin(0); - setPaletteForegroundColor(QColor(0, 0, 255)); + setPaletteForegroundColor(TQColor(0, 0, 255)); } else { setLineWidth(1); setMargin(1); - setPaletteForegroundColor(QColor(0, 0, 0)); + setPaletteForegroundColor(TQColor(0, 0, 0)); } } } void -TrackHeader::transposeValueToName(int transpose, QString &transposeName) +TrackHeader::transposeValueToName(int transpose, TQString &transposeName) { /// TODO : Should be rewrited using methods from Pitch class @@ -268,7 +268,7 @@ TrackHeader::lookAtStaff(double x, int maxWidth) // inconsistency occurs. Clef clef, clef0; Rosegarden::Key key, key0, key1 = Rosegarden::Key("C major"); - QString label = QString(""), label0, label1 = QString(""); + TQString label = TQString(""), label0, label1 = TQString(""); int transpose = 0, transpose0, transpose1 = 0; int staff; @@ -346,14 +346,14 @@ TrackHeader::lookAtStaff(double x, int maxWidth) m_current = current; m_status = status; - QString noteName; + TQString noteName; transposeValueToName(m_transpose, noteName); - m_upperText = QString(i18n("%1: %2") + m_upperText = TQString(i18n("%1: %2") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); if (m_transpose) m_transposeText = i18n(" in %1").arg(noteName); - else m_transposeText = QString(""); + else m_transposeText = TQString(""); NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); int clefAndKeyWidth = npf->getClefAndKeyWidth(m_key, m_clef); @@ -411,7 +411,7 @@ TrackHeader::updateHeader(int width) m_lastUpperText = m_upperText; bool drawClef = true; - QColor clefColour; + TQColor clefColour; if (m_status & (SEGMENT_HERE | BEFORE_FIRST_SEGMENT)) { if (m_status & (INCONSISTENT_CLEFS | INCONSISTENT_KEYS)) clefColour = Qt::red; @@ -422,7 +422,7 @@ TrackHeader::updateHeader(int width) } NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); - QPixmap pmap = NotePixmapFactory::toQPixmap( + TQPixmap pmap = NotePixmapFactory::toQPixmap( npf->makeTrackHeaderPixmap(width, m_height, this)); setPixmap(pmap); diff --git a/src/gui/editors/notation/TrackHeader.h b/src/gui/editors/notation/TrackHeader.h index 0104430..1cb4f1e 100644 --- a/src/gui/editors/notation/TrackHeader.h +++ b/src/gui/editors/notation/TrackHeader.h @@ -33,13 +33,13 @@ #include "base/NotationTypes.h" #include "base/Track.h" -#include <qsize.h> -#include <qwidget.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqlabel.h> #include <set> -class QLabel; +class TQLabel; namespace Rosegarden @@ -59,7 +59,7 @@ public: * *parent is the parent widget, height the height of staff and * ypos is the staff y position on canvas. */ - TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos); + TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos); /** * Draw a blue line around header when current is true @@ -119,18 +119,18 @@ public: /** * Return the text to write in the header top */ - QString getUpperText() { return m_upperText; } + TQString getUpperText() { return m_upperText; } /** * Return the transposition text * (to be written at the end of the upper text) */ - QString getTransposeText() { return m_transposeText; } + TQString getTransposeText() { return m_transposeText; } /** * Return the text to write in the header bottom */ - QString getLowerText() { return m_label; } + TQString getLowerText() { return m_label; } /** * Return true if two segments or more are superimposed and are @@ -165,7 +165,7 @@ private : * Convert the transpose value to the instrument tune and * return it in a printable string. */ - void transposeValueToName(int transpose, QString &transposeName); + void transposeValueToName(int transpose, TQString &transposeName); // Status bits @@ -184,9 +184,9 @@ private : Clef m_lastClef; Rosegarden::Key m_lastKey; - QString m_lastLabel; + TQString m_lastLabel; int m_lastTranspose; - QString m_lastUpperText; + TQString m_lastUpperText; bool m_neverUpdated; bool m_isCurrent; int m_lastStatusPart; @@ -194,13 +194,13 @@ private : Clef m_clef; Rosegarden::Key m_key; - QString m_label; + TQString m_label; int m_transpose; int m_status; bool m_current; - QString m_upperText; - QString m_transposeText; + TQString m_upperText; + TQString m_transposeText; int m_numberOfTextLines; // Used to sort the segments listed in the header toolTipText diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp index 44a202b..bfa61a8 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp @@ -24,7 +24,7 @@ #include "AudioInstrumentParameterPanel.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -45,16 +45,16 @@ #include "InstrumentParameterPanel.h" #include "sound/MappedCommon.h" #include "sound/MappedStudio.h" -#include <qcolor.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpalette.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qsignalmapper.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpalette.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqsignalmapper.h> namespace Rosegarden @@ -115,11 +115,11 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, << ", index = " << index << ", plugin = " << plugin << endl; - QColor pluginBackgroundColour = Qt::black; + TQColor pluginBackgroundColour = Qt::black; bool bypassed = false; - QPushButton *button = 0; - QString noneText; + TQPushButton *button = 0; + TQString noneText; // updates synth gui button &c: m_audioFader->slotSetInstrument(&m_doc->getStudio(), m_selectedInstrument); @@ -138,7 +138,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, if (plugin == -1) { button->setText(noneText); - QToolTip::add + TQToolTip::add (button, noneText); } else { @@ -148,7 +148,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, if (pluginClass) { button->setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (button, pluginClass->getLabel()); pluginBackgroundColour = pluginClass->getColour(); @@ -179,7 +179,7 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, AudioPluginInstance *inst = m_selectedInstrument->getPlugin(pluginIndex); - QColor backgroundColour = Qt::black; // default background colour + TQColor backgroundColour = Qt::black; // default background colour if (inst && inst->isAssigned()) { AudioPlugin *pluginClass @@ -198,14 +198,14 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, void AudioInstrumentParameterPanel::setButtonColour( - int pluginIndex, bool bypassState, const QColor &colour) + int pluginIndex, bool bypassState, const TQColor &colour) { RG_DEBUG << "AudioInstrumentParameterPanel::setButtonColour " << "pluginIndex = " << pluginIndex << ", bypassState = " << bypassState << ", rgb = " << colour.name() << endl; - QPushButton *button = 0; + TQPushButton *button = 0; if (pluginIndex == Instrument::SYNTH_PLUGIN_POSITION) { button = m_audioFader->m_synthButton; @@ -220,19 +220,19 @@ AudioInstrumentParameterPanel::setButtonColour( if (bypassState) { button-> setPaletteForegroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); button-> setPaletteBackgroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); } else if (colour == Qt::black) { button-> setPaletteForegroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); button-> setPaletteBackgroundColor(kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); } else { button-> setPaletteForegroundColor(Qt::white); @@ -242,11 +242,11 @@ AudioInstrumentParameterPanel::setButtonColour( } } -AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, QWidget* parent) +AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent) : InstrumentParameterPanel(doc, parent), m_audioFader(new AudioFaderBox(this)) { - QGridLayout *gridLayout = new QGridLayout(this, 3, 2, 5, 5); + TQGridLayout *gridLayout = new TQGridLayout(this, 3, 2, 5, 5); // Instrument label : first row, all cols gridLayout->addMultiCellWidget(m_instrumentLabel, 0, 0, 0, 1, AlignCenter); @@ -256,32 +256,32 @@ AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* d gridLayout->setRowStretch(2, 1); - connect(m_audioFader, SIGNAL(audioChannelsChanged(int)), - this, SLOT(slotAudioChannels(int))); + connect(m_audioFader, TQT_SIGNAL(audioChannelsChanged(int)), + this, TQT_SLOT(slotAudioChannels(int))); - connect(m_audioFader->m_signalMapper, SIGNAL(mapped(int)), - this, SLOT(slotSelectPlugin(int))); + connect(m_audioFader->m_signalMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotSelectPlugin(int))); - connect(m_audioFader->m_fader, SIGNAL(faderChanged(float)), - this, SLOT(slotSelectAudioLevel(float))); + connect(m_audioFader->m_fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotSelectAudioLevel(float))); - connect(m_audioFader->m_recordFader, SIGNAL(faderChanged(float)), - this, SLOT(slotSelectAudioRecordLevel(float))); + connect(m_audioFader->m_recordFader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotSelectAudioRecordLevel(float))); - connect(m_audioFader->m_pan, SIGNAL(valueChanged(float)), - this, SLOT(slotSetPan(float))); + connect(m_audioFader->m_pan, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotSetPan(float))); - connect(m_audioFader->m_audioOutput, SIGNAL(changed()), - this, SLOT(slotAudioRoutingChanged())); + connect(m_audioFader->m_audioOutput, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotAudioRoutingChanged())); - connect(m_audioFader->m_audioInput, SIGNAL(changed()), - this, SLOT(slotAudioRoutingChanged())); + connect(m_audioFader->m_audioInput, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotAudioRoutingChanged())); - connect(m_audioFader->m_synthButton, SIGNAL(clicked()), - this, SLOT(slotSynthButtonClicked())); + connect(m_audioFader->m_synthButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSynthButtonClicked())); - connect(m_audioFader->m_synthGUIButton, SIGNAL(clicked()), - this, SLOT(slotSynthGUIButtonClicked())); + connect(m_audioFader->m_synthGUIButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSynthGUIButtonClicked())); } void @@ -348,8 +348,8 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) for (int i = start; i < int(m_audioFader->m_plugins.size()); i++) { int index; - QPushButton *button; - QString noneText; + TQPushButton *button; + TQString noneText; if (i == -1) { index = Instrument::SYNTH_PLUGIN_POSITION; @@ -373,14 +373,14 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) if (pluginClass) { button->setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (button, pluginClass->getLabel()); setButtonColour(index, inst->isBypassed(), pluginClass->getColour()); } } else { button->setText(noneText); - QToolTip::add + TQToolTip::add (button, noneText); setButtonColour(index, inst ? inst->isBypassed() : false, Qt::black); } diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h index 932e6bc..87da334 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h @@ -28,12 +28,12 @@ #include "base/MidiProgram.h" #include "InstrumentParameterPanel.h" -#include <qpixmap.h> -#include <qstring.h> +#include <tqpixmap.h> +#include <tqstring.h> -class QWidget; -class QColor; +class TQWidget; +class TQColor; namespace Rosegarden @@ -48,7 +48,7 @@ class AudioInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT public: - AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, QWidget* parent); + AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent); virtual void setupForInstrument(Instrument*); @@ -61,7 +61,7 @@ public: // Set the button colour // void setButtonColour(int pluginIndex, bool bypassState, - const QColor &color); + const TQColor &color); public slots: // From AudioFaderBox @@ -84,10 +84,10 @@ public slots: void slotSynthGUIButtonClicked(); signals: - void selectPlugin(QWidget *, InstrumentId, int index); + void selectPlugin(TQWidget *, InstrumentId, int index); void instrumentParametersChanged(InstrumentId); void showPluginGUI(InstrumentId, int index); - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); protected: //--------------- Data members --------------------------------- @@ -96,8 +96,8 @@ protected: private: - QPixmap m_monoPixmap; - QPixmap m_stereoPixmap; + TQPixmap m_monoPixmap; + TQPixmap m_stereoPixmap; }; diff --git a/src/gui/editors/parameters/InstrumentParameterBox.cpp b/src/gui/editors/parameters/InstrumentParameterBox.cpp index 8114e0d..1d5b99d 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.cpp +++ b/src/gui/editors/parameters/InstrumentParameterBox.cpp @@ -24,7 +24,7 @@ #include "InstrumentParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -36,25 +36,25 @@ #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Instrument"), i18n("Instrument Parameters"), parent), - m_widgetStack(new QWidgetStack(this)), - m_noInstrumentParameters(new QVBox(this)), + m_widgetStack(new TQWidgetStack(this)), + m_noInstrumentParameters(new TQVBox(this)), m_midiInstrumentParameters(new MIDIInstrumentParameterPanel(doc, this)), m_audioInstrumentParameters(new AudioInstrumentParameterPanel(doc, this)), m_selectedInstrument(-1), @@ -86,43 +86,43 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, m_audioInstrumentParameters->adjustSize(); m_noInstrumentParameters->adjustSize(); - connect(m_audioInstrumentParameters, SIGNAL(updateAllBoxes()), - this, SLOT(slotUpdateAllBoxes())); + connect(m_audioInstrumentParameters, TQT_SIGNAL(updateAllBoxes()), + this, TQT_SLOT(slotUpdateAllBoxes())); connect(m_audioInstrumentParameters, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(m_audioInstrumentParameters, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), this, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int))); + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int))); connect(m_audioInstrumentParameters, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), this, - SIGNAL(showPluginGUI(InstrumentId, int))); + TQT_SIGNAL(showPluginGUI(InstrumentId, int))); - connect(m_midiInstrumentParameters, SIGNAL(updateAllBoxes()), - this, SLOT(slotUpdateAllBoxes())); + connect(m_midiInstrumentParameters, TQT_SIGNAL(updateAllBoxes()), + this, TQT_SLOT(slotUpdateAllBoxes())); connect(m_midiInstrumentParameters, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), - this, SIGNAL(changeInstrumentLabel(InstrumentId, QString))); + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), + this, TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString))); connect(m_audioInstrumentParameters, - SIGNAL(changeInstrumentLabel(InstrumentId, QString)), - this, SIGNAL(changeInstrumentLabel(InstrumentId, QString))); + TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString)), + this, TQT_SIGNAL(changeInstrumentLabel(InstrumentId, TQString))); connect(m_midiInstrumentParameters, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), this, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); // Layout the groups left to right. - QBoxLayout* layout = new QVBoxLayout(this); + TQBoxLayout* layout = new TQVBoxLayout(this); layout->addWidget(m_widgetStack); } diff --git a/src/gui/editors/parameters/InstrumentParameterBox.h b/src/gui/editors/parameters/InstrumentParameterBox.h index f406567..cc36351 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.h +++ b/src/gui/editors/parameters/InstrumentParameterBox.h @@ -29,13 +29,13 @@ #include "base/MidiProgram.h" #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> +#include <tqstring.h> #include <vector> -class QWidgetStack; -class QWidget; -class QFrame; +class TQWidgetStack; +class TQWidget; +class TQFrame; namespace Rosegarden @@ -56,7 +56,7 @@ Q_OBJECT public: InstrumentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent = 0); + TQWidget *parent = 0); ~InstrumentParameterBox(); void useInstrument(Instrument *instrument); @@ -70,7 +70,7 @@ public: virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: @@ -91,9 +91,9 @@ public slots: signals: - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); - void selectPlugin(QWidget*, InstrumentId id, int index); + void selectPlugin(TQWidget*, InstrumentId id, int index); void showPluginGUI(InstrumentId id, int index); void instrumentParametersChanged(InstrumentId); @@ -102,8 +102,8 @@ signals: protected: //--------------- Data members --------------------------------- - QWidgetStack *m_widgetStack; - QFrame *m_noInstrumentParameters; + TQWidgetStack *m_widgetStack; + TQFrame *m_noInstrumentParameters; MIDIInstrumentParameterPanel *m_midiInstrumentParameters; AudioInstrumentParameterPanel *m_audioInstrumentParameters; diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.cpp b/src/gui/editors/parameters/InstrumentParameterPanel.cpp index 9437daf..a47a8a8 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/InstrumentParameterPanel.cpp @@ -28,23 +28,23 @@ #include "base/Instrument.h" #include "document/RosegardenGUIDoc.h" #include <ksqueezedtextlabel.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qwidget.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqwidget.h> namespace Rosegarden { InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, - QWidget* parent) - : QFrame(parent), + TQWidget* parent) + : TQFrame(parent), m_instrumentLabel(new KSqueezedTextLabel(this)), m_selectedInstrument(0), m_doc(doc) { - QFontMetrics metrics(m_instrumentLabel->fontMetrics()); + TQFontMetrics metrics(m_instrumentLabel->fontMetrics()); int width25 = metrics.width("1234567890123456789012345"); m_instrumentLabel->setFixedWidth(width25); diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.h b/src/gui/editors/parameters/InstrumentParameterPanel.h index 9a794d0..717ffd2 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.h +++ b/src/gui/editors/parameters/InstrumentParameterPanel.h @@ -26,12 +26,12 @@ #ifndef _RG_INSTRUMENTPARAMETERPANEL_H_ #define _RG_INSTRUMENTPARAMETERPANEL_H_ -#include <qframe.h> +#include <tqframe.h> #include <vector> #include <utility> -class QWidget; -class QLabel; +class TQWidget; +class TQLabel; namespace Rosegarden @@ -41,7 +41,7 @@ class RosegardenGUIDoc; class Instrument; class Rotary; -typedef std::pair<Rotary *, QLabel *> RotaryPair; +typedef std::pair<Rotary *, TQLabel *> RotaryPair; typedef std::vector<std::pair<int, RotaryPair> > RotaryMap; @@ -51,7 +51,7 @@ class InstrumentParameterPanel : public QFrame { Q_OBJECT public: - InstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent); + InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); virtual ~InstrumentParameterPanel() {}; @@ -66,7 +66,7 @@ signals: protected: //--------------- Data members --------------------------------- - QLabel *m_instrumentLabel; + TQLabel *m_instrumentLabel; Instrument *m_selectedInstrument; RosegardenGUIDoc *m_doc; }; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp index fcd4247..61a9256 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp @@ -24,7 +24,7 @@ #include "MIDIInstrumentParameterPanel.h" -#include <qlayout.h> +#include <tqlayout.h> #include "sound/Midi.h" #include <klocale.h> @@ -44,52 +44,52 @@ #include "sound/MappedInstrument.h" #include <kcombobox.h> #include <ksqueezedtextlabel.h> -#include <qcheckbox.h> -#include <qcolor.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qregexp.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcolor.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> namespace Rosegarden { -MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent): +MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent): InstrumentParameterPanel(doc, parent), m_rotaryFrame(0), - m_rotaryMapper(new QSignalMapper(this)) + m_rotaryMapper(new TQSignalMapper(this)) { - m_mainGrid = new QGridLayout(this, 10, 3, 2, 1); + m_mainGrid = new TQGridLayout(this, 10, 3, 2, 1); m_connectionLabel = new KSqueezedTextLabel(this); m_bankValue = new KComboBox(this); m_channelValue = new KComboBox(this); m_programValue = new KComboBox(this); m_variationValue = new KComboBox(this); - m_bankCheckBox = new QCheckBox(this); - m_programCheckBox = new QCheckBox(this); - m_variationCheckBox = new QCheckBox(this); - m_percussionCheckBox = new QCheckBox(this); + m_bankCheckBox = new TQCheckBox(this); + m_programCheckBox = new TQCheckBox(this); + m_variationCheckBox = new TQCheckBox(this); + m_percussionCheckBox = new TQCheckBox(this); m_bankValue->setSizeLimit(20); m_programValue->setSizeLimit(20); m_variationValue->setSizeLimit(20); - m_bankLabel = new QLabel(i18n("Bank"), this); - m_variationLabel = new QLabel(i18n("Variation"), this); - m_programLabel = new QLabel(i18n("Program"), this); - QLabel *channelLabel = new QLabel(i18n("Channel out"), this); - QLabel *percussionLabel = new QLabel(i18n("Percussion"), this); + m_bankLabel = new TQLabel(i18n("Bank"), this); + m_variationLabel = new TQLabel(i18n("Variation"), this); + m_programLabel = new TQLabel(i18n("Program"), this); + TQLabel *channelLabel = new TQLabel(i18n("Channel out"), this); + TQLabel *percussionLabel = new TQLabel(i18n("Percussion"), this); // Ensure a reasonable amount of space in the program dropdowns even // if no instrument initially selected - QFontMetrics metrics(m_programValue->font()); + TQFontMetrics metrics(m_programValue->font()); int width22 = metrics.width("1234567890123456789012"); int width25 = metrics.width("1234567890123456789012345"); @@ -131,7 +131,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Populate channel lists // for (int i = 0; i < 16; i++) { - m_channelValue->insertItem(QString("%1").arg(i + 1)); + m_channelValue->insertItem(TQString("%1").arg(i + 1)); } m_channelValue->setSizeLimit(16); @@ -152,32 +152,32 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Connect up the toggle boxes // - connect(m_percussionCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotTogglePercussion(bool))); + connect(m_percussionCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotTogglePercussion(bool))); - connect(m_programCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleProgramChange(bool))); + connect(m_programCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleProgramChange(bool))); - connect(m_bankCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleBank(bool))); + connect(m_bankCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleBank(bool))); - connect(m_variationCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotToggleVariation(bool))); + connect(m_variationCheckBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotToggleVariation(bool))); // Connect activations // - connect(m_bankValue, SIGNAL(activated(int)), - this, SLOT(slotSelectBank(int))); + connect(m_bankValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectBank(int))); - connect(m_variationValue, SIGNAL(activated(int)), - this, SLOT(slotSelectVariation(int))); + connect(m_variationValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectVariation(int))); - connect(m_programValue, SIGNAL(activated(int)), - this, SLOT(slotSelectProgram(int))); + connect(m_programValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectProgram(int))); - connect(m_channelValue, SIGNAL(activated(int)), - this, SLOT(slotSelectChannel(int))); + connect(m_channelValue, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSelectChannel(int))); // don't select any of the options in any dropdown m_programValue->setCurrentItem( -1); @@ -185,8 +185,8 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc m_channelValue->setCurrentItem( -1); m_variationValue->setCurrentItem( -1); - connect(m_rotaryMapper, SIGNAL(mapped(int)), - this, SLOT(slotControllerChanged(int))); + connect(m_rotaryMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotControllerChanged(int))); } void @@ -210,18 +210,18 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument) // Set Studio Device name // - QString connection(strtoqstr(md->getConnection())); + TQString connection(strtoqstr(md->getConnection())); if (connection == "") { m_connectionLabel->setText(i18n("[ %1 ]").arg(i18n("No connection"))); } else { // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(QRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); - QString text = i18n("[ %1 ]").arg(connection); - /*QString origText(text); + TQString text = i18n("[ %1 ]").arg(connection); + /*TQString origText(text); - QFontMetrics metrics(m_connectionLabel->fontMetrics()); + TQFontMetrics metrics(m_connectionLabel->fontMetrics()); int maxwidth = metrics.width ("Program: [X] Acoustic Grand Piano 123");// kind of arbitrary! @@ -292,10 +292,10 @@ void MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) { if (!m_rotaryFrame) { - m_rotaryFrame = new QFrame(this); + m_rotaryFrame = new TQFrame(this); m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, Qt::AlignHCenter); - m_rotaryGrid = new QGridLayout(m_rotaryFrame, 10, 3, 8, 1); - m_rotaryGrid->addItem(new QSpacerItem(10, 4), 0, 1); + m_rotaryGrid = new TQGridLayout(m_rotaryFrame, 10, 3, 8, 1); + m_rotaryGrid->addItem(new TQSpacerItem(10, 4), 0, 1); } // To cut down on flicker, we avoid destroying and recreating @@ -321,12 +321,12 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Get the knob colour - only if the colour is non-default (>0) // - QColor knobColour = Qt::black; // special case for Rotary + TQColor knobColour = Qt::black; // special case for Rotary if (it->getColourIndex() > 0) { Colour c = comp.getGeneralColourMap().getColourByIndex (it->getColourIndex()); - knobColour = QColor(c.getRed(), c.getGreen(), c.getBlue()); + knobColour = TQColor(c.getRed(), c.getGreen(), c.getBlue()); } Rotary *rotary = 0; @@ -367,14 +367,14 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Update the controller name that is associated with // with the existing rotary widget. - QLabel *label = rmi->second.second; + TQLabel *label = rmi->second.second; label->setText(strtoqstr(it->getName())); ++rmi; } else { - QHBox *hbox = new QHBox(m_rotaryFrame); + TQHBox *hbox = new TQHBox(m_rotaryFrame); hbox->setSpacing(8); float smallStep = 1.0; @@ -400,7 +400,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) rotary->setKnobColour(knobColour); // Add a label - QLabel *label = new KSqueezedTextLabel(strtoqstr(it->getName()), hbox); + TQLabel *label = new KSqueezedTextLabel(strtoqstr(it->getName()), hbox); RG_DEBUG << "Adding new widget at " << (count / 2) << "," << (count % 2) << endl; @@ -417,8 +417,8 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Connect // - connect(rotary, SIGNAL(valueChanged(float)), - m_rotaryMapper, SLOT(map())); + connect(rotary, TQT_SIGNAL(valueChanged(float)), + m_rotaryMapper, TQT_SLOT(map())); rmi = m_rotaries.end(); } @@ -640,7 +640,7 @@ MIDIInstrumentParameterPanel::populateProgramList() for (unsigned int i = 0; i < programs.size(); ++i) { std::string programName = programs[i].getName(); if (programName != "") { - m_programValue->insertItem(QString("%1. %2") + m_programValue->insertItem(TQString("%1. %2") .arg(programs[i].getProgram() + 1) .arg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == programs[i]) { @@ -762,7 +762,7 @@ MIDIInstrumentParameterPanel::populateVariationList() i18n("(default)") : strtoqstr(programName)); */ - m_variationValue->insertItem(QString("%1. %2") + m_variationValue->insertItem(TQString("%1. %2") .arg(variations[i] + 1) .arg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == program) { diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h index 7f1a1c5..22c0ba1 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h @@ -29,15 +29,15 @@ #include "base/MidiProgram.h" #include "base/MidiDevice.h" #include "InstrumentParameterPanel.h" -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QSignalMapper; -class QLabel; -class QGridLayout; -class QFrame; -class QCheckBox; +class TQWidget; +class TQSignalMapper; +class TQLabel; +class TQGridLayout; +class TQFrame; +class TQCheckBox; class KComboBox; @@ -54,7 +54,7 @@ class MIDIInstrumentParameterPanel : public InstrumentParameterPanel Q_OBJECT public: - MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, QWidget* parent); + MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); void setupControllers(MidiDevice *); // setup ControlParameters on box @@ -63,7 +63,7 @@ public: void showAdditionalControls(bool showThem); signals: - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); void instrumentParametersChanged(InstrumentId); public slots: @@ -102,7 +102,7 @@ protected: //--------------- Data members --------------------------------- - QLabel *m_connectionLabel; + TQLabel *m_connectionLabel; KComboBox *m_bankValue; KComboBox *m_variationValue; @@ -110,20 +110,20 @@ protected: KComboBox *m_programValue; //KComboBox *m_channelInValue; - QCheckBox *m_percussionCheckBox; - QCheckBox *m_bankCheckBox; - QCheckBox *m_variationCheckBox; - QCheckBox *m_programCheckBox; + TQCheckBox *m_percussionCheckBox; + TQCheckBox *m_bankCheckBox; + TQCheckBox *m_variationCheckBox; + TQCheckBox *m_programCheckBox; - QLabel *m_bankLabel; - QLabel *m_variationLabel; - QLabel *m_programLabel; + TQLabel *m_bankLabel; + TQLabel *m_variationLabel; + TQLabel *m_programLabel; - QGridLayout *m_mainGrid; - QFrame *m_rotaryFrame; - QGridLayout *m_rotaryGrid; + TQGridLayout *m_mainGrid; + TQFrame *m_rotaryFrame; + TQGridLayout *m_rotaryGrid; RotaryMap m_rotaries; - QSignalMapper *m_rotaryMapper; + TQSignalMapper *m_rotaryMapper; BankList m_banks; ProgramList m_programs; diff --git a/src/gui/editors/parameters/RosegardenParameterArea.cpp b/src/gui/editors/parameters/RosegardenParameterArea.cpp index 968c737..8790122 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.cpp +++ b/src/gui/editors/parameters/RosegardenParameterArea.cpp @@ -29,16 +29,16 @@ #include "RosegardenParameterBox.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qvgroupbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> #include <iostream> #include <set> @@ -46,20 +46,20 @@ namespace Rosegarden { -RosegardenParameterArea::RosegardenParameterArea(QWidget *parent, +RosegardenParameterArea::RosegardenParameterArea(TQWidget *parent, const char *name, WFlags f) - : QWidgetStack(parent, name, f), + : TQWidgetStack(parent, name, f), m_style(RosegardenParameterArea::CLASSIC_STYLE), - m_scrollView(new QScrollView(this, 0, Qt::WStaticContents)), - m_classic(new QVBox(m_scrollView->viewport())), + m_scrollView(new TQScrollView(this, 0, Qt::WStaticContents)), + m_classic(new TQVBox(m_scrollView->viewport())), m_tabBox(new KTabWidget(this)), m_active(0), m_spacing(0) { m_scrollView->addChild(m_classic); - m_scrollView->setHScrollBarMode(QScrollView::AlwaysOff); - m_scrollView->setVScrollBarMode(QScrollView::Auto); - m_scrollView->setResizePolicy(QScrollView::AutoOneFit); + m_scrollView->setHScrollBarMode(TQScrollView::AlwaysOff); + m_scrollView->setVScrollBarMode(TQScrollView::Auto); + m_scrollView->setResizePolicy(TQScrollView::AutoOneFit); // Install the classic-style VBox widget in the widget-stack. @@ -93,16 +93,16 @@ void RosegardenParameterArea::addRosegardenParameterBox( // and outline, in classic mode. Add this container to an array that // parallels the above array of parameter boxes. - QVGroupBox *box = new QVGroupBox(b->getLongLabel(), m_classic); + TQVGroupBox *box = new TQVGroupBox(b->getLongLabel(), m_classic); box->layout()->setMargin( 4 ); // about half the default value - QFont f; + TQFont f; f.setBold( true ); box->setFont( f ); m_groupBoxes.push_back(box); if (m_spacing) delete m_spacing; - m_spacing = new QFrame(m_classic); + m_spacing = new TQFrame(m_classic); m_classic->setStretchFactor(m_spacing, 100); // Add the parameter box to the current container of the displayed @@ -120,7 +120,7 @@ void RosegardenParameterArea::setArrangement(Arrangement style) { // Lookup the container of the specified style. - QWidget *container; + TQWidget *container; switch (style) { case CLASSIC_STYLE: container = m_classic; @@ -149,7 +149,7 @@ void RosegardenParameterArea::setArrangement(Arrangement style) unsorted.insert(m_parameterBoxes[i]); } - QString previous = ""; + TQString previous = ""; while (!unsorted.empty()) { std::set<RosegardenParameterBox *>::iterator i = unsorted.begin(); @@ -191,8 +191,8 @@ void RosegardenParameterArea::setArrangement(Arrangement style) m_style = style; } -void RosegardenParameterArea::moveWidget(QWidget *old_container, - QWidget *new_container, +void RosegardenParameterArea::moveWidget(TQWidget *old_container, + TQWidget *new_container, RosegardenParameterBox *box) { // Remove any state that is associated with the parameter boxes, @@ -215,10 +215,10 @@ void RosegardenParameterArea::moveWidget(QWidget *old_container, ++index; } if (index < m_parameterBoxes.size()) { - box->reparent(m_groupBoxes[index], 0, QPoint(0, 0), FALSE); + box->reparent(m_groupBoxes[index], 0, TQPoint(0, 0), FALSE); } } else if (new_container == m_tabBox) { - box->reparent(new_container, 0, QPoint(0, 0), FALSE); + box->reparent(new_container, 0, TQPoint(0, 0), FALSE); m_tabBox->insertTab(box, box->getShortLabel()); } } diff --git a/src/gui/editors/parameters/RosegardenParameterArea.h b/src/gui/editors/parameters/RosegardenParameterArea.h index 1236a43..7af178a 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.h +++ b/src/gui/editors/parameters/RosegardenParameterArea.h @@ -28,14 +28,14 @@ #ifndef _RG_ROSEGARDENPARAMETERAREA_H_ #define _RG_ROSEGARDENPARAMETERAREA_H_ -#include <qwidgetstack.h> +#include <tqwidgetstack.h> #include <vector> -class QWidget; -class QVGroupBox; -class QVBox; -class QScrollView; +class TQWidget; +class TQVGroupBox; +class TQVBox; +class TQScrollView; class KTabWidget; @@ -56,7 +56,7 @@ public: // Create the parameter display area. - RosegardenParameterArea(QWidget *parent=0, const char *name=0, WFlags f=0); + RosegardenParameterArea(TQWidget *parent=0, const char *name=0, WFlags f=0); // Add a rosegarden parameter box to the list that are to be displayed. @@ -88,18 +88,18 @@ private: // corresponding parameter box widget needs to be enclosed by a // titled outline. - std::vector<QVGroupBox *> m_groupBoxes; + std::vector<TQVGroupBox *> m_groupBoxes; // Move a RosegardenParameterBox widget from one container to another. - void moveWidget(QWidget *old_container, QWidget *new_container, + void moveWidget(TQWidget *old_container, TQWidget *new_container, RosegardenParameterBox *box); - QScrollView *m_scrollView; // Holds the m_classic container - QVBox *m_classic; // The container widget for m_style==CLASSIC_STYLE. + TQScrollView *m_scrollView; // Holds the m_classic container + TQVBox *m_classic; // The container widget for m_style==CLASSIC_STYLE. KTabWidget *m_tabBox; // The container widget for m_style==TAB_BOX_STYLE. - QWidget *m_active; // The current container widget. - QWidget *m_spacing; + TQWidget *m_active; // The current container widget. + TQWidget *m_spacing; }; diff --git a/src/gui/editors/parameters/RosegardenParameterBox.cpp b/src/gui/editors/parameters/RosegardenParameterBox.cpp index 7d9100c..dbefda0 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.cpp +++ b/src/gui/editors/parameters/RosegardenParameterBox.cpp @@ -27,23 +27,23 @@ #include "RosegardenParameterArea.h" #include <ktabwidget.h> -#include <qfont.h> -#include <qframe.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { -RosegardenParameterBox::RosegardenParameterBox(const QString &shortLabel, - const QString &longLabel, - QWidget *parent, +RosegardenParameterBox::RosegardenParameterBox(const TQString &shortLabel, + const TQString &longLabel, + TQWidget *parent, const char *name) : - QFrame(parent, name), + TQFrame(parent, name), m_shortLabel(shortLabel), m_longLabel(longLabel), m_mode(LANDSCAPE_MODE) @@ -53,14 +53,14 @@ RosegardenParameterBox::RosegardenParameterBox(const QString &shortLabel, void RosegardenParameterBox::init() { - QFont plainFont; + TQFont plainFont; plainFont.setPointSize(plainFont.pointSize() * 95 / 100); if (plainFont.pixelSize() > 14) plainFont.setPixelSize(14); plainFont.setBold(false); m_font = plainFont; - QFont boldFont; + TQFont boldFont; boldFont.setPointSize(int(boldFont.pointSize() * 9.5 / 10.0 + 0.5)); if (boldFont.pixelSize() > 14) boldFont.setPixelSize(14); @@ -69,17 +69,17 @@ void RosegardenParameterBox::init() setFont(boldFont); } -QString RosegardenParameterBox::getShortLabel() const +TQString RosegardenParameterBox::getShortLabel() const { return m_shortLabel; } -QString RosegardenParameterBox::getLongLabel() const +TQString RosegardenParameterBox::getLongLabel() const { return m_longLabel; } -QString RosegardenParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement) const +TQString RosegardenParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement) const { // No ordering known -- depends on subclasses return ""; diff --git a/src/gui/editors/parameters/RosegardenParameterBox.h b/src/gui/editors/parameters/RosegardenParameterBox.h index 6f17358..629245f 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.h +++ b/src/gui/editors/parameters/RosegardenParameterBox.h @@ -27,13 +27,13 @@ #define _RG_ROSEGARDENPARAMETERBOX_H_ #include "RosegardenParameterArea.h" -#include <qfont.h> -#include <qframe.h> -#include <qstring.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqstring.h> #include <klocale.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -42,7 +42,7 @@ namespace Rosegarden /** - * A flat QFrame, in which a group of parameters can be laid out. + * A flat TQFrame, in which a group of parameters can be laid out. * Virtual method functions are defined for for requesting a layout * style, and returning the single-word to use for labelling the * box. @@ -52,19 +52,19 @@ class RosegardenParameterBox : public QFrame { Q_OBJECT public: - RosegardenParameterBox(const QString &shortLabel, // e.g. i18n("Track") - const QString &longLabel, // e.g. i18n("Track Parameters") - QWidget *parent = 0, + RosegardenParameterBox(const TQString &shortLabel, // e.g. i18n("Track") + const TQString &longLabel, // e.g. i18n("Track Parameters") + TQWidget *parent = 0, const char *name = 0); // Ask for a one-word string that can be used to label the widget. - QString getShortLabel() const; + TQString getShortLabel() const; // Ask for the full label (e.g. short-label "Parameters") - QString getLongLabel() const; + TQString getLongLabel() const; // Get the short label of the prior parameter box (to establish an ordering) - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; virtual void showAdditionalControls(bool) = 0; @@ -80,9 +80,9 @@ protected: void setLayoutMode(LayoutMode mode); - QFont m_font; - QString m_shortLabel; // The string that containers can use for labelling and identification - QString m_longLabel; // The full title + TQFont m_font; + TQString m_shortLabel; // The string that containers can use for labelling and identification + TQString m_longLabel; // The full title LayoutMode m_mode; // The current layout mode. }; diff --git a/src/gui/editors/parameters/SegmentParameterBox.cpp b/src/gui/editors/parameters/SegmentParameterBox.cpp index c17cbe2..23fce12 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.cpp +++ b/src/gui/editors/parameters/SegmentParameterBox.cpp @@ -24,7 +24,7 @@ #include "SegmentParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -61,30 +61,30 @@ #include <kconfig.h> #include <klineeditdlg.h> #include <ktabwidget.h> -#include <qbutton.h> -#include <qcheckbox.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qscrollview.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> +#include <tqbutton.h> +#include <tqcheckbox.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqscrollview.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> namespace Rosegarden { SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Segment"), i18n("Segment Parameters"), parent), @@ -98,8 +98,8 @@ SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, m_doc->getComposition().addObserver(this); - connect(getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); } SegmentParameterBox::~SegmentParameterBox() @@ -112,48 +112,48 @@ SegmentParameterBox::~SegmentParameterBox() void SegmentParameterBox::initBox() { - QFont font(m_font); + TQFont font(m_font); - QFontMetrics fontMetrics(font); + TQFontMetrics fontMetrics(font); // magic numbers: 13 is the height of the menu pixmaps, 10 is just 10 //int comboHeight = std::max(fontMetrics.height(), 13) + 10; int width = fontMetrics.width("12345678901234567890"); - // QFrame *frame = new QFrame(this); - QGridLayout *gridLayout = new QGridLayout(this, 8, 6, 4, 2); + // TQFrame *frame = new TQFrame(this); + TQGridLayout *gridLayout = new TQGridLayout(this, 8, 6, 4, 2); - QLabel *label = new QLabel(i18n("Label"), this); - QLabel *repeatLabel = new QLabel(i18n("Repeat"), this); - QLabel *quantizeLabel = new QLabel(i18n("Quantize"), this); - QLabel *transposeLabel = new QLabel(i18n("Transpose"), this); - QLabel *delayLabel = new QLabel(i18n("Delay"), this); - QLabel *colourLabel = new QLabel(i18n("Color"), this); -// m_autoFadeLabel = new QLabel(i18n("Audio auto-fade"), this); -// m_fadeInLabel = new QLabel(i18n("Fade in"), this); -// m_fadeOutLabel = new QLabel(i18n("Fade out"), this); -// m_rangeLabel = new QLabel(i18n("Range"), this); + TQLabel *label = new TQLabel(i18n("Label"), this); + TQLabel *repeatLabel = new TQLabel(i18n("Repeat"), this); + TQLabel *quantizeLabel = new TQLabel(i18n("Quantize"), this); + TQLabel *transposeLabel = new TQLabel(i18n("Transpose"), this); + TQLabel *delayLabel = new TQLabel(i18n("Delay"), this); + TQLabel *colourLabel = new TQLabel(i18n("Color"), this); +// m_autoFadeLabel = new TQLabel(i18n("Audio auto-fade"), this); +// m_fadeInLabel = new TQLabel(i18n("Fade in"), this); +// m_fadeOutLabel = new TQLabel(i18n("Fade out"), this); +// m_rangeLabel = new TQLabel(i18n("Range"), this); // Label .. - m_label = new QLabel(this); + m_label = new TQLabel(this); m_label->setFont(font); m_label->setFixedWidth(width); //m_label->setFixedHeight(comboHeight); - m_label->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_label->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); // .. and edit button - m_labelButton = new QPushButton(i18n("Edit"), this); + m_labelButton = new TQPushButton(i18n("Edit"), this); m_labelButton->setFont(font); // m_labelButton->setFixedWidth(50); - connect(m_labelButton, SIGNAL(released()), - SLOT(slotEditSegmentLabel())); + connect(m_labelButton, TQT_SIGNAL(released()), + TQT_SLOT(slotEditSegmentLabel())); m_repeatValue = new TristateCheckBox(this); m_repeatValue->setFont(font); //m_repeatValue->setFixedHeight(comboHeight); // handle state changes - connect(m_repeatValue, SIGNAL(pressed()), SLOT(slotRepeatPressed())); + connect(m_repeatValue, TQT_SIGNAL(pressed()), TQT_SLOT(slotRepeatPressed())); // non-reversing motif style read-only combo m_quantizeValue = new KComboBox(this); @@ -161,8 +161,8 @@ SegmentParameterBox::initBox() //m_quantizeValue->setFixedHeight(comboHeight); // handle quantize changes from drop down - connect(m_quantizeValue, SIGNAL(activated(int)), - SLOT(slotQuantizeSelected(int))); + connect(m_quantizeValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotQuantizeSelected(int))); // reversing motif style read-write combo m_transposeValue = new KComboBox(this); @@ -170,12 +170,12 @@ SegmentParameterBox::initBox() //m_transposeValue->setFixedHeight(comboHeight); // handle transpose combo changes - connect(m_transposeValue, SIGNAL(activated(int)), - SLOT(slotTransposeSelected(int))); + connect(m_transposeValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTransposeSelected(int))); // and text changes - connect(m_transposeValue, SIGNAL(textChanged(const QString&)), - SLOT(slotTransposeTextChanged(const QString&))); + connect(m_transposeValue, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotTransposeTextChanged(const TQString&))); // reversing motif style read-write combo m_delayValue = new KComboBox(this); @@ -183,16 +183,16 @@ SegmentParameterBox::initBox() //m_delayValue->setFixedHeight(comboHeight); // handle delay combo changes - connect(m_delayValue, SIGNAL(activated(int)), - SLOT(slotDelaySelected(int))); + connect(m_delayValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotDelaySelected(int))); // Detect when the document colours are updated - connect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); // handle text changes for delay - connect(m_delayValue, SIGNAL(textChanged(const QString&)), - SLOT(slotDelayTextChanged(const QString &))); + connect(m_delayValue, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotDelayTextChanged(const TQString &))); // set up combo box for colours m_colourValue = new KComboBox(false, this); @@ -202,55 +202,55 @@ SegmentParameterBox::initBox() m_colourValue->setSizeLimit(20); // handle colour combo changes - connect(m_colourValue, SIGNAL(activated(int)), - SLOT(slotColourSelected(int))); + connect(m_colourValue, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColourSelected(int))); // pre-set width of buttons so they don't grow later // width = fontMetrics.width(i18n("used internally for spacing", "High: ----")); // highest playable note // -// m_highButton = new QPushButton(i18n("High: ---"), this); -// QToolTip::add +// m_highButton = new TQPushButton(i18n("High: ---"), this); +// TQToolTip::add // (m_highButton, i18n("Choose the highest suggested playable note, using a staff")); // m_highButton->setFont(font); // m_highButton->setMinimumWidth(width); -// connect(m_highButton, SIGNAL(released()), -// SLOT(slotHighestPressed())); +// connect(m_highButton, TQT_SIGNAL(released()), +// TQT_SLOT(slotHighestPressed())); // lowest playable note // -// m_lowButton = new QPushButton(i18n("Low: ----"), this); -// QToolTip::add +// m_lowButton = new TQPushButton(i18n("Low: ----"), this); +// TQToolTip::add // (m_lowButton, i18n("Choose the lowest suggested playable note, using a staff")); // m_lowButton->setFont(font); // m_lowButton->setMinimumWidth(width); -// connect(m_lowButton, SIGNAL(released()), -// SLOT(slotLowestPressed())); +// connect(m_lowButton, TQT_SIGNAL(released()), +// TQT_SLOT(slotLowestPressed())); // Audio autofade enabled // -// m_autoFadeBox = new QCheckBox(this); -// connect(m_autoFadeBox, SIGNAL(stateChanged(int)), -// this, SLOT(slotAudioFadeChanged(int))); +// m_autoFadeBox = new TQCheckBox(this); +// connect(m_autoFadeBox, TQT_SIGNAL(stateChanged(int)), +// this, TQT_SLOT(slotAudioFadeChanged(int))); // Fade in and out times // -// m_fadeInSpin = new QSpinBox(this); +// m_fadeInSpin = new TQSpinBox(this); // m_fadeInSpin->setMinValue(0); // m_fadeInSpin->setMaxValue(5000); // m_fadeInSpin->setSuffix(i18n(" ms")); -// connect(m_fadeInSpin, SIGNAL(valueChanged(int)), -// this, SLOT(slotFadeInChanged(int))); +// connect(m_fadeInSpin, TQT_SIGNAL(valueChanged(int)), +// this, TQT_SLOT(slotFadeInChanged(int))); -// m_fadeOutSpin = new QSpinBox(this); +// m_fadeOutSpin = new TQSpinBox(this); // m_fadeOutSpin->setMinValue(0); // m_fadeOutSpin->setMaxValue(5000); // m_fadeOutSpin->setSuffix(i18n(" ms")); -// connect(m_fadeOutSpin, SIGNAL(valueChanged(int)), -// this, SLOT(slotFadeOutChanged(int))); +// connect(m_fadeOutSpin, TQT_SIGNAL(valueChanged(int)), +// this, TQT_SLOT(slotFadeOutChanged(int))); label->setFont(font); repeatLabel->setFont(font); @@ -315,14 +315,14 @@ SegmentParameterBox::initBox() // populate the quantize combo // - QPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeValue->insertItem(error ? noMap : pmap, label); } m_quantizeValue->insertItem(noMap, i18n("Off")); @@ -333,7 +333,7 @@ SegmentParameterBox::initBox() // populate the transpose combo // for (int i = -m_transposeRange; i < m_transposeRange + 1; i++) { - m_transposeValue->insertItem(noMap, QString("%1").arg(i)); + m_transposeValue->insertItem(noMap, TQString("%1").arg(i)); if (i == 0) m_transposeValue->setCurrentItem(m_transposeValue->count() - 1); } @@ -355,8 +355,8 @@ SegmentParameterBox::initBox() // resolution it might not be) & include a note pixmap if so // timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_delayValue->insertItem((error ? noMap : pmap), label); } @@ -384,14 +384,14 @@ void SegmentParameterBox::setDocument(RosegardenGUIDoc* doc) { if (m_doc != 0) - disconnect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + disconnect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); m_doc = doc; // Detect when the document colours are updated - connect (m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect (m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); slotDocColoursChanged(); // repopulate combo } @@ -428,8 +428,8 @@ SegmentParameterBox::slotDocColoursChanged() unsigned int i = 0; for (RCMap::const_iterator it = temp.begin(); it != temp.end(); ++it) { - QString qtrunc(strtoqstr(it->second.second)); - QPixmap colour(15, 15); + TQString qtrunc(strtoqstr(it->second.second)); + TQPixmap colour(15, 15); colour.fill(GUIPalette::convertColour(it->second.first)); if (qtrunc == "") { m_colourValue->insertItem(colour, i18n("Default"), i); @@ -666,11 +666,11 @@ SegmentParameterBox::populateBoxFromSegments() // 2nd arg of "true" means "add if necessary" case All: m_transposeValue-> - setCurrentItem(QString("%1").arg(transposeLevel), true); + setCurrentItem(TQString("%1").arg(transposeLevel), true); break; case Some: - m_transposeValue->setCurrentItem(QString(""), true); + m_transposeValue->setCurrentItem(TQString(""), true); break; case None: @@ -687,7 +687,7 @@ SegmentParameterBox::populateBoxFromSegments() case All: if (delayLevel >= 0) { timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(delayLevel, + TQString label = NotationStrings::makeNoteMenuLabel(delayLevel, true, error); m_delayValue->setCurrentItem(label, true); @@ -834,12 +834,12 @@ void SegmentParameterBox::slotRepeatPressed() bool state = false; switch (m_repeatValue->state()) { - case QButton::Off: + case TQButton::Off: state = true; break; - case QButton::NoChange: - case QButton::On: + case TQButton::NoChange: + case TQButton::On: default: state = false; break; @@ -874,7 +874,7 @@ SegmentParameterBox::slotQuantizeSelected(int qLevel) } void -SegmentParameterBox::slotTransposeTextChanged(const QString &text) +SegmentParameterBox::slotTransposeTextChanged(const TQString &text) { if (text.isEmpty() || m_segments.size() == 0) return ; @@ -934,7 +934,7 @@ SegmentParameterBox::slotDelayTimeChanged(timeT delayValue) } void -SegmentParameterBox::slotDelayTextChanged(const QString &text) +SegmentParameterBox::slotDelayTextChanged(const TQString &text) { if (text.isEmpty() || m_segments.size() == 0) return ; @@ -978,9 +978,9 @@ SegmentParameterBox::slotColourSelected(int value) addCommandToHistory(command); } else { ColourMap newMap = m_doc->getComposition().getSegmentColourMap(); - QColor newColour; + TQColor newColour; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), i18n("New"), &ok); if ((ok == true) && (!newName.isEmpty())) { KColorDialog box(this, "", true); @@ -1019,8 +1019,8 @@ SegmentParameterBox::updateHighLow() //!!! FIXME this code is broken, and needs to be fixed after the fashion of //the TPB, but I'm not bothering with that at this time, because they are //going to be hidden for 1.3 anyway -// m_highButton->setText(QString("&High: %1%2").arg(highest.getNoteName(key)).arg(highest.getOctave(base))); -// m_lowButton->setText(QString("&Low: %1%2").arg(lowest.getNoteName(key)).arg(lowest.getOctave(base))); +// m_highButton->setText(TQString("&High: %1%2").arg(highest.getNoteName(key)).arg(highest.getOctave(base))); +// m_lowButton->setText(TQString("&Low: %1%2").arg(lowest.getNoteName(key)).arg(lowest.getOctave(base))); } void @@ -1031,7 +1031,7 @@ SegmentParameterBox::slotHighestPressed() PitchPickerDialog dialog(0, m_highestPlayable, i18n("Highest playable note")); std::vector<Segment*>::iterator it; - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_highestPlayable = dialog.getPitch(); updateHighLow(); @@ -1051,7 +1051,7 @@ SegmentParameterBox::slotLowestPressed() PitchPickerDialog dialog(0, m_lowestPlayable, i18n("Lowest playable note")); std::vector<Segment*>::iterator it; - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_lowestPlayable = dialog.getPitch(); updateHighLow(); @@ -1078,7 +1078,7 @@ SegmentParameterBox::addCommandToHistory(KCommand *command) void SegmentParameterBox::slotEditSegmentLabel() { - QString editLabel; + TQString editLabel; if (m_segments.size() == 0) return ; @@ -1091,11 +1091,11 @@ SegmentParameterBox::slotEditSegmentLabel() // Remove the asterisk if we're using it // - QString label = m_label->text(); + TQString label = m_label->text(); if (label == "*") label = ""; - QString newLabel = KLineEditDlg::getText(editLabel, + TQString newLabel = KLineEditDlg::getText(editLabel, i18n("Enter new label"), m_label->text(), &ok, @@ -1127,7 +1127,7 @@ SegmentParameterBox::slotAudioFadeChanged(int value) return ; bool state = false; - if (value == QButton::On) + if (value == TQButton::On) state = true; std::vector<Segment*>::iterator it; @@ -1147,9 +1147,9 @@ SegmentParameterBox::slotFadeInChanged(int value) return ; if (value == 0 && m_fadeOutSpin->value() == 0) - slotAudioFadeChanged(QButton::Off); + slotAudioFadeChanged(TQButton::Off); else - slotAudioFadeChanged(QButton::On); + slotAudioFadeChanged(TQButton::On); // Convert from ms // @@ -1174,9 +1174,9 @@ SegmentParameterBox::slotFadeOutChanged(int value) return ; if (value == 0 && m_fadeInSpin->value() == 0) - slotAudioFadeChanged(QButton::Off); + slotAudioFadeChanged(TQButton::Off); else - slotAudioFadeChanged(QButton::On); + slotAudioFadeChanged(TQButton::On); // Convert from ms // diff --git a/src/gui/editors/parameters/SegmentParameterBox.h b/src/gui/editors/parameters/SegmentParameterBox.h index a8b0353..0a7a266 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.h +++ b/src/gui/editors/parameters/SegmentParameterBox.h @@ -31,16 +31,16 @@ #include "gui/widgets/ColourTable.h" #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QSpinBox; -class QPushButton; -class QLabel; -class QCheckBox; +class TQWidget; +class TQSpinBox; +class TQPushButton; +class TQLabel; +class TQCheckBox; class KCommand; class KComboBox; @@ -72,7 +72,7 @@ public: } Tristate; SegmentParameterBox(RosegardenGUIDoc *doc, - QWidget *parent=0); + TQWidget *parent=0); ~SegmentParameterBox(); // Use Segments to update GUI parameters @@ -93,18 +93,18 @@ public: virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: void slotRepeatPressed(); void slotQuantizeSelected(int); void slotTransposeSelected(int); - void slotTransposeTextChanged(const QString &); + void slotTransposeTextChanged(const TQString &); void slotDelaySelected(int); void slotDelayTimeChanged(timeT delayValue); - void slotDelayTextChanged(const QString &); + void slotDelayTextChanged(const TQString &); void slotEditSegmentLabel(); @@ -129,11 +129,11 @@ protected: void populateBoxFromSegments(); void updateHighLow(); - QLabel *m_label; -// QLabel *m_rangeLabel; - QPushButton *m_labelButton; -// QPushButton *m_highButton; -// QPushButton *m_lowButton; + TQLabel *m_label; +// TQLabel *m_rangeLabel; + TQPushButton *m_labelButton; +// TQPushButton *m_highButton; +// TQPushButton *m_lowButton; TristateCheckBox *m_repeatValue; KComboBox *m_quantizeValue; KComboBox *m_transposeValue; @@ -142,12 +142,12 @@ protected: // Audio autofade // -// QLabel *m_autoFadeLabel; -// QCheckBox *m_autoFadeBox; -// QLabel *m_fadeInLabel; -// QSpinBox *m_fadeInSpin; -// QLabel *m_fadeOutLabel; -// QSpinBox *m_fadeOutSpin; +// TQLabel *m_autoFadeLabel; +// TQCheckBox *m_autoFadeBox; +// TQLabel *m_fadeInLabel; +// TQSpinBox *m_fadeInSpin; +// TQLabel *m_fadeOutLabel; +// TQSpinBox *m_fadeOutSpin; int m_addColourPos; diff --git a/src/gui/editors/parameters/TrackParameterBox.cpp b/src/gui/editors/parameters/TrackParameterBox.cpp index fc85346..3ddfa69 100644 --- a/src/gui/editors/parameters/TrackParameterBox.cpp +++ b/src/gui/editors/parameters/TrackParameterBox.cpp @@ -28,7 +28,7 @@ #include "TrackParameterBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -66,29 +66,29 @@ #include <kmessagebox.h> #include <ksqueezedtextlabel.h> #include <ktabwidget.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qcheckbox.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqcheckbox.h> namespace Rosegarden { TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, - QWidget *parent) + TQWidget *parent) : RosegardenParameterBox(i18n("Track"), i18n("Track Parameters"), parent), @@ -97,9 +97,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, m_lowestPlayable(0), m_selectedTrackId( -1) { - QFont font(m_font); - QFont title_font(m_font); - QFontMetrics metrics(font); + TQFont font(m_font); + TQFont title_font(m_font); + TQFontMetrics metrics(font); int width11 = metrics.width("12345678901"); int width20 = metrics.width("12345678901234567890"); int width22 = metrics.width("1234567890123456789012"); @@ -109,7 +109,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // Set up default expansions for the collapsing elements KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); bool expanded = config->readBoolEntry("trackparametersplayback", true); config->writeEntry("trackparametersplayback", expanded); @@ -121,7 +121,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, config->writeEntry("trackstaffgroup", expanded); config->setGroup(groupTemp); - QGridLayout *mainLayout = new QGridLayout(this, 5, 1, 2, 1); + TQGridLayout *mainLayout = new TQGridLayout(this, 5, 1, 2, 1); int row = 0; @@ -136,9 +136,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // CollapsingFrame *cframe = new CollapsingFrame(i18n("Playback parameters"), this, "trackparametersplayback"); - m_playbackGroup = new QFrame(cframe); + m_playbackGroup = new TQFrame(cframe); cframe->setWidget(m_playbackGroup); - QGridLayout *groupLayout = new QGridLayout(m_playbackGroup, 3, 3, 3, 2); + TQGridLayout *groupLayout = new TQGridLayout(m_playbackGroup, 3, 3, 3, 2); // playback group title // @@ -147,7 +147,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // playback device // // row++; - QLabel *devLabel = new QLabel(i18n("Device"), m_playbackGroup); + TQLabel *devLabel = new TQLabel(i18n("Device"), m_playbackGroup); groupLayout->addWidget(devLabel, row, 0); m_playDevice = new KComboBox(m_playbackGroup); m_playDevice->setMinimumWidth(width25); @@ -156,7 +156,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // playback instrument // row++; - QLabel *insLabel = new QLabel(i18n("Instrument"), m_playbackGroup); + TQLabel *insLabel = new TQLabel(i18n("Instrument"), m_playbackGroup); groupLayout->addMultiCellWidget(insLabel, row, row, 0, 1); m_instrument = new KComboBox(m_playbackGroup); m_instrument->setSizeLimit( 16 ); @@ -171,16 +171,16 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Recording filters"), this, "trackparametersrecord"); - m_recordGroup = new QFrame(cframe); + m_recordGroup = new TQFrame(cframe); cframe->setWidget(m_recordGroup); - groupLayout = new QGridLayout(m_recordGroup, 3, 3, 3, 2); + groupLayout = new TQGridLayout(m_recordGroup, 3, 3, 3, 2); // recording group title // row = 0; // recording device - groupLayout->addWidget(new QLabel(i18n("Device"), m_recordGroup), row, 0); + groupLayout->addWidget(new TQLabel(i18n("Device"), m_recordGroup), row, 0); m_recDevice = new KComboBox(m_recordGroup); m_recDevice->setMinimumWidth(width25); groupLayout->addMultiCellWidget(m_recDevice, row, row, 1, 2); @@ -188,7 +188,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // recording channel // row++; - groupLayout->addMultiCellWidget(new QLabel(i18n("Channel"), m_recordGroup), row, row, 0, 1); + groupLayout->addMultiCellWidget(new TQLabel(i18n("Channel"), m_recordGroup), row, row, 0, 1); m_recChannel = new KComboBox(m_recordGroup); m_recChannel->setSizeLimit( 17 ); m_recChannel->setMinimumWidth(width11); @@ -202,9 +202,9 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Staff export options"), this, "staffoptions"); - m_staffGroup = new QFrame(cframe); + m_staffGroup = new TQFrame(cframe); cframe->setWidget(m_staffGroup); - groupLayout = new QGridLayout(m_staffGroup, 2, 2, 2, 2); + groupLayout = new TQGridLayout(m_staffGroup, 2, 2, 2, 2); groupLayout->setColStretch(1, 1); @@ -217,7 +217,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // per-staff (rather than per-score) basis is something the author of the // LilyPond documentation has no idea how to do, so we settle for this, // which is not as nice, but actually a lot easier to implement. - m_staffGrpLbl = new QLabel(i18n("Notation size:"), m_staffGroup); + m_staffGrpLbl = new TQLabel(i18n("Notation size:"), m_staffGroup); groupLayout->addWidget(m_staffGrpLbl, row, 0, AlignLeft); m_staffSizeCombo = new KComboBox(m_staffGroup); m_staffSizeCombo->setMinimumWidth(width11); @@ -230,7 +230,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // Staff bracketing (export only at the moment, but using this for GUI // rendering would be nice in the future!) //!!! row++; - m_grandStaffLbl = new QLabel(i18n("Bracket type:"), m_staffGroup); + m_grandStaffLbl = new TQLabel(i18n("Bracket type:"), m_staffGroup); groupLayout->addWidget(m_grandStaffLbl, row, 0, AlignLeft); m_staffBracketCombo = new KComboBox(m_staffGroup); m_staffBracketCombo->setMinimumWidth(width11); @@ -252,30 +252,30 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // cframe = new CollapsingFrame(i18n("Create segments with"), this, "trackparametersdefaults"); - m_defaultsGroup = new QFrame(cframe); + m_defaultsGroup = new TQFrame(cframe); cframe->setWidget(m_defaultsGroup); - groupLayout = new QGridLayout(m_defaultsGroup, 6, 6, 3, 2); + groupLayout = new TQGridLayout(m_defaultsGroup, 6, 6, 3, 2); groupLayout->setColStretch(1, 1); row = 0; // preset picker - m_psetLbl = new QLabel(i18n("Preset"), m_defaultsGroup); + m_psetLbl = new TQLabel(i18n("Preset"), m_defaultsGroup); groupLayout->addWidget(m_psetLbl, row, 0, AlignLeft); - m_presetLbl = new QLabel(i18n("<none>"), m_defaultsGroup); - m_presetLbl->setFrameStyle(QFrame::Panel | QFrame::Sunken); + m_presetLbl = new TQLabel(i18n("<none>"), m_defaultsGroup); + m_presetLbl->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); m_presetLbl->setFixedWidth(width20); groupLayout->addMultiCellWidget(m_presetLbl, row, row, 1, 3); - m_presetButton = new QPushButton(i18n("Load"), m_defaultsGroup); + m_presetButton = new TQPushButton(i18n("Load"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_presetButton, row, row, 4, 5); // default clef // row++; - m_clefLbl = new QLabel(i18n("Clef"), m_defaultsGroup); + m_clefLbl = new TQLabel(i18n("Clef"), m_defaultsGroup); groupLayout->addWidget(m_clefLbl, row, 0, AlignLeft); m_defClef = new KComboBox(m_defaultsGroup); m_defClef->setMinimumWidth(width11); @@ -302,16 +302,16 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // default transpose // - m_transpLbl = new QLabel(i18n("Transpose"), m_defaultsGroup); + m_transpLbl = new TQLabel(i18n("Transpose"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_transpLbl, row, row, 3, 4, AlignRight); m_defTranspose = new KComboBox(m_defaultsGroup); - connect(m_defTranspose, SIGNAL(activated(int)), - SLOT(slotTransposeIndexChanged(int))); + connect(m_defTranspose, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTransposeIndexChanged(int))); int transposeRange = 48; for (int i = -transposeRange; i < transposeRange + 1; i++) { - m_defTranspose->insertItem(QString("%1").arg(i)); + m_defTranspose->insertItem(TQString("%1").arg(i)); if (i == 0) m_defTranspose->setCurrentItem(m_defTranspose->count() - 1); } @@ -321,20 +321,20 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // highest/lowest playable note // row++; - m_rangeLbl = new QLabel(i18n("Pitch"), m_defaultsGroup); + m_rangeLbl = new TQLabel(i18n("Pitch"), m_defaultsGroup); groupLayout->addMultiCellWidget(m_rangeLbl, row, row, 0, 0); - groupLayout->addWidget(new QLabel(i18n("Lowest"), m_defaultsGroup), row, 1, AlignRight); + groupLayout->addWidget(new TQLabel(i18n("Lowest"), m_defaultsGroup), row, 1, AlignRight); - m_lowButton = new QPushButton(i18n("---"), m_defaultsGroup); - QToolTip::add + m_lowButton = new TQPushButton(i18n("---"), m_defaultsGroup); + TQToolTip::add (m_lowButton, i18n("Choose the lowest suggested playable note, using a staff")); groupLayout->addMultiCellWidget(m_lowButton, row, row, 2, 2); - groupLayout->addWidget(new QLabel(i18n("Highest"), m_defaultsGroup), row, 3, AlignRight); + groupLayout->addWidget(new TQLabel(i18n("Highest"), m_defaultsGroup), row, 3, AlignRight); - m_highButton = new QPushButton(i18n("---"), m_defaultsGroup); - QToolTip::add + m_highButton = new TQPushButton(i18n("---"), m_defaultsGroup); + TQToolTip::add (m_highButton, i18n("Choose the highest suggested playable note, using a staff")); groupLayout->addMultiCellWidget(m_highButton, row, row, 4, 5); @@ -343,7 +343,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // default color // row++; - m_colorLbl = new QLabel(i18n("Color"), m_defaultsGroup); + m_colorLbl = new TQLabel(i18n("Color"), m_defaultsGroup); groupLayout->addWidget(m_colorLbl, row, 0, AlignLeft); m_defColor = new KComboBox(false, m_defaultsGroup); m_defColor->setSizeLimit(20); @@ -361,43 +361,43 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, mainLayout->setRowStretch(mainLayout->numRows() - 1, 1); // Connections - connect( m_playDevice, SIGNAL(activated(int)), - this, SLOT(slotPlaybackDeviceChanged(int))); + connect( m_playDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPlaybackDeviceChanged(int))); - connect( m_instrument, SIGNAL(activated(int)), - this, SLOT(slotInstrumentChanged(int))); + connect( m_instrument, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotInstrumentChanged(int))); - connect( m_recDevice, SIGNAL(activated(int)), - this, SLOT(slotRecordingDeviceChanged(int))); + connect( m_recDevice, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotRecordingDeviceChanged(int))); - connect( m_recChannel, SIGNAL(activated(int)), - this, SLOT(slotRecordingChannelChanged(int))); + connect( m_recChannel, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotRecordingChannelChanged(int))); - connect( m_defClef, SIGNAL(activated(int)), - this, SLOT(slotClefChanged(int))); + connect( m_defClef, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotClefChanged(int))); // Detect when the document colours are updated - connect(m_doc, SIGNAL(docColoursChanged()), - this, SLOT(slotDocColoursChanged())); + connect(m_doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotDocColoursChanged())); // handle colour combo changes - connect(m_defColor, SIGNAL(activated(int)), - SLOT(slotColorChanged(int))); + connect(m_defColor, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColorChanged(int))); - connect(m_highButton, SIGNAL(released()), - SLOT(slotHighestPressed())); + connect(m_highButton, TQT_SIGNAL(released()), + TQT_SLOT(slotHighestPressed())); - connect(m_lowButton, SIGNAL(released()), - SLOT(slotLowestPressed())); + connect(m_lowButton, TQT_SIGNAL(released()), + TQT_SLOT(slotLowestPressed())); - connect(m_presetButton, SIGNAL(released()), - SLOT(slotPresetPressed())); + connect(m_presetButton, TQT_SIGNAL(released()), + TQT_SLOT(slotPresetPressed())); - connect(m_staffSizeCombo, SIGNAL(activated(int)), - this, SLOT(slotStaffSizeChanged(int))); + connect(m_staffSizeCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotStaffSizeChanged(int))); - connect(m_staffBracketCombo, SIGNAL(activated(int)), - this, SLOT(slotStaffBracketChanged(int))); + connect(m_staffBracketCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotStaffBracketChanged(int))); } TrackParameterBox::~TrackParameterBox() @@ -446,9 +446,9 @@ TrackParameterBox::populatePlaybackDeviceList() if (! (*it)) continue; // sanity check - //QString iname(strtoqstr((*it)->getPresentationName())); - QString iname(strtoqstr((*it)->getName())); - QString pname(strtoqstr((*it)->getProgramName())); + //TQString iname(strtoqstr((*it)->getPresentationName())); + TQString iname(strtoqstr((*it)->getName())); + TQString pname(strtoqstr((*it)->getProgramName())); Device *device = (*it)->getDevice(); DeviceId devId = device->getId(); @@ -459,16 +459,16 @@ TrackParameterBox::populatePlaybackDeviceList() (Instrument::SYNTH_PLUGIN_POSITION); if (plugin) { pname = strtoqstr(plugin->getProgram()); - QString identifier = strtoqstr(plugin->getIdentifier()); + TQString identifier = strtoqstr(plugin->getIdentifier()); if (identifier != "") { - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier (identifier, type, soName, label); if (pname == "") { pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = QString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").arg(label).arg(pname); } else { pname = label; } @@ -478,7 +478,7 @@ TrackParameterBox::populatePlaybackDeviceList() if (devId != (DeviceId)(currentDevId)) { currentDevId = int(devId); - QString deviceName = strtoqstr(device->getName()); + TQString deviceName = strtoqstr(device->getName()); m_playDevice->insertItem(deviceName); m_playDeviceIds.push_back(currentDevId); } @@ -545,9 +545,9 @@ TrackParameterBox::populateRecordingDeviceList() if (dev) { if (dev->getDirection() == MidiDevice::Record && dev->isRecording()) { - QString connection = strtoqstr(dev->getConnection()); + TQString connection = strtoqstr(dev->getConnection()); // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(QRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); m_recDevice->insertItem(connection); m_recDeviceIds.push_back(dev->getId()); } @@ -556,7 +556,7 @@ TrackParameterBox::populateRecordingDeviceList() m_recChannel->insertItem(i18n("All")); for (int i = 1; i < 17; ++i) { - m_recChannel->insertItem(QString::number(i)); + m_recChannel->insertItem(TQString::number(i)); } m_recDevice->setEnabled(true); @@ -603,8 +603,8 @@ TrackParameterBox::updateHighLow() // m_highButton->setText(i18n("High: %1").arg(highest.getAsString(useSharps, includeOctave, base))); // m_lowButton->setText(i18n("Low: %1").arg(lowest.getAsString(useSharps, includeOctave, base))); - m_highButton->setText(QString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); - m_lowButton->setText(QString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); + m_highButton->setText(TQString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); + m_lowButton->setText(TQString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); m_presetLbl->setEnabled(false); } @@ -624,7 +624,7 @@ TrackParameterBox::slotUpdateControls(int /*dummy*/) return ; m_defClef->setCurrentItem(trk->getClef()); - m_defTranspose->setCurrentItem(QString("%1").arg(trk->getTranspose()), true); + m_defTranspose->setCurrentItem(TQString("%1").arg(trk->getTranspose()), true); m_defColor->setCurrentItem(trk->getColor()); m_highestPlayable = trk->getHighestPlayable(); m_lowestPlayable = trk->getLowestPlayable(); @@ -657,7 +657,7 @@ TrackParameterBox::slotSelectedTrackNameChanged() RG_DEBUG << "TrackParameterBox::sotSelectedTrackNameChanged()\n"; Composition &comp = m_doc->getComposition(); Track *trk = comp.getTrackById(m_selectedTrackId); - QString m_trackName = trk->getLabel(); + TQString m_trackName = trk->getLabel(); if (m_trackName.isEmpty()) m_trackName = i18n("<untitled>"); else @@ -782,7 +782,7 @@ TrackParameterBox::slotRecordingChannelChanged(int index) } void -TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, QString label) +TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, TQString label) { RG_DEBUG << "TrackParameterBox::slotInstrumentLabelChanged(" << id << ") = " << label << "\n"; populatePlaybackDeviceList(); @@ -822,7 +822,7 @@ TrackParameterBox::slotTransposeIndexChanged(int index) } void -TrackParameterBox::slotTransposeTextChanged(QString text) +TrackParameterBox::slotTransposeTextChanged(TQString text) { if (text.isEmpty()) return ; @@ -843,8 +843,8 @@ TrackParameterBox::slotDocColoursChanged() unsigned int i = 0; for (RCMap::const_iterator it = temp.begin(); it != temp.end(); ++it) { - QString qtrunc(strtoqstr(it->second.second)); - QPixmap colour(15, 15); + TQString qtrunc(strtoqstr(it->second.second)); + TQPixmap colour(15, 15); colour.fill(GUIPalette::convertColour(it->second.first)); if (qtrunc == "") { m_defColor->insertItem(colour, i18n("Default"), i); @@ -877,9 +877,9 @@ TrackParameterBox::slotColorChanged(int index) if (index == m_addColourPos) { ColourMap newMap = m_doc->getComposition().getSegmentColourMap(); - QColor newColour; + TQColor newColour; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), i18n("New"), &ok); if ((ok == true) && (!newName.isEmpty())) { KColorDialog box(this, "", true); @@ -909,7 +909,7 @@ TrackParameterBox::slotHighestPressed() PitchPickerDialog dialog(0, m_highestPlayable, i18n("Highest playable note")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_highestPlayable = dialog.getPitch(); updateHighLow(); } @@ -929,7 +929,7 @@ TrackParameterBox::slotLowestPressed() PitchPickerDialog dialog(0, m_lowestPlayable, i18n("Lowest playable note")); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_lowestPlayable = dialog.getPitch(); updateHighLow(); } @@ -950,7 +950,7 @@ TrackParameterBox::slotPresetPressed() PresetHandlerDialog dialog(this); try { - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { m_presetLbl->setText(dialog.getName()); trk->setPresetLabel(dialog.getName()); if (dialog.getConvertAllSegments()) { @@ -962,7 +962,7 @@ TrackParameterBox::slotPresetPressed() m_doc->getCommandHistory()->addCommand(command); } m_defClef->setCurrentItem(dialog.getClef()); - m_defTranspose->setCurrentItem(QString("%1").arg + m_defTranspose->setCurrentItem(TQString("%1").arg (dialog.getTranspose()), true); m_highestPlayable = dialog.getHighRange(); diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h index c5fa0f9..696e3f7 100644 --- a/src/gui/editors/parameters/TrackParameterBox.h +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -35,17 +35,17 @@ #include <map> #include "RosegardenParameterArea.h" #include "RosegardenParameterBox.h" -#include <qstring.h> -#include <qcheckbox.h> // #include <QCheckBox> in QT4, thinking ahead +#include <tqstring.h> +#include <tqcheckbox.h> // #include <TQCheckBox> in QT4, thinking ahead #include <vector> -class QWidget; -class QPushButton; -class QLabel; -class QFrame; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQFrame; class KComboBox; -class QCheckBox; +class TQCheckBox; namespace Rosegarden @@ -60,14 +60,14 @@ Q_OBJECT public: TrackParameterBox( RosegardenGUIDoc *doc, - QWidget *parent=0); + TQWidget *parent=0); ~TrackParameterBox(); void setDocument( RosegardenGUIDoc *doc ); void populateDeviceLists(); virtual void showAdditionalControls(bool showThem); - virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + virtual TQString getPreviousBox(RosegardenParameterArea::Arrangement) const; public slots: void slotSelectedTrackChanged(); @@ -77,12 +77,12 @@ public slots: void slotRecordingDeviceChanged(int index); void slotRecordingChannelChanged(int index); void slotUpdateControls(int); - void slotInstrumentLabelChanged(InstrumentId id, QString label); + void slotInstrumentLabelChanged(InstrumentId id, TQString label); void slotClefChanged(int clef); void slotTransposeChanged(int transpose); void slotTransposeIndexChanged(int index); - void slotTransposeTextChanged(QString text); + void slotTransposeTextChanged(TQString text); void slotDocColoursChanged(); void slotColorChanged(int index); void slotHighestPressed(); @@ -108,9 +108,9 @@ private: KComboBox *m_recDevice; KComboBox *m_recChannel; - QPushButton *m_presetButton; - QPushButton *m_highButton; - QPushButton *m_lowButton; + TQPushButton *m_presetButton; + TQPushButton *m_highButton; + TQPushButton *m_lowButton; KComboBox *m_defClef; KComboBox *m_defColor; @@ -124,7 +124,7 @@ private: int m_lowestPlayable; ColourTable::ColourList m_colourList; - QLabel *m_trackLabel; + TQLabel *m_trackLabel; typedef std::vector<DeviceId> IdsVector; @@ -132,27 +132,27 @@ private: IdsVector m_recDeviceIds; std::map<DeviceId, IdsVector> m_instrumentIds; - std::map<DeviceId, QStringList> m_instrumentNames; + std::map<DeviceId, TQStringList> m_instrumentNames; int m_selectedTrackId; char m_lastInstrumentType; // Additional elements that may be hidden in vertical stacked mode - //QFrame *m_separator2; - QFrame *m_playbackGroup; - QFrame *m_recordGroup; - QFrame *m_defaultsGroup; - QFrame *m_staffGroup; - QLabel *m_segHeader; - QLabel *m_presetLbl; - QLabel *m_staffGrpLbl; - QLabel *m_grandStaffLbl; - QLabel *m_clefLbl; - QLabel *m_transpLbl; - QLabel *m_colorLbl; - QLabel *m_rangeLbl; - QLabel *m_psetLbl; + //TQFrame *m_separator2; + TQFrame *m_playbackGroup; + TQFrame *m_recordGroup; + TQFrame *m_defaultsGroup; + TQFrame *m_staffGroup; + TQLabel *m_segHeader; + TQLabel *m_presetLbl; + TQLabel *m_staffGrpLbl; + TQLabel *m_grandStaffLbl; + TQLabel *m_clefLbl; + TQLabel *m_transpLbl; + TQLabel *m_colorLbl; + TQLabel *m_rangeLbl; + TQLabel *m_psetLbl; }; diff --git a/src/gui/editors/segment/ControlEditorDialog.cpp b/src/gui/editors/segment/ControlEditorDialog.cpp index 3c4cc47..5fb1fa1 100644 --- a/src/gui/editors/segment/ControlEditorDialog.cpp +++ b/src/gui/editors/segment/ControlEditorDialog.cpp @@ -24,7 +24,7 @@ #include "ControlEditorDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -52,27 +52,27 @@ #include <kmainwindow.h> #include <kstdaccel.h> #include <kstdaction.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -const QString notShowing(i18n("<not showing>")); +const TQString notShowing(i18n("<not showing>")); -ControlEditorDialog::ControlEditorDialog(QWidget *parent, +ControlEditorDialog::ControlEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId device): KMainWindow(parent, "controleditordialog"), @@ -83,22 +83,22 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, { RG_DEBUG << "ControlEditorDialog::ControlEditorDialog: device is " << m_device << endl; - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Control Events")); - QString deviceName(i18n("<no device>")); + TQString deviceName(i18n("<no device>")); MidiDevice *md = dynamic_cast<MidiDevice *>(m_studio->getDevice(m_device)); if (md) deviceName = strtoqstr(md->getName()); // spacing hack! - new QLabel("", mainFrame); - new QLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). + new TQLabel("", mainFrame); + new TQLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). arg(device), mainFrame); - new QLabel("", mainFrame); + new TQLabel("", mainFrame); m_listView = new KListView(mainFrame); m_listView->addColumn(i18n("Control Event name ")); @@ -119,27 +119,27 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, m_listView->restoreLayout(kapp->config(), ControlEditorConfigGroup); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_addButton = new QPushButton(i18n("Add"), btnBox); - m_deleteButton = new QPushButton(i18n("Delete"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Control Parameter to the Studio")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Control Parameter from the Studio")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Control Parameter editor")); @@ -151,25 +151,25 @@ ControlEditorDialog::ControlEditorDialog(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_addButton, SIGNAL(released()), - SLOT(slotAdd())); + connect(m_addButton, TQT_SIGNAL(released()), + TQT_SLOT(slotAdd())); - connect(m_deleteButton, SIGNAL(released()), - SLOT(slotDelete())); + connect(m_deleteButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDelete())); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem *)), - SLOT(slotEdit(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + TQT_SLOT(slotEdit(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); initDialog(); @@ -198,7 +198,7 @@ ControlEditorDialog::slotUpdate() { RG_DEBUG << "ControlEditorDialog::slotUpdate" << endl; - //QPtrList<QListViewItem> selection = m_listView->selectedItems(); + //TQPtrList<TQListViewItem> selection = m_listView->selectedItems(); MidiDevice *md = dynamic_cast<MidiDevice *>(m_studio->getDevice(m_device)); @@ -206,7 +206,7 @@ ControlEditorDialog::slotUpdate() return ; ControlList::const_iterator it = md->beginControllers(); - QListViewItem *item; + TQListViewItem *item; int i = 0; m_listView->clear(); @@ -214,17 +214,17 @@ ControlEditorDialog::slotUpdate() for (; it != md->endControllers(); ++it) { Composition &comp = m_doc->getComposition(); - QString colour = + TQString colour = strtoqstr(comp.getGeneralColourMap().getNameByIndex(it->getColourIndex())); if (colour == "") colour = i18n("<default>"); - QString position = QString("%1").arg(it->getIPBPosition()); + TQString position = TQString("%1").arg(it->getIPBPosition()); if (position.toInt() == -1) position = notShowing; - QString value; + TQString value; value.sprintf("%d (0x%x)", it->getControllerValue(), it->getControllerValue()); @@ -233,11 +233,11 @@ ControlEditorDialog::slotUpdate() m_listView, strtoqstr(it->getName()), strtoqstr(it->getType()), - QString("-"), + TQString("-"), strtoqstr(it->getDescription()), - QString("%1").arg(it->getMin()), - QString("%1").arg(it->getMax()), - QString("%1").arg(it->getDefault()), + TQString("%1").arg(it->getMin()), + TQString("%1").arg(it->getMax()), + TQString("%1").arg(it->getDefault()), colour, position); } else { @@ -247,9 +247,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), value, strtoqstr(it->getDescription()), - QString("%1").arg(it->getMin()), - QString("%1").arg(it->getMax()), - QString("%1").arg(it->getDefault()), + TQString("%1").arg(it->getMin()), + TQString("%1").arg(it->getMax()), + TQString("%1").arg(it->getDefault()), colour, position); } @@ -257,21 +257,21 @@ ControlEditorDialog::slotUpdate() // create and set a colour pixmap // - QPixmap colourPixmap(16, 16); + TQPixmap colourPixmap(16, 16); Colour c = comp.getGeneralColourMap().getColourByIndex(it->getColourIndex()); - colourPixmap.fill(QColor(c.getRed(), c.getGreen(), c.getBlue())); + colourPixmap.fill(TQColor(c.getRed(), c.getGreen(), c.getBlue())); item->setPixmap(7, colourPixmap); m_listView->insertItem(item); } if (m_listView->childCount() == 0) { - QListViewItem *item = new QListViewItem(m_listView, i18n("<none>")); + TQListViewItem *item = new TQListViewItem(m_listView, i18n("<none>")); m_listView->insertItem(item); - m_listView->setSelectionMode(QListView::NoSelection); + m_listView->setSelectionMode(TQListView::NoSelection); } else { - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); } @@ -338,11 +338,11 @@ void ControlEditorDialog::setupActions() { KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -397,7 +397,7 @@ ControlEditorDialog::slotEdit() {} void -ControlEditorDialog::slotEdit(QListViewItem *i) +ControlEditorDialog::slotEdit(TQListViewItem *i) { RG_DEBUG << "ControlEditorDialog::slotEdit" << endl; @@ -412,7 +412,7 @@ ControlEditorDialog::slotEdit(QListViewItem *i) (this, md->getControlParameter(item->getId()), m_doc); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyControlParameterCommand *command = new ModifyControlParameterCommand(m_studio, m_device, @@ -425,7 +425,7 @@ ControlEditorDialog::slotEdit(QListViewItem *i) } void -ControlEditorDialog::closeEvent(QCloseEvent *e) +ControlEditorDialog::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); diff --git a/src/gui/editors/segment/ControlEditorDialog.h b/src/gui/editors/segment/ControlEditorDialog.h index 9270d2c..369a9b1 100644 --- a/src/gui/editors/segment/ControlEditorDialog.h +++ b/src/gui/editors/segment/ControlEditorDialog.h @@ -31,10 +31,10 @@ #include <kmainwindow.h> -class QWidget; -class QPushButton; -class QListViewItem; -class QCloseEvent; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQCloseEvent; class KListView; class KCommand; @@ -52,7 +52,7 @@ class ControlEditorDialog : public KMainWindow Q_OBJECT public: - ControlEditorDialog(QWidget *parent, + ControlEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId device); @@ -84,14 +84,14 @@ public slots: void slotClose(); void slotEdit(); - void slotEdit(QListViewItem *); + void slotEdit(TQListViewItem *); signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); @@ -100,13 +100,13 @@ protected: RosegardenGUIDoc *m_doc; DeviceId m_device; - QPushButton *m_closeButton; + TQPushButton *m_closeButton; - QPushButton *m_copyButton; - QPushButton *m_pasteButton; + TQPushButton *m_copyButton; + TQPushButton *m_pasteButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; KListView *m_listView; diff --git a/src/gui/editors/segment/ControlParameterEditDialog.cpp b/src/gui/editors/segment/ControlParameterEditDialog.cpp index bc779f5..1f4e9fd 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.cpp +++ b/src/gui/editors/segment/ControlParameterEditDialog.cpp @@ -24,7 +24,7 @@ #include "ControlParameterEditDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -37,25 +37,25 @@ #include "document/RosegardenGUIDoc.h" #include <kcombobox.h> #include <kdialogbase.h> -#include <qcolor.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpixmap.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpixmap.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -const QString notShowing(i18n("<not showing>")); +const TQString notShowing(i18n("<not showing>")); ControlParameterEditDialog::ControlParameterEditDialog( - QWidget *parent, + TQWidget *parent, ControlParameter *control, RosegardenGUIDoc *doc): KDialogBase(parent, 0, true, @@ -65,81 +65,81 @@ ControlParameterEditDialog::ControlParameterEditDialog( { m_dialogControl = *control; // copy in the ControlParameter - QVBox *vbox = makeVBoxMainWidget(); + TQVBox *vbox = makeVBoxMainWidget(); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Control Event Properties"), vbox); - QFrame *frame = new QFrame(groupBox); + TQFrame *frame = new TQFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new QLabel(i18n("Name:"), frame), 0, 0); - m_nameEdit = new QLineEdit(frame); + layout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); + m_nameEdit = new TQLineEdit(frame); layout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new QLabel(i18n("Type:"), frame), 1, 0); + layout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); m_typeCombo = new KComboBox(frame); layout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); - layout->addWidget(new QLabel(i18n("Description:"), frame), 2, 0); - m_description = new QLineEdit(frame); + layout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); + m_description = new TQLineEdit(frame); layout->addMultiCellWidget(m_description, 2, 2, 1, 2); // hex value alongside decimal value - m_hexValue = new QLabel(frame); + m_hexValue = new TQLabel(frame); layout->addWidget(m_hexValue, 3, 1); - layout->addWidget(new QLabel(i18n("Control Event value:"), frame), 3, 0); - m_controllerBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); + m_controllerBox = new TQSpinBox(frame); layout->addWidget(m_controllerBox, 3, 2); - layout->addWidget(new QLabel(i18n("Minimum value:"), frame), 4, 0); - m_minBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); + m_minBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); - layout->addWidget(new QLabel(i18n("Maximum value:"), frame), 5, 0); - m_maxBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); + m_maxBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); - layout->addWidget(new QLabel(i18n("Default value:"), frame), 6, 0); - m_defaultBox = new QSpinBox(frame); + layout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); + m_defaultBox = new TQSpinBox(frame); layout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); - layout->addWidget(new QLabel(i18n("Color:"), frame), 7, 0); + layout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); m_colourCombo = new KComboBox(frame); layout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); - layout->addWidget(new QLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); + layout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); m_ipbPosition = new KComboBox(frame); layout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); - connect(m_nameEdit, SIGNAL(textChanged(const QString&)), - SLOT(slotNameChanged(const QString&))); + connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotNameChanged(const TQString&))); - connect(m_typeCombo, SIGNAL(activated(int)), - SLOT(slotTypeChanged(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotTypeChanged(int))); - connect(m_description, SIGNAL(textChanged(const QString&)), - SLOT(slotDescriptionChanged(const QString &))); + connect(m_description, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotDescriptionChanged(const TQString &))); - connect(m_controllerBox, SIGNAL(valueChanged(int)), - SLOT(slotControllerChanged(int))); + connect(m_controllerBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotControllerChanged(int))); - connect(m_minBox, SIGNAL(valueChanged(int)), - SLOT(slotMinChanged(int))); + connect(m_minBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotMinChanged(int))); - connect(m_maxBox, SIGNAL(valueChanged(int)), - SLOT(slotMaxChanged(int))); + connect(m_maxBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotMaxChanged(int))); - connect(m_defaultBox, SIGNAL(valueChanged(int)), - SLOT(slotDefaultChanged(int))); + connect(m_defaultBox, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotDefaultChanged(int))); - connect(m_colourCombo, SIGNAL(activated(int)), - SLOT(slotColourChanged(int))); + connect(m_colourCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotColourChanged(int))); - connect(m_ipbPosition, SIGNAL(activated(int)), - SLOT(slotIPBPositionChanged(int))); + connect(m_ipbPosition, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotIPBPositionChanged(int))); //m_nameEdit->selectAll(); //m_description->selectAll(); @@ -170,11 +170,11 @@ ControlParameterEditDialog::ControlParameterEditDialog( // ColourMap &colourMap = m_doc->getComposition().getGeneralColourMap(); RCMap::const_iterator it; - QPixmap colourPixmap(16, 16); + TQPixmap colourPixmap(16, 16); for (it = colourMap.begin(); it != colourMap.end(); ++it) { Colour c = it->second.first; - colourPixmap.fill(QColor(c.getRed(), c.getGreen(), c.getBlue())); + colourPixmap.fill(TQColor(c.getRed(), c.getGreen(), c.getBlue())); m_colourCombo->insertItem(colourPixmap, strtoqstr(it->second.second)); } @@ -182,7 +182,7 @@ ControlParameterEditDialog::ControlParameterEditDialog( // m_ipbPosition->insertItem(notShowing); for (unsigned int i = 0; i < 32; i++) - m_ipbPosition->insertItem(QString("%1").arg(i)); + m_ipbPosition->insertItem(TQString("%1").arg(i)); if (m_control->getType() == Controller::EventType) m_typeCombo->setCurrentItem(0); @@ -206,7 +206,7 @@ ControlParameterEditDialog::populate() m_description->setText(strtoqstr(m_control->getDescription())); m_controllerBox->setValue(int(m_control->getControllerValue())); - QString hexValue; + TQString hexValue; hexValue.sprintf("(0x%x)", m_control->getControllerValue()); m_hexValue->setText(hexValue); @@ -252,7 +252,7 @@ ControlParameterEditDialog::populate() } void -ControlParameterEditDialog::slotNameChanged(const QString &str) +ControlParameterEditDialog::slotNameChanged(const TQString &str) { RG_DEBUG << "ControlParameterEditDialog::slotNameChanged" << endl; m_dialogControl.setName(qstrtostr(str)); @@ -268,7 +268,7 @@ ControlParameterEditDialog::slotTypeChanged(int value) } void -ControlParameterEditDialog::slotDescriptionChanged(const QString &str) +ControlParameterEditDialog::slotDescriptionChanged(const TQString &str) { RG_DEBUG << "ControlParameterEditDialog::slotDescriptionChanged" << endl; m_dialogControl.setDescription(qstrtostr(str)); @@ -281,7 +281,7 @@ ControlParameterEditDialog::slotControllerChanged(int value) m_dialogControl.setControllerValue(value); // set hex value - QString hexValue; + TQString hexValue; hexValue.sprintf("(0x%x)", value); m_hexValue->setText(hexValue); } diff --git a/src/gui/editors/segment/ControlParameterEditDialog.h b/src/gui/editors/segment/ControlParameterEditDialog.h index b9f4606..1c6bc01 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.h +++ b/src/gui/editors/segment/ControlParameterEditDialog.h @@ -30,11 +30,11 @@ #include <kdialogbase.h> -class QWidget; -class QString; -class QSpinBox; -class QLineEdit; -class QLabel; +class TQWidget; +class TQString; +class TQSpinBox; +class TQLineEdit; +class TQLabel; class KComboBox; @@ -48,7 +48,7 @@ class ControlParameterEditDialog : public KDialogBase { Q_OBJECT public: - ControlParameterEditDialog(QWidget *parent, + ControlParameterEditDialog(TQWidget *parent, ControlParameter *control, RosegardenGUIDoc *doc); @@ -56,9 +56,9 @@ public: public slots: - void slotNameChanged(const QString &); + void slotNameChanged(const TQString &); void slotTypeChanged(int); - void slotDescriptionChanged(const QString &); + void slotDescriptionChanged(const TQString &); void slotControllerChanged(int); void slotMinChanged(int); void slotMaxChanged(int); @@ -73,16 +73,16 @@ protected: ControlParameter *m_control; ControlParameter m_dialogControl; - QLineEdit *m_nameEdit; + TQLineEdit *m_nameEdit; KComboBox *m_typeCombo; - QLineEdit *m_description; - QSpinBox *m_controllerBox; - QSpinBox *m_minBox; - QSpinBox *m_maxBox; - QSpinBox *m_defaultBox; + TQLineEdit *m_description; + TQSpinBox *m_controllerBox; + TQSpinBox *m_minBox; + TQSpinBox *m_maxBox; + TQSpinBox *m_defaultBox; KComboBox *m_colourCombo; KComboBox *m_ipbPosition; - QLabel *m_hexValue; + TQLabel *m_hexValue; }; diff --git a/src/gui/editors/segment/ControlParameterItem.cpp b/src/gui/editors/segment/ControlParameterItem.cpp index beb0922..8fdeabb 100644 --- a/src/gui/editors/segment/ControlParameterItem.cpp +++ b/src/gui/editors/segment/ControlParameterItem.cpp @@ -25,8 +25,8 @@ #include "ControlParameterItem.h" -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> namespace Rosegarden diff --git a/src/gui/editors/segment/ControlParameterItem.h b/src/gui/editors/segment/ControlParameterItem.h index 6746ca2..7be91b3 100644 --- a/src/gui/editors/segment/ControlParameterItem.h +++ b/src/gui/editors/segment/ControlParameterItem.h @@ -26,7 +26,7 @@ #ifndef _RG_CONTROLPARAMETERITEM_H_ #define _RG_CONTROLPARAMETERITEM_H_ -#include <qstring.h> +#include <tqstring.h> #include <klistview.h> @@ -38,16 +38,16 @@ class ControlParameterItem : public KListViewItem { public: ControlParameterItem(int id, - QListView *parent, - QString str1, - QString str2, - QString str3, - QString str4, - QString str5, - QString str6, - QString str7, - QString str8, - QString str9): + TQListView *parent, + TQString str1, + TQString str2, + TQString str3, + TQString str4, + TQString str5, + TQString str6, + TQString str7, + TQString str8, + TQString str9): KListViewItem(parent, str1, str2, str3, str4, str5, str6, str7, str8), m_id(id) { setText(8, str9); } @@ -56,7 +56,7 @@ public: protected: int m_id; - QString m_string9; + TQString m_string9; }; diff --git a/src/gui/editors/segment/MarkerEditor.cpp b/src/gui/editors/segment/MarkerEditor.cpp index 61caaa7..d9df8a2 100644 --- a/src/gui/editors/segment/MarkerEditor.cpp +++ b/src/gui/editors/segment/MarkerEditor.cpp @@ -25,7 +25,7 @@ #include "MarkerEditor.h" #include "MarkerEditorViewItem.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -51,33 +51,33 @@ #include <kmainwindow.h> #include <kstdaccel.h> #include <kstdaction.h> -#include <qaccel.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qptrlist.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcanvas.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqptrlist.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcanvas.h> namespace Rosegarden { -MarkerEditor::MarkerEditor(QWidget *parent, +MarkerEditor::MarkerEditor(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "markereditordialog"), m_doc(doc), m_modified(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Markers")); @@ -91,44 +91,44 @@ MarkerEditor::MarkerEditor(QWidget *parent, for (int i = 0; i < 3; ++i) m_listView->setColumnAlignment(i, Qt::AlignHCenter); - QGroupBox *posGroup = new QGroupBox(2, Horizontal, + TQGroupBox *posGroup = new TQGroupBox(2, Horizontal, i18n("Pointer position"), mainFrame); - new QLabel(i18n("Absolute time:"), posGroup); - m_absoluteTime = new QLabel(posGroup); + new TQLabel(i18n("Absolute time:"), posGroup); + m_absoluteTime = new TQLabel(posGroup); - new QLabel(i18n("Real time:"), posGroup); - m_realTime = new QLabel(posGroup); + new TQLabel(i18n("Real time:"), posGroup); + m_realTime = new TQLabel(posGroup); - new QLabel(i18n("In measure:"), posGroup); - m_barTime = new QLabel(posGroup); + new TQLabel(i18n("In measure:"), posGroup); + m_barTime = new TQLabel(posGroup); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_addButton = new QPushButton(i18n("Add"), btnBox); - m_deleteButton = new QPushButton(i18n("Delete"), btnBox); - m_deleteAllButton = new QPushButton(i18n("Delete All"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); + m_deleteAllButton = new TQPushButton(i18n("Delete All"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Marker")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Marker")); - QToolTip::add + TQToolTip::add (m_deleteAllButton, i18n("Delete All Markers")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Marker Editor")); @@ -141,48 +141,48 @@ MarkerEditor::MarkerEditor(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_addButton, SIGNAL(released()), - SLOT(slotAdd())); + connect(m_addButton, TQT_SIGNAL(released()), + TQT_SLOT(slotAdd())); - connect(m_deleteButton, SIGNAL(released()), - SLOT(slotDelete())); + connect(m_deleteButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDelete())); - connect(m_closeButton, SIGNAL(released()), - SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), + TQT_SLOT(slotClose())); - connect(m_deleteAllButton, SIGNAL(released()), - SLOT(slotDeleteAll())); + connect(m_deleteAllButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDeleteAll())); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem *)), - SLOT(slotEdit(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + TQT_SLOT(slotEdit(TQListViewItem *))); - connect(m_listView, SIGNAL(pressed(QListViewItem *)), - this, SLOT(slotItemClicked(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem *)), + this, TQT_SLOT(slotItemClicked(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); m_listView->setItemsRenameable(true); initDialog(); setAutoSaveSettings(MarkerEditorConfigGroup, true); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } void MarkerEditor::updatePosition() { timeT pos = m_doc->getComposition().getPosition(); - m_absoluteTime->setText(QString("%1").arg(pos)); + m_absoluteTime->setText(TQString("%1").arg(pos)); RealTime rT = m_doc->getComposition().getElapsedRealTime(pos); long hours = rT.sec / (60 * 60); @@ -190,11 +190,11 @@ MarkerEditor::updatePosition() long secs = rT.sec; long msecs = rT.msec(); - QString realTime, secsStr; + TQString realTime, secsStr; if (hours) - realTime += QString("%1h ").arg(hours); + realTime += TQString("%1h ").arg(hours); if (mins) - realTime += QString("%1m ").arg(mins); + realTime += TQString("%1m ").arg(mins); secsStr.sprintf("%ld.%03lds", secs, msecs); realTime += secsStr; @@ -202,8 +202,8 @@ MarkerEditor::updatePosition() if (m_realTime->text() != realTime) m_realTime->setText(realTime); - QString barTime = - QString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); + TQString barTime = + TQString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); // again only update if needed if (m_barTime->text() != barTime) @@ -243,7 +243,7 @@ MarkerEditor::slotUpdate() { RG_DEBUG << "MarkerEditor::slotUpdate" << endl; - //QPtrList<QListViewItem> selection = m_listView->selectedItems(); + //TQPtrList<TQListViewItem> selection = m_listView->selectedItems(); MarkerEditorViewItem *item; @@ -258,7 +258,7 @@ MarkerEditor::slotUpdate() int timeMode = kapp->config()->readNumEntry("timemode", 0); for (it = markers.begin(); it != markers.end(); ++it) { - QString timeString = makeTimeString((*it)->getTime(), timeMode); + TQString timeString = makeTimeString((*it)->getTime(), timeMode); item = new MarkerEditorViewItem(m_listView, @@ -275,14 +275,14 @@ MarkerEditor::slotUpdate() } if (m_listView->childCount() == 0) { - QListViewItem *item = + TQListViewItem *item = new MarkerEditorViewItem(m_listView, 0, i18n("<none>")); ((MarkerEditorViewItem *)item)->setFake(true); m_listView->insertItem(item); - m_listView->setSelectionMode(QListView::NoSelection); + m_listView->setSelectionMode(TQListView::NoSelection); } else { - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); } updatePosition(); @@ -295,7 +295,7 @@ MarkerEditor::slotDeleteAll() RG_DEBUG << "MarkerEditor::slotDeleteAll" << endl; KMacroCommand *command = new KMacroCommand(i18n("Remove all markers")); - QListViewItem *item = m_listView->firstChild(); + TQListViewItem *item = m_listView->firstChild(); do { MarkerEditorViewItem *ei = @@ -333,7 +333,7 @@ void MarkerEditor::slotDelete() { RG_DEBUG << "MarkerEditor::slotDelete" << endl; - QListViewItem *item = m_listView->currentItem(); + TQListViewItem *item = m_listView->currentItem(); MarkerEditorViewItem *ei = dynamic_cast<MarkerEditorViewItem *>(item); @@ -368,11 +368,11 @@ void MarkerEditor::setupActions() { KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -387,37 +387,37 @@ MarkerEditor::setupActions() actionCollection(), KStdAction::stdName(KStdAction::Redo)); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); kapp->config()->setGroup(MarkerEditorConfigGroup); int timeMode = kapp->config()->readNumEntry("timemode", 0); KRadioAction *action; - QCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); - QIconSet icon(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); + TQIconSet icon(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -459,11 +459,11 @@ MarkerEditor::checkModified() } void -MarkerEditor::slotEdit(QListViewItem *i) +MarkerEditor::slotEdit(TQListViewItem *i) { RG_DEBUG << "MarkerEditor::slotEdit" << endl; - if (m_listView->selectionMode() == QListView::NoSelection) { + if (m_listView->selectionMode() == TQListView::NoSelection) { // The marker list is empty, so we shouldn't allow editing the // <none> placeholder return ; @@ -483,7 +483,7 @@ MarkerEditor::slotEdit(QListViewItem *i) item->text(1), item->text(2)); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyMarkerCommand *command = new ModifyMarkerCommand(&m_doc->getComposition(), item->getID(), @@ -499,7 +499,7 @@ MarkerEditor::slotEdit(QListViewItem *i) } void -MarkerEditor::closeEvent(QCloseEvent *e) +MarkerEditor::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -516,7 +516,7 @@ MarkerEditor::setDocument(RosegardenGUIDoc *doc) } void -MarkerEditor::slotItemClicked(QListViewItem *item) +MarkerEditor::slotItemClicked(TQListViewItem *item) { RG_DEBUG << "MarkerEditor::slotItemClicked" << endl; MarkerEditorViewItem *ei = @@ -541,7 +541,7 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) m_doc->getComposition().getMusicalTimeForAbsoluteTime (time, bar, beat, fraction, remainder); ++bar; - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -557,12 +557,12 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) { RealTime rt = m_doc->getComposition().getElapsedRealTime(time); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(time); + return TQString("%1 ").arg(time); } } diff --git a/src/gui/editors/segment/MarkerEditor.h b/src/gui/editors/segment/MarkerEditor.h index d3c9ac7..8d6de0e 100644 --- a/src/gui/editors/segment/MarkerEditor.h +++ b/src/gui/editors/segment/MarkerEditor.h @@ -27,16 +27,16 @@ #define _RG_MARKEREDITOR_H_ #include <kmainwindow.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QPushButton; -class QListViewItem; -class QLabel; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQLabel; +class TQCloseEvent; +class TQAccel; class KListView; class KCommand; @@ -53,7 +53,7 @@ class MarkerEditor : public KMainWindow Q_OBJECT public: - MarkerEditor(QWidget *parent, + MarkerEditor(TQWidget *parent, RosegardenGUIDoc *doc); ~MarkerEditor(); @@ -71,7 +71,7 @@ public: // update pointer position void updatePosition(); - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } public slots: void slotUpdate(); @@ -80,8 +80,8 @@ public slots: void slotDelete(); void slotDeleteAll(); void slotClose(); - void slotEdit(QListViewItem *); - void slotItemClicked(QListViewItem *); + void slotEdit(TQListViewItem *); + void slotItemClicked(TQListViewItem *); void slotMusicalTime(); void slotRealTime(); @@ -92,30 +92,30 @@ signals: void jumpToMarker(timeT); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); - QString makeTimeString(timeT time, int timeMode); + TQString makeTimeString(timeT time, int timeMode); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QLabel *m_absoluteTime; - QLabel *m_realTime; - QLabel *m_barTime; + TQLabel *m_absoluteTime; + TQLabel *m_realTime; + TQLabel *m_barTime; - QPushButton *m_closeButton; + TQPushButton *m_closeButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; - QPushButton *m_deleteAllButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; + TQPushButton *m_deleteAllButton; KListView *m_listView; bool m_modified; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/editors/segment/MarkerEditorViewItem.cpp b/src/gui/editors/segment/MarkerEditorViewItem.cpp index 9ff2bda..004f9d9 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.cpp +++ b/src/gui/editors/segment/MarkerEditorViewItem.cpp @@ -27,7 +27,7 @@ namespace Rosegarden { int -MarkerEditorViewItem::compare(QListViewItem * i, int col, bool ascending) const +MarkerEditorViewItem::compare(TQListViewItem * i, int col, bool ascending) const { MarkerEditorViewItem *ei = dynamic_cast<MarkerEditorViewItem *>(i); diff --git a/src/gui/editors/segment/MarkerEditorViewItem.h b/src/gui/editors/segment/MarkerEditorViewItem.h index 010d227..9852202 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.h +++ b/src/gui/editors/segment/MarkerEditorViewItem.h @@ -35,20 +35,20 @@ namespace Rosegarden { class MarkerEditorViewItem : public KListViewItem { public: - MarkerEditorViewItem(QListView * parent, int id, - QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null): + MarkerEditorViewItem(TQListView * parent, int id, + TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null): KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_rawTime(0), m_fake(false), m_id(id) { ; } - virtual int compare(QListViewItem * i, int col, bool ascending) const; + virtual int compare(TQListViewItem * i, int col, bool ascending) const; void setRawTime(Rosegarden::timeT rawTime) { m_rawTime = rawTime; } Rosegarden::timeT getRawTime() const { return m_rawTime; } diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp index bfc795c..da56edc 100644 --- a/src/gui/editors/segment/PlayList.cpp +++ b/src/gui/editors/segment/PlayList.cpp @@ -27,43 +27,43 @@ #include "PlayListView.h" #include "PlayListViewItem.h" #include "document/ConfigGroups.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kconfig.h> #include <kfiledialog.h> #include <kglobal.h> #include <kurl.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qdragobject.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqdragobject.h> namespace Rosegarden { -PlayList::PlayList(QWidget *parent, const char *name) - : QVBox(parent, name), +PlayList::PlayList(TQWidget *parent, const char *name) + : TQVBox(parent, name), m_listView(new PlayListView(this)), - m_buttonBar(new QFrame(this)), - m_barLayout(new QHBoxLayout(m_buttonBar)), + m_buttonBar(new TQFrame(this)), + m_barLayout(new TQHBoxLayout(m_buttonBar)), m_playButton(0), m_moveUpButton(0), m_moveDownButton(0), m_deleteButton(0), m_clearButton(0) { - m_openButton = new QPushButton(m_buttonBar); - m_playButton = new QPushButton(m_buttonBar); - m_moveUpButton = new QPushButton(m_buttonBar); - m_moveDownButton = new QPushButton(m_buttonBar); - m_deleteButton = new QPushButton(m_buttonBar); - m_clearButton = new QPushButton(m_buttonBar); + m_openButton = new TQPushButton(m_buttonBar); + m_playButton = new TQPushButton(m_buttonBar); + m_moveUpButton = new TQPushButton(m_buttonBar); + m_moveDownButton = new TQPushButton(m_buttonBar); + m_deleteButton = new TQPushButton(m_buttonBar); + m_clearButton = new TQPushButton(m_buttonBar); m_barLayout->addWidget(m_openButton); m_barLayout->addWidget(m_playButton); m_barLayout->addWidget(m_moveUpButton); @@ -80,29 +80,29 @@ PlayList::PlayList(QWidget *parent, const char *name) m_deleteButton ->setText(i18n("Delete")); m_clearButton ->setText(i18n("Clear")); - connect(m_openButton, SIGNAL(clicked()), - SLOT(slotOpenFiles())); + connect(m_openButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotOpenFiles())); - connect(m_playButton, SIGNAL(clicked()), - SLOT(slotPlay())); + connect(m_playButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPlay())); - connect(m_deleteButton, SIGNAL(clicked()), - SLOT(slotDeleteCurrent())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotDeleteCurrent())); - connect(m_clearButton, SIGNAL(clicked()), - SLOT(slotClear())); + connect(m_clearButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotClear())); - connect(m_moveUpButton, SIGNAL(clicked()), - SLOT(slotMoveUp())); + connect(m_moveUpButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveUp())); - connect(m_moveDownButton, SIGNAL(clicked()), - SLOT(slotMoveDown())); + connect(m_moveDownButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveDown())); - connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), - SLOT(slotCurrentItemChanged(QListViewItem*))); + connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), + TQT_SLOT(slotCurrentItemChanged(TQListViewItem*))); - connect(m_listView, SIGNAL(dropped(QDropEvent*, QListViewItem*)), - SLOT(slotDropped(QDropEvent*, QListViewItem*))); + connect(m_listView, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), + TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*))); restore(); @@ -133,17 +133,17 @@ void PlayList::slotOpenFiles() } void -PlayList::slotDropped(QDropEvent *event, QListViewItem* after) +PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after) { - QStrList uri; + TQStrList uri; // see if we can decode a URI.. if not, just ignore it - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { // okay, we have a URI.. process it // weed out non-rg files // - for (QString url = uri.first(); url; url = uri.next()) { + for (TQString url = uri.first(); url; url = uri.next()) { if (url.right(3).lower() == ".rg") new PlayListViewItem(m_listView, after, KURL(url)); @@ -163,8 +163,8 @@ void PlayList::slotPlay() void PlayList::slotMoveUp() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *previousItem = m_listView->previousSibling(currentItem); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *previousItem = m_listView->previousSibling(currentItem); if (previousItem) previousItem->moveItem(currentItem); @@ -174,8 +174,8 @@ void PlayList::slotMoveUp() void PlayList::slotMoveDown() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *nextItem = currentItem->nextSibling(); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *nextItem = currentItem->nextSibling(); if (nextItem) currentItem->moveItem(nextItem); @@ -191,17 +191,17 @@ void PlayList::slotClear() void PlayList::slotDeleteCurrent() { - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (currentItem) delete currentItem; } -void PlayList::slotCurrentItemChanged(QListViewItem* currentItem) +void PlayList::slotCurrentItemChanged(TQListViewItem* currentItem) { enableButtons(currentItem); } -void PlayList::enableButtons(QListViewItem* currentItem) +void PlayList::enableButtons(TQListViewItem* currentItem) { bool enable = (currentItem != 0); @@ -221,7 +221,7 @@ void PlayList::enableButtons(QListViewItem* currentItem) void PlayList::save() { - QStringList urlList; + TQStringList urlList; PlayListViewItem* item = dynamic_cast<PlayListViewItem*>(getListView()->firstChild()); while (item) { @@ -242,9 +242,9 @@ void PlayList::restore() getListView()->restoreLayout(kc, PlayListConfigGroup); KConfigGroupSaver cs(kc, PlayListConfigGroup); - QStringList urlList = kc->readListEntry("Playlist Files"); + TQStringList urlList = kc->readListEntry("Playlist Files"); - for (QStringList::Iterator it = urlList.begin(); + for (TQStringList::Iterator it = urlList.begin(); it != urlList.end(); ++it) { new PlayListViewItem(getListView(), KURL(*it)); } diff --git a/src/gui/editors/segment/PlayList.h b/src/gui/editors/segment/PlayList.h index 8e40c8c..8c04553 100644 --- a/src/gui/editors/segment/PlayList.h +++ b/src/gui/editors/segment/PlayList.h @@ -26,15 +26,15 @@ #ifndef _RG_PLAYLIST_H_ #define _RG_PLAYLIST_H_ -#include <qvbox.h> +#include <tqvbox.h> -class QWidget; -class QPushButton; -class QListViewItem; -class QHBoxLayout; -class QFrame; -class QDropEvent; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQHBoxLayout; +class TQFrame; +class TQDropEvent; namespace Rosegarden @@ -48,16 +48,16 @@ class PlayList : public QVBox Q_OBJECT public: - PlayList(QWidget *parent = 0, const char *name = 0); + PlayList(TQWidget *parent = 0, const char *name = 0); ~PlayList(); PlayListView* getListView() { return m_listView; } - void enableButtons(QListViewItem*); + void enableButtons(TQListViewItem*); signals: - void play(QString); + void play(TQString); protected slots: void slotOpenFiles(); @@ -66,8 +66,8 @@ protected slots: void slotMoveDown(); void slotDeleteCurrent(); void slotClear(); - void slotCurrentItemChanged(QListViewItem*); - void slotDropped(QDropEvent*, QListViewItem*); + void slotCurrentItemChanged(TQListViewItem*); + void slotDropped(TQDropEvent*, TQListViewItem*); protected: void save(); @@ -75,15 +75,15 @@ protected: //--------------- Data members --------------------------------- PlayListView* m_listView; - QFrame* m_buttonBar; - QHBoxLayout* m_barLayout; - - QPushButton* m_openButton; - QPushButton* m_playButton; - QPushButton* m_moveUpButton; - QPushButton* m_moveDownButton; - QPushButton* m_deleteButton; - QPushButton* m_clearButton; + TQFrame* m_buttonBar; + TQHBoxLayout* m_barLayout; + + TQPushButton* m_openButton; + TQPushButton* m_playButton; + TQPushButton* m_moveUpButton; + TQPushButton* m_moveDownButton; + TQPushButton* m_deleteButton; + TQPushButton* m_clearButton; }; diff --git a/src/gui/editors/segment/PlayListDialog.cpp b/src/gui/editors/segment/PlayListDialog.cpp index 7aa03a5..b519b6e 100644 --- a/src/gui/editors/segment/PlayListDialog.cpp +++ b/src/gui/editors/segment/PlayListDialog.cpp @@ -28,15 +28,15 @@ #include "document/ConfigGroups.h" #include "PlayList.h" #include <kdialogbase.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -PlayListDialog::PlayListDialog(QString caption, - QWidget* parent, const char* name) +PlayListDialog::PlayListDialog(TQString caption, + TQWidget* parent, const char* name) : KDialogBase(parent, name, false, caption, KDialogBase::Close, // standard buttons KDialogBase::Close, // default button @@ -58,7 +58,7 @@ void PlayListDialog::restore() setInitialSize(configDialogSize(PlayListConfigGroup)); } -void PlayListDialog::closeEvent(QCloseEvent *e) +void PlayListDialog::closeEvent(TQCloseEvent *e) { save(); emit closing(); diff --git a/src/gui/editors/segment/PlayListDialog.h b/src/gui/editors/segment/PlayListDialog.h index 51db8ca..5130ee3 100644 --- a/src/gui/editors/segment/PlayListDialog.h +++ b/src/gui/editors/segment/PlayListDialog.h @@ -27,11 +27,11 @@ #define _RG_PLAYLISTDIALOG_H_ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> -class QWidget; -class QCloseEvent; +class TQWidget; +class TQCloseEvent; namespace Rosegarden @@ -45,7 +45,7 @@ class PlayListDialog : public KDialogBase Q_OBJECT public: - PlayListDialog(QString caption, QWidget* parent = 0, const char* name = 0); + PlayListDialog(TQString caption, TQWidget* parent = 0, const char* name = 0); PlayList* getPlayList() { return m_playList; } @@ -56,7 +56,7 @@ signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *e); + virtual void closeEvent(TQCloseEvent *e); void save(); void restore(); diff --git a/src/gui/editors/segment/PlayListView.cpp b/src/gui/editors/segment/PlayListView.cpp index 8c17076..ff4d1c8 100644 --- a/src/gui/editors/segment/PlayListView.cpp +++ b/src/gui/editors/segment/PlayListView.cpp @@ -25,11 +25,11 @@ #include "PlayListView.h" #include <klocale.h> -#include <qdragobject.h> +#include <tqdragobject.h> namespace Rosegarden { -PlayListView::PlayListView(QWidget *parent, const char *name) +PlayListView::PlayListView(TQWidget *parent, const char *name) : KListView(parent, name) { addColumn(i18n("Title")); @@ -46,15 +46,15 @@ PlayListView::PlayListView(QWidget *parent, const char *name) setSorting(-1); } -bool PlayListView::acceptDrag(QDropEvent* e) const +bool PlayListView::acceptDrag(TQDropEvent* e) const { - return QUriDrag::canDecode(e) || KListView::acceptDrag(e); + return TQUriDrag::canDecode(e) || KListView::acceptDrag(e); } -QListViewItem* PlayListView::previousSibling(QListViewItem* item) +TQListViewItem* PlayListView::previousSibling(TQListViewItem* item) { - QListViewItem* prevSib = firstChild(); + TQListViewItem* prevSib = firstChild(); while(prevSib && prevSib->nextSibling() != item) prevSib = prevSib->nextSibling(); diff --git a/src/gui/editors/segment/PlayListView.h b/src/gui/editors/segment/PlayListView.h index a18b8e8..43390d0 100644 --- a/src/gui/editors/segment/PlayListView.h +++ b/src/gui/editors/segment/PlayListView.h @@ -32,16 +32,16 @@ namespace Rosegarden { class PlayListView : public KListView { public: - PlayListView(QWidget *parent=0, const char *name=0); + PlayListView(TQWidget *parent=0, const char *name=0); - QListViewItem* previousSibling(QListViewItem*); + TQListViewItem* previousSibling(TQListViewItem*); protected: -// virtual void dragEnterEvent(QDragEnterEvent *event); -// virtual void dropEvent(QDropEvent*); +// virtual void dragEnterEvent(TQDragEnterEvent *event); +// virtual void dropEvent(TQDropEvent*); -// virtual void dragEnterEvent(QDragEnterEvent*); - virtual bool acceptDrag(QDropEvent*) const; +// virtual void dragEnterEvent(TQDragEnterEvent*); + virtual bool acceptDrag(TQDropEvent*) const; }; diff --git a/src/gui/editors/segment/PlayListViewItem.cpp b/src/gui/editors/segment/PlayListViewItem.cpp index df04a2e..ab0c25c 100644 --- a/src/gui/editors/segment/PlayListViewItem.cpp +++ b/src/gui/editors/segment/PlayListViewItem.cpp @@ -32,7 +32,7 @@ PlayListViewItem::PlayListViewItem(KListView* parent, KURL kurl) { } -PlayListViewItem::PlayListViewItem(KListView* parent, QListViewItem* after, KURL kurl) +PlayListViewItem::PlayListViewItem(KListView* parent, TQListViewItem* after, KURL kurl) : KListViewItem(parent, after, kurl.fileName(), kurl.prettyURL()), m_kurl(kurl) { diff --git a/src/gui/editors/segment/PlayListViewItem.h b/src/gui/editors/segment/PlayListViewItem.h index b88de0f..a622682 100644 --- a/src/gui/editors/segment/PlayListViewItem.h +++ b/src/gui/editors/segment/PlayListViewItem.h @@ -34,7 +34,7 @@ class PlayListViewItem : public KListViewItem { public: PlayListViewItem(KListView* parent, KURL); - PlayListViewItem(KListView* parent, QListViewItem*, KURL); + PlayListViewItem(KListView* parent, TQListViewItem*, KURL); const KURL& getURL() { return m_kurl; } diff --git a/src/gui/editors/segment/TrackButtons.cpp b/src/gui/editors/segment/TrackButtons.cpp index 5cf9908..39e19d2 100644 --- a/src/gui/editors/segment/TrackButtons.cpp +++ b/src/gui/editors/segment/TrackButtons.cpp @@ -24,7 +24,7 @@ #include "TrackButtons.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kstddirs.h> @@ -50,19 +50,19 @@ #include <kglobal.h> #include <kled.h> #include <kmessagebox.h> -#include <qcursor.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpopupmenu.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqtooltip.h> namespace Rosegarden { @@ -72,16 +72,16 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f) - : QFrame(parent, name, f), + : TQFrame(parent, name, f), m_doc(doc), - m_layout(new QVBoxLayout(this)), - m_recordSigMapper(new QSignalMapper(this)), - m_muteSigMapper(new QSignalMapper(this)), - m_clickedSigMapper(new QSignalMapper(this)), - m_instListSigMapper(new QSignalMapper(this)), + m_layout(new TQVBoxLayout(this)), + m_recordSigMapper(new TQSignalMapper(this)), + m_muteSigMapper(new TQSignalMapper(this)), + m_clickedSigMapper(new TQSignalMapper(this)), + m_instListSigMapper(new TQSignalMapper(this)), m_tracks(doc->getComposition().getNbTracks()), m_offset(4), m_cellSize(trackCellHeight), @@ -108,18 +108,18 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, m_layout->addStretch(20); - connect(m_recordSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotToggleRecordTrack(int))); + connect(m_recordSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotToggleRecordTrack(int))); - connect(m_muteSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotToggleMutedTrack(int))); + connect(m_muteSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotToggleMutedTrack(int))); // connect signal mappers - connect(m_instListSigMapper, SIGNAL(mapped(int)), - this, SLOT(slotInstrumentSelection(int))); + connect(m_instListSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SLOT(slotInstrumentSelection(int))); - connect(m_clickedSigMapper, SIGNAL(mapped(int)), - this, SIGNAL(trackSelected(int))); + connect(m_clickedSigMapper, TQT_SIGNAL(mapped(int)), + this, TQT_SIGNAL(trackSelected(int))); // // Populate instrument popup menu just once at start-up // // @@ -149,7 +149,7 @@ TrackButtons::makeButtons() Track *track = m_doc->getComposition().getTrackByPosition(i); if (track) { - QFrame *trackHBox = makeButton(track->getId()); + TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { m_layout->addWidget(trackHBox); @@ -161,7 +161,7 @@ TrackButtons::makeButtons() populateButtons(); } -void TrackButtons::setButtonMapping(QObject* obj, TrackId trackId) +void TrackButtons::setButtonMapping(TQObject* obj, TrackId trackId) { m_clickedSigMapper->setMapping(obj, trackId); m_instListSigMapper->setMapping(obj, trackId); @@ -271,7 +271,7 @@ TrackButtons::removeButtons(unsigned int position) delete m_trackHBoxes[position]; // deletes all child widgets (button, led, label...) - std::vector<QFrame*>::iterator it = m_trackHBoxes.begin(); + std::vector<TQFrame*>::iterator it = m_trackHBoxes.begin(); it += position; m_trackHBoxes.erase(it); @@ -293,7 +293,7 @@ TrackButtons::slotUpdateTracks() for (unsigned int i = m_tracks; i < newNbTracks; ++i) { track = m_doc->getComposition().getTrackByPosition(i); if (track) { - QFrame *trackHBox = makeButton(track->getId()); + TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { trackHBox->show(); @@ -343,7 +343,7 @@ TrackButtons::slotUpdateTracks() if (track) { m_trackLabels[i]->setId(track->getId()); - QLabel *trackLabel = m_trackLabels[i]->getTrackLabel(); + TQLabel *trackLabel = m_trackLabels[i]->getTrackLabel(); if (track->getLabel() == std::string("")) { Instrument *ins = @@ -530,7 +530,7 @@ TrackButtons::getHighlightedTracks() } void -TrackButtons::slotRenameTrack(QString newName, TrackId trackId) +TrackButtons::slotRenameTrack(TQString newName, TrackId trackId) { m_doc->getCommandHistory()->addCommand (new RenameTrackCommand(&m_doc->getComposition(), @@ -582,7 +582,7 @@ TrackButtons::slotInstrumentSelection(int trackId) int position = comp.getTrackById(trackId)->getPosition(); - QString instrumentName = i18n("<no instrument>"); + TQString instrumentName = i18n("<no instrument>"); Track *track = comp.getTrackByPosition(position); Instrument *instrument = 0; @@ -603,7 +603,7 @@ TrackButtons::slotInstrumentSelection(int trackId) // Device/Bank dialog then we reload the whole menu here. // - QPopupMenu instrumentPopup(this); + TQPopupMenu instrumentPopup(this); populateInstrumentPopup(instrument, &instrumentPopup); @@ -611,7 +611,7 @@ TrackButtons::slotInstrumentSelection(int trackId) // m_popupItem = position; - instrumentPopup.exec(QCursor::pos()); + instrumentPopup.exec(TQCursor::pos()); // Restore the label back to what it was showing m_trackLabels[position]->showLabel(m_trackInstrumentLabels); @@ -634,30 +634,30 @@ TrackButtons::slotInstrumentSelection(int trackId) } void -TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* instrumentPopup) +TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* instrumentPopup) { - static QPixmap connectedPixmap, unconnectedPixmap, + static TQPixmap connectedPixmap, unconnectedPixmap, connectedUsedPixmap, unconnectedUsedPixmap, connectedSelectedPixmap, unconnectedSelectedPixmap; static bool havePixmaps = false; if (!havePixmaps) { - QString pixmapDir = + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); connectedPixmap.load - (QString("%1/misc/connected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected.xpm").arg(pixmapDir)); connectedUsedPixmap.load - (QString("%1/misc/connected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-used.xpm").arg(pixmapDir)); connectedSelectedPixmap.load - (QString("%1/misc/connected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-selected.xpm").arg(pixmapDir)); unconnectedPixmap.load - (QString("%1/misc/unconnected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected.xpm").arg(pixmapDir)); unconnectedUsedPixmap.load - (QString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); unconnectedSelectedPixmap.load - (QString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); havePixmaps = true; } @@ -668,7 +668,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in // clear the popup instrumentPopup->clear(); - std::vector<QPopupMenu*> instrumentSubMenus; + std::vector<TQPopupMenu*> instrumentSubMenus; // position index int i = 0; @@ -684,8 +684,8 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in if (! (*it)) continue; // sanity check - QString iname(strtoqstr((*it)->getPresentationName())); - QString pname(strtoqstr((*it)->getProgramName())); + TQString iname(strtoqstr((*it)->getPresentationName())); + TQString pname(strtoqstr((*it)->getProgramName())); Device *device = (*it)->getDevice(); DeviceId devId = device->getId(); bool connected = false; @@ -696,17 +696,17 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in (Instrument::SYNTH_PLUGIN_POSITION); if (plugin) { pname = strtoqstr(plugin->getProgram()); - QString identifier = strtoqstr(plugin->getIdentifier()); + TQString identifier = strtoqstr(plugin->getIdentifier()); if (identifier != "") { connected = true; - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier (identifier, type, soName, label); if (pname == "") { pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = QString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").arg(label).arg(pname); } else { pname = label; } @@ -753,7 +753,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in } } - QIconSet iconSet + TQIconSet iconSet (connected ? (deviceUsedByAnyone ? connectedUsedPixmap : connectedPixmap) : @@ -762,15 +762,15 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in currentDevId = int(devId); - QPopupMenu *subMenu = new QPopupMenu(instrumentPopup); - QString deviceName = strtoqstr(device->getName()); + TQPopupMenu *subMenu = new TQPopupMenu(instrumentPopup); + TQString deviceName = strtoqstr(device->getName()); instrumentPopup->insertItem(iconSet, deviceName, subMenu); instrumentSubMenus.push_back(subMenu); // Connect up the submenu // - connect(subMenu, SIGNAL(activated(int)), - SLOT(slotInstrumentPopupActivated(int))); + connect(subMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotInstrumentPopupActivated(int))); } else if (!instrUsedByMe) { @@ -785,7 +785,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* in } } - QIconSet iconSet + TQIconSet iconSet (connected ? (instrUsedByAnyone ? instrUsedByMe ? @@ -866,7 +866,7 @@ TrackButtons::changeTrackInstrumentLabels(TrackLabel::InstrumentTrackLabels labe } void -TrackButtons::changeInstrumentLabel(InstrumentId id, QString label) +TrackButtons::changeInstrumentLabel(InstrumentId id, TQString label) { Composition &comp = m_doc->getComposition(); Track *track; @@ -895,7 +895,7 @@ TrackButtons::changeInstrumentLabel(InstrumentId id, QString label) } void -TrackButtons::changeTrackLabel(TrackId id, QString label) +TrackButtons::changeTrackLabel(TrackId id, TQString label) { Composition &comp = m_doc->getComposition(); Track *track; @@ -932,7 +932,7 @@ TrackButtons::slotSynchroniseWithComposition() Instrument *ins = studio. getInstrumentById(track->getInstrument()); - QString instrumentName(i18n("<no instrument>")); + TQString instrumentName(i18n("<no instrument>")); if (ins) instrumentName = strtoqstr(ins->getPresentationName()); @@ -990,13 +990,13 @@ TrackButtons::slotTrackInstrumentSelection(TrackId trackId, int item) slotInstrumentPopupActivated( item ); } -QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) +TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) { // The buttonGap sets up the sizes of the buttons // static const int buttonGap = 8; - QFrame *trackHBox = 0; + TQFrame *trackHBox = 0; KLedButton *mute = 0; KLedButton *record = 0; @@ -1020,8 +1020,8 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Create a horizontal box for each track // - trackHBox = new QFrame(this); - QHBoxLayout *hblayout = new QHBoxLayout(trackHBox); + trackHBox = new TQFrame(this); + TQHBoxLayout *hblayout = new TQHBoxLayout(trackHBox); trackHBox->setMinimumSize(labelWidth, m_cellSize * multiple - m_borderGap); trackHBox->setFixedHeight(m_cellSize * multiple - m_borderGap); @@ -1055,12 +1055,12 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) mute = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::MuteTrackLED), trackHBox); - QToolTip::add(mute, i18n("Mute track")); + TQToolTip::add(mute, i18n("Mute track")); hblayout->addWidget(mute); record = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::RecordMIDITrackLED), trackHBox); - QToolTip::add(record, i18n("Record on this track")); + TQToolTip::add(record, i18n("Record on this track")); hblayout->addWidget(record); record->setLook(KLed::Sunken); @@ -1068,10 +1068,10 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) record->off(); // Connect them to their sigmappers - connect(record, SIGNAL(stateChanged(bool)), - m_recordSigMapper, SLOT(map())); - connect(mute, SIGNAL(stateChanged(bool)), - m_muteSigMapper, SLOT(map())); + connect(record, TQT_SIGNAL(stateChanged(bool)), + m_recordSigMapper, TQT_SLOT(map())); + connect(mute, TQT_SIGNAL(stateChanged(bool)), + m_muteSigMapper, TQT_SLOT(map())); m_recordSigMapper->setMapping(record, track->getPosition()); m_muteSigMapper->setMapping(mute, track->getPosition()); @@ -1103,8 +1103,8 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) trackLabel->setFixedHeight(m_cellSize - buttonGap); trackLabel->setIndent(7); - connect(trackLabel, SIGNAL(renameTrack(QString, TrackId)), - SLOT(slotRenameTrack(QString, TrackId))); + connect(trackLabel, TQT_SIGNAL(renameTrack(TQString, TrackId)), + TQT_SLOT(slotRenameTrack(TQString, TrackId))); // Store the TrackLabel pointer // @@ -1113,10 +1113,10 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Connect it setButtonMapping(trackLabel, trackId); - connect(trackLabel, SIGNAL(changeToInstrumentList()), - m_instListSigMapper, SLOT(map())); - connect(trackLabel, SIGNAL(clicked()), - m_clickedSigMapper, SLOT(map())); + connect(trackLabel, TQT_SIGNAL(changeToInstrumentList()), + m_instListSigMapper, TQT_SLOT(map())); + connect(trackLabel, TQT_SIGNAL(clicked()), + m_clickedSigMapper, TQT_SLOT(map())); // // instrument label @@ -1124,7 +1124,7 @@ QFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) Rosegarden::Instrument *ins = m_doc->getStudio().getInstrumentById(track->getInstrument()); - QString instrumentName(i18n("<no instrument>")); + TQString instrumentName(i18n("<no instrument>")); if (ins) instrumentName = strtoqstr(ins->getPresentationName()); // Set label to program change if it's being sent diff --git a/src/gui/editors/segment/TrackButtons.h b/src/gui/editors/segment/TrackButtons.h index a61601d..7f2b5dd 100644 --- a/src/gui/editors/segment/TrackButtons.h +++ b/src/gui/editors/segment/TrackButtons.h @@ -30,16 +30,16 @@ #include "base/Track.h" #include "gui/application/RosegardenGUIApp.h" #include "TrackLabel.h" -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QVBoxLayout; -class QSignalMapper; -class QPopupMenu; -class QObject; +class TQWidget; +class TQVBoxLayout; +class TQSignalMapper; +class TQPopupMenu; +class TQObject; namespace Rosegarden @@ -61,7 +61,7 @@ public: unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); @@ -80,9 +80,9 @@ public: * an actual program name rather than a meaningless * device number and midi channel */ - void changeInstrumentLabel(InstrumentId id, QString label); + void changeInstrumentLabel(InstrumentId id, TQString label); - void changeTrackLabel(TrackId id, QString label); + void changeTrackLabel(TrackId id, TQString label); // Select a label from outside this class by position // @@ -105,7 +105,7 @@ public: * * @see RosegardenGUIApp#slotPopulateTrackInstrumentPopup() */ - void populateInstrumentPopup(Instrument *thisTrackInstr, QPopupMenu* instrumentPopup); + void populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* instrumentPopup); signals: // to emit what Track has been selected @@ -138,7 +138,7 @@ public slots: void slotToggleRecordTrack(int position); void slotToggleMutedTrack(int mutedTrack); void slotUpdateTracks(); - void slotRenameTrack(QString newName, TrackId trackId); + void slotRenameTrack(TQString newName, TrackId trackId); void slotSetTrackMeter(float value, int position); void slotSetMetersByInstrument(float value, InstrumentId id); @@ -176,27 +176,27 @@ protected: */ void makeButtons(); - QFrame* makeButton(TrackId trackId); - QString getPresentationName(Instrument *); + TQFrame* makeButton(TrackId trackId); + TQString getPresentationName(Instrument *); - void setButtonMapping(QObject*, TrackId); + void setButtonMapping(TQObject*, TrackId); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QVBoxLayout *m_layout; + TQVBoxLayout *m_layout; std::vector<KLedButton *> m_muteLeds; std::vector<KLedButton *> m_recordLeds; std::vector<TrackLabel *> m_trackLabels; std::vector<TrackVUMeter *> m_trackMeters; - std::vector<QFrame *> m_trackHBoxes; + std::vector<TQFrame *> m_trackHBoxes; - QSignalMapper *m_recordSigMapper; - QSignalMapper *m_muteSigMapper; - QSignalMapper *m_clickedSigMapper; - QSignalMapper *m_instListSigMapper; + TQSignalMapper *m_recordSigMapper; + TQSignalMapper *m_muteSigMapper; + TQSignalMapper *m_clickedSigMapper; + TQSignalMapper *m_instListSigMapper; // Number of tracks on our view // diff --git a/src/gui/editors/segment/TrackEditor.cpp b/src/gui/editors/segment/TrackEditor.cpp index 32c2b02..9eeb21b 100644 --- a/src/gui/editors/segment/TrackEditor.cpp +++ b/src/gui/editors/segment/TrackEditor.cpp @@ -24,7 +24,7 @@ #include "TrackEditor.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -64,33 +64,33 @@ #include <kcommand.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qfont.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qwidget.h> -#include <qvalidator.h> -#include <qdragobject.h> -#include <qtextstream.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqfont.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqwidget.h> +#include <tqvalidator.h> +#include <tqdragobject.h> +#include <tqtextstream.h> namespace Rosegarden { TrackEditor::TrackEditor(RosegardenGUIDoc* doc, - QWidget* rosegardenguiview, + TQWidget* rosegardenguiview, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel, - QWidget* parent, const char* name, + TQWidget* parent, const char* name, WFlags) : DCOPObject("TrackEditorIface"), - QWidget(parent, name), + TQWidget(parent, name), m_doc(doc), m_rulerScale(rulerScale), m_topStandardRuler(0), @@ -118,9 +118,9 @@ TrackEditor::~TrackEditor() } void -TrackEditor::init(QWidget* rosegardenguiview) +TrackEditor::init(TQWidget* rosegardenguiview) { - QGridLayout *grid = new QGridLayout(this, 4, 2); + TQGridLayout *grid = new TQGridLayout(this, 4, 2); int trackLabelWidth = 230; int barButtonsHeight = 25; @@ -164,18 +164,18 @@ TrackEditor::init(QWidget* rosegardenguiview) m_doc->getStudio(), m_rulerScale, getTrackCellHeight()); - connect(rosegardenguiview, SIGNAL(instrumentParametersChanged(InstrumentId)), - m_compositionModel, SLOT(slotInstrumentParametersChanged(InstrumentId))); - connect(rosegardenguiview->parent(), SIGNAL(instrumentParametersChanged(InstrumentId)), - m_compositionModel, SLOT(slotInstrumentParametersChanged(InstrumentId))); + connect(rosegardenguiview, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); + connect(rosegardenguiview->parent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); m_segmentCanvas = new CompositionView(m_doc, m_compositionModel, this); kapp->config()->setGroup(GeneralOptionsConfigGroup); if (kapp->config()->readBoolEntry("backgroundtextures", true)) { - QPixmap background; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - if (background.load(QString("%1/misc/bg-segmentcanvas.xpm"). + TQPixmap background; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + if (background.load(TQString("%1/misc/bg-segmentcanvas.xpm"). arg(pixmapDir))) { m_segmentCanvas->setBackgroundPixmap(background); m_segmentCanvas->viewport()->setBackgroundPixmap(background); @@ -202,7 +202,7 @@ TrackEditor::init(QWidget* rosegardenguiview) // Track Buttons // - // (must be put in a QScrollView) + // (must be put in a TQScrollView) // m_trackButtonScroll = new QDeferScrollView(this); grid->addWidget(m_trackButtonScroll, 3, 0); @@ -217,111 +217,111 @@ TrackEditor::init(QWidget* rosegardenguiview) canvasHeight, m_trackButtonScroll->viewport()); m_trackButtonScroll->addChild(m_trackButtons); - m_trackButtonScroll->setHScrollBarMode(QScrollView::AlwaysOff); - m_trackButtonScroll->setVScrollBarMode(QScrollView::AlwaysOff); - m_trackButtonScroll->setResizePolicy(QScrollView::AutoOneFit); + m_trackButtonScroll->setHScrollBarMode(TQScrollView::AlwaysOff); + m_trackButtonScroll->setVScrollBarMode(TQScrollView::AlwaysOff); + m_trackButtonScroll->setResizePolicy(TQScrollView::AutoOneFit); m_trackButtonScroll->setBottomMargin(m_bottomStandardRuler->height() + m_segmentCanvas->horizontalScrollBar()->height()); - connect(m_trackButtons, SIGNAL(widthChanged()), - this, SLOT(slotTrackButtonsWidthChanged())); + connect(m_trackButtons, TQT_SIGNAL(widthChanged()), + this, TQT_SLOT(slotTrackButtonsWidthChanged())); - connect(m_trackButtons, SIGNAL(trackSelected(int)), - rosegardenguiview, SLOT(slotSelectTrackSegments(int))); + connect(m_trackButtons, TQT_SIGNAL(trackSelected(int)), + rosegardenguiview, TQT_SLOT(slotSelectTrackSegments(int))); - connect(m_trackButtons, SIGNAL(instrumentSelected(int)), - rosegardenguiview, SLOT(slotUpdateInstrumentParameterBox(int))); + connect(m_trackButtons, TQT_SIGNAL(instrumentSelected(int)), + rosegardenguiview, TQT_SLOT(slotUpdateInstrumentParameterBox(int))); - connect(this, SIGNAL(stateChange(QString, bool)), - rosegardenguiview, SIGNAL(stateChange(QString, bool))); + connect(this, TQT_SIGNAL(stateChange(TQString, bool)), + rosegardenguiview, TQT_SIGNAL(stateChange(TQString, bool))); - connect(m_trackButtons, SIGNAL(modified()), - m_doc, SLOT(slotDocumentModified())); + connect(m_trackButtons, TQT_SIGNAL(modified()), + m_doc, TQT_SLOT(slotDocumentModified())); - connect(m_trackButtons, SIGNAL(muteButton(TrackId, bool)), - rosegardenguiview, SLOT(slotSetMuteButton(TrackId, bool))); + connect(m_trackButtons, TQT_SIGNAL(muteButton(TrackId, bool)), + rosegardenguiview, TQT_SLOT(slotSetMuteButton(TrackId, bool))); // connect loop rulers' follow-scroll signals - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_segmentCanvas, SLOT(startAutoScroll(int))); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_segmentCanvas, SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_segmentCanvas, SLOT(startAutoScroll(int))); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_segmentCanvas, SLOT(stopAutoScroll())); - - connect(m_segmentCanvas, SIGNAL(contentsMoving(int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_segmentCanvas, TQT_SLOT(startAutoScroll(int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_segmentCanvas, TQT_SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_segmentCanvas, TQT_SLOT(startAutoScroll(int))); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_segmentCanvas, TQT_SLOT(stopAutoScroll())); + + connect(m_segmentCanvas, TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); // Synchronize bar buttons' scrollview with segment canvas' scrollbar // - connect(m_segmentCanvas->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollTrackButtons(int))); + connect(m_segmentCanvas->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollTrackButtons(int))); - connect(m_segmentCanvas->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollTrackButtons(int))); + connect(m_segmentCanvas->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollTrackButtons(int))); // scrolling with mouse wheel - connect(m_trackButtonScroll, SIGNAL(gotWheelEvent(QWheelEvent*)), - m_segmentCanvas, SLOT(slotExternalWheelEvent(QWheelEvent*))); + connect(m_trackButtonScroll, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + m_segmentCanvas, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // Connect horizontal scrollbar // - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_tempoRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_tempoRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_tempoRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_tempoRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_chordNameRuler, SLOT(slotScrollHoriz(int))); - connect(m_segmentCanvas->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_chordNameRuler, SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_chordNameRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_segmentCanvas->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_chordNameRuler, TQT_SLOT(slotScrollHoriz(int))); - connect(this, SIGNAL(needUpdate()), m_segmentCanvas, SLOT(slotUpdateSegmentsDrawBuffer())); + connect(this, TQT_SIGNAL(needUpdate()), m_segmentCanvas, TQT_SLOT(slotUpdateSegmentsDrawBuffer())); connect(m_segmentCanvas->getModel(), - SIGNAL(selectedSegments(const SegmentSelection &)), + TQT_SIGNAL(selectedSegments(const SegmentSelection &)), rosegardenguiview, - SLOT(slotSelectedSegments(const SegmentSelection &))); + TQT_SLOT(slotSelectedSegments(const SegmentSelection &))); - connect(m_segmentCanvas, SIGNAL(zoomIn()), - RosegardenGUIApp::self(), SLOT(slotZoomIn())); - connect(m_segmentCanvas, SIGNAL(zoomOut()), - RosegardenGUIApp::self(), SLOT(slotZoomOut())); + connect(m_segmentCanvas, TQT_SIGNAL(zoomIn()), + RosegardenGUIApp::self(), TQT_SLOT(slotZoomIn())); + connect(m_segmentCanvas, TQT_SIGNAL(zoomOut()), + RosegardenGUIApp::self(), TQT_SLOT(slotZoomOut())); - connect(getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - connect(m_doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // // pointer and loop drag signals from top and bottom bar buttons (loop rulers actually) // - connect(m_topStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotPointerDraggedToPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotPointerDraggedToPosition(timeT))); + connect(m_topStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotPointerDraggedToPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotPointerDraggedToPosition(timeT))); - connect(m_topStandardRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SLOT(slotLoopDraggedToPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SLOT(slotLoopDraggedToPosition(timeT))); + connect(m_topStandardRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SLOT(slotLoopDraggedToPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SLOT(slotLoopDraggedToPosition(timeT))); - connect(m_doc, SIGNAL(loopChanged(timeT, + connect(m_doc, TQT_SIGNAL(loopChanged(timeT, timeT)), - this, SLOT(slotSetLoop(timeT, timeT))); + this, TQT_SLOT(slotSetLoop(timeT, timeT))); } void TrackEditor::slotReadjustCanvasSize() @@ -342,17 +342,17 @@ void TrackEditor::slotTrackButtonsWidthChanged() int TrackEditor::getTrackCellHeight() const { int size; - static QFont defaultFont; + static TQFont defaultFont; // do some scrabbling around for a reasonable size // size = defaultFont.pixelSize(); if (size < 8) { - if (QApplication::font(this).pixelSize() < 8) + if (TQApplication::font(this).pixelSize() < 8) size = 12; else - size = QApplication::font(this).pixelSize(); + size = TQApplication::font(this).pixelSize(); } return size + 12; @@ -382,7 +382,7 @@ void TrackEditor::updateRulers() getBottomStandardRuler()->update(); } -void TrackEditor::paintEvent(QPaintEvent* e) +void TrackEditor::paintEvent(TQPaintEvent* e) { if (isCompositionModified()) { @@ -407,7 +407,7 @@ void TrackEditor::paintEvent(QPaintEvent* e) setCompositionModified(false); } - QWidget::paintEvent(e); + TQWidget::paintEvent(e); } void TrackEditor::slotAddTracks(unsigned int nbNewTracks, @@ -443,7 +443,7 @@ void TrackEditor::addSegment(int track, int time, unsigned int duration) void TrackEditor::slotSegmentOrderChanged(int section, int fromIdx, int toIdx) { - RG_DEBUG << QString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") + RG_DEBUG << TQString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") .arg(section).arg(fromIdx).arg(toIdx) << endl; //!!! how do we get here? need to involve a command @@ -461,7 +461,7 @@ TrackEditor::slotCanvasScrolled(int x, int y) m_bottomStandardRuler->getLoopRuler()->hasActiveMousePress() && !m_bottomStandardRuler->getLoopRuler()->getLoopingMode())) { - int mx = m_segmentCanvas->viewport()->mapFromGlobal(QCursor::pos()).x(); + int mx = m_segmentCanvas->viewport()->mapFromGlobal(TQCursor::pos()).x(); m_segmentCanvas->setPointerPos(x + mx); // bad idea, creates a feedback loop @@ -642,7 +642,7 @@ TrackEditor::slotTurnRepeatingSegmentToRealCopies() if (segments.size() == 0) return ; - QString text; + TQString text; if (segments.size() == 1) text = i18n("Turn Repeating Segment into Real Copies"); @@ -668,16 +668,16 @@ TrackEditor::slotVerticalScrollTrackButtons(int y) m_trackButtonScroll->setContentsPos(0, y); } -void TrackEditor::dragEnterEvent(QDragEnterEvent *event) +void TrackEditor::dragEnterEvent(TQDragEnterEvent *event) { - event->accept(QUriDrag::canDecode(event) || - QTextDrag::canDecode(event)); + event->accept(TQUriDrag::canDecode(event) || + TQTextDrag::canDecode(event)); } -void TrackEditor::dropEvent(QDropEvent* event) +void TrackEditor::dropEvent(TQDropEvent* event) { - QStrList uri; - QString text; + TQStrList uri; + TQString text; int heightAdjust = 0; //int widthAdjust = 0; @@ -693,7 +693,7 @@ void TrackEditor::dropEvent(QDropEvent* event) if (m_chordNameRuler && m_chordNameRuler->isVisible()) heightAdjust += m_chordNameRuler->height(); - QPoint posInSegmentCanvas = + TQPoint posInSegmentCanvas = m_segmentCanvas->viewportToContents (m_segmentCanvas-> viewport()->mapFrom(this, event->pos())); @@ -706,20 +706,20 @@ void TrackEditor::dropEvent(QDropEvent* event) m_segmentCanvas->grid().snapX(posInSegmentCanvas.x()); - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { RG_DEBUG << "TrackEditor::dropEvent() : got URI :" << uri.first() << endl; - QString uriPath = uri.first(); + TQString uriPath = uri.first(); if (uriPath.endsWith(".rg")) { emit droppedDocument(uriPath); } else { - QStrList uris; - QString uri; - if (QUriDrag::decode(event, uris)) uri = uris.first(); -// QUriDrag::decodeLocalFiles(event, files); -// QString filePath = files.first(); + TQStrList uris; + TQString uri; + if (TQUriDrag::decode(event, uris)) uri = uris.first(); +// TQUriDrag::decodeLocalFiles(event, files); +// TQString filePath = files.first(); RG_DEBUG << "TrackEditor::dropEvent() : got URI: " << uri << endl; @@ -736,8 +736,8 @@ void TrackEditor::dropEvent(QDropEvent* event) Track* track = m_doc->getComposition().getTrackByPosition(trackPos); if (track) { - QString audioText; - QTextOStream t(&audioText); + TQString audioText; + TQTextOStream t(&audioText); t << uri << "\n"; t << track->getId() << "\n"; @@ -748,7 +748,7 @@ void TrackEditor::dropEvent(QDropEvent* event) } - } else if (QTextDrag::decode(event, text)) { + } else if (TQTextDrag::decode(event, text)) { RG_DEBUG << "TrackEditor::dropEvent() : got text info " << endl; //<< text << endl; @@ -758,14 +758,14 @@ void TrackEditor::dropEvent(QDropEvent* event) // WARNING // // DO NOT PERFORM ANY OPERATIONS AFTER THAT - // EMITTING THIS SIGNAL TRIGGERS THE LOADING OF A NEW DOCUMENT + // EMITTING THIS TQT_SIGNAL TRIGGERS THE LOADING OF A NEW DOCUMENT // AND AS A CONSEQUENCE THE DELETION OF THIS TrackEditor OBJECT // } else { - QTextIStream s(&text); + TQTextIStream s(&text); - QString id; + TQString id; AudioFileId audioFileId; RealTime startTime, endTime; @@ -796,8 +796,8 @@ void TrackEditor::dropEvent(QDropEvent* event) << posInSegmentCanvas.x() << endl; - QString audioText; - QTextOStream t(&audioText); + TQString audioText; + TQTextOStream t(&audioText); t << audioFileId << "\n"; t << track->getId() << "\n"; t << time << "\n"; // time on canvas diff --git a/src/gui/editors/segment/TrackEditor.h b/src/gui/editors/segment/TrackEditor.h index 6670a15..b2c2bd2 100644 --- a/src/gui/editors/segment/TrackEditor.h +++ b/src/gui/editors/segment/TrackEditor.h @@ -29,15 +29,15 @@ #include "base/MidiProgram.h" #include <map> #include "TrackEditorIface.h" -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> #include "base/Event.h" #include "gui/editors/segment/TrackButtons.h" -class QPaintEvent; -class QDropEvent; -class QDragEnterEvent; +class TQPaintEvent; +class TQDropEvent; +class TQDragEnterEvent; class KCommand; @@ -65,7 +65,7 @@ class StandardRuler; * * @see CompositionView */ -class TrackEditor : public QWidget, virtual public TrackEditorIface +class TrackEditor : public TQWidget, virtual public TrackEditorIface { Q_OBJECT public: @@ -73,11 +73,11 @@ public: * Create a new TrackEditor representing the document \a doc */ TrackEditor(RosegardenGUIDoc* doc, - QWidget* rosegardenguiview, + TQWidget* rosegardenguiview, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel = 0, - QWidget* parent = 0, const char* name = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); ~TrackEditor(); @@ -181,35 +181,35 @@ signals: /** * sent back to RosegardenGUI */ - void stateChange(QString, bool); + void stateChange(TQString, bool); /** * A URI to a Rosegarden document was dropped on the canvas * * @see RosegardenGUI#slotOpenURL() */ - void droppedDocument(QString uri); + void droppedDocument(TQString uri); /** * An audio file was dropped from the audio manager dialog */ - void droppedAudio(QString audioDesc); + void droppedAudio(TQString audioDesc); /** * And audio file was dropped from konqi say and needs to be * inserted into AudioManagerDialog before adding to the * composition. */ - void droppedNewAudio(QString audioDesc); + void droppedNewAudio(TQString audioDesc); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent*); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent*); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); - void init(QWidget *); + void init(TQWidget *); bool isCompositionModified(); void setCompositionModified(bool); diff --git a/src/gui/editors/segment/TrackHeader.cpp b/src/gui/editors/segment/TrackHeader.cpp index d7ca6d3..367d02b 100644 --- a/src/gui/editors/segment/TrackHeader.cpp +++ b/src/gui/editors/segment/TrackHeader.cpp @@ -25,10 +25,10 @@ #include "TrackHeader.h" -#include <qheader.h> -#include <qpainter.h> -#include <qrect.h> -#include <qwidget.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqwidget.h> namespace Rosegarden @@ -38,9 +38,9 @@ TrackHeader::~TrackHeader() {} void -TrackHeader::paintEvent(QPaintEvent *e) +TrackHeader::paintEvent(TQPaintEvent *e) { - QPainter p( this ); + TQPainter p( this ); p.setPen( colorGroup().buttonText() ); int pos = (orientation() == Horizontal) ? e->rect().left() @@ -52,7 +52,7 @@ TrackHeader::paintEvent(QPaintEvent *e) else id = 0; for ( int i = id; i < count(); i++ ) { - QRect r = sRect( i ); + TQRect r = sRect( i ); paintSection( &p, i, r ); if ( orientation() == Horizontal && r. right() >= e->rect().right() || orientation() == Vertical && r. bottom() >= e->rect().bottom() ) diff --git a/src/gui/editors/segment/TrackHeader.h b/src/gui/editors/segment/TrackHeader.h index fe404c3..91bef26 100644 --- a/src/gui/editors/segment/TrackHeader.h +++ b/src/gui/editors/segment/TrackHeader.h @@ -26,11 +26,11 @@ #ifndef _RG_TRACKHEADER_H_ #define _RG_TRACKHEADER_H_ -#include <qheader.h> +#include <tqheader.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -43,16 +43,16 @@ class TrackHeader : public QHeader public: TrackHeader(int number, - QWidget *parent=0, + TQWidget *parent=0, const char *name=0 ): - QHeader(number, parent, name) {;} + TQHeader(number, parent, name) {;} ~TrackHeader(); protected: - virtual void paintEvent(QPaintEvent *pe); -// void paintSection(QPainter * p, int index, QRect fr); -// void paintSectionLabel (QPainter * p, int index, const QRect & fr); -// QRect sRect (int index); + virtual void paintEvent(TQPaintEvent *pe); +// void paintSection(TQPainter * p, int index, TQRect fr); +// void paintSectionLabel (TQPainter * p, int index, const TQRect & fr); +// TQRect sRect (int index); private: diff --git a/src/gui/editors/segment/TrackLabel.cpp b/src/gui/editors/segment/TrackLabel.cpp index 90561d1..9df485f 100644 --- a/src/gui/editors/segment/TrackLabel.cpp +++ b/src/gui/editors/segment/TrackLabel.cpp @@ -28,16 +28,16 @@ #include <klocale.h> #include "base/Track.h" #include <klineeditdlg.h> -#include <qfont.h> -#include <qframe.h> -#include <qlabel.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qvalidator.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqvalidator.h> namespace Rosegarden @@ -45,15 +45,15 @@ namespace Rosegarden TrackLabel::TrackLabel(TrackId id, int position, - QWidget *parent, + TQWidget *parent, const char *name): - QWidgetStack(parent, name), - m_instrumentLabel(new QLabel(this)), - m_trackLabel(new QLabel(this)), + TQWidgetStack(parent, name), + m_instrumentLabel(new TQLabel(this)), + m_trackLabel(new TQLabel(this)), m_id(id), m_position(position) { - QFont font; + TQFont font; font.setPointSize(font.pointSize() * 95 / 100); if (font.pixelSize() > 14) font.setPixelSize(14); @@ -65,15 +65,15 @@ TrackLabel::TrackLabel(TrackId id, addWidget(m_trackLabel, ShowTrack); raiseWidget(ShowTrack); - m_instrumentLabel->setFrameShape(QFrame::NoFrame); - m_trackLabel->setFrameShape(QFrame::NoFrame); + m_instrumentLabel->setFrameShape(TQFrame::NoFrame); + m_trackLabel->setFrameShape(TQFrame::NoFrame); - m_pressTimer = new QTimer(this); + m_pressTimer = new TQTimer(this); - connect(m_pressTimer, SIGNAL(timeout()), - this, SIGNAL(changeToInstrumentList())); + connect(m_pressTimer, TQT_SIGNAL(timeout()), + this, TQT_SIGNAL(changeToInstrumentList())); - QToolTip::add + TQToolTip::add (this, i18n("Click and hold with left mouse button to assign this Track to an Instrument.")); } @@ -87,7 +87,7 @@ void TrackLabel::setIndent(int i) m_trackLabel->setIndent(i); } -void TrackLabel::setAlternativeLabel(const QString &label) +void TrackLabel::setAlternativeLabel(const TQString &label) { // recover saved original if (label.isEmpty()) { @@ -142,7 +142,7 @@ TrackLabel::setSelected(bool on) } void -TrackLabel::mousePressEvent(QMouseEvent *e) +TrackLabel::mousePressEvent(TQMouseEvent *e) { if (e->button() == RightButton) { @@ -157,7 +157,7 @@ TrackLabel::mousePressEvent(QMouseEvent *e) } void -TrackLabel::mouseReleaseEvent(QMouseEvent *e) +TrackLabel::mouseReleaseEvent(TQMouseEvent *e) { // stop the timer if running if (m_pressTimer->isActive()) @@ -169,7 +169,7 @@ TrackLabel::mouseReleaseEvent(QMouseEvent *e) } void -TrackLabel::mouseDoubleClickEvent(QMouseEvent *e) +TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) { if (e->button() != LeftButton) return ; @@ -186,9 +186,9 @@ TrackLabel::mouseDoubleClickEvent(QMouseEvent *e) bool ok = false; - QRegExpValidator validator(QRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK - QString newText = KLineEditDlg::getText(i18n("Change track name"), + TQString newText = KLineEditDlg::getText(i18n("Change track name"), i18n("Enter new track name"), m_trackLabel->text(), &ok, diff --git a/src/gui/editors/segment/TrackLabel.h b/src/gui/editors/segment/TrackLabel.h index e56d0e5..b7aac70 100644 --- a/src/gui/editors/segment/TrackLabel.h +++ b/src/gui/editors/segment/TrackLabel.h @@ -27,14 +27,14 @@ #define _RG_TRACKLABEL_H_ #include "base/Track.h" -#include <qstring.h> -#include <qwidgetstack.h> +#include <tqstring.h> +#include <tqwidgetstack.h> -class QWidget; -class QTimer; -class QMouseEvent; -class QLabel; +class TQWidget; +class TQTimer; +class TQMouseEvent; +class TQLabel; namespace Rosegarden @@ -43,7 +43,7 @@ namespace Rosegarden /** - * Specialises QLabel to create in effect a toggleable and hence + * Specialises TQLabel to create in effect a toggleable and hence * selectable label/label list. In conjunction with TrackButtons * provides a framework for Track selection on the TrackCanvas. */ @@ -61,17 +61,17 @@ public: TrackLabel(TrackId id, int position, - QWidget *parent, + TQWidget *parent, const char *name=0); ~TrackLabel(); - // QLabel API delegation - applies on both labels + // TQLabel API delegation - applies on both labels void setIndent(int); - QLabel* getInstrumentLabel() { return m_instrumentLabel; } - QLabel* getTrackLabel() { return m_trackLabel; } - void setAlternativeLabel(const QString &label); + TQLabel* getInstrumentLabel() { return m_instrumentLabel; } + TQLabel* getTrackLabel() { return m_trackLabel; } + void setAlternativeLabel(const TQString &label); void clearAlternativeLabel(); void showLabel(InstrumentTrackLabels); @@ -91,29 +91,29 @@ signals: // We emit this once we've renamed a track // - void renameTrack(QString, TrackId); + void renameTrack(TQString, TrackId); void changeToInstrumentList(); protected: - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); - QLabel* getVisibleLabel(); + TQLabel* getVisibleLabel(); //--------------- Data members --------------------------------- - QLabel *m_instrumentLabel; - QLabel *m_trackLabel; - QString m_alternativeLabel; + TQLabel *m_instrumentLabel; + TQLabel *m_trackLabel; + TQString m_alternativeLabel; TrackId m_id; int m_position; bool m_selected; - QTimer *m_pressTimer; + TQTimer *m_pressTimer; }; diff --git a/src/gui/editors/segment/TrackVUMeter.cpp b/src/gui/editors/segment/TrackVUMeter.cpp index a638ee7..f8acbe8 100644 --- a/src/gui/editors/segment/TrackVUMeter.cpp +++ b/src/gui/editors/segment/TrackVUMeter.cpp @@ -26,15 +26,15 @@ #include "TrackVUMeter.h" #include "gui/widgets/VUMeter.h" -#include <qfont.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TrackVUMeter::TrackVUMeter(QWidget *parent, +TrackVUMeter::TrackVUMeter(TQWidget *parent, VUMeterType type, int width, int height, @@ -45,7 +45,7 @@ TrackVUMeter::TrackVUMeter(QWidget *parent, { setAlignment(AlignCenter); - QFont font; + TQFont font; font.setPointSize(font.pointSize() * 95 / 100); if (font.pointSize() > 14) font.setPointSize(14); @@ -67,7 +67,7 @@ TrackVUMeter::meterStop() { setMinimumHeight(m_textHeight); setMaximumHeight(m_textHeight); - setText(QString("%1").arg(m_position + 1)); + setText(TQString("%1").arg(m_position + 1)); if (m_active) { m_active = false; update(); diff --git a/src/gui/editors/segment/TrackVUMeter.h b/src/gui/editors/segment/TrackVUMeter.h index 26b8e4e..dad0455 100644 --- a/src/gui/editors/segment/TrackVUMeter.h +++ b/src/gui/editors/segment/TrackVUMeter.h @@ -29,7 +29,7 @@ #include "gui/widgets/VUMeter.h" -class QWidget; +class TQWidget; namespace Rosegarden @@ -40,7 +40,7 @@ namespace Rosegarden class TrackVUMeter: public VUMeter { public: - TrackVUMeter(QWidget *parent = 0, + TrackVUMeter(TQWidget *parent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/editors/segment/TriggerManagerItem.cpp b/src/gui/editors/segment/TriggerManagerItem.cpp index 2e7402d..bd3d64a 100644 --- a/src/gui/editors/segment/TriggerManagerItem.cpp +++ b/src/gui/editors/segment/TriggerManagerItem.cpp @@ -27,12 +27,12 @@ namespace Rosegarden { int -TriggerManagerItem::compare(QListViewItem * i, int col, bool ascending) const +TriggerManagerItem::compare(TQListViewItem * i, int col, bool ascending) const { TriggerManagerItem *ei = dynamic_cast<TriggerManagerItem *>(i); - if (!ei) return QListViewItem::compare(i, col, ascending); + if (!ei) return TQListViewItem::compare(i, col, ascending); // col 0 -> index -- numeric compare // col 1 -> ID -- numeric compare @@ -43,7 +43,7 @@ TriggerManagerItem::compare(QListViewItem * i, int col, bool ascending) const // col 6 -> usage count -- numeric compare // if (col == 2) { - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } else if (col == 3) { if (m_rawDuration < ei->getRawDuration()) return -1; else if (ei->getRawDuration() < m_rawDuration) return 1; diff --git a/src/gui/editors/segment/TriggerManagerItem.h b/src/gui/editors/segment/TriggerManagerItem.h index c1eb95a..7af5619 100644 --- a/src/gui/editors/segment/TriggerManagerItem.h +++ b/src/gui/editors/segment/TriggerManagerItem.h @@ -35,18 +35,18 @@ namespace Rosegarden { class TriggerManagerItem : public QListViewItem { public: - TriggerManagerItem(QListView * parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null): - QListViewItem(parent, label1, label2, label3, label4, + TriggerManagerItem(TQListView * parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null): + TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { ; } - virtual int compare(QListViewItem * i, int col, bool ascending) const; + virtual int compare(TQListViewItem * i, int col, bool ascending) const; void setRawDuration(timeT raw) { m_rawDuration = raw; } timeT getRawDuration() const { return m_rawDuration; } diff --git a/src/gui/editors/segment/TriggerSegmentManager.cpp b/src/gui/editors/segment/TriggerSegmentManager.cpp index 3fb1732..76e71bf 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.cpp +++ b/src/gui/editors/segment/TriggerSegmentManager.cpp @@ -25,7 +25,7 @@ #include "TriggerSegmentManager.h" #include "TriggerManagerItem.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "base/BaseProperties.h" @@ -56,30 +56,30 @@ #include <kstdaccel.h> #include <kstdaction.h> #include <kconfig.h> -#include <qaccel.h> -#include <qdialog.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcanvas.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcanvas.h> namespace Rosegarden { -TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, +TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "triggereditordialog"), m_doc(doc), m_modified(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Triggered Segments")); @@ -97,32 +97,32 @@ TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, for (int i = 0; i < 2; ++i) m_listView->setColumnAlignment(i, Qt::AlignHCenter); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_addButton = new QPushButton(i18n("Add"), btnBox); - m_deleteButton = new QPushButton(i18n("Delete"), btnBox); - m_deleteAllButton = new QPushButton(i18n("Delete All"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); + m_deleteAllButton = new TQPushButton(i18n("Delete All"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteAllButton, i18n("Delete All Triggered Segments")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Triggered Segment Manager")); @@ -135,41 +135,41 @@ TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_addButton, SIGNAL(released()), - SLOT(slotAdd())); + connect(m_addButton, TQT_SIGNAL(released()), + TQT_SLOT(slotAdd())); - connect(m_deleteButton, SIGNAL(released()), - SLOT(slotDelete())); + connect(m_deleteButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDelete())); - connect(m_closeButton, SIGNAL(released()), - SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), + TQT_SLOT(slotClose())); - connect(m_deleteAllButton, SIGNAL(released()), - SLOT(slotDeleteAll())); + connect(m_deleteAllButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDeleteAll())); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem *)), - SLOT(slotEdit(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + TQT_SLOT(slotEdit(TQListViewItem *))); - connect(m_listView, SIGNAL(pressed(QListViewItem *)), - this, SLOT(slotItemClicked(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem *)), + this, TQT_SLOT(slotItemClicked(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); m_listView->setItemsRenameable(true); initDialog(); setAutoSaveSettings(TriggerManagerConfigGroup, true); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } TriggerSegmentManager::~TriggerSegmentManager() @@ -237,25 +237,25 @@ TriggerSegmentManager::slotUpdate() (*it)->getSegment()->getEndMarkerTime() - (*it)->getSegment()->getStartTime(); - QString timeString = makeDurationString + TQString timeString = makeDurationString (first, duration, timeMode); - QString label = strtoqstr((*it)->getSegment()->getLabel()); + TQString label = strtoqstr((*it)->getSegment()->getLabel()); if (label == "") label = i18n("<no label>"); - QString used = i18n("%1 on 1 track", + TQString used = i18n("%1 on 1 track", "%1 on %n tracks", tracks.size()).arg(uses); - QString pitch = QString("%1 (%2)") + TQString pitch = TQString("%1 (%2)") .arg(MidiPitchLabel((*it)->getBasePitch()).getQString()) .arg((*it)->getBasePitch()); - QString velocity = QString("%1").arg((*it)->getBaseVelocity()); + TQString velocity = TQString("%1").arg((*it)->getBaseVelocity()); item = new TriggerManagerItem - (m_listView, QString("%1").arg(i + 1), QString("%1").arg((*it)->getId()), + (m_listView, TQString("%1").arg(i + 1), TQString("%1").arg((*it)->getId()), label, timeString, pitch, velocity, used); item->setRawDuration(duration); @@ -268,13 +268,13 @@ TriggerSegmentManager::slotUpdate() } if (m_listView->childCount() == 0) { - QListViewItem *item = + TQListViewItem *item = new TriggerManagerItem(m_listView, i18n("<none>")); m_listView->insertItem(item); - m_listView->setSelectionMode(QListView::NoSelection); + m_listView->setSelectionMode(TQListView::NoSelection); } else { - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); } } @@ -287,7 +287,7 @@ TriggerSegmentManager::slotDeleteAll() RG_DEBUG << "TriggerSegmentManager::slotDeleteAll" << endl; KMacroCommand *command = new KMacroCommand(i18n("Remove all triggered segments")); - QListViewItem *it = m_listView->firstChild(); + TQListViewItem *it = m_listView->firstChild(); do { @@ -314,7 +314,7 @@ TriggerSegmentManager::slotAdd() &m_doc->getComposition(), 0, 3840, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { addCommandToHistory(new AddTriggerSegmentCommand (m_doc, dialog.getTime(), 64)); } @@ -376,13 +376,13 @@ void TriggerSegmentManager::setupActions() { KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -398,7 +398,7 @@ TriggerSegmentManager::setupActions() KStdAction::stdName(KStdAction::Redo)); new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, this, - SLOT(slotPasteAsNew()), actionCollection(), + TQT_SLOT(slotPasteAsNew()), actionCollection(), "paste_to_trigger_segment"); kapp->config()->setGroup(TriggerManagerConfigGroup); @@ -406,31 +406,31 @@ TriggerSegmentManager::setupActions() KRadioAction *action; - QCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); - QIconSet icon(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); + TQIconSet icon(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -469,7 +469,7 @@ TriggerSegmentManager::checkModified() } void -TriggerSegmentManager::slotEdit(QListViewItem *i) +TriggerSegmentManager::slotEdit(TQListViewItem *i) { RG_DEBUG << "TriggerSegmentManager::slotEdit" << endl; @@ -487,7 +487,7 @@ TriggerSegmentManager::slotEdit(QListViewItem *i) } void -TriggerSegmentManager::closeEvent(QCloseEvent *e) +TriggerSegmentManager::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -504,7 +504,7 @@ TriggerSegmentManager::setDocument(RosegardenGUIDoc *doc) } void -TriggerSegmentManager::slotItemClicked(QListViewItem *item) +TriggerSegmentManager::slotItemClicked(TQListViewItem *item) { RG_DEBUG << "TriggerSegmentManager::slotItemClicked" << endl; } @@ -522,7 +522,7 @@ TriggerSegmentManager::makeDurationString(timeT time, int bar, beat, fraction, remainder; m_doc->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -539,12 +539,12 @@ TriggerSegmentManager::makeDurationString(timeT time, RealTime rt = m_doc->getComposition().getRealTimeDifference (time, time + duration); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(duration); + return TQString("%1 ").arg(duration); } } diff --git a/src/gui/editors/segment/TriggerSegmentManager.h b/src/gui/editors/segment/TriggerSegmentManager.h index 2de6488..4746a0e 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.h +++ b/src/gui/editors/segment/TriggerSegmentManager.h @@ -27,15 +27,15 @@ #define _RG_TRIGGERSEGMENTMANAGER_H_ #include <kmainwindow.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QPushButton; -class QListViewItem; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQCloseEvent; +class TQAccel; class KListView; class KCommand; @@ -52,7 +52,7 @@ class TriggerSegmentManager : public KMainWindow Q_OBJECT public: - TriggerSegmentManager(QWidget *parent, + TriggerSegmentManager(TQWidget *parent, RosegardenGUIDoc *doc); ~TriggerSegmentManager(); @@ -67,7 +67,7 @@ public: // reset the document void setDocument(RosegardenGUIDoc *doc); - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } public slots: void slotUpdate(); @@ -76,8 +76,8 @@ public slots: void slotDelete(); void slotDeleteAll(); void slotClose(); - void slotEdit(QListViewItem *); - void slotItemClicked(QListViewItem *); + void slotEdit(TQListViewItem *); + void slotItemClicked(TQListViewItem *); void slotPasteAsNew(); void slotMusicalTime(); @@ -89,25 +89,25 @@ signals: void closing(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void setupActions(); - QString makeDurationString(timeT startTime, + TQString makeDurationString(timeT startTime, timeT duration, int timeMode); //--------------- Data members --------------------------------- RosegardenGUIDoc *m_doc; - QPushButton *m_closeButton; - QPushButton *m_addButton; - QPushButton *m_deleteButton; - QPushButton *m_deleteAllButton; + TQPushButton *m_closeButton; + TQPushButton *m_addButton; + TQPushButton *m_deleteButton; + TQPushButton *m_deleteAllButton; KListView *m_listView; bool m_modified; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp index 1b982dc..b0d3f3b 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp @@ -34,8 +34,8 @@ #include "misc/Debug.h" #include "document/ConfigGroups.h" -#include <qimage.h> -#include <qapplication.h> +#include <tqimage.h> +#include <tqapplication.h> #include <kapp.h> #include <kconfig.h> @@ -57,7 +57,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, { int pixWidth = std::min(m_rect.getBaseWidth(), tileWidth()); - m_image = QImage(pixWidth, m_rect.height(), 8, 4); + m_image = TQImage(pixWidth, m_rect.height(), 8, 4); m_image.setAlphaBuffer(true); m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2); @@ -67,7 +67,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, int AudioPreviewPainter::tileWidth() { static int tw = -1; - if (tw == -1) tw = QApplication::desktop()->width(); + if (tw == -1) tw = TQApplication::desktop()->width(); return tw; } @@ -294,7 +294,7 @@ void AudioPreviewPainter::finalizeCurrentSlice() m_image.setColor(0, qRgba(255, 255, 255, 0)); // foreground from computeSegmentPreviewColor - QColor c = m_model.computeSegmentPreviewColor(m_segment); + TQColor c = m_model.computeSegmentPreviewColor(m_segment); QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255); m_image.setColor(1, rgba); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h index b3c1cac..202b5dd 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h @@ -27,8 +27,8 @@ #include "CompositionModel.h" -#include <qpainter.h> -#include <qcolor.h> +#include <tqpainter.h> +#include <tqcolor.h> namespace Rosegarden { @@ -60,12 +60,12 @@ protected: const Segment* m_segment; CompositionRect m_rect; - QImage m_image; + TQImage m_image; PixmapArray m_previewPixmaps; - QPainter m_p; - QPainter m_pb; - QColor m_defaultCol; + TQPainter m_p; + TQPainter m_pb; + TQColor m_defaultCol; int m_penWidth; int m_height; int m_halfRectHeight; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp index ae64134..b686b35 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp @@ -28,11 +28,11 @@ #include "base/RealTime.h" #include "sound/AudioFileManager.h" #include "sound/PeakFileManager.h" -#include <qapplication.h> -#include <qevent.h> -#include <qmutex.h> -#include <qobject.h> -#include <qthread.h> +#include <tqapplication.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqobject.h> +#include <tqthread.h> namespace Rosegarden @@ -59,8 +59,8 @@ AudioPreviewThread::run() if (m_queue.empty()) { if (m_emptyQueueListener && !emptyQueueSignalled) { - QApplication::postEvent(m_emptyQueueListener, - new QCustomEvent(AudioPreviewQueueEmpty, 0)); + TQApplication::postEvent(m_emptyQueueListener, + new TQCustomEvent(AudioPreviewQueueEmpty, 0)); emptyQueueSignalled = true; } @@ -159,10 +159,10 @@ AudioPreviewThread::process() unsigned int channels = m_manager->getAudioFile(req.audioFileId)->getChannels(); m_results[token] = ResultsPair(channels, results); - QObject *notify = req.notify; - QApplication::postEvent + TQObject *notify = req.notify; + TQApplication::postEvent (notify, - new QCustomEvent(AudioPreviewReady, (void *)token)); + new TQCustomEvent(AudioPreviewReady, (void *)token)); } m_mutex.unlock(); @@ -261,7 +261,7 @@ AudioPreviewThread::getPreview(int token, unsigned int &channels, return ; } -const QEvent::Type AudioPreviewThread::AudioPreviewReady = QEvent::Type(QEvent::User + 1); -const QEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = QEvent::Type(QEvent::User + 2); +const TQEvent::Type AudioPreviewThread::AudioPreviewReady = TQEvent::Type(TQEvent::User + 1); +const TQEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = TQEvent::Type(TQEvent::User + 2); } diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h index ae3ac81..0337346 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h @@ -28,14 +28,14 @@ #include "base/RealTime.h" #include <map> -#include <qevent.h> -#include <qmutex.h> -#include <qthread.h> +#include <tqevent.h> +#include <tqmutex.h> +#include <tqthread.h> #include <utility> #include <vector> -class QObject; +class TQObject; namespace Rosegarden @@ -58,7 +58,7 @@ public: RealTime audioEndTime; int width; bool showMinima; - QObject *notify; + TQObject *notify; }; virtual int requestPreview(const Request &request); @@ -66,10 +66,10 @@ public: virtual void getPreview(int token, unsigned int &channels, std::vector<float> &values); - void setEmptyQueueListener(QObject* o) { m_emptyQueueListener = o; } + void setEmptyQueueListener(TQObject* o) { m_emptyQueueListener = o; } - static const QEvent::Type AudioPreviewReady; - static const QEvent::Type AudioPreviewQueueEmpty; + static const TQEvent::Type AudioPreviewReady; + static const TQEvent::Type AudioPreviewQueueEmpty; protected: @@ -80,7 +80,7 @@ protected: int m_nextToken; bool m_exiting; - QObject* m_emptyQueueListener; + TQObject* m_emptyQueueListener; typedef std::pair<int, Request> RequestRec; typedef std::multimap<int, RequestRec> RequestQueue; @@ -90,7 +90,7 @@ protected: typedef std::map<int, ResultsPair> ResultsQueue; ResultsQueue m_results; - QMutex m_mutex; + TQMutex m_mutex; }; diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp index 76497b9..182eb9b 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp @@ -31,9 +31,9 @@ #include "base/RealTime.h" #include "base/Segment.h" #include "CompositionModelImpl.h" -#include <qevent.h> -#include <qobject.h> -#include <qrect.h> +#include <tqevent.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden @@ -43,9 +43,9 @@ static int apuExtantCount = 0; AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread, const Composition& c, const Segment* s, - const QRect& r, + const TQRect& r, CompositionModelImpl* parent) - : QObject(parent), + : TQObject(parent), m_thread(thread), m_composition(c), m_segment(s), @@ -100,12 +100,12 @@ void AudioPreviewUpdater::cancel() m_previewToken = -1; } -bool AudioPreviewUpdater::event(QEvent *e) +bool AudioPreviewUpdater::event(TQEvent *e) { RG_DEBUG << "AudioPreviewUpdater(" << this << ")::event (" << e << ")" << endl; if (e->type() == AudioPreviewThread::AudioPreviewReady) { - QCustomEvent *ev = dynamic_cast<QCustomEvent *>(e); + TQCustomEvent *ev = dynamic_cast<TQCustomEvent *>(e); if (ev) { intptr_t token = (intptr_t)ev->data(); m_channels = 0; // to be filled as getPreview return value @@ -142,7 +142,7 @@ bool AudioPreviewUpdater::event(QEvent *e) } } - return QObject::event(e); + return TQObject::event(e); } } diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h index ffc97c9..347ba16 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h @@ -26,12 +26,12 @@ #ifndef _RG_AUDIOPREVIEWUPDATER_H_ #define _RG_AUDIOPREVIEWUPDATER_H_ -#include <qobject.h> -#include <qrect.h> +#include <tqobject.h> +#include <tqrect.h> #include <vector> -class QEvent; +class TQEvent; namespace Rosegarden @@ -51,15 +51,15 @@ public: AudioPreviewUpdater(AudioPreviewThread &thread, const Composition &composition, const Segment *segment, - const QRect &displayExtent, + const TQRect &displayExtent, CompositionModelImpl *parent); ~AudioPreviewUpdater(); void update(); void cancel(); - QRect getDisplayExtent() const { return m_rect; } - void setDisplayExtent(const QRect &rect) { m_rect = rect; } + TQRect getDisplayExtent() const { return m_rect; } + void setDisplayExtent(const TQRect &rect) { m_rect = rect; } const Segment *getSegment() const { return m_segment; } @@ -70,13 +70,13 @@ signals: void audioPreviewComplete(AudioPreviewUpdater*); protected: - virtual bool event(QEvent*); + virtual bool event(TQEvent*); AudioPreviewThread& m_thread; const Composition& m_composition; const Segment* m_segment; - QRect m_rect; + TQRect m_rect; bool m_showMinima; unsigned int m_channels; std::vector<float> m_values; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp index b36d6e0..b9f05d4 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp @@ -26,7 +26,7 @@ #include "CompositionColourCache.h" #include "gui/general/GUIPalette.h" -#include <qcolor.h> +#include <tqcolor.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h index 32d4719..c9dcafc 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h @@ -26,7 +26,7 @@ #ifndef _RG_COMPOSITIONCOLOURCACHE_H_ #define _RG_COMPOSITIONCOLOURCACHE_H_ -#include <qcolor.h> +#include <tqcolor.h> @@ -43,19 +43,19 @@ public: void init(); - QColor SegmentCanvas; - QColor SegmentAudioPreview; - QColor SegmentInternalPreview; - QColor SegmentLabel; - QColor SegmentBorder; - QColor RepeatSegmentBorder; - QColor RecordingSegmentBorder; - QColor RecordingAudioSegmentBlock; - QColor RecordingInternalSegmentBlock; - QColor Pointer; - QColor MovementGuide; - QColor RotaryFloatBackground; - QColor RotaryFloatForeground; + TQColor SegmentCanvas; + TQColor SegmentAudioPreview; + TQColor SegmentInternalPreview; + TQColor SegmentLabel; + TQColor SegmentBorder; + TQColor RepeatSegmentBorder; + TQColor RecordingSegmentBorder; + TQColor RecordingAudioSegmentBlock; + TQColor RecordingInternalSegmentBlock; + TQColor Pointer; + TQColor MovementGuide; + TQColor RotaryFloatBackground; + TQColor RotaryFloatForeground; protected: CompositionColourCache() { init(); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp index 798178a..f37487b 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp @@ -25,8 +25,8 @@ #include "CompositionItem.h" -#include <qobject.h> -#include <qrect.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.h b/src/gui/editors/segment/segmentcanvas/CompositionItem.h index b5e749b..f86f1b0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItem.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.h @@ -26,18 +26,18 @@ #ifndef _RG_COMPOSITIONITEM_H_ #define _RG_COMPOSITIONITEM_H_ -#include <qguardedptr.h> -#include <qobject.h> -#include <qrect.h> +#include <tqguardedptr.h> +#include <tqobject.h> +#include <tqrect.h> namespace Rosegarden { -class _CompositionItem : public QObject { +class _CompositionItem : public TQObject { public: virtual bool isRepeating() const = 0; - virtual QRect rect() const = 0; + virtual TQRect rect() const = 0; virtual void moveBy(int x, int y) = 0; virtual void moveTo(int x, int y) = 0; virtual void setX(int x) = 0; @@ -51,14 +51,14 @@ public: // used by itemcontainer virtual long hashKey() = 0; - QRect savedRect() const { return m_savedRect; } + TQRect savedRect() const { return m_savedRect; } void saveRect() const { m_savedRect = rect(); } protected: - mutable QRect m_savedRect; + mutable TQRect m_savedRect; }; -typedef QGuardedPtr<_CompositionItem> CompositionItem; +typedef TQGuardedPtr<_CompositionItem> CompositionItem; bool operator<(const CompositionItem&, const CompositionItem&); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp index e1705cd..9579ba2 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp @@ -31,9 +31,9 @@ #include "misc/Debug.h" #include "CompositionModel.h" #include "CompositionItemImpl.h" -#include <qcolor.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqrect.h> namespace Rosegarden { @@ -60,7 +60,7 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg timeT t = 0; if (item) { - QRect itemRect = item->rect(); + TQRect itemRect = item->rect(); t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L); @@ -102,8 +102,8 @@ void CompositionItemHelper::setEndTime(CompositionItem& item, timeT time, { if (item) { int x = int(nearbyint(grid.getRulerScale()->getXForTime(time))); - QRect r = item->rect(); - QPoint topRight = r.topRight(); + TQRect r = item->rect(); + TQPoint topRight = r.topRight(); topRight.setX(x); r.setTopRight(topRight); item->setWidth(r.width()); @@ -127,7 +127,7 @@ Rosegarden::Segment* CompositionItemHelper::getSegment(CompositionItem item) CompositionItem CompositionItemHelper::makeCompositionItem(Rosegarden::Segment* segment) { - return CompositionItem(new CompositionItemImpl(*segment, QRect())); + return CompositionItem(new CompositionItemImpl(*segment, TQRect())); } CompositionItem CompositionItemHelper::findSiblingCompositionItem(const CompositionModel::itemcontainer& items, diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp index 5508ad2..12984a0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp @@ -28,13 +28,13 @@ #include "misc/Debug.h" #include "base/Segment.h" #include "CompositionRect.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> namespace Rosegarden @@ -46,9 +46,9 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect m_z(0) {} -QRect CompositionItemImpl::rect() const +TQRect CompositionItemImpl::rect() const { - QRect res = m_rect; + TQRect res = m_rect; if (m_rect.isRepeating()) { CompositionRect::repeatmarks repeatMarks = m_rect.getRepeatMarks(); int neww = m_rect.getBaseWidth(); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h index b5b3ef7..bd61bd0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h @@ -28,7 +28,7 @@ #include "CompositionRect.h" #include "CompositionItem.h" -#include <qrect.h> +#include <tqrect.h> @@ -43,7 +43,7 @@ class CompositionItemImpl : public _CompositionItem { public: CompositionItemImpl(Segment& s, const CompositionRect&); virtual bool isRepeating() const { return m_rect.isRepeating(); } - virtual QRect rect() const; + virtual TQRect rect() const; virtual void moveBy(int x, int y) { m_rect.moveBy(x, y); } virtual void moveTo(int x, int y) { m_rect.setRect(x, y, m_rect.width(), m_rect.height()); } virtual void setX(int x) { m_rect.setX(x); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h index beafc2e..63412c0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h @@ -29,11 +29,11 @@ #include "base/Composition.h" #include "base/Segment.h" #include <set> -#include <qcolor.h> -#include <qobject.h> -#include <qimage.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqobject.h> +#include <tqimage.h> +#include <tqpoint.h> +#include <tqrect.h> #include <utility> #include <vector> #include "base/Event.h" @@ -50,10 +50,10 @@ namespace Rosegarden { class SnapGrid; -typedef std::vector<QImage> PixmapArray; +typedef std::vector<TQImage> PixmapArray; -class CompositionModel : public QObject, public CompositionObserver, public SegmentObserver +class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver { Q_OBJECT public: @@ -62,17 +62,17 @@ public: bool operator()(const CompositionItem &c1, const CompositionItem &c2) const; }; - typedef std::vector<QRect> rectlist; + typedef std::vector<TQRect> rectlist; typedef std::vector<int> heightlist; typedef std::vector<CompositionRect> rectcontainer; typedef std::set<CompositionItem, CompositionItemCompare> itemcontainer; struct AudioPreviewDrawDataItem { - AudioPreviewDrawDataItem(PixmapArray p, QPoint bp, QRect r) : + AudioPreviewDrawDataItem(PixmapArray p, TQPoint bp, TQRect r) : pixmap(p), basePoint(bp), rect(r), resizeOffset(0) {}; PixmapArray pixmap; - QPoint basePoint; - QRect rect; + TQPoint basePoint; + TQRect rect; // when showing a segment that is being resized from the // beginning, this contains the offset between the current @@ -84,8 +84,8 @@ public: struct RectRange { std::pair<rectlist::iterator, rectlist::iterator> range; - QPoint basePoint; - QColor color; + TQPoint basePoint; + TQColor color; }; typedef std::vector<RectRange> RectRanges; @@ -104,14 +104,14 @@ public: const std::vector<float> &getValues() const { return m_values; } void setValues(const std::vector<float>&v) { m_values = v; } - QRect getSegmentRect() { return m_segmentRect; } - void setSegmentRect(const QRect& r) { m_segmentRect = r; } + TQRect getSegmentRect() { return m_segmentRect; } + void setSegmentRect(const TQRect& r) { m_segmentRect = r; } protected: std::vector<float> m_values; bool m_showMinima; unsigned int m_channels; - QRect m_segmentRect; + TQRect m_segmentRect; private: // no copy ctor @@ -122,13 +122,13 @@ public: virtual ~CompositionModel() {}; virtual unsigned int getNbRows() = 0; - virtual const rectcontainer& getRectanglesIn(const QRect& rect, + virtual const rectcontainer& getRectanglesIn(const TQRect& rect, RectRanges* notationRects, AudioPreviewDrawData* audioRects) = 0; - virtual heightlist getTrackDividersIn(const QRect& rect) = 0; + virtual heightlist getTrackDividersIn(const TQRect& rect) = 0; - virtual itemcontainer getItemsAt (const QPoint&) = 0; - virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&) = 0; + virtual itemcontainer getItemsAt (const TQPoint&) = 0; + virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&) = 0; virtual SnapGrid& grid() = 0; @@ -140,9 +140,9 @@ public: virtual bool haveSelection() const = 0; virtual bool haveMultipleSelection() const = 0; virtual void signalSelection() = 0; - virtual void setSelectionRect(const QRect&) = 0; + virtual void setSelectionRect(const TQRect&) = 0; virtual void finalizeSelectionRect() = 0; - virtual QRect getSelectionContentsRect() = 0; + virtual TQRect getSelectionContentsRect() = 0; virtual void signalContentChange() = 0; virtual void addRecordingItem(const CompositionItem&) = 0; @@ -163,7 +163,7 @@ public: signals: void needContentUpdate(); - void needContentUpdate(const QRect&); + void needContentUpdate(const TQRect&); void needArtifactsUpdate(); protected: diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp index 39deb2e..9627b16 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp @@ -50,14 +50,14 @@ #include "AudioPreviewPainter.h" #include "gui/general/GUIPalette.h" #include "SegmentOrderer.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qregexp.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqregexp.h> +#include <tqsize.h> +#include <tqstring.h> @@ -120,13 +120,13 @@ CompositionModelImpl::~CompositionModelImpl() } struct RectCompare { - bool operator()(const QRect &r1, const QRect &r2) const { + bool operator()(const TQRect &r1, const TQRect &r2) const { return r1.x() < r2.x(); } }; -void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint basePoint, - const Segment* segment, const QRect& clipRect) +void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, TQPoint basePoint, + const Segment* segment, const TQRect& clipRect) { rectlist* cachedNPData = getNotationPreviewData(segment); @@ -167,8 +167,8 @@ void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint npRects->push_back(interval); } -void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, QPoint basePoint, - const Segment* segment, const QRect& currentSR) +void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, TQPoint basePoint, + const Segment* segment, const TQRect& currentSR) { CompositionRect unmovedSR = computeSegmentRect(*segment); @@ -222,14 +222,14 @@ void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npR } void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment* segment, - const CompositionRect& segRect, const QRect& clipRect) + const CompositionRect& segRect, const TQRect& clipRect) { Profiler profiler("CompositionModelImpl::makeAudioPreviewRects", true); RG_DEBUG << "CompositionModelImpl::makeAudioPreviewRects - segRect = " << segRect << endl; PixmapArray previewImage = getAudioPreviewPixmap(segment); - QPoint basePoint = segRect.topLeft(); + TQPoint basePoint = segRect.topLeft(); AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect); @@ -392,7 +392,7 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s if (y > y1 - height + 1) y = y1 - height + 1; - QRect r(x, (int)y, width, height); + TQRect r(x, (int)y, width, height); // RG_DEBUG << "CompositionModelImpl::updatePreviewCacheForNotationSegment() : npData = " // << npData << ", preview rect = " @@ -402,10 +402,10 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s } -QColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment) +TQColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment) { // compute the preview color so it's as visible as possible over the segment's color - QColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex())); + TQColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex())); int h, s, v; segColor.hsv(&h, &s, &v); @@ -440,7 +440,7 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm CompositionRect segRect = computeSegmentRect(*segment); segRect.setWidth(segRect.getBaseWidth()); // don't use repeating area - segRect.moveTopLeft(QPoint(0, 0)); + segRect.moveTopLeft(TQPoint(0, 0)); if (apData) apData->setSegmentRect(segRect); @@ -451,8 +451,8 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm AudioPreviewUpdater *updater = new AudioPreviewUpdater (*m_audioPreviewThread, m_composition, segment, segRect, this); - connect(updater, SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)), - this, SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*))); + connect(updater, TQT_SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)), + this, TQT_SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*))); m_audioPreviewUpdaterMap[segment] = updater; @@ -473,7 +473,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete()\n"; AudioPreviewData *apData = getAudioPreviewData(apu->getSegment()); - QRect updateRect; + TQRect updateRect; if (apData) { RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl; @@ -492,7 +492,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) emit needContentUpdate(updateRect); } -QRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment) +TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment) { // RG_DEBUG << "CompositionModelImpl::postProcessAudioPreview()\n"; @@ -608,7 +608,7 @@ void CompositionModelImpl::segmentRemoved(const Composition *, Segment *s) { setTrackHeights(); - QRect r = computeSegmentRect(*s); + TQRect r = computeSegmentRect(*s); m_selectedSegments.erase(s); @@ -658,7 +658,7 @@ void CompositionModelImpl::endMarkerTimeChanged(const Composition *, bool) emit needSizeUpdate(); } -void CompositionModelImpl::setSelectionRect(const QRect& r) +void CompositionModelImpl::setSelectionRect(const TQRect& r) { m_selectionRect = r.normalize(); @@ -668,7 +668,7 @@ void CompositionModelImpl::setSelectionRect(const QRect& r) const Composition::segmentcontainer& segments = m_composition.getSegments(); Composition::segmentcontainer::iterator segEnd = segments.end(); - QRect updateRect = m_selectionRect; + TQRect updateRect = m_selectionRect; for (Composition::segmentcontainer::iterator i = segments.begin(); i != segEnd; ++i) { @@ -711,13 +711,13 @@ void CompositionModelImpl::finalizeSelectionRect() } } - m_previousSelectionUpdateRect = m_selectionRect = QRect(); + m_previousSelectionUpdateRect = m_selectionRect = TQRect(); m_tmpSelectedSegments.clear(); } -QRect CompositionModelImpl::getSelectionContentsRect() +TQRect CompositionModelImpl::getSelectionContentsRect() { - QRect selectionRect; + TQRect selectionRect; SegmentSelection sel = getSelectedSegments(); for (SegmentSelection::iterator i = sel.begin(); @@ -784,7 +784,7 @@ bool CompositionModelImpl::isRecording(const Segment* s) const return m_recordingSegments.find(const_cast<Segment*>(s)) != m_recordingSegments.end(); } -CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const QPoint& point) +CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint& point) { itemcontainer res; @@ -953,7 +953,7 @@ int CompositionModelImpl::getLength() return w; } -timeT CompositionModelImpl::getRepeatTimeAt(const QPoint& p, const CompositionItem& cItem) +timeT CompositionModelImpl::getRepeatTimeAt(const TQPoint& p, const CompositionItem& cItem) { // timeT timeAtClick = m_grid.getRulerScale()->getTimeForX(p.x()); @@ -1009,14 +1009,14 @@ bool CompositionModelImpl::setTrackHeights(Segment *s) return heightsChanged; } -QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) +TQPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) { // Profiler profiler("CompositionModelImpl::computeSegmentOrigin", true); int trackPosition = m_composition.getTrackPositionById(s.getTrack()); timeT startTime = s.getStartTime(); - QPoint res; + TQPoint res; res.setX(int(nearbyint(m_grid.getRulerScale()->getXForTime(startTime)))); @@ -1027,7 +1027,7 @@ QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s) return res; } -bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, QPoint cachedSegmentOrigin, timeT cachedSegmentEndTime) +bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, TQPoint cachedSegmentOrigin, timeT cachedSegmentEndTime) { return s.isRepeating() == r.isRepeating() && ((cachedSegmentOrigin.x() != r.x() && s.getEndMarkerTime() != cachedSegmentEndTime) || @@ -1059,7 +1059,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool { // Profiler profiler("CompositionModelImpl::computeSegmentRect", true); - QPoint origin = computeSegmentOrigin(s); + TQPoint origin = computeSegmentOrigin(s); bool isRecordingSegment = isRecording(&s); @@ -1119,11 +1119,11 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool // << " w = " << w << " (x for time at start is " << m_grid.getRulerScale()->getXForTime(startTime) << ", end is " << m_grid.getRulerScale()->getXForTime(endTime) << ")" << endl; } - CompositionRect cr(origin, QSize(w, h)); - QString label = strtoqstr(s.getLabel()); + CompositionRect cr(origin, TQSize(w, h)); + TQString label = strtoqstr(s.getLabel()); if (s.getType() == Segment::Audio) { - static QRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) - static QRegExp re2("\\.[^.]+$"); // filename suffix + static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) + static TQRegExp re2("\\.[^.]+$"); // filename suffix label.replace(re1, "").replace(re2, ""); } cr.setLabel(label); @@ -1155,7 +1155,7 @@ unsigned int CompositionModelImpl::getNbRows() return m_composition.getNbTracks(); } -const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const QRect& rect, +const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const TQRect& rect, RectRanges* npData, AudioPreviewDrawData* apData) { @@ -1199,7 +1199,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con bool isAudio = (s && s->getType() == Segment::Audio); if (!isRecording(s)) { - QColor brushColor = GUIPalette::convertColour(m_composition. + TQColor brushColor = GUIPalette::convertColour(m_composition. getSegmentColourMap().getColourByIndex(s->getColourIndex())); sr.setBrush(brushColor); sr.setPen(CompositionColourCache::getInstance()->SegmentBorder); @@ -1217,7 +1217,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con // Notation preview data if (npData && s->getType() == Segment::Internal) { - makeNotationPreviewRects(npData, QPoint(0, sr.y()), s, rect); + makeNotationPreviewRects(npData, TQPoint(0, sr.y()), s, rect); // Audio preview data } else if (apData && s->getType() == Segment::Audio) { makeAudioPreviewRects(apData, s, sr, rect); @@ -1238,7 +1238,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con if (sr.intersects(rect)) { Segment* s = CompositionItemHelper::getSegment(*i); sr.setSelected(true); - QColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex())); + TQColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex())); sr.setBrush(brushColor); sr.setPen(CompositionColourCache::getInstance()->SegmentBorder); @@ -1259,7 +1259,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con } CompositionModel::heightlist -CompositionModelImpl::getTrackDividersIn(const QRect& rect) +CompositionModelImpl::getTrackDividersIn(const TQRect& rect) { int top = m_grid.getYBin(rect.y()); int bottom = m_grid.getYBin(rect.y() + rect.height()); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h index 6e1c9d6..2d3fd64 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h @@ -33,10 +33,10 @@ #include <map> #include "SegmentOrderer.h" #include <set> -#include <qcolor.h> -#include <qpoint.h> -#include <qptrdict.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqptrdict.h> +#include <tqrect.h> #include <vector> #include "base/Event.h" @@ -72,11 +72,11 @@ public: virtual ~CompositionModelImpl(); virtual unsigned int getNbRows(); - virtual const rectcontainer& getRectanglesIn(const QRect& rect, + virtual const rectcontainer& getRectanglesIn(const TQRect& rect, RectRanges* notationRects, AudioPreviewDrawData* audioRects); - virtual heightlist getTrackDividersIn(const QRect& rect); - virtual itemcontainer getItemsAt (const QPoint&); - virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&); + virtual heightlist getTrackDividersIn(const TQRect& rect); + virtual itemcontainer getItemsAt (const TQPoint&); + virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&); virtual SnapGrid& grid() { return m_grid; } @@ -88,9 +88,9 @@ public: virtual bool haveSelection() const { return !m_selectedSegments.empty(); } virtual bool haveMultipleSelection() const { return m_selectedSegments.size() > 1; } virtual void signalSelection(); - virtual void setSelectionRect(const QRect&); + virtual void setSelectionRect(const TQRect&); virtual void finalizeSelectionRect(); - virtual QRect getSelectionContentsRect(); + virtual TQRect getSelectionContentsRect(); virtual void signalContentChange(); virtual void addRecordingItem(const CompositionItem&); @@ -117,8 +117,8 @@ public: AudioPreviewData* makeAudioPreviewDataCache(const Segment *s); CompositionRect computeSegmentRect(const Segment&, bool computeZ = false); - QColor computeSegmentPreviewColor(const Segment*); - QPoint computeSegmentOrigin(const Segment&); + TQColor computeSegmentPreviewColor(const Segment*); + TQPoint computeSegmentOrigin(const Segment&); void computeRepeatMarks(CompositionItem&); SegmentSelection getSelectedSegments() { return m_selectedSegments; } @@ -173,21 +173,21 @@ protected: rectlist* getNotationPreviewData(const Segment* s); AudioPreviewData* getAudioPreviewData(const Segment* s); PixmapArray getAudioPreviewPixmap(const Segment* s); - QRect postProcessAudioPreview(AudioPreviewData*, const Segment*); + TQRect postProcessAudioPreview(AudioPreviewData*, const Segment*); void makePreviewCache(const Segment* s); void removePreviewCache(const Segment* s); - void makeNotationPreviewRects(RectRanges* npData, QPoint basePoint, const Segment*, const QRect&); - void makeNotationPreviewRectsMovingSegment(RectRanges* npData, QPoint basePoint, const Segment*, - const QRect&); + void makeNotationPreviewRects(RectRanges* npData, TQPoint basePoint, const Segment*, const TQRect&); + void makeNotationPreviewRectsMovingSegment(RectRanges* npData, TQPoint basePoint, const Segment*, + const TQRect&); void makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment*, - const CompositionRect& segRect, const QRect& clipRect); + const CompositionRect& segRect, const TQRect& clipRect); void clearInCache(const Segment*, bool clearPreviewCache = false); void putInCache(const Segment*, const CompositionRect&); const CompositionRect& getFromCache(const Segment*, timeT& endTime); bool isCachedRectCurrent(const Segment& s, const CompositionRect& r, - QPoint segmentOrigin, timeT segmentEndTime); + TQPoint segmentOrigin, timeT segmentEndTime); //--------------- Data members --------------------------------- Composition& m_composition; @@ -206,8 +206,8 @@ protected: AudioPreviewThread* m_audioPreviewThread; - typedef QPtrDict<rectlist> NotationPreviewDataCache; - typedef QPtrDict<AudioPreviewData> AudioPreviewDataCache; + typedef TQPtrDict<rectlist> NotationPreviewDataCache; + typedef TQPtrDict<AudioPreviewData> AudioPreviewDataCache; NotationPreviewDataCache m_notationPreviewDataCache; AudioPreviewDataCache m_audioPreviewDataCache; @@ -217,8 +217,8 @@ protected: ChangeType m_changeType; itemgc m_itemGC; - QRect m_selectionRect; - QRect m_previousSelectionUpdateRect; + TQRect m_selectionRect; + TQRect m_previousSelectionUpdateRect; std::map<const Segment*, CompositionRect> m_segmentRectMap; std::map<const Segment*, timeT> m_segmentEndTimeMap; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp index 9e34d71..9f867a5 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp @@ -26,17 +26,17 @@ #include "CompositionRect.h" #include "base/ColourMap.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> namespace Rosegarden { - const QColor CompositionRect::DefaultPenColor = Qt::black; - const QColor CompositionRect::DefaultBrushColor = QColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B); + const TQColor CompositionRect::DefaultPenColor = Qt::black; + const TQColor CompositionRect::DefaultBrushColor = TQColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.h b/src/gui/editors/segment/segmentcanvas/CompositionRect.h index 3c3d2b6..45c5f50 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h @@ -26,16 +26,16 @@ #ifndef _RG_COMPOSITIONRECT_H_ #define _RG_COMPOSITIONRECT_H_ -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qrect.h> -#include <qstring.h> -#include <qvaluevector.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqvaluevector.h> -class QSize; -class QPoint; +class TQSize; +class TQPoint; namespace Rosegarden @@ -44,22 +44,22 @@ namespace Rosegarden class CompositionRect : public QRect { public: - typedef QValueVector<int> repeatmarks; + typedef TQValueVector<int> repeatmarks; friend bool operator<(const CompositionRect&, const CompositionRect&); - CompositionRect() : QRect(), m_selected(false), + CompositionRect() : TQRect(), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor) {}; - CompositionRect(const QRect& r) : QRect(r), m_resized(false), m_selected(false), + CompositionRect(const TQRect& r) : TQRect(r), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; - CompositionRect(const QPoint & topLeft, const QPoint & bottomRight) - : QRect(topLeft, bottomRight), m_resized(false), m_selected(false), + CompositionRect(const TQPoint & topLeft, const TQPoint & bottomRight) + : TQRect(topLeft, bottomRight), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; - CompositionRect(const QPoint & topLeft, const QSize & size) - : QRect(topLeft, size), m_resized(false), m_selected(false), + CompositionRect(const TQPoint & topLeft, const TQSize & size) + : TQRect(topLeft, size), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; CompositionRect(int left, int top, int width, int height) - : QRect(left, top, width, height), m_resized(false), m_selected(false), + : TQRect(left, top, width, height), m_resized(false), m_selected(false), m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {}; void setResized(bool s) { m_resized = s; } @@ -73,10 +73,10 @@ public: int z() const { return m_z; } // brush, pen draw info - void setBrush(QBrush b) { m_brush = b; } - QBrush getBrush() const { return m_brush; } - void setPen(QPen b) { m_pen = b; } - QPen getPen() const { return m_pen; } + void setBrush(TQBrush b) { m_brush = b; } + TQBrush getBrush() const { return m_brush; } + void setPen(TQPen b) { m_pen = b; } + TQPen getPen() const { return m_pen; } // repeating segments void setRepeatMarks(const repeatmarks& rm) { m_repeatMarks = rm; } @@ -84,21 +84,21 @@ public: bool isRepeating() const { return m_repeatMarks.size() > 0; } int getBaseWidth() const { return m_baseWidth; } void setBaseWidth(int bw) { m_baseWidth = bw; } - QString getLabel() const { return m_label; } - void setLabel(QString l) { m_label = l; } + TQString getLabel() const { return m_label; } + void setLabel(TQString l) { m_label = l; } - static const QColor DefaultPenColor; - static const QColor DefaultBrushColor; + static const TQColor DefaultPenColor; + static const TQColor DefaultBrushColor; protected: bool m_resized; bool m_selected; bool m_needUpdate; - QBrush m_brush; - QPen m_pen; + TQBrush m_brush; + TQPen m_pen; repeatmarks m_repeatMarks; int m_baseWidth; - QString m_label; + TQString m_label; int m_z; }; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp index 8e83a6b..1ff0263 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp @@ -47,22 +47,22 @@ #include "SegmentToolBox.h" #include "SegmentTool.h" #include <kmessagebox.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qmemarray.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqmemarray.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <kapplication.h> #include <kconfig.h> #include <algorithm> @@ -71,24 +71,24 @@ namespace Rosegarden { -class PreviewRect : public QRect { +class PreviewRect : public TQRect { public: PreviewRect(int left, int top, int width, int height) : - QRect(left, top, width, height) {}; + TQRect(left, top, width, height) {}; - PreviewRect(const QRect& r) : - QRect(r) {}; + PreviewRect(const TQRect& r) : + TQRect(r) {}; - const QColor& getColor() const { return m_color; } - void setColor(QColor c) { m_color = c; } + const TQColor& getColor() const { return m_color; } + void setColor(TQColor c) { m_color = c; } protected: - QColor m_color; + TQColor m_color; }; CompositionView::CompositionView(RosegardenGUIDoc* doc, CompositionModel* model, - QWidget * parent, const char * name, WFlags f) + TQWidget * parent, const char * name, WFlags f) #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) : RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents), #else @@ -110,8 +110,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, m_pointerPos(0), m_pointerColor(GUIPalette::getColour(GUIPalette::Pointer)), m_pointerWidth(4), - m_pointerPen(QPen(m_pointerColor, m_pointerWidth)), - m_tmpRect(QRect(QPoint(0, 0), QPoint( -1, -1))), + m_pointerPen(TQPen(m_pointerColor, m_pointerWidth)), + m_tmpRect(TQRect(TQPoint(0, 0), TQPoint( -1, -1))), m_tmpRectFill(CompositionRect::DefaultBrushColor), m_trackDividerColor(GUIPalette::getColour(GUIPalette::TrackDivider)), m_drawGuides(false), @@ -132,8 +132,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, if (doc) { m_toolBox = new SegmentToolBox(this, doc); - connect(m_toolBox, SIGNAL(showContextHelp(const QString &)), - this, SLOT(slotToolHelpChanged(const QString &))); + connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), + this, TQT_SLOT(slotToolHelpChanged(const TQString &))); } setDragAutoScroll(true); @@ -143,46 +143,46 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, slotUpdateSize(); - QScrollBar* hsb = horizontalScrollBar(); + TQScrollBar* hsb = horizontalScrollBar(); // dynamically adjust content size when scrolling past current composition's end - connect(hsb, SIGNAL(nextLine()), - this, SLOT(scrollRight())); - connect(hsb, SIGNAL(prevLine()), - this, SLOT(scrollLeft())); - - // connect(this, SIGNAL(contentsMoving(int, int)), - // this, SLOT(slotAllDrawBuffersNeedRefresh())); - - // connect(this, SIGNAL(contentsMoving(int, int)), - // this, SLOT(slotContentsMoving(int, int))); - - connect(model, SIGNAL(needContentUpdate()), - this, SLOT(slotUpdateSegmentsDrawBuffer())); - connect(model, SIGNAL(needContentUpdate(const QRect&)), - this, SLOT(slotUpdateSegmentsDrawBuffer(const QRect&))); - connect(model, SIGNAL(needArtifactsUpdate()), - this, SLOT(slotArtifactsDrawBufferNeedsRefresh())); - connect(model, SIGNAL(needSizeUpdate()), - this, SLOT(slotUpdateSize())); + connect(hsb, TQT_SIGNAL(nextLine()), + this, TQT_SLOT(scrollRight())); + connect(hsb, TQT_SIGNAL(prevLine()), + this, TQT_SLOT(scrollLeft())); + + // connect(this, TQT_SIGNAL(contentsMoving(int, int)), + // this, TQT_SLOT(slotAllDrawBuffersNeedRefresh())); + + // connect(this, TQT_SIGNAL(contentsMoving(int, int)), + // this, TQT_SLOT(slotContentsMoving(int, int))); + + connect(model, TQT_SIGNAL(needContentUpdate()), + this, TQT_SLOT(slotUpdateSegmentsDrawBuffer())); + connect(model, TQT_SIGNAL(needContentUpdate(const TQRect&)), + this, TQT_SLOT(slotUpdateSegmentsDrawBuffer(const TQRect&))); + connect(model, TQT_SIGNAL(needArtifactsUpdate()), + this, TQT_SLOT(slotArtifactsDrawBufferNeedsRefresh())); + connect(model, TQT_SIGNAL(needSizeUpdate()), + this, TQT_SLOT(slotUpdateSize())); if (doc) { - connect(doc, SIGNAL(docColoursChanged()), - this, SLOT(slotRefreshColourCache())); + connect(doc, TQT_SIGNAL(docColoursChanged()), + this, TQT_SLOT(slotRefreshColourCache())); // recording-related signals - connect(doc, SIGNAL(newMIDIRecordingSegment(Segment*)), - this, SLOT(slotNewMIDIRecordingSegment(Segment*))); - connect(doc, SIGNAL(newAudioRecordingSegment(Segment*)), - this, SLOT(slotNewAudioRecordingSegment(Segment*))); - // connect(doc, SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)), - // this, SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT))); - connect(doc, SIGNAL(stoppedAudioRecording()), - this, SLOT(slotStoppedRecording())); - connect(doc, SIGNAL(stoppedMIDIRecording()), - this, SLOT(slotStoppedRecording())); - connect(doc, SIGNAL(audioFileFinalized(Segment*)), - getModel(), SLOT(slotAudioFileFinalized(Segment*))); + connect(doc, TQT_SIGNAL(newMIDIRecordingSegment(Segment*)), + this, TQT_SLOT(slotNewMIDIRecordingSegment(Segment*))); + connect(doc, TQT_SIGNAL(newAudioRecordingSegment(Segment*)), + this, TQT_SLOT(slotNewAudioRecordingSegment(Segment*))); + // connect(doc, TQT_SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)), + // this, TQT_SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT))); + connect(doc, TQT_SIGNAL(stoppedAudioRecording()), + this, TQT_SLOT(slotStoppedRecording())); + connect(doc, TQT_SIGNAL(stoppedMIDIRecording()), + this, TQT_SLOT(slotStoppedRecording())); + connect(doc, TQT_SIGNAL(audioFileFinalized(Segment*)), + getModel(), TQT_SLOT(slotAudioFileFinalized(Segment*))); } CompositionModelImpl* cmi = dynamic_cast<CompositionModelImpl*>(model); @@ -194,8 +194,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, doc->getAudioPreviewThread().setEmptyQueueListener(this); } - m_segmentsDrawBuffer.setOptimization(QPixmap::BestOptim); - m_artifactsDrawBuffer.setOptimization(QPixmap::BestOptim); + m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim); + m_artifactsDrawBuffer.setOptimization(TQPixmap::BestOptim); viewport()->setMouseTracking(true); } @@ -208,7 +208,7 @@ void CompositionView::endAudioPreviewGeneration() } } -void CompositionView::setBackgroundPixmap(const QPixmap &m) +void CompositionView::setBackgroundPixmap(const TQPixmap &m) { m_backgroundPixmap = m; // viewport()->setErasePixmap(m_backgroundPixmap); @@ -216,7 +216,7 @@ void CompositionView::setBackgroundPixmap(const QPixmap &m) void CompositionView::initStepSize() { - QScrollBar* hsb = horizontalScrollBar(); + TQScrollBar* hsb = horizontalScrollBar(); m_stepSize = hsb->lineStep(); } @@ -265,7 +265,7 @@ void CompositionView::scrollLeft() } -void CompositionView::setSelectionRectPos(const QPoint& pos) +void CompositionView::setSelectionRectPos(const TQPoint& pos) { m_selectionRect.setRect(pos.x(), pos.y(), 0, 0); getModel()->setSelectionRect(m_selectionRect); @@ -273,7 +273,7 @@ void CompositionView::setSelectionRectPos(const QPoint& pos) void CompositionView::setSelectionRectSize(int w, int h) { - m_selectionRect.setSize(QSize(w, h)); + m_selectionRect.setSize(TQSize(w, h)); getModel()->setSelectionRect(m_selectionRect); } @@ -303,7 +303,7 @@ void CompositionView::updateSelectionContents() return ; - QRect selectionRect = getModel()->getSelectionContentsRect(); + TQRect selectionRect = getModel()->getSelectionContentsRect(); updateContents(selectionRect); } @@ -312,7 +312,7 @@ void CompositionView::slotContentsMoving(int x, int y) // qDebug("contents moving : x=%d", x); } -void CompositionView::slotSetTool(const QString& toolName) +void CompositionView::slotSetTool(const TQString& toolName) { RG_DEBUG << "CompositionView::slotSetTool(" << toolName << ")" << this << "\n"; @@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const QString& toolName) if (m_tool) m_tool->ready(); else { - KMessageBox::error(0, QString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); + KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); } } @@ -335,7 +335,7 @@ void CompositionView::slotSelectSegments(const SegmentSelection &segments) { RG_DEBUG << "CompositionView::slotSelectSegments\n"; - static QRect dummy; + static TQRect dummy; getModel()->clearSelected(); @@ -383,13 +383,13 @@ void CompositionView::slotHideSplitLine() m_splitLinePos.setY( -1); } -void CompositionView::slotExternalWheelEvent(QWheelEvent* e) +void CompositionView::slotExternalWheelEvent(TQWheelEvent* e) { e->accept(); wheelEvent(e); } -CompositionItem CompositionView::getFirstItemAt(QPoint pos) +CompositionItem CompositionView::getFirstItemAt(TQPoint pos) { CompositionModel::itemcontainer items = getModel()->getItemsAt(pos); @@ -443,7 +443,7 @@ void CompositionView::slotUpdateSegmentsDrawBuffer() updateContents(); } -void CompositionView::slotUpdateSegmentsDrawBuffer(const QRect& rect) +void CompositionView::slotUpdateSegmentsDrawBuffer(const TQRect& rect) { // RG_DEBUG << "CompositionView::slotUpdateSegmentsDrawBuffer() rect " // << rect << " - valid : " << rect.isValid() << endl; @@ -479,9 +479,9 @@ void CompositionView::slotStoppedRecording() getModel()->clearRecordingItems(); } -void CompositionView::resizeEvent(QResizeEvent* e) +void CompositionView::resizeEvent(TQResizeEvent* e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); slotUpdateSize(); int w = std::max(m_segmentsDrawBuffer.width(), visibleWidth()); @@ -493,18 +493,18 @@ void CompositionView::resizeEvent(QResizeEvent* e) // RG_DEBUG << "CompositionView::resizeEvent() : drawBuffer size = " << m_segmentsDrawBuffer.size() << endl; } -void CompositionView::viewportPaintEvent(QPaintEvent* e) +void CompositionView::viewportPaintEvent(TQPaintEvent* e) { - QMemArray<QRect> rects = e->region().rects(); + TQMemArray<TQRect> rects = e->region().rects(); for (unsigned int i = 0; i < rects.size(); ++i) { viewportPaintRect(rects[i]); } } -void CompositionView::viewportPaintRect(QRect r) +void CompositionView::viewportPaintRect(TQRect r) { - QRect updateRect = r; + TQRect updateRect = r; r &= viewport()->rect(); r.moveBy(contentsX(), contentsY()); @@ -520,7 +520,7 @@ void CompositionView::viewportPaintRect(QRect r) if (changed || m_artifactsDrawBufferRefresh.isValid()) { // r was modified by checkScrollAndRefreshDrawBuffer - QRect copyRect(r | m_artifactsDrawBufferRefresh); + TQRect copyRect(r | m_artifactsDrawBufferRefresh); copyRect.moveBy( -contentsX(), -contentsY()); // RG_DEBUG << "copying from segment to artifacts buffer: " << copyRect << endl; @@ -534,7 +534,7 @@ void CompositionView::viewportPaintRect(QRect r) if (m_artifactsDrawBufferRefresh.isValid()) { refreshArtifactsDrawBuffer(m_artifactsDrawBufferRefresh); - m_artifactsDrawBufferRefresh = QRect(); + m_artifactsDrawBufferRefresh = TQRect(); } if (scroll) { @@ -549,17 +549,17 @@ void CompositionView::viewportPaintRect(QRect r) // DEBUG - // QPainter pdebug(viewport()); - // static QPen framePen(Qt::red, 1); + // TQPainter pdebug(viewport()); + // static TQPen framePen(Qt::red, 1); // pdebug.setPen(framePen); // pdebug.drawRect(updateRect); } -bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) +bool CompositionView::checkScrollAndRefreshDrawBuffer(TQRect &rect, bool& scroll) { bool all = false; - QRect refreshRect = m_segmentsDrawBufferRefresh; + TQRect refreshRect = m_segmentsDrawBufferRefresh; int w = visibleWidth(), h = visibleHeight(); int cx = contentsX(), cy = contentsY(); @@ -591,13 +591,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (dx > -w && dx < w) { - QPainter cp(&m_segmentsDrawBuffer); + TQPainter cp(&m_segmentsDrawBuffer); cp.drawPixmap(dx, 0, m_segmentsDrawBuffer); if (dx < 0) { - refreshRect |= QRect(cx + w + dx, cy, -dx, h); + refreshRect |= TQRect(cx + w + dx, cy, -dx, h); } else { - refreshRect |= QRect(cx, cy, dx, h); + refreshRect |= TQRect(cx, cy, dx, h); } } else { @@ -613,13 +613,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (dy > -h && dy < h) { - QPainter cp(&m_segmentsDrawBuffer); + TQPainter cp(&m_segmentsDrawBuffer); cp.drawPixmap(0, dy, m_segmentsDrawBuffer); if (dy < 0) { - refreshRect |= QRect(cx, cy + h + dy, w, -dy); + refreshRect |= TQRect(cx, cy + h + dy, w, -dy); } else { - refreshRect |= QRect(cx, cy, w, dy); + refreshRect |= TQRect(cx, cy, w, dy); } } else { @@ -640,7 +640,7 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) if (needRefresh) refreshSegmentsDrawBuffer(refreshRect); - m_segmentsDrawBufferRefresh = QRect(); + m_segmentsDrawBufferRefresh = TQRect(); m_lastBufferRefreshX = cx; m_lastBufferRefreshY = cy; @@ -650,17 +650,17 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll) return needRefresh; } -void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect) +void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect) { // Profiler profiler("CompositionView::refreshDrawBuffer", true); // RG_DEBUG << "CompositionView::refreshSegmentsDrawBuffer() r = " // << rect << endl; - QPainter p(&m_segmentsDrawBuffer, viewport()); + TQPainter p(&m_segmentsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); if (!m_backgroundPixmap.isNull()) { - QPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width()); + TQPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width()); p.drawTiledPixmap(rect, m_backgroundPixmap, pp); } else { p.eraseRect(rect); @@ -669,29 +669,29 @@ void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect) drawArea(&p, rect); // DEBUG - show what's updated - // QPen framePen(Qt::red, 1); + // TQPen framePen(Qt::red, 1); // p.setPen(framePen); // p.drawRect(rect); // m_segmentsDrawBufferNeedsRefresh = false; } -void CompositionView::refreshArtifactsDrawBuffer(const QRect& rect) +void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect) { // RG_DEBUG << "CompositionView::refreshArtifactsDrawBuffer() r = " // << rect << endl; - QPainter p; + TQPainter p; p.begin(&m_artifactsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); - // QRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); + // TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); drawAreaArtifacts(&p, rect); p.end(); // m_artifactsDrawBufferNeedsRefresh = false; } -void CompositionView::drawArea(QPainter *p, const QRect& clipRect) +void CompositionView::drawArea(TQPainter *p, const TQRect& clipRect) { // Profiler profiler("CompositionView::drawArea", true); @@ -705,7 +705,7 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) if (!lineHeights.empty()) { p->save(); - QColor light = m_trackDividerColor.light(); + TQColor light = m_trackDividerColor.light(); p->setPen(light); for (CompositionModel::heightlist::const_iterator hi = lineHeights.begin(); @@ -802,8 +802,8 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) for (; interval.range.first != interval.range.second; ++interval.range.first) { const PreviewRect& pr = *(interval.range.first); - QColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview; - QColor col = interval.color.isValid() ? interval.color : defaultCol; + TQColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview; + TQColor col = interval.color.isValid() ? interval.color : defaultCol; p->setBrush(col); p->setPen(col); // RG_DEBUG << "CompositionView::drawArea : drawing preview rect at x = " << pr.x() << endl; @@ -828,15 +828,15 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect) } -void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect) +void CompositionView::drawAreaAudioPreviews(TQPainter * p, const TQRect& clipRect) { CompositionModel::AudioPreviewDrawData::const_iterator api = m_audioPreviewRects.begin(); CompositionModel::AudioPreviewDrawData::const_iterator apEnd = m_audioPreviewRects.end(); - QRect rectToFill, // rect to fill on canvas + TQRect rectToFill, // rect to fill on canvas localRect; // the rect of the tile to draw on the canvas - QPoint basePoint, // origin of segment rect + TQPoint basePoint, // origin of segment rect drawBasePoint; // origin of rect to fill on canvas - QRect r; + TQRect r; for (; api != apEnd; ++api) { rectToFill = api->rect; basePoint = api->basePoint; @@ -891,7 +891,7 @@ void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect) } } -void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect) +void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect) { // // Playback Pointer @@ -938,10 +938,10 @@ void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect) } } -void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/) +void CompositionView::drawGuides(TQPainter * p, const TQRect& /*clipRect*/) { // no need to check for clipping, these guides are meant to follow the mouse cursor - QPoint guideOrig(m_topGuidePos, m_foreGuidePos); + TQPoint guideOrig(m_topGuidePos, m_foreGuidePos); p->save(); p->setPen(m_guideColor); @@ -950,15 +950,15 @@ void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/) p->restore(); } -void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect, +void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect, int intersectLvl, bool fill) { p->save(); - QBrush brush = r.getBrush(); + TQBrush brush = r.getBrush(); if (r.isRepeating()) { - QColor brushColor = brush.color(); + TQColor brushColor = brush.color(); brush.setColor(brushColor.light(150)); } @@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const // draw 'start' rectangle with original brush // - QRect startRect = r; + TQRect startRect = r; startRect.setWidth(repeatMarks[0] - r.x()); p->setBrush(r.getBrush()); drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill); @@ -992,7 +992,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const break; if (pos >= clipRect.left()) { - QPoint p1(pos, r.y() + penWidth), + TQPoint p1(pos, r.y() + penWidth), p2(pos, r.y() + r.height() - penWidth - 1); // RG_DEBUG << "CompositionView::drawCompRect() : drawing repeat mark at " @@ -1007,7 +1007,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const p->restore(); } -void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect) +void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect) { // draw segment label // @@ -1017,10 +1017,10 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c p->save(); p->setPen(GUIPalette::getColour(GUIPalette::SegmentLabel)); p->setBrush(white); - QRect textRect(r); + TQRect textRect(r); textRect.setX(textRect.x() + 3); - QString label = " " + r.getLabel() + " "; - QRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + TQString label = " " + r.getLabel() + " "; + TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); p->drawRect(textBoundingRect & r); p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); p->restore(); @@ -1030,13 +1030,13 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c p->save(); - QFont font; + TQFont font; font.setPixelSize(r.height() / 2.2); - font.setWeight(QFont::Bold); + font.setWeight(TQFont::Bold); font.setItalic(false); p->setFont(font); - QRect labelRect = QRect + TQRect labelRect = QRect (r.x(), r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1, r.width(), @@ -1045,8 +1045,8 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c int x = labelRect.x() + p->fontMetrics().width('x'); int y = labelRect.y(); - QBrush brush = r.getBrush(); - QColor surroundColour = brush.color().light(110); + TQBrush brush = r.getBrush(); + TQColor surroundColour = brush.color().light(110); int h, s, v; surroundColour.hsv(&h, &s, &v); @@ -1090,7 +1090,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c #endif } -void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRect, +void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clipRect, bool isSelected, int intersectLvl, bool fill) { // RG_DEBUG << "CompositionView::drawRect : intersectLvl = " << intersectLvl @@ -1101,22 +1101,22 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec p->save(); - QRect rect = r; + TQRect rect = r; if (fill) { if (isSelected) { - QColor fillColor = p->brush().color(); + TQColor fillColor = p->brush().color(); fillColor = fillColor.dark(200); - QBrush b = p->brush(); + TQBrush b = p->brush(); b.setColor(fillColor); p->setBrush(b); // RG_DEBUG << "CompositionView::drawRect : selected color : " << fillColor << endl; } if (intersectLvl > 0) { - QColor fillColor = p->brush().color(); + TQColor fillColor = p->brush().color(); fillColor = fillColor.dark((intersectLvl) * 105); - QBrush b = p->brush(); + TQBrush b = p->brush(); b.setColor(fillColor); p->setBrush(b); // RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl; @@ -1126,7 +1126,7 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec } // Paint using the small coordinates... - QRect intersection = rect.intersect(clipRect); + TQRect intersection = rect.intersect(clipRect); if (clipRect.contains(rect)) { p->drawRect(rect); @@ -1166,9 +1166,9 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec p->restore(); } -QColor CompositionView::mixBrushes(QBrush a, QBrush b) +TQColor CompositionView::mixBrushes(TQBrush a, TQBrush b) { - QColor ac = a.color(), bc = b.color(); + TQColor ac = a.color(), bc = b.color(); int aR = ac.red(), aG = ac.green(), aB = ac.blue(), bR = bc.red(), bG = bc.green(), bB = ac.blue(); @@ -1179,7 +1179,7 @@ QColor CompositionView::mixBrushes(QBrush a, QBrush b) } void CompositionView::drawIntersections(const CompositionModel::rectcontainer& rects, - QPainter * p, const QRect& clipRect) + TQPainter * p, const TQRect& clipRect) { if (! (rects.size() > 1)) return ; @@ -1262,7 +1262,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r } -void CompositionView::drawPointer(QPainter *p, const QRect& clipRect) +void CompositionView::drawPointer(TQPainter *p, const TQRect& clipRect) { // RG_DEBUG << "CompositionView::drawPointer: clipRect " // << clipRect.x() << "," << clipRect.y() << " " << clipRect.width() @@ -1277,11 +1277,11 @@ void CompositionView::drawPointer(QPainter *p, const QRect& clipRect) } -void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) +void CompositionView::drawTextFloat(TQPainter *p, const TQRect& clipRect) { - QFontMetrics metrics(p->fontMetrics()); + TQFontMetrics metrics(p->fontMetrics()); - QRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText); + TQRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText); p->save(); @@ -1290,7 +1290,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) bound.setTop(bound.top() - 2); bound.setBottom(bound.bottom() + 2); - QPoint pos(m_textFloatPos); + TQPoint pos(m_textFloatPos); if (pos.y() < 0 && getModel()) { if (pos.y() + bound.height() < 0) { pos.setY(pos.y() + getModel()->grid().getYSnap() * 3); @@ -1316,7 +1316,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect) p->restore(); } -bool CompositionView::event(QEvent* e) +bool CompositionView::event(TQEvent* e) { if (e->type() == AudioPreviewThread::AudioPreviewQueueEmpty) { RG_DEBUG << "CompositionView::event - AudioPreviewQueueEmpty\n"; @@ -1328,7 +1328,7 @@ bool CompositionView::event(QEvent* e) return RosegardenScrollView::event(e); } -void CompositionView::enterEvent(QEvent *e) +void CompositionView::enterEvent(TQEvent *e) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -1337,13 +1337,13 @@ void CompositionView::enterEvent(QEvent *e) m_contextHelpShown = true; } -void CompositionView::leaveEvent(QEvent *e) +void CompositionView::leaveEvent(TQEvent *e) { emit showContextHelp(""); m_contextHelpShown = false; } -void CompositionView::slotToolHelpChanged(const QString &text) +void CompositionView::slotToolHelpChanged(const TQString &text) { if (m_toolContextHelp == text) return; m_toolContextHelp = text; @@ -1354,7 +1354,7 @@ void CompositionView::slotToolHelpChanged(const QString &text) if (m_contextHelpShown) emit showContextHelp(text); } -void CompositionView::contentsMousePressEvent(QMouseEvent* e) +void CompositionView::contentsMousePressEvent(TQMouseEvent* e) { Qt::ButtonState bs = e->state(); slotSetSelectCopy((bs & Qt::ControlButton) != 0); @@ -1385,7 +1385,7 @@ void CompositionView::contentsMousePressEvent(QMouseEvent* e) } } -void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e) +void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e) { RG_DEBUG << "CompositionView::contentsMouseReleaseEvent()\n"; @@ -1399,7 +1399,7 @@ void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e) m_tool->handleMouseButtonRelease(e); } -void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e) +void CompositionView::contentsMouseDoubleClickEvent(TQMouseEvent* e) { m_currentItem = getFirstItemAt(e->pos()); @@ -1429,7 +1429,7 @@ void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e) } } -void CompositionView::contentsMouseMoveEvent(QMouseEvent* e) +void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e) { if (!m_tool) return ; @@ -1500,7 +1500,7 @@ void CompositionView::setPointerPos(int pos) if (deltaW <= m_pointerPen.width() * 2) { // use one rect instead of two separate ones - QRect updateRect + TQRect updateRect (std::min(m_pointerPos, oldPos) - m_pointerPen.width(), 0, deltaW + m_pointerPen.width() * 2, contentsHeight()); @@ -1509,11 +1509,11 @@ void CompositionView::setPointerPos(int pos) } else { slotArtifactsDrawBufferNeedsRefresh - (QRect(m_pointerPos - m_pointerPen.width(), 0, + (TQRect(m_pointerPos - m_pointerPen.width(), 0, m_pointerPen.width() * 2, contentsHeight())); slotArtifactsDrawBufferNeedsRefresh - (QRect(oldPos - m_pointerPen.width(), 0, + (TQRect(oldPos - m_pointerPen.width(), 0, m_pointerPen.width() * 2, contentsHeight())); } } @@ -1525,7 +1525,7 @@ void CompositionView::setGuidesPos(int x, int y) slotArtifactsDrawBufferNeedsRefresh(); } -void CompositionView::setGuidesPos(const QPoint& p) +void CompositionView::setGuidesPos(const TQPoint& p) { m_topGuidePos = p.x(); m_foreGuidePos = p.y(); @@ -1538,20 +1538,20 @@ void CompositionView::setDrawGuides(bool d) slotArtifactsDrawBufferNeedsRefresh(); } -void CompositionView::setTmpRect(const QRect& r) +void CompositionView::setTmpRect(const TQRect& r) { setTmpRect(r, m_tmpRectFill); } -void CompositionView::setTmpRect(const QRect& r, const QColor &c) +void CompositionView::setTmpRect(const TQRect& r, const TQColor &c) { - QRect pRect = m_tmpRect; + TQRect pRect = m_tmpRect; m_tmpRect = r; m_tmpRectFill = c; slotUpdateSegmentsDrawBuffer(m_tmpRect | pRect); } -void CompositionView::setTextFloat(int x, int y, const QString &text) +void CompositionView::setTextFloat(int x, int y, const TQString &text) { m_textFloatPos.setX(x); m_textFloatPos.setY(y); @@ -1562,7 +1562,7 @@ void CompositionView::setTextFloat(int x, int y, const QString &text) // most of the time when the floating text is drawn // we want to update a larger part of the view // so don't update here - // QRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText); + // TQRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText); // slotUpdateSegmentsDrawBuffer(r); @@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout() { hideTextFloat(); slotArtifactsDrawBufferNeedsRefresh(); - // rgapp->slotSetStatusMessage(QString::null); + // rgapp->slotSetStatusMessage(TQString::null); } } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h index ff0d440..c31cf96 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h @@ -30,23 +30,23 @@ #include "CompositionModel.h" #include "CompositionItem.h" #include "gui/general/RosegardenScrollView.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QWheelEvent; -class QResizeEvent; -class QPaintEvent; -class QPainter; -class QMouseEvent; -class QEvent; +class TQWidget; +class TQWheelEvent; +class TQResizeEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; +class TQEvent; namespace Rosegarden @@ -66,31 +66,31 @@ class CompositionView : public RosegardenScrollView Q_OBJECT public: CompositionView(RosegardenGUIDoc*, CompositionModel*, - QWidget * parent=0, const char* name=0, WFlags f=0); + TQWidget * parent=0, const char* name=0, WFlags f=0); void setPointerPos(int pos); int getPointerPos() { return m_pointerPos; } void setGuidesPos(int x, int y); - void setGuidesPos(const QPoint& p); + void setGuidesPos(const TQPoint& p); void setDrawGuides(bool d); - QRect getSelectionRect() const { return m_selectionRect; } - void setSelectionRectPos(const QPoint& pos); + TQRect getSelectionRect() const { return m_selectionRect; } + void setSelectionRectPos(const TQPoint& pos); void setSelectionRectSize(int w, int h); void setDrawSelectionRect(bool d); SnapGrid& grid() { return m_model->grid(); } - CompositionItem getFirstItemAt(QPoint pos); + CompositionItem getFirstItemAt(TQPoint pos); SegmentToolBox* getToolBox() { return m_toolBox; } CompositionModel* getModel() { return m_model; } - void setTmpRect(const QRect& r); - void setTmpRect(const QRect& r, const QColor &c); - const QRect& getTmpRect() const { return m_tmpRect; } + void setTmpRect(const TQRect& r); + void setTmpRect(const TQRect& r, const TQColor &c); + const TQRect& getTmpRect() const { return m_tmpRect; } /** * Set the snap resolution of the grid to something suitable. @@ -149,12 +149,12 @@ public: * explicitly. * */ - void setTextFloat(int x, int y, const QString &text); + void setTextFloat(int x, int y, const TQString &text); void hideTextFloat() { m_drawTextFloat = false; } void setShowSegmentLabels(bool b) { m_showSegmentLabels = b; } - void setBackgroundPixmap(const QPixmap &m); + void setBackgroundPixmap(const TQPixmap &m); void endAudioPreviewGeneration(); @@ -164,7 +164,7 @@ public slots: void slotContentsMoving(int x, int y); /// Set the current segment editing tool - void slotSetTool(const QString& toolName); + void slotSetTool(const TQString& toolName); // This method only operates if we're of the "Selector" // tool type - it's called from the View to enable it @@ -188,13 +188,13 @@ public slots: void slotShowSplitLine(int x, int y); void slotHideSplitLine(); - void slotExternalWheelEvent(QWheelEvent*); + void slotExternalWheelEvent(TQWheelEvent*); // TextFloat timer void slotTextFloatTimeout(); void slotUpdateSegmentsDrawBuffer(); - void slotUpdateSegmentsDrawBuffer(const QRect&); + void slotUpdateSegmentsDrawBuffer(const TQRect&); void slotRefreshColourCache(); @@ -217,73 +217,73 @@ signals: void setPointerPosition(timeT); - void showContextHelp(const QString &); + void showContextHelp(const TQString &); protected: - virtual bool event(QEvent *); + virtual bool event(TQEvent *); - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); - virtual void viewportPaintEvent(QPaintEvent*); - virtual void resizeEvent(QResizeEvent*); + virtual void viewportPaintEvent(TQPaintEvent*); + virtual void resizeEvent(TQResizeEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); - virtual void viewportPaintRect(QRect); + virtual void viewportPaintRect(TQRect); /** * if something changed, returns true and sets rect accordingly * sets 'scroll' if some scrolling occurred */ - bool checkScrollAndRefreshDrawBuffer(QRect &, bool& scroll); - void refreshSegmentsDrawBuffer(const QRect&); - void refreshArtifactsDrawBuffer(const QRect&); - void drawArea(QPainter * p, const QRect& rect); - void drawAreaAudioPreviews(QPainter * p, const QRect& rect); - void drawAreaArtifacts(QPainter * p, const QRect& rect); - void drawRect(const QRect& rect, QPainter * p, const QRect& clipRect, + bool checkScrollAndRefreshDrawBuffer(TQRect &, bool& scroll); + void refreshSegmentsDrawBuffer(const TQRect&); + void refreshArtifactsDrawBuffer(const TQRect&); + void drawArea(TQPainter * p, const TQRect& rect); + void drawAreaAudioPreviews(TQPainter * p, const TQRect& rect); + void drawAreaArtifacts(TQPainter * p, const TQRect& rect); + void drawRect(const TQRect& rect, TQPainter * p, const TQRect& clipRect, bool isSelected = false, int intersectLvl = 0, bool fill = true); - void drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect, + void drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect, int intersectLvl = 0, bool fill = true); - void drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect); - void drawIntersections(const CompositionModel::rectcontainer&, QPainter * p, const QRect& clipRect); + void drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect); + void drawIntersections(const CompositionModel::rectcontainer&, TQPainter * p, const TQRect& clipRect); - void drawPointer(QPainter * p, const QRect& clipRect); - void drawGuides(QPainter * p, const QRect& clipRect); - void drawTextFloat(QPainter * p, const QRect& clipRect); + void drawPointer(TQPainter * p, const TQRect& clipRect); + void drawGuides(TQPainter * p, const TQRect& clipRect); + void drawTextFloat(TQPainter * p, const TQRect& clipRect); void initStepSize(); void releaseCurrentItem(); - static QColor mixBrushes(QBrush a, QBrush b); + static TQColor mixBrushes(TQBrush a, TQBrush b); SegmentSelector* getSegmentSelectorTool(); protected slots: void slotSegmentsDrawBufferNeedsRefresh() { m_segmentsDrawBufferRefresh = - QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); + TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); } - void slotSegmentsDrawBufferNeedsRefresh(QRect r) { + void slotSegmentsDrawBufferNeedsRefresh(TQRect r) { m_segmentsDrawBufferRefresh |= - (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) + (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) & r); } void slotArtifactsDrawBufferNeedsRefresh() { m_artifactsDrawBufferRefresh = - QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); + TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()); updateContents(); } - void slotArtifactsDrawBufferNeedsRefresh(QRect r) { + void slotArtifactsDrawBufferNeedsRefresh(TQRect r) { m_artifactsDrawBufferRefresh |= - (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) + (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight()) & r); updateContents(r); } @@ -293,12 +293,12 @@ protected slots: slotArtifactsDrawBufferNeedsRefresh(); } - void slotAllDrawBuffersNeedRefresh(QRect r) { + void slotAllDrawBuffersNeedRefresh(TQRect r) { slotSegmentsDrawBufferNeedsRefresh(r); slotArtifactsDrawBufferNeedsRefresh(r); } - void slotToolHelpChanged(const QString &); + void slotToolHelpChanged(const TQString &); protected: @@ -318,42 +318,42 @@ protected: int m_minWidth; int m_stepSize; - QColor m_rectFill; - QColor m_selectedRectFill; + TQColor m_rectFill; + TQColor m_selectedRectFill; int m_pointerPos; - QColor m_pointerColor; + TQColor m_pointerColor; int m_pointerWidth; - QPen m_pointerPen; + TQPen m_pointerPen; - QRect m_tmpRect; - QColor m_tmpRectFill; - QPoint m_splitLinePos; + TQRect m_tmpRect; + TQColor m_tmpRectFill; + TQPoint m_splitLinePos; - QColor m_trackDividerColor; + TQColor m_trackDividerColor; bool m_drawGuides; - QColor m_guideColor; + TQColor m_guideColor; int m_topGuidePos; int m_foreGuidePos; bool m_drawSelectionRect; - QRect m_selectionRect; + TQRect m_selectionRect; bool m_drawTextFloat; - QString m_textFloatText; - QPoint m_textFloatPos; + TQString m_textFloatText; + TQPoint m_textFloatPos; - QPixmap m_segmentsDrawBuffer; - QPixmap m_artifactsDrawBuffer; - QRect m_segmentsDrawBufferRefresh; - QRect m_artifactsDrawBufferRefresh; + TQPixmap m_segmentsDrawBuffer; + TQPixmap m_artifactsDrawBuffer; + TQRect m_segmentsDrawBufferRefresh; + TQRect m_artifactsDrawBufferRefresh; int m_lastBufferRefreshX; int m_lastBufferRefreshY; int m_lastPointerRefreshX; - QPixmap m_backgroundPixmap; + TQPixmap m_backgroundPixmap; - QString m_toolContextHelp; + TQString m_toolContextHelp; bool m_contextHelpShown; mutable CompositionModel::AudioPreviewDrawData m_audioPreviewRects; diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp index fa09644..659a9de 100644 --- a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp @@ -25,8 +25,8 @@ #include "PreviewRect.h" -#include <qcolor.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqrect.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.h b/src/gui/editors/segment/segmentcanvas/PreviewRect.h index 59f3113..1e4bc76 100644 --- a/src/gui/editors/segment/segmentcanvas/PreviewRect.h +++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.h @@ -26,8 +26,8 @@ #ifndef _RG_PREVIEWRECT_H_ #define _RG_PREVIEWRECT_H_ -#include <qcolor.h> -#include <qrect.h> +#include <tqcolor.h> +#include <tqrect.h> #include <vector> @@ -38,22 +38,22 @@ namespace Rosegarden -class PreviewRect : public QRect { +class PreviewRect : public TQRect { public: PreviewRect(int left, int top, int width, int height) : - QRect(left, top, width, height) {}; + TQRect(left, top, width, height) {}; - PreviewRect(const QRect& r) : - QRect(r) {}; + PreviewRect(const TQRect& r) : + TQRect(r) {}; - const QColor& getColor() const { return m_color; } - void setColor(QColor c) { m_color = c; } + const TQColor& getColor() const { return m_color; } + void setColor(TQColor c) { m_color = c; } protected: - QColor m_color; + TQColor m_color; }; -typedef std::vector<QImage> PixmapArray; +typedef std::vector<TQImage> PixmapArray; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp index 3d1e26f..f519c8a 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp @@ -34,8 +34,8 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> #include <klocale.h> @@ -54,12 +54,12 @@ void SegmentEraser::ready() setBasicContextHelp(); } -void SegmentEraser::handleMouseButtonPress(QMouseEvent *e) +void SegmentEraser::handleMouseButtonPress(TQMouseEvent *e) { setCurrentItem(m_canvas->getFirstItemAt(e->pos())); } -void SegmentEraser::handleMouseButtonRelease(QMouseEvent*) +void SegmentEraser::handleMouseButtonRelease(TQMouseEvent*) { if (m_currentItem) { // no need to test the result, we know it's good (see handleMouseButtonPress) @@ -71,7 +71,7 @@ void SegmentEraser::handleMouseButtonRelease(QMouseEvent*) setCurrentItem(CompositionItem()); } -int SegmentEraser::handleMouseMove(QMouseEvent*) +int SegmentEraser::handleMouseMove(TQMouseEvent*) { setBasicContextHelp(); return RosegardenCanvasView::NoFollow; @@ -82,7 +82,7 @@ void SegmentEraser::setBasicContextHelp() setContextHelp(i18n("Click on a segment to delete it")); } -const QString SegmentEraser::ToolName = "segmenteraser"; +const TQString SegmentEraser::ToolName = "segmenteraser"; } #include "SegmentEraser.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h index f428c28..78165b9 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h @@ -27,10 +27,10 @@ #define _RG_SEGMENTERASER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -50,11 +50,11 @@ public: virtual void ready(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentEraser(CompositionView*, RosegardenGUIDoc*); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp index f0c4598..3fb4e33 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp @@ -27,9 +27,9 @@ #include "base/RulerScale.h" #include "base/Segment.h" -#include <qpainter.h> -#include <qrect.h> -#include <qwmatrix.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqwmatrix.h> namespace Rosegarden diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h index e190a5c..d1bb9a7 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h @@ -26,11 +26,11 @@ #ifndef _RG_SEGMENTITEMPREVIEW_H_ #define _RG_SEGMENTITEMPREVIEW_H_ -#include <qrect.h> +#include <tqrect.h> -class QWMatrix; -class QPainter; +class TQWMatrix; +class TQPainter; namespace Rosegarden @@ -54,7 +54,7 @@ public: PreviewCurrent }; - virtual void drawShape(QPainter&) = 0; + virtual void drawShape(TQPainter&) = 0; PreviewState getPreviewState() const { return m_previewState; } @@ -71,10 +71,10 @@ public: */ virtual void clearPreview() = 0; - QRect rect(); + TQRect rect(); protected: - virtual void updatePreview(const QWMatrix &matrix) = 0; + virtual void updatePreview(const TQWMatrix &matrix) = 0; //--------------- Data members --------------------------------- diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp index 5129202..71a3ca3 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp @@ -32,8 +32,8 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> #include <klocale.h> @@ -50,24 +50,24 @@ SegmentJoiner::~SegmentJoiner() {} void -SegmentJoiner::handleMouseButtonPress(QMouseEvent*) +SegmentJoiner::handleMouseButtonPress(TQMouseEvent*) {} void -SegmentJoiner::handleMouseButtonRelease(QMouseEvent*) +SegmentJoiner::handleMouseButtonRelease(TQMouseEvent*) {} int -SegmentJoiner::handleMouseMove(QMouseEvent*) +SegmentJoiner::handleMouseMove(TQMouseEvent*) { return RosegardenCanvasView::NoFollow; } void -SegmentJoiner::contentsMouseDoubleClickEvent(QMouseEvent*) +SegmentJoiner::contentsMouseDoubleClickEvent(TQMouseEvent*) {} -const QString SegmentJoiner::ToolName = "segmentjoiner"; +const TQString SegmentJoiner::ToolName = "segmentjoiner"; } #include "SegmentJoiner.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h index 2c83a26..946edee 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h @@ -27,10 +27,10 @@ #define _RG_SEGMENTJOINER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -50,14 +50,14 @@ public: virtual ~SegmentJoiner(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // don't do double clicks - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentJoiner(CompositionView*, RosegardenGUIDoc*); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp index a3d2a59..bc621fe 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp @@ -43,11 +43,11 @@ #include "SegmentToolBox.h" #include "SegmentSelector.h" #include <kcommand.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include <klocale.h> @@ -63,26 +63,26 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d) void SegmentMover::ready() { m_canvas->viewport()->setCursor(Qt::sizeAllCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(); } void SegmentMover::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentMover::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentMover::handleMouseButtonPress(QMouseEvent *e) +void SegmentMover::handleMouseButtonPress(TQMouseEvent *e) { CompositionItem item = m_canvas->getFirstItemAt(e->pos()); SegmentSelector* selector = dynamic_cast<SegmentSelector*> @@ -141,7 +141,7 @@ void SegmentMover::handleMouseButtonPress(QMouseEvent *e) } -void SegmentMover::handleMouseButtonRelease(QMouseEvent *e) +void SegmentMover::handleMouseButtonRelease(TQMouseEvent *e) { Composition &comp = m_doc->getComposition(); @@ -214,7 +214,7 @@ void SegmentMover::handleMouseButtonRelease(QMouseEvent *e) setBasicContextHelp(); } -int SegmentMover::handleMouseMove(QMouseEvent *e) +int SegmentMover::handleMouseMove(TQMouseEvent *e) { m_canvas->setSnapGrain(true); @@ -239,7 +239,7 @@ int SegmentMover::handleMouseMove(QMouseEvent *e) CompositionModel::itemcontainer::iterator it; int guideX = 0; int guideY = 0; - QRect updateRect; + TQRect updateRect; for (it = changingItems.begin(); it != changingItems.end(); @@ -321,13 +321,13 @@ int SegmentMover::handleMouseMove(QMouseEvent *e) timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x()); RealTime time = comp.getElapsedRealTime(currentItemStartTime); - QString ms; + TQString ms; ms.sprintf("%03d", time.msec()); int bar, beat, fraction, remainder; comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); - QString posString = QString("%1.%2s (%3, %4, %5)") + TQString posString = TQString("%1.%2s (%3, %4, %5)") .arg(time.sec).arg(ms) .arg(bar + 1).arg(beat).arg(fraction); @@ -342,7 +342,7 @@ void SegmentMover::setBasicContextHelp() setContextHelp(i18n("Click and drag to move a segment")); } -const QString SegmentMover::ToolName = "segmentmover"; +const TQString SegmentMover::ToolName = "segmentmover"; } #include "SegmentMover.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h index 776189e..580fff0 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTMOVER_H_ #include "SegmentTool.h" -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -52,11 +52,11 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); @@ -68,7 +68,7 @@ protected: //--------------- Data members --------------------------------- - QPoint m_clickPoint; + TQPoint m_clickPoint; bool m_passedInertiaEdge; }; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp index 68ca020..60a74f4 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp @@ -42,11 +42,11 @@ #include "SegmentTool.h" #include <kcommand.h> #include <klocale.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -65,26 +65,26 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d) void SegmentPencil::ready() { m_canvas->viewport()->setCursor(Qt::ibeamCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); - setContextHelpFor(QPoint(0, 0)); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); + setContextHelpFor(TQPoint(0, 0)); } void SegmentPencil::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentPencil::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) +void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) { if (e->button() == RightButton) return; @@ -134,7 +134,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) .getMaxContemporaneousSegmentsOnTrack(trackId); if (multiple < 1) multiple = 1; - QRect tmpRect; + TQRect tmpRect; tmpRect.setX(int(nearbyint(m_canvas->grid().getRulerScale()->getXForTime(time)))); tmpRect.setY(m_canvas->grid().getYBinCoordinate(trackPosition) + 1); tmpRect.setHeight(m_canvas->grid().getYSnap() * multiple - 2); @@ -151,7 +151,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e) m_canvas->updateContents(tmpRect); } -void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) +void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) { if (e->button() == RightButton) return ; @@ -160,7 +160,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) if (m_newRect) { - QRect tmpRect = m_canvas->getTmpRect(); + TQRect tmpRect = m_canvas->getTmpRect(); int trackPosition = m_canvas->grid().getYBin(tmpRect.y()); Track *track = m_doc->getComposition().getTrackByPosition(trackPosition); @@ -205,7 +205,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) m_canvas->getModel()->clearSelected(); m_canvas->getModel()->setSelected(item); m_canvas->getModel()->signalSelection(); - m_canvas->setTmpRect(QRect()); + m_canvas->setTmpRect(TQRect()); m_canvas->slotUpdateSegmentsDrawBuffer(); } else { @@ -214,7 +214,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e) } } -int SegmentPencil::handleMouseMove(QMouseEvent *e) +int SegmentPencil::handleMouseMove(TQMouseEvent *e) { if (!m_newRect) { setContextHelpFor(e->pos()); @@ -227,8 +227,8 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e) clearContextHelp(); } - QRect tmpRect = m_canvas->getTmpRect(); - QRect oldTmpRect = tmpRect; + TQRect tmpRect = m_canvas->getTmpRect(); + TQRect oldTmpRect = tmpRect; m_canvas->setSnapGrain(false); @@ -271,7 +271,7 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal; } -void SegmentPencil::setContextHelpFor(QPoint p) +void SegmentPencil::setContextHelpFor(TQPoint p) { int trackPosition = m_canvas->grid().getYBin(p.y()); @@ -289,7 +289,7 @@ void SegmentPencil::setContextHelpFor(QPoint p) setContextHelp(i18n("Click and drag to draw an empty segment. Control+Alt click and drag to draw in overlap mode.")); } -const QString SegmentPencil::ToolName = "segmentpencil"; +const TQString SegmentPencil::ToolName = "segmentpencil"; } #include "SegmentPencil.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h index 8b55917..f283f15 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h @@ -28,11 +28,11 @@ #include "base/Track.h" #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,18 +56,18 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); protected: SegmentPencil(CompositionView*, RosegardenGUIDoc*); - void setContextHelpFor(QPoint p); + void setContextHelpFor(TQPoint p); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp index 6ae7433..99241f1 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp @@ -49,11 +49,11 @@ #include "SegmentTool.h" #include <kcommand.h> #include <kmessagebox.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -70,26 +70,26 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d, void SegmentResizer::ready() { m_canvas->viewport()->setCursor(Qt::sizeHorCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(false); } void SegmentResizer::stow() { - disconnect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); } void SegmentResizer::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } -void SegmentResizer::handleMouseButtonPress(QMouseEvent *e) +void SegmentResizer::handleMouseButtonPress(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonPress" << endl; m_canvas->getModel()->clearSelected(); @@ -112,7 +112,7 @@ void SegmentResizer::handleMouseButtonPress(QMouseEvent *e) } } -void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) +void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl; @@ -179,10 +179,10 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) progressDlg.setLabel(i18n("Generating audio preview...")); command->disconnectProgressDialog(&progressDlg); - connect(&m_doc->getAudioFileManager(), SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); - connect(&progressDlg, SIGNAL(cancelClicked()), - &m_doc->getAudioFileManager(), SLOT(slotStopPreview())); + connect(&m_doc->getAudioFileManager(), TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); + connect(&progressDlg, TQT_SIGNAL(cancelClicked()), + &m_doc->getAudioFileManager(), TQT_SLOT(slotStopPreview())); int fid = command->getNewAudioFileId(); if (fid >= 0) { @@ -239,7 +239,7 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e) setBasicContextHelp(); } -int SegmentResizer::handleMouseMove(QMouseEvent *e) +int SegmentResizer::handleMouseMove(TQMouseEvent *e) { // RG_DEBUG << "SegmentResizer::handleMouseMove" << endl; @@ -278,7 +278,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e) } */ - QRect oldRect = m_currentItem->rect(); + TQRect oldRect = m_currentItem->rect(); m_canvas->setSnapGrain(true); @@ -364,7 +364,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal; } -bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const QPoint &coord, +bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const TQPoint &coord, int edgeThreshold, bool &start) { if (abs(p->rect().x() + p->rect().width() - coord.x()) < edgeThreshold) { @@ -387,7 +387,7 @@ void SegmentResizer::setBasicContextHelp(bool ctrlPressed) } } -const QString SegmentResizer::ToolName = "segmentresizer"; +const TQString SegmentResizer::ToolName = "segmentresizer"; } #include "SegmentResizer.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h index 9d54573..7a0600d 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTRESIZER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> -class QPoint; -class QMouseEvent; +class TQPoint; +class TQMouseEvent; class CompositionItem; @@ -57,16 +57,16 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); - static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const QPoint&, int, bool &); + static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const TQPoint&, int, bool &); void setEdgeThreshold(int e) { m_edgeThreshold = e; } int getEdgeThreshold() { return m_edgeThreshold; } - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp index 35ec639..d601c16 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp @@ -48,11 +48,11 @@ #include "SegmentToolBox.h" #include <kapplication.h> #include <kconfig.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> namespace Rosegarden @@ -76,8 +76,8 @@ SegmentSelector::~SegmentSelector() void SegmentSelector::ready() { m_canvas->viewport()->setCursor(Qt::arrowCursor); - connect(m_canvas, SIGNAL(contentsMoving (int, int)), - this, SLOT(slotCanvasScrolled(int, int))); + connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelp(i18n("Click and drag to select segments")); } @@ -86,14 +86,14 @@ void SegmentSelector::stow() void SegmentSelector::slotCanvasScrolled(int newX, int newY) { - QMouseEvent tmpEvent(QEvent::MouseMove, - m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY), + TQMouseEvent tmpEvent(TQEvent::MouseMove, + m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY), Qt::NoButton, Qt::NoButton); handleMouseMove(&tmpEvent); } void -SegmentSelector::handleMouseButtonPress(QMouseEvent *e) +SegmentSelector::handleMouseButtonPress(TQMouseEvent *e) { RG_DEBUG << "SegmentSelector::handleMouseButtonPress\n"; m_buttonPressed = true; @@ -205,7 +205,7 @@ SegmentSelector::handleMouseButtonPress(QMouseEvent *e) } void -SegmentSelector::handleMouseButtonRelease(QMouseEvent *e) +SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) { m_buttonPressed = false; @@ -310,7 +310,7 @@ SegmentSelector::handleMouseButtonRelease(QMouseEvent *e) } int -SegmentSelector::handleMouseMove(QMouseEvent *e) +SegmentSelector::handleMouseMove(TQMouseEvent *e) { if (!m_buttonPressed) { setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton)); @@ -328,7 +328,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) // RG_DEBUG << "SegmentSelector::handleMouseMove: no current item\n"; // do a bounding box - QRect selectionRect = m_canvas->getSelectionRect(); + TQRect selectionRect = m_canvas->getSelectionRect(); m_canvas->setDrawSelectionRect(true); @@ -459,13 +459,13 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x()); RealTime time = comp.getElapsedRealTime(currentItemStartTime); - QString ms; + TQString ms; ms.sprintf("%03d", time.msec()); int bar, beat, fraction, remainder; comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); - QString posString = QString("%1.%2s (%3, %4, %5)") + TQString posString = TQString("%1.%2s (%3, %4, %5)") .arg(time.sec).arg(ms) .arg(bar + 1).arg(beat).arg(fraction); @@ -479,7 +479,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e) return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed) +void SegmentSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -526,7 +526,7 @@ void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed) } } -const QString SegmentSelector::ToolName = "segmentselector"; +const TQString SegmentSelector::ToolName = "segmentselector"; } #include "SegmentSelector.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h index a6d8d9c..3c602fa 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTSELECTOR_H_ #include "SegmentTool.h" -#include <qpoint.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -55,9 +55,9 @@ public: virtual void ready(); virtual void stow(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // These two alter the behaviour of the selection mode // @@ -77,7 +77,7 @@ public: // SegmentItemList* getSegmentItemList() { return &m_selectedItems; } - static const QString ToolName; + static const TQString ToolName; protected slots: void slotCanvasScrolled(int newX, int newY); @@ -85,7 +85,7 @@ protected slots: protected: SegmentSelector(CompositionView*, RosegardenGUIDoc*); - void setContextHelpFor(QPoint p, bool ctrlPressed = false); + void setContextHelpFor(TQPoint p, bool ctrlPressed = false); //--------------- Data members --------------------------------- @@ -93,7 +93,7 @@ protected: bool m_segmentAddMode; bool m_segmentCopyMode; - QPoint m_clickPoint; + TQPoint m_clickPoint; bool m_segmentQuickCopyDone; bool m_passedInertiaEdge; bool m_buttonPressed; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp index 4fd48c3..1149cd9 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp @@ -37,9 +37,9 @@ #include "gui/general/RosegardenCanvasView.h" #include "SegmentTool.h" #include <kcommand.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> #include <klocale.h> @@ -64,7 +64,7 @@ void SegmentSplitter::ready() } void -SegmentSplitter::handleMouseButtonPress(QMouseEvent *e) +SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e) { // Remove cursor and replace with line on a SegmentItem // at where the cut will be made @@ -81,7 +81,7 @@ SegmentSplitter::handleMouseButtonPress(QMouseEvent *e) } void -SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e) +SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e) { setBasicContextHelp(); @@ -111,7 +111,7 @@ SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e) } int -SegmentSplitter::handleMouseMove(QMouseEvent *e) +SegmentSplitter::handleMouseMove(TQMouseEvent *e) { setBasicContextHelp(); @@ -130,7 +130,7 @@ SegmentSplitter::handleMouseMove(QMouseEvent *e) } void -SegmentSplitter::drawSplitLine(QMouseEvent *e) +SegmentSplitter::drawSplitLine(TQMouseEvent *e) { m_canvas->setSnapGrain(true); @@ -146,7 +146,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e) m_canvas->slotShowSplitLine(x, y); - QRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y, + TQRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y, std::max(m_prevX, x) + 5, m_prevY + m_canvas->grid().getYSnap()); m_canvas->updateContents(updateRect); m_prevX = x; @@ -154,7 +154,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e) } void -SegmentSplitter::contentsMouseDoubleClickEvent(QMouseEvent*) +SegmentSplitter::contentsMouseDoubleClickEvent(TQMouseEvent*) { // DO NOTHING } @@ -169,7 +169,7 @@ SegmentSplitter::setBasicContextHelp() } } -const QString SegmentSplitter::ToolName = "segmentsplitter"; +const TQString SegmentSplitter::ToolName = "segmentsplitter"; } #include "SegmentSplitter.moc" diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h index 06201ec..3f21ece 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h @@ -27,11 +27,11 @@ #define _RG_SEGMENTSPLITTER_H_ #include "SegmentTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,21 +54,21 @@ public: virtual void ready(); - virtual void handleMouseButtonPress(QMouseEvent*); - virtual void handleMouseButtonRelease(QMouseEvent*); - virtual int handleMouseMove(QMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*); + virtual void handleMouseButtonRelease(TQMouseEvent*); + virtual int handleMouseMove(TQMouseEvent*); // don't do double clicks - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; protected: SegmentSplitter(CompositionView*, RosegardenGUIDoc*); void setBasicContextHelp(); - void drawSplitLine(QMouseEvent*); + void drawSplitLine(TQMouseEvent*); void splitSegment(Segment *segment, timeT &splitTime); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp index 9bd7e69..438cc51 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp @@ -34,8 +34,8 @@ #include "SegmentToolBox.h" #include <kcommand.h> #include <kmainwindow.h> -#include <qpoint.h> -#include <qpopupmenu.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> namespace Rosegarden @@ -58,7 +58,7 @@ void SegmentTool::ready() } void -SegmentTool::handleRightButtonPress(QMouseEvent *e) +SegmentTool::handleRightButtonPress(TQMouseEvent *e) { if (m_currentItem) // mouse button is pressed for some tool return ; @@ -89,7 +89,7 @@ SegmentTool::createMenu() dynamic_cast<RosegardenGUIApp*>(m_doc->parent()); if (app) { - m_menu = static_cast<QPopupMenu*> + m_menu = static_cast<TQPopupMenu*> //(app->factory()->container("segment_tool_menu", app)); (m_parentFactory->container("segment_tool_menu", app)); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h index 90ed961..5b054a8 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h @@ -28,12 +28,12 @@ #include "gui/general/BaseTool.h" #include "CompositionItem.h" -#include <qpoint.h> +#include <tqpoint.h> #include <utility> #include <vector> -class QMouseEvent; +class TQMouseEvent; class KCommand; @@ -53,7 +53,7 @@ class SegmentSelector; // Allow the tools to share the Selector tool's selection // through these. // -typedef std::pair<QPoint, CompositionItem> SegmentItemPair; +typedef std::pair<TQPoint, CompositionItem> SegmentItemPair; typedef std::vector<SegmentItemPair> SegmentItemList; class SegmentTool : public BaseTool @@ -70,10 +70,10 @@ public: */ virtual void ready(); - virtual void handleRightButtonPress(QMouseEvent*); - virtual void handleMouseButtonPress(QMouseEvent*) = 0; - virtual void handleMouseButtonRelease(QMouseEvent*) = 0; - virtual int handleMouseMove(QMouseEvent*) = 0; + virtual void handleRightButtonPress(TQMouseEvent*); + virtual void handleMouseButtonPress(TQMouseEvent*) = 0; + virtual void handleMouseButtonRelease(TQMouseEvent*) = 0; + virtual int handleMouseMove(TQMouseEvent*) = 0; void addCommandToHistory(KCommand *command); @@ -95,7 +95,7 @@ protected: CompositionView* m_canvas; CompositionItem m_currentItem; RosegardenGUIDoc* m_doc; - QPoint m_origPos; + TQPoint m_origPos; bool m_changeMade; }; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp index cb0dec9..5ce8a58 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp @@ -36,7 +36,7 @@ #include "SegmentPencil.h" #include "SegmentResizer.h" #include "SegmentSplitter.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -48,11 +48,11 @@ SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc) m_doc(doc) {} -SegmentTool* SegmentToolBox::createTool(const QString& toolName) +SegmentTool* SegmentToolBox::createTool(const TQString& toolName) { SegmentTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == SegmentPencil::ToolName) @@ -83,7 +83,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName) tool = new SegmentJoiner(m_canvas, m_doc); else { - KMessageBox::error(0, QString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } @@ -93,7 +93,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName) return tool; } -SegmentTool* SegmentToolBox::getTool(const QString& toolName) +SegmentTool* SegmentToolBox::getTool(const TQString& toolName) { return dynamic_cast<SegmentTool*>(BaseToolBox::getTool(toolName)); } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h index 7a46fb6..2609708 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h @@ -30,7 +30,7 @@ #include "SegmentTool.h" -class QString; +class TQString; namespace Rosegarden @@ -46,10 +46,10 @@ class SegmentToolBox : public BaseToolBox public: SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*); - virtual SegmentTool* getTool(const QString& toolName); + virtual SegmentTool* getTool(const TQString& toolName); protected: - virtual SegmentTool* createTool(const QString& toolName); + virtual SegmentTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/tempo/TempoListItem.cpp b/src/gui/editors/tempo/TempoListItem.cpp index d088b5b..821c329 100644 --- a/src/gui/editors/tempo/TempoListItem.cpp +++ b/src/gui/editors/tempo/TempoListItem.cpp @@ -27,10 +27,10 @@ namespace Rosegarden { int -TempoListItem::compare(QListViewItem *i, int col, bool ascending) const +TempoListItem::compare(TQListViewItem *i, int col, bool ascending) const { TempoListItem *ti = dynamic_cast<TempoListItem *>(i); - if (!ti) return QListViewItem::compare(i, col, ascending); + if (!ti) return TQListViewItem::compare(i, col, ascending); if (col == 0) { // time if (m_time == ti->m_time) { diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h index 143edde..640b7b1 100644 --- a/src/gui/editors/tempo/TempoListItem.h +++ b/src/gui/editors/tempo/TempoListItem.h @@ -43,10 +43,10 @@ public: timeT time, int index, KListView *parent, - QString label1, - QString label2, - QString label3, - QString label4 = QString::null) : + TQString label1, + TQString label2, + TQString label3, + TQString label4 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4), m_composition(composition), m_type(type), @@ -58,7 +58,7 @@ public: Rosegarden::timeT getTime() const { return m_time; } int getIndex() const { return m_index; } - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: Rosegarden::Composition *m_composition; diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp index 6ff6c1d..c3bc23e 100644 --- a/src/gui/editors/tempo/TempoView.cpp +++ b/src/gui/editors/tempo/TempoView.cpp @@ -49,17 +49,17 @@ #include <kconfig.h> #include <klistview.h> #include <kxmlguiclient.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qptrlist.h> -#include <qsize.h> -#include <qstring.h> -#include <qlayout.h> -#include <qcanvas.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqptrlist.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqcanvas.h> #include <kstatusbar.h> @@ -70,7 +70,7 @@ int TempoView::m_lastSetFilter = -1; -TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): +TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"), m_filter(Tempo | TimeSignature), m_ignoreUpdates(true) @@ -86,16 +86,16 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): // define some note filtering buttons in a group // m_filterGroup = - new QButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); + new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); - m_tempoCheckBox = new QCheckBox(i18n("Tempo"), m_filterGroup); - m_timeSigCheckBox = new QCheckBox(i18n("Time Signature"), m_filterGroup); + m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup); + m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup); m_grid->addWidget(m_filterGroup, 2, 0); // Connect up // - connect(m_filterGroup, SIGNAL(released(int)), - SLOT(slotModifyFilter(int))); + connect(m_filterGroup, TQT_SIGNAL(released(int)), + TQT_SLOT(slotModifyFilter(int))); m_list = new KListView(getCentralWidget()); m_list->setItemsRenameable(true); @@ -108,11 +108,11 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime): // Connect double clicker // - connect(m_list, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotPopupEditor(QListViewItem*))); + connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotPopupEditor(TQListViewItem*))); m_list->setAllColumnsShowFocus(true); - m_list->setSelectionMode(QListView::Extended); + m_list->setSelectionMode(TQListView::Extended); m_list->addColumn(i18n("Time ")); m_list->addColumn(i18n("Type ")); @@ -140,7 +140,7 @@ TempoView::~TempoView() } void -TempoView::closeEvent(QCloseEvent *e) +TempoView::closeEvent(TQCloseEvent *e) { emit closing(); EditViewBase::closeEvent(e); @@ -174,11 +174,11 @@ TempoView::applyLayout(int /*staffNo*/) // of the view. This code borrowed from EventView. // if (m_listSelection.size() == 0) { - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count()) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_list->itemIndex(*it)); @@ -202,7 +202,7 @@ TempoView::applyLayout(int /*staffNo*/) std::pair<timeT, Rosegarden::TimeSignature> sig = comp->getTimeSignatureChange(i); - QString properties; + TQString properties; if (sig.second.isHidden()) { if (sig.second.isCommon()) properties = i18n("Common, hidden"); @@ -213,12 +213,12 @@ TempoView::applyLayout(int /*staffNo*/) properties = i18n("Common"); } - QString timeString = makeTimeString(sig.first, timeMode); + TQString timeString = makeTimeString(sig.first, timeMode); new TempoListItem(comp, TempoListItem::TimeSignature, sig.first, i, m_list, timeString, i18n("Time Signature "), - QString("%1/%2 ").arg(sig.second.getNumerator()). + TQString("%1/%2 ").arg(sig.second.getNumerator()). arg(sig.second.getDenominator()), properties); } @@ -230,7 +230,7 @@ TempoView::applyLayout(int /*staffNo*/) std::pair<timeT, tempoT> tempo = comp->getTempoChange(i); - QString desc; + TQString desc; //!!! imprecise -- better to work from tempoT directly @@ -257,7 +257,7 @@ TempoView::applyLayout(int /*staffNo*/) arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths); } - QString timeString = makeTimeString(tempo.first, timeMode); + TQString timeString = makeTimeString(tempo.first, timeMode); new TempoListItem(comp, TempoListItem::Tempo, tempo.first, i, m_list, timeString, @@ -267,12 +267,12 @@ TempoView::applyLayout(int /*staffNo*/) } if (m_list->childCount() == 0) { - new QListViewItem(m_list, + new TQListViewItem(m_list, i18n("<nothing at this filter level>")); - m_list->setSelectionMode(QListView::NoSelection); + m_list->setSelectionMode(TQListView::NoSelection); stateChanged("have_selection", KXMLGUIClient::StateReverse); } else { - m_list->setSelectionMode(QListView::Extended); + m_list->setSelectionMode(TQListView::Extended); // If no selection then select the first event if (m_listSelection.size() == 0) @@ -353,7 +353,7 @@ TempoView::makeTimeString(timeT time, int timeMode) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (time, bar, beat, fraction, remainder); ++bar; - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -369,12 +369,12 @@ TempoView::makeTimeString(timeT time, int timeMode) { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(time); + return TQString("%1 ").arg(time); } } @@ -415,15 +415,15 @@ TempoView::slotEditPaste() void TempoView::slotEditDelete() { - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() == 0) return ; RG_DEBUG << "TempoView::slotEditDelete - deleting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; TempoListItem *item; int itemIndex = -1; @@ -476,7 +476,7 @@ void TempoView::slotEditInsertTempo() { timeT insertTime = 0; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -489,12 +489,12 @@ TempoView::slotEditInsertTempo() dialog.setTempoPosition(insertTime); connect(&dialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -506,7 +506,7 @@ void TempoView::slotEditInsertTimeSignature() { timeT insertTime = 0; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -520,7 +520,7 @@ TempoView::slotEditInsertTimeSignature() TimeSignatureDialog dialog(this, &composition, insertTime, sig, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { insertTime = dialog.getTime(); @@ -541,7 +541,7 @@ TempoView::slotEdit() { RG_DEBUG << "TempoView::slotEdit" << endl; - QPtrList<QListViewItem> selection = m_list->selectedItems(); + TQPtrList<TQListViewItem> selection = m_list->selectedItems(); if (selection.count() > 0) { TempoListItem *item = @@ -575,40 +575,40 @@ TempoView::setupActions() { EditViewBase::setupActions("tempoview.rc", false); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this, - SLOT(slotEditInsertTempo()), actionCollection(), + TQT_SLOT(slotEditInsertTempo()), actionCollection(), "insert_tempo"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); + icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this, - SLOT(slotEditInsertTimeSignature()), actionCollection(), + TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(), "insert_timesig"); pixmap.load(pixmapDir + "/toolbar/event-delete.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Delete"), icon, Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Edit Item"), icon, Key_E, this, - SLOT(slotEdit()), actionCollection(), + TQT_SLOT(slotEdit()), actionCollection(), "edit"); new KAction(i18n("Select &All"), 0, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); m_config->setGroup(TempoViewConfigGroup); @@ -617,30 +617,30 @@ TempoView::setupActions() KRadioAction *action; pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -667,7 +667,7 @@ TempoView::getViewSize() } void -TempoView::setViewSize(QSize s) +TempoView::setViewSize(TQSize s) { m_list->setFixedSize(s); } @@ -692,7 +692,7 @@ TempoView::slotSaveOptions() void TempoView::slotModifyFilter(int button) { - QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); if (checkBox == 0) return ; @@ -770,7 +770,7 @@ TempoView::slotRawTime() } void -TempoView::slotPopupEditor(QListViewItem *qitem) +TempoView::slotPopupEditor(TQListViewItem *qitem) { TempoListItem *item = dynamic_cast<TempoListItem *>(qitem); if (!item) @@ -786,12 +786,12 @@ TempoView::slotPopupEditor(QListViewItem *qitem) dialog.setTempoPosition(time); connect(&dialog, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -807,7 +807,7 @@ TempoView::slotPopupEditor(QListViewItem *qitem) TimeSignatureDialog dialog(this, &composition, time, sig, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { time = dialog.getTime(); diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h index 9a78e1b..fcf3efb 100644 --- a/src/gui/editors/tempo/TempoView.h +++ b/src/gui/editors/tempo/TempoView.h @@ -30,17 +30,17 @@ #include "base/NotationTypes.h" #include "gui/dialogs/TempoDialog.h" #include "gui/general/EditViewBase.h" -#include <qsize.h> -#include <qstring.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QListViewItem; -class QCloseEvent; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQListViewItem; +class TQCloseEvent; +class TQCheckBox; +class TQButtonGroup; class KListView; @@ -71,7 +71,7 @@ class TempoView : public EditViewBase, public CompositionObserver }; public: - TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT); + TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT); virtual ~TempoView(); virtual bool applyLayout(int staffNo = -1); @@ -84,8 +84,8 @@ public: virtual void setupActions(); virtual void initStatusBar(); - virtual QSize getViewSize(); - virtual void setViewSize(QSize); + virtual TQSize getViewSize(); + virtual void setViewSize(TQSize); // Set the button states to the current filter positions // @@ -130,7 +130,7 @@ public slots: // on double click on the event list // - void slotPopupEditor(QListViewItem*); + void slotPopupEditor(TQListViewItem*); // Change filter parameters // @@ -144,11 +144,11 @@ protected: virtual void readOptions(); void makeInitialSelection(timeT); - QString makeTimeString(timeT time, int timeMode); + TQString makeTimeString(timeT time, int timeMode); virtual Segment *getCurrentSegment(); virtual void updateViewCaption(); - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); //--------------- Data members --------------------------------- KListView *m_list; @@ -156,9 +156,9 @@ protected: static int m_lastSetFilter; - QButtonGroup *m_filterGroup; - QCheckBox *m_tempoCheckBox; - QCheckBox *m_timeSigCheckBox; + TQButtonGroup *m_filterGroup; + TQCheckBox *m_tempoCheckBox; + TQCheckBox *m_timeSigCheckBox; std::vector<int> m_listSelection; diff --git a/src/gui/general/ActiveItem.h b/src/gui/general/ActiveItem.h index f8f5339..df7ca37 100644 --- a/src/gui/general/ActiveItem.h +++ b/src/gui/general/ActiveItem.h @@ -28,7 +28,7 @@ -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -43,9 +43,9 @@ namespace Rosegarden class ActiveItem { public: - virtual void handleMousePress(QMouseEvent*) = 0; - virtual void handleMouseMove(QMouseEvent*) = 0; - virtual void handleMouseRelease(QMouseEvent*) = 0; + virtual void handleMousePress(TQMouseEvent*) = 0; + virtual void handleMouseMove(TQMouseEvent*) = 0; + virtual void handleMouseRelease(TQMouseEvent*) = 0; }; diff --git a/src/gui/general/BarLine.cpp b/src/gui/general/BarLine.cpp index 42bb936..5b5973d 100644 --- a/src/gui/general/BarLine.cpp +++ b/src/gui/general/BarLine.cpp @@ -24,12 +24,12 @@ #include "BarLine.h" -#include <qpainter.h> +#include <tqpainter.h> namespace Rosegarden { void -BarLine::drawShape(QPainter &painter) +BarLine::drawShape(TQPainter &painter) { int bx = int(x()); int by = int(y()); @@ -154,11 +154,11 @@ BarLine::areaPoints() const break; } - QPointArray p(4); - p[0] = QPoint(x0, y0); - p[1] = QPoint(x1, y0); - p[2] = QPoint(x1, y1); - p[3] = QPoint(x0, y1); + TQPointArray p(4); + p[0] = TQPoint(x0, y0); + p[1] = TQPoint(x1, y0); + p[2] = TQPoint(x1, y1); + p[3] = TQPoint(x0, y1); return p; } diff --git a/src/gui/general/BarLine.h b/src/gui/general/BarLine.h index 124bc06..3523c8a 100644 --- a/src/gui/general/BarLine.h +++ b/src/gui/general/BarLine.h @@ -27,17 +27,17 @@ #define _RG_BARLINE_H_ #include "LinedStaff.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { class BarLine : public QCanvasPolygonalItem { public: - BarLine(QCanvas *canvas, double layoutX, + BarLine(TQCanvas *canvas, double layoutX, int barLineHeight, int baseBarThickness, int lineSpacing, int inset, LinedStaff::BarStyle style) : - QCanvasPolygonalItem(canvas), + TQCanvasPolygonalItem(canvas), m_layoutX(layoutX), m_barLineHeight(barLineHeight), m_baseBarThickness(baseBarThickness), @@ -47,8 +47,8 @@ public: double getLayoutX() const { return m_layoutX; } - virtual QPointArray areaPoints() const; - virtual void drawShape(QPainter &); + virtual TQPointArray areaPoints() const; + virtual void drawShape(TQPainter &); protected: double m_layoutX; diff --git a/src/gui/general/BaseTool.cpp b/src/gui/general/BaseTool.cpp index 4c33610..75202ac 100644 --- a/src/gui/general/BaseTool.cpp +++ b/src/gui/general/BaseTool.cpp @@ -27,17 +27,17 @@ #include "misc/Debug.h" #include <kxmlguifactory.h> -#include <qcursor.h> -#include <qobject.h> -#include <qpopupmenu.h> -#include <qstring.h> +#include <tqcursor.h> +#include <tqobject.h> +#include <tqpopupmenu.h> +#include <tqstring.h> namespace Rosegarden { -BaseTool::BaseTool(const QString& menuName, KXMLGUIFactory* factory, QObject* parent) - : QObject(parent), +BaseTool::BaseTool(const TQString& menuName, KXMLGUIFactory* factory, TQObject* parent) + : TQObject(parent), m_menuName(menuName), m_menu(0), m_parentFactory(factory) @@ -67,17 +67,17 @@ void BaseTool::showMenu() createMenu(); if (m_menu) - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); else RG_DEBUG << "BaseTool::showMenu() : no menu to show\n"; } -QString BaseTool::getCurrentContextHelp() const +TQString BaseTool::getCurrentContextHelp() const { return m_contextHelp; } -void BaseTool::setContextHelp(const QString &help) +void BaseTool::setContextHelp(const TQString &help) { m_contextHelp = help; emit showContextHelp(m_contextHelp); diff --git a/src/gui/general/BaseTool.h b/src/gui/general/BaseTool.h index 71e6410..6dd6820 100644 --- a/src/gui/general/BaseTool.h +++ b/src/gui/general/BaseTool.h @@ -26,11 +26,11 @@ #ifndef _RG_BASETOOL_H_ #define _RG_BASETOOL_H_ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> -class QPopupMenu; +class TQPopupMenu; class KXMLGUIFactory; @@ -76,10 +76,10 @@ public: /** * Retrieve current status-line type help for the tool, if any */ - virtual QString getCurrentContextHelp() const; + virtual TQString getCurrentContextHelp() const; signals: - void showContextHelp(const QString &); + void showContextHelp(const TQString &); protected: /** @@ -87,22 +87,22 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - BaseTool(const QString& menuName, KXMLGUIFactory*, QObject* parent); + BaseTool(const TQString& menuName, KXMLGUIFactory*, TQObject* parent); virtual void createMenu() = 0; virtual bool hasMenu() { return false; } - virtual void setContextHelp(const QString &help); + virtual void setContextHelp(const TQString &help); virtual void clearContextHelp() { setContextHelp(""); } //--------------- Data members --------------------------------- - QString m_menuName; - QPopupMenu* m_menu; + TQString m_menuName; + TQPopupMenu* m_menu; KXMLGUIFactory* m_parentFactory; - QString m_contextHelp; + TQString m_contextHelp; }; diff --git a/src/gui/general/BaseToolBox.cpp b/src/gui/general/BaseToolBox.cpp index 9e2fda9..e4c2a5f 100644 --- a/src/gui/general/BaseToolBox.cpp +++ b/src/gui/general/BaseToolBox.cpp @@ -26,30 +26,30 @@ #include "BaseToolBox.h" #include "BaseTool.h" -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -BaseToolBox::BaseToolBox(QWidget* parent) - : QObject(parent), +BaseToolBox::BaseToolBox(TQWidget* parent) + : TQObject(parent), m_tools(17, // default size, from the Qt docs false) // but we want it to be case insensitive { //m_tools.setAutoDelete(true); } -BaseTool* BaseToolBox::getTool(const QString& toolName) +BaseTool* BaseToolBox::getTool(const TQString& toolName) { BaseTool* tool = m_tools[toolName]; if (!tool) tool = createTool(toolName); - connect(tool, SIGNAL(showContextHelp(const QString &)), - this, SIGNAL(showContextHelp(const QString &))); + connect(tool, TQT_SIGNAL(showContextHelp(const TQString &)), + this, TQT_SIGNAL(showContextHelp(const TQString &))); return tool; } diff --git a/src/gui/general/BaseToolBox.h b/src/gui/general/BaseToolBox.h index 2a0242f..d061938 100644 --- a/src/gui/general/BaseToolBox.h +++ b/src/gui/general/BaseToolBox.h @@ -26,12 +26,12 @@ #ifndef _RG_BASETOOLBOX_H_ #define _RG_BASETOOLBOX_H_ -#include <qdict.h> -#include <qobject.h> +#include <tqdict.h> +#include <tqobject.h> -class QWidget; -class QString; +class TQWidget; +class TQString; namespace Rosegarden @@ -50,17 +50,17 @@ class BaseToolBox : public QObject Q_OBJECT public: - BaseToolBox(QWidget* parent); + BaseToolBox(TQWidget* parent); - virtual BaseTool* getTool(const QString& toolName); + virtual BaseTool* getTool(const TQString& toolName); signals: - void showContextHelp(const QString &); + void showContextHelp(const TQString &); protected: - virtual BaseTool* createTool(const QString& toolName) = 0; + virtual BaseTool* createTool(const TQString& toolName) = 0; - QDict<BaseTool> m_tools; + TQDict<BaseTool> m_tools; }; diff --git a/src/gui/general/CanvasCursor.cpp b/src/gui/general/CanvasCursor.cpp index 5f04794..44a8d50 100644 --- a/src/gui/general/CanvasCursor.cpp +++ b/src/gui/general/CanvasCursor.cpp @@ -26,18 +26,18 @@ #include "CanvasCursor.h" #include "GUIPalette.h" -#include <qcanvas.h> -#include <qpen.h> +#include <tqcanvas.h> +#include <tqpen.h> namespace Rosegarden { -CanvasCursor::CanvasCursor(QCanvas* c, int width) - : QCanvasRectangle(c), +CanvasCursor::CanvasCursor(TQCanvas* c, int width) + : TQCanvasRectangle(c), m_width(width) { - QPen pen(GUIPalette::getColour(GUIPalette::Pointer)); + TQPen pen(GUIPalette::getColour(GUIPalette::Pointer)); // pen.setWidth(width); setPen(pen); setBrush(GUIPalette::getColour(GUIPalette::Pointer)); diff --git a/src/gui/general/CanvasCursor.h b/src/gui/general/CanvasCursor.h index 694e9df..a53e39f 100644 --- a/src/gui/general/CanvasCursor.h +++ b/src/gui/general/CanvasCursor.h @@ -27,9 +27,9 @@ #define _RG_CANVASCURSOR_H_ -#include <qcanvas.h> +#include <tqcanvas.h> -class QCanvas; +class TQCanvas; namespace Rosegarden @@ -40,9 +40,9 @@ namespace Rosegarden class CanvasCursor : public QCanvasRectangle { public: - CanvasCursor(QCanvas*, int width); + CanvasCursor(TQCanvas*, int width); void updateHeight(); -// virtual QRect boundingRect() const; +// virtual TQRect boundingRect() const; protected: int m_width; }; diff --git a/src/gui/general/CanvasItemGC.cpp b/src/gui/general/CanvasItemGC.cpp index 6e6afb2..64ac215 100644 --- a/src/gui/general/CanvasItemGC.cpp +++ b/src/gui/general/CanvasItemGC.cpp @@ -27,12 +27,12 @@ #include "misc/Debug.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { -void CanvasItemGC::mark(QCanvasItem* item) +void CanvasItemGC::mark(TQCanvasItem* item) { if (!item) return ; @@ -59,6 +59,6 @@ void CanvasItemGC::flush() m_garbage.clear(); } -std::vector<QCanvasItem*> CanvasItemGC::m_garbage; +std::vector<TQCanvasItem*> CanvasItemGC::m_garbage; } diff --git a/src/gui/general/CanvasItemGC.h b/src/gui/general/CanvasItemGC.h index db1833b..681e021 100644 --- a/src/gui/general/CanvasItemGC.h +++ b/src/gui/general/CanvasItemGC.h @@ -29,7 +29,7 @@ #include <vector> -class QCanvasItem; +class TQCanvasItem; namespace Rosegarden @@ -47,12 +47,12 @@ namespace Rosegarden * The problem this solves is a classic ownership/double deletion * case. The SegmentCanvas deletes all its items on destruction. But * the SegmentItems have an auxiliary "repeat rectangle" which is a - * QCanvasRectangle, that needs to be deleted when the SegmentItem is + * TQCanvasRectangle, that needs to be deleted when the SegmentItem is * itself deleted. * * However, if the SegmentItem deletes its repeat rectangle, then when * the SegmentCanvas destruction occurs, the SegmentCanvas dtor will - * get a list of all its children (QCanvas::allItems()), containing + * get a list of all its children (TQCanvas::allItems()), containing * both SegmentItems and their repeat rectangles. Deleting a * SegmentItem will delete its repeat rectangle, which will still be * present in the all children list which the SegmentCanvas dtor is @@ -66,7 +66,7 @@ class CanvasItemGC { public: /// mark the given item for GC - static void mark(QCanvasItem*); + static void mark(TQCanvasItem*); /// GC all marked items static void gc(); @@ -75,7 +75,7 @@ public: static void flush(); protected: - static std::vector<QCanvasItem*> m_garbage; + static std::vector<TQCanvasItem*> m_garbage; }; diff --git a/src/gui/general/CategoryElement.cpp b/src/gui/general/CategoryElement.cpp index 2199ce6..5042896 100644 --- a/src/gui/general/CategoryElement.cpp +++ b/src/gui/general/CategoryElement.cpp @@ -27,13 +27,13 @@ #include "misc/Debug.h" #include "PresetElement.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -CategoryElement::CategoryElement(QString name) : +CategoryElement::CategoryElement(TQString name) : m_name(name) {} @@ -43,7 +43,7 @@ CategoryElement::~CategoryElement() } void -CategoryElement::addPreset(QString name, +CategoryElement::addPreset(TQString name, int clef, int transpose, int highAm, diff --git a/src/gui/general/CategoryElement.h b/src/gui/general/CategoryElement.h index eeb88a5..67a51f7 100644 --- a/src/gui/general/CategoryElement.h +++ b/src/gui/general/CategoryElement.h @@ -27,7 +27,7 @@ #define _RG_CATEGORYELEMENT_H_ #include "PresetElement.h" -#include <qstring.h> +#include <tqstring.h> @@ -43,10 +43,10 @@ namespace Rosegarden class CategoryElement { public: - CategoryElement(QString name); + CategoryElement(TQString name); ~CategoryElement(); - void addPreset(QString name, + void addPreset(TQString name, int clef, int transpose, int highAm, @@ -54,13 +54,13 @@ public: int highPro, int lowPro); - QString getName() { return m_name; } + TQString getName() { return m_name; } ElementContainer getPresets() { return m_categoryPresets; } PresetElement getPresetByIndex(int index) { return m_categoryPresets [index]; } private: - QString m_name; + TQString m_name; ElementContainer m_categoryPresets; }; // CategoryElement diff --git a/src/gui/general/ClefIndex.cpp b/src/gui/general/ClefIndex.cpp index 68ad488..376b6cb 100644 --- a/src/gui/general/ClefIndex.cpp +++ b/src/gui/general/ClefIndex.cpp @@ -52,7 +52,7 @@ const Rosegarden::Clef clefIndexToClef(int index) return clef; } -const int clefNameToClefIndex(QString s) +const int clefNameToClefIndex(TQString s) { int m_elClef = 0; if (s) { diff --git a/src/gui/general/ClefIndex.h b/src/gui/general/ClefIndex.h index 74e3fc8..118307c 100644 --- a/src/gui/general/ClefIndex.h +++ b/src/gui/general/ClefIndex.h @@ -24,7 +24,7 @@ #define _CLEF_INDEX_H_ #include "base/NotationTypes.h" -#include <qstring.h> +#include <tqstring.h> // used variously by TPB, SPB, PresetHandler to correlate combo box indices to // clef types @@ -52,7 +52,7 @@ namespace Rosegarden const Clef clefIndexToClef(int index); -const int clefNameToClefIndex(QString s); +const int clefNameToClefIndex(TQString s); } diff --git a/src/gui/general/EditTool.cpp b/src/gui/general/EditTool.cpp index 52e7b11..f48017c 100644 --- a/src/gui/general/EditTool.cpp +++ b/src/gui/general/EditTool.cpp @@ -32,15 +32,15 @@ #include "EditView.h" #include "RosegardenCanvasView.h" #include <kxmlguiclient.h> -#include <qevent.h> -#include <qpopupmenu.h> -#include <qstring.h> +#include <tqevent.h> +#include <tqpopupmenu.h> +#include <tqstring.h> namespace Rosegarden { -EditTool::EditTool(const QString& menuName, EditView* view) +EditTool::EditTool(const TQString& menuName, EditView* view) : BaseTool(menuName, view->factory(), view), m_parentView(view) {} @@ -48,7 +48,7 @@ EditTool::EditTool(const QString& menuName, EditView* view) void EditTool::handleMousePress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { RG_DEBUG << "EditTool::handleMousePress : mouse button = " @@ -57,7 +57,7 @@ void EditTool::handleMousePress(timeT time, switch (e->button()) { case Qt::LeftButton: - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { RG_DEBUG << "EditTool::handleMousePress: it's a double-click" << endl; handleMouseDoubleClick(time, height, staffNo, e, el); @@ -84,13 +84,13 @@ void EditTool::handleMousePress(timeT time, void EditTool::handleMidButtonPress(timeT, int, int, - QMouseEvent*, + TQMouseEvent*, ViewElement*) {} void EditTool::handleRightButtonPress(timeT, int, int, - QMouseEvent*, + TQMouseEvent*, ViewElement*) { showMenu(); @@ -98,21 +98,21 @@ void EditTool::handleRightButtonPress(timeT, void EditTool::handleMouseDoubleClick(timeT, int, int, - QMouseEvent*, + TQMouseEvent*, ViewElement*) { // nothing } -int EditTool::handleMouseMove(timeT, int, QMouseEvent*) +int EditTool::handleMouseMove(timeT, int, TQMouseEvent*) { return RosegardenCanvasView::NoFollow; } -void EditTool::handleMouseRelease(timeT, int, QMouseEvent*) +void EditTool::handleMouseRelease(timeT, int, TQMouseEvent*) {} -void EditTool::createMenu(QString rcFileName) +void EditTool::createMenu(TQString rcFileName) { setRCFileName(rcFileName); createMenu(); @@ -125,14 +125,14 @@ void EditTool::createMenu() setXMLFile(m_rcFileName); m_parentFactory->addClient(this); - QWidget* tmp = m_parentFactory->container(m_menuName, this); + TQWidget* tmp = m_parentFactory->container(m_menuName, this); if (!tmp) RG_DEBUG << "BaseTool::createMenu(" << m_rcFileName << ") : menu creation failed (name : " << m_menuName << ")\n"; - m_menu = dynamic_cast<QPopupMenu*>(tmp); + m_menu = dynamic_cast<TQPopupMenu*>(tmp); } bool EditTool::hasMenu() diff --git a/src/gui/general/EditTool.h b/src/gui/general/EditTool.h index 17937d1..7fda27f 100644 --- a/src/gui/general/EditTool.h +++ b/src/gui/general/EditTool.h @@ -28,11 +28,11 @@ #include "BaseTool.h" #include <kxmlguiclient.h> -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -77,7 +77,7 @@ public: virtual void handleMousePress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -86,7 +86,7 @@ public: virtual void handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*) = 0; /** @@ -95,7 +95,7 @@ public: virtual void handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -104,7 +104,7 @@ public: virtual void handleRightButtonPress(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -113,7 +113,7 @@ public: virtual void handleMouseDoubleClick(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -124,14 +124,14 @@ public: */ virtual int handleMouseMove(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); /** * Do nothing */ virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); /** * Respond to an event being deleted -- it may be the one the tool @@ -146,16 +146,16 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - EditTool(const QString& menuName, EditView*); + EditTool(const TQString& menuName, EditView*); - void setRCFileName(QString rcfilename) { m_rcFileName = rcfilename; } + void setRCFileName(TQString rcfilename) { m_rcFileName = rcfilename; } virtual void createMenu(); - virtual void createMenu(QString rcFileName); + virtual void createMenu(TQString rcFileName); virtual bool hasMenu(); //--------------- Data members --------------------------------- - QString m_rcFileName; + TQString m_rcFileName; EditView* m_parentView; }; diff --git a/src/gui/general/EditToolBox.cpp b/src/gui/general/EditToolBox.cpp index c2e24a9..48fa7e4 100644 --- a/src/gui/general/EditToolBox.cpp +++ b/src/gui/general/EditToolBox.cpp @@ -28,8 +28,8 @@ #include "BaseToolBox.h" #include "EditTool.h" #include "EditView.h" -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -41,12 +41,12 @@ EditToolBox::EditToolBox(EditView *parent) { } -EditTool* EditToolBox::getTool(const QString& toolName) +EditTool* EditToolBox::getTool(const TQString& toolName) { return dynamic_cast<EditTool*>(BaseToolBox::getTool(toolName)); } -EditTool* EditToolBox::createTool(const QString&) +EditTool* EditToolBox::createTool(const TQString&) { KMessageBox::error(0, "EditToolBox::createTool called - this should never happen"); return 0; diff --git a/src/gui/general/EditToolBox.h b/src/gui/general/EditToolBox.h index 0115558..c1287b8 100644 --- a/src/gui/general/EditToolBox.h +++ b/src/gui/general/EditToolBox.h @@ -30,7 +30,7 @@ #include "EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -49,10 +49,10 @@ class EditToolBox : public BaseToolBox public: EditToolBox(EditView* parent); - virtual EditTool* getTool(const QString& toolName); + virtual EditTool* getTool(const TQString& toolName); protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/general/EditView.cpp b/src/gui/general/EditView.cpp index a36b385..e37cbfc 100644 --- a/src/gui/general/EditView.cpp +++ b/src/gui/general/EditView.cpp @@ -24,7 +24,7 @@ #include "EditView.h" -#include <qlayout.h> +#include <tqlayout.h> #include "base/BaseProperties.h" #include <klocale.h> @@ -87,20 +87,20 @@ #include <kstddirs.h> #include <ktabwidget.h> #include <kxmlguiclient.h> -#include <qaccel.h> -#include <qbutton.h> -#include <qdialog.h> -#include <qframe.h> -#include <qinputdialog.h> -#include <qlabel.h> -#include <qobjectlist.h> -#include <qpopupmenu.h> -#include <qsize.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qwmatrix.h> +#include <tqaccel.h> +#include <tqbutton.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqinputdialog.h> +#include <tqlabel.h> +#include <tqobjectlist.h> +#include <tqpopupmenu.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -119,15 +119,15 @@ static int FeatureShowVelocity = 0x00001; // show the velocity ruler EditView::EditView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - QWidget *parent, const char *name) : + TQWidget *parent, const char *name) : EditViewBase(doc, segments, cols, parent, name), m_currentEventSelection(0), m_activeItem(0), m_canvasView(0), - m_rulerBox(new QVBoxLayout), // top ruler box - added to grid later on + m_rulerBox(new TQVBoxLayout), // top ruler box - added to grid later on m_rulerBoxFiller(0), // On the left of m_rulerBox - m_controlBox(new QVBoxLayout), // top control ruler box - added to grid later on - m_bottomBox(new QVBox(this, "bottomframe")), // bottom box - added to bottom of canvas view by setCanvasView() + m_controlBox(new TQVBoxLayout), // top control ruler box - added to grid later on + m_bottomBox(new TQVBox(this, "bottomframe")), // bottom box - added to bottom of canvas view by setCanvasView() m_topStandardRuler(0), m_bottomStandardRuler(0), m_controlRuler(0), @@ -135,19 +135,19 @@ EditView::EditView(RosegardenGUIDoc *doc, { m_controlRulers->setHoverCloseButton(true); m_controlRulers->setHoverCloseButtonDelayed(false); - connect(m_controlRulers, SIGNAL(closeRequest(QWidget*)), - this, SLOT(slotRemoveControlRuler(QWidget*))); + connect(m_controlRulers, TQT_SIGNAL(closeRequest(TQWidget*)), + this, TQT_SLOT(slotRemoveControlRuler(TQWidget*))); - (dynamic_cast<QBoxLayout*>(m_bottomBox->layout()))->setDirection(QBoxLayout::BottomToTop); + (dynamic_cast<TQBoxLayout*>(m_bottomBox->layout()))->setDirection(TQBoxLayout::BottomToTop); // m_rulerBoxFiller is a white label used to keep m_rulerBox exactly // above the scrolling part of the view (and never above the // RosegardenCanvasView::m_leftWidget). - QGridLayout * gl = new QGridLayout(1, 2); + TQGridLayout * gl = new TQGridLayout(1, 2); gl->setColStretch(0, 0); gl->setColStretch(1, 1); gl->addLayout(m_rulerBox, 0, 1); - m_rulerBoxFiller = new QLabel(getCentralWidget()); + m_rulerBoxFiller = new TQLabel(getCentralWidget()); gl->addWidget(m_rulerBoxFiller, 0, 0); m_rulerBoxFiller->hide(); @@ -158,7 +158,7 @@ EditView::EditView(RosegardenGUIDoc *doc, // m_grid->addWidget(m_controlRulers, CONTROLRULER_ROW, 2); m_controlRulers->hide(); - m_controlRulers->setTabPosition(QTabWidget::Bottom); + m_controlRulers->setTabPosition(TQTabWidget::Bottom); } EditView::~EditView() @@ -174,7 +174,7 @@ void EditView::updateBottomWidgetGeometry() getCanvasView()->updateBottomWidgetGeometry(); } -void EditView::paintEvent(QPaintEvent* e) +void EditView::paintEvent(TQPaintEvent* e) { RG_DEBUG << "EditView::paintEvent()\n"; EditViewBase::paintEvent(e); @@ -185,8 +185,8 @@ void EditView::paintEvent(QPaintEvent* e) getCanvasView()->slotUpdate(); // update rulers - QLayoutIterator it = m_rulerBox->iterator(); - QLayoutItem *child; + TQLayoutIterator it = m_rulerBox->iterator(); + TQLayoutItem *child; while ( (child = it.current()) != 0 ) { if (child->widget()) child->widget()->update(); @@ -218,7 +218,7 @@ void EditView::updateControlRulers(bool updateHPos) } } -void EditView::setControlRulersZoom(QWMatrix zoomMatrix) +void EditView::setControlRulersZoom(TQWMatrix zoomMatrix) { m_currentRulerZoomMatrix = zoomMatrix; @@ -266,12 +266,12 @@ void EditView::setControlRulersCurrentSegment() */ } -void EditView::setTopStandardRuler(StandardRuler* w, QWidget *leftBox) +void EditView::setTopStandardRuler(StandardRuler* w, TQWidget *leftBox) { delete m_topStandardRuler; m_topStandardRuler = w; - QGridLayout * gl = new QGridLayout(1, 2); + TQGridLayout * gl = new TQGridLayout(1, 2); gl->setColStretch(0, 0); gl->setColStretch(1, 1); @@ -283,10 +283,10 @@ void EditView::setTopStandardRuler(StandardRuler* w, QWidget *leftBox) m_grid->addLayout(gl, TOPBARBUTTONS_ROW, m_mainCol); if (m_canvasView) { - connect(m_canvasView->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_canvasView->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_topStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_topStandardRuler, TQT_SLOT(slotScrollHoriz(int))); } } @@ -298,30 +298,30 @@ void EditView::setBottomStandardRuler(StandardRuler* w) // m_bottomBox->insertWidget(0, w); if (m_canvasView) { - connect(m_canvasView->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); - connect(m_canvasView->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - m_bottomStandardRuler, SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + m_bottomStandardRuler, TQT_SLOT(slotScrollHoriz(int))); } } void EditView::setRewFFwdToAutoRepeat() { - QWidget* transportToolbar = factory()->container("Transport Toolbar", this); + TQWidget* transportToolbar = factory()->container("Transport Toolbar", this); if (transportToolbar) { - QObjectList *l = transportToolbar->queryList(); - QObjectListIt it(*l); // iterate over the buttons - QObject *obj; + TQObjectList *l = transportToolbar->queryList(); + TQObjectListIt it(*l); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... ++it; // RG_DEBUG << "EditView::setRewFFwdToAutoRepeat() : obj name : " << obj->name() << endl; - QString objName = obj->name(); + TQString objName = obj->name(); if (objName.endsWith("playback_pointer_back_bar") || objName.endsWith("playback_pointer_forward_bar")) { - QButton* btn = dynamic_cast<QButton*>(obj); + TQButton* btn = dynamic_cast<TQButton*>(obj); if (!btn) { RG_DEBUG << "Very strange - found widgets in Transport Toolbar which aren't buttons\n"; @@ -340,19 +340,19 @@ void EditView::setRewFFwdToAutoRepeat() } -void EditView::addRuler(QWidget* w) +void EditView::addRuler(TQWidget* w) { m_rulerBox->addWidget(w); if (m_canvasView) { - connect(m_canvasView->horizontalScrollBar(), SIGNAL(valueChanged(int)), - w, SLOT(slotScrollHoriz(int))); - connect(m_canvasView->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - w, SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + w, TQT_SLOT(slotScrollHoriz(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + w, TQT_SLOT(slotScrollHoriz(int))); } } -void EditView::addPropertyBox(QWidget *w) +void EditView::addPropertyBox(TQWidget *w) { m_controlBox->addWidget(w); } @@ -365,19 +365,19 @@ void EditView::addControlRuler(ControlRuler* ruler) m_controlRulers->showPage(ruler); if (m_canvasView) { - connect(m_canvasView->horizontalScrollBar(), SIGNAL(valueChanged(int)), - ruler->horizontalScrollBar(), SIGNAL(valueChanged(int))); - connect(m_canvasView->horizontalScrollBar(), SIGNAL(sliderMoved(int)), - ruler->horizontalScrollBar(), SIGNAL(sliderMoved(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + ruler->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int))); + connect(m_canvasView->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + ruler->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int))); } - connect(ruler, SIGNAL(stateChange(const QString&, bool)), - this, SLOT(slotStateChanged(const QString&, bool))); + connect(ruler, TQT_SIGNAL(stateChange(const TQString&, bool)), + this, TQT_SLOT(slotStateChanged(const TQString&, bool))); stateChanged("have_control_ruler", KXMLGUIClient::StateReverse); } -void EditView::readjustViewSize(QSize requestedSize, bool exact) +void EditView::readjustViewSize(TQSize requestedSize, bool exact) { Profiler profiler("EditView::readjustViewSize", true); @@ -396,7 +396,7 @@ void EditView::readjustViewSize(QSize requestedSize, bool exact) windowWidth = width(), windowHeight = height(); - QSize newSize; + TQSize newSize; newSize.setWidth(((requestedWidth / windowWidth) + 1) * windowWidth); newSize.setHeight(((requestedHeight / windowHeight) + 1) * windowHeight); @@ -426,10 +426,10 @@ void EditView::setCanvasView(RosegardenCanvasView *canvasView) // m_horizontalScrollBar->setSteps(m_canvasView->horizontalScrollBar()->lineStep(), // m_canvasView->horizontalScrollBar()->pageStep()); - // connect(m_horizontalScrollBar, SIGNAL(valueChanged(int)), - // m_canvasView->horizontalScrollBar(), SIGNAL(valueChanged(int))); - // connect(m_horizontalScrollBar, SIGNAL(sliderMoved(int)), - // m_canvasView->horizontalScrollBar(), SIGNAL(sliderMoved(int))); + // connect(m_horizontalScrollBar, TQT_SIGNAL(valueChanged(int)), + // m_canvasView->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int))); + // connect(m_horizontalScrollBar, TQT_SIGNAL(sliderMoved(int)), + // m_canvasView->horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int))); } @@ -469,8 +469,8 @@ EditView::getInsertionTime(Clef &clef, return t; } -void EditView::slotActiveItemPressed(QMouseEvent* e, - QCanvasItem* item) +void EditView::slotActiveItemPressed(TQMouseEvent* e, + TQCanvasItem* item) { if (!item) return ; @@ -723,137 +723,137 @@ EditView::setupActions() // // Tempo and time signature changes // - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-tempo.png"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-tempo.png"); + TQIconSet icon = TQIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, - this, SLOT(slotAddTempo()), + this, TQT_SLOT(slotAddTempo()), actionCollection(), "add_tempo"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, - this, SLOT(slotAddTimeSignature()), + this, TQT_SLOT(slotAddTimeSignature()), actionCollection(), "add_time_signature"); // // Transforms // new KAction(i18n("&Halve Durations"), Key_H + CTRL, this, - SLOT(slotHalveDurations()), actionCollection(), + TQT_SLOT(slotHalveDurations()), actionCollection(), "halve_durations"); new KAction(i18n("&Double Durations"), Key_H + CTRL + SHIFT, this, - SLOT(slotDoubleDurations()), actionCollection(), + TQT_SLOT(slotDoubleDurations()), actionCollection(), "double_durations"); new KAction(RescaleCommand::getGlobalName(), 0, this, - SLOT(slotRescale()), actionCollection(), + TQT_SLOT(slotRescale()), actionCollection(), "rescale"); new KAction(TransposeCommand::getGlobalName(1), 0, Key_Up, this, - SLOT(slotTransposeUp()), actionCollection(), + TQT_SLOT(slotTransposeUp()), actionCollection(), "transpose_up"); new KAction(TransposeCommand::getGlobalName(12), 0, Key_Up + CTRL, this, - SLOT(slotTransposeUpOctave()), actionCollection(), + TQT_SLOT(slotTransposeUpOctave()), actionCollection(), "transpose_up_octave"); new KAction(TransposeCommand::getGlobalName( -1), 0, Key_Down, this, - SLOT(slotTransposeDown()), actionCollection(), + TQT_SLOT(slotTransposeDown()), actionCollection(), "transpose_down"); new KAction(TransposeCommand::getGlobalName( -12), 0, Key_Down + CTRL, this, - SLOT(slotTransposeDownOctave()), actionCollection(), + TQT_SLOT(slotTransposeDownOctave()), actionCollection(), "transpose_down_octave"); new KAction(TransposeCommand::getGlobalName(0), 0, this, - SLOT(slotTranspose()), actionCollection(), + TQT_SLOT(slotTranspose()), actionCollection(), "general_transpose"); new KAction(TransposeCommand::getDiatonicGlobalName(0,0), 0, this, - SLOT(slotDiatonicTranspose()), actionCollection(), + TQT_SLOT(slotDiatonicTranspose()), actionCollection(), "general_diatonic_transpose"); new KAction(InvertCommand::getGlobalName(0), 0, this, - SLOT(slotInvert()), actionCollection(), + TQT_SLOT(slotInvert()), actionCollection(), "invert"); new KAction(RetrogradeCommand::getGlobalName(0), 0, this, - SLOT(slotRetrograde()), actionCollection(), + TQT_SLOT(slotRetrograde()), actionCollection(), "retrograde"); new KAction(RetrogradeInvertCommand::getGlobalName(0), 0, this, - SLOT(slotRetrogradeInvert()), actionCollection(), + TQT_SLOT(slotRetrogradeInvert()), actionCollection(), "retrograde_invert"); new KAction(i18n("Jog &Left"), Key_Left + ALT, this, - SLOT(slotJogLeft()), actionCollection(), + TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); new KAction(i18n("Jog &Right"), Key_Right + ALT, this, - SLOT(slotJogRight()), actionCollection(), + TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); // Control rulers // new KAction(i18n("Show Velocity Property Ruler"), 0, this, - SLOT(slotShowVelocityControlRuler()), actionCollection(), + TQT_SLOT(slotShowVelocityControlRuler()), actionCollection(), "show_velocity_control_ruler"); /* new KAction(i18n("Show Controllers Events Ruler"), 0, this, - SLOT(slotShowControllerEventsRuler()), actionCollection(), + TQT_SLOT(slotShowControllerEventsRuler()), actionCollection(), "show_controller_events_ruler"); */ // Disabled for now // // new KAction(i18n("Add Control Ruler..."), 0, this, - // SLOT(slotShowPropertyControlRuler()), actionCollection(), + // TQT_SLOT(slotShowPropertyControlRuler()), actionCollection(), // "add_control_ruler"); // // Control Ruler context menu // new KAction(i18n("Insert item"), 0, this, - SLOT(slotInsertControlRulerItem()), actionCollection(), + TQT_SLOT(slotInsertControlRulerItem()), actionCollection(), "insert_control_ruler_item"); // This was on Key_Delete, but that conflicts with existing Delete commands // on individual edit views new KAction(i18n("Erase selected items"), 0, this, - SLOT(slotEraseControlRulerItem()), actionCollection(), + TQT_SLOT(slotEraseControlRulerItem()), actionCollection(), "erase_control_ruler_item"); new KAction(i18n("Clear ruler"), 0, this, - SLOT(slotClearControlRulerItem()), actionCollection(), + TQT_SLOT(slotClearControlRulerItem()), actionCollection(), "clear_control_ruler_item"); new KAction(i18n("Insert line of controllers"), 0, this, - SLOT(slotStartControlLineItem()), actionCollection(), + TQT_SLOT(slotStartControlLineItem()), actionCollection(), "start_control_line_item"); new KAction(i18n("Flip forward"), Key_BracketRight, this, - SLOT(slotFlipForwards()), actionCollection(), + TQT_SLOT(slotFlipForwards()), actionCollection(), "flip_control_events_forward"); new KAction(i18n("Flip backwards"), Key_BracketLeft, this, - SLOT(slotFlipBackwards()), actionCollection(), + TQT_SLOT(slotFlipBackwards()), actionCollection(), "flip_control_events_back"); new KAction(i18n("Draw property line"), 0, this, - SLOT(slotDrawPropertyLine()), actionCollection(), + TQT_SLOT(slotDrawPropertyLine()), actionCollection(), "draw_property_line"); new KAction(i18n("Select all property values"), 0, this, - SLOT(slotSelectAllProperties()), actionCollection(), + TQT_SLOT(slotSelectAllProperties()), actionCollection(), "select_all_properties"); } @@ -862,7 +862,7 @@ EditView::setupAddControlRulerMenu() { RG_DEBUG << "EditView::setupAddControlRulerMenu" << endl; - QPopupMenu* addControlRulerMenu = dynamic_cast<QPopupMenu*> + TQPopupMenu* addControlRulerMenu = dynamic_cast<TQPopupMenu*> (factory()->container("add_control_ruler", this)); if (addControlRulerMenu) { @@ -883,12 +883,12 @@ EditView::setupAddControlRulerMenu() const ControlList &list = c->getControlParameters(); int i = 0; - QString itemStr; + TQString itemStr; for (ControlList::const_iterator it = list.begin(); it != list.end(); ++it) { if (it->getType() == Controller::EventType) { - QString hexValue; + TQString hexValue; hexValue.sprintf("(0x%x)", it->getControllerValue()); itemStr = i18n("%1 Controller %2 %3").arg(strtoqstr(it->getName())) @@ -903,8 +903,8 @@ EditView::setupAddControlRulerMenu() addControlRulerMenu->insertItem(itemStr, i++); } - connect(addControlRulerMenu, SIGNAL(activated(int)), - SLOT(slotAddControlRuler(int))); + connect(addControlRulerMenu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotAddControlRuler(int))); } } @@ -1015,7 +1015,7 @@ EditView::slotAddControlRuler(int controller) getDocument()->slotDocumentModified(); } -void EditView::slotRemoveControlRuler(QWidget* w) +void EditView::slotRemoveControlRuler(TQWidget* w) { ControllerEventsRuler* ruler = dynamic_cast<ControllerEventsRuler*>(w); @@ -1062,12 +1062,12 @@ void EditView::slotRemoveControlRuler(QWidget* w) void EditView::createInsertPitchActionMenu() { - QString notePitchNames[] = { + TQString notePitchNames[] = { i18n("I"), i18n("II"), i18n("III"), i18n("IV"), i18n("V"), i18n("VI"), i18n("VII"), i18n("VIII") }; - QString flat = i18n("%1 flat"); - QString sharp = i18n("%1 sharp"); + TQString flat = i18n("%1 flat"); + TQString sharp = i18n("%1 sharp"); const Key notePitchKeys[3][7] = { { @@ -1102,7 +1102,7 @@ EditView::createInsertPitchActionMenu() KAction *insertPitchAction = 0; - QString octaveSuffix; + TQString octaveSuffix; if (octave == 1) octaveSuffix = "_high"; else if (octave == 2) @@ -1116,8 +1116,8 @@ EditView::createInsertPitchActionMenu() new KAction (flat.arg(notePitchNames[i]), CTRL + SHIFT + notePitchKeys[octave][i], - this, SLOT(slotInsertNoteFromAction()), actionCollection(), - QString("insert_%1_flat%2").arg(i).arg(octaveSuffix)); + this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1_flat%2").arg(i).arg(octaveSuffix)); menu->insert(insertPitchAction); } @@ -1126,8 +1126,8 @@ EditView::createInsertPitchActionMenu() new KAction (notePitchNames[i], notePitchKeys[octave][i], - this, SLOT(slotInsertNoteFromAction()), actionCollection(), - QString("insert_%1%2").arg(i).arg(octaveSuffix)); + this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1%2").arg(i).arg(octaveSuffix)); menu->insert(insertPitchAction); @@ -1139,8 +1139,8 @@ EditView::createInsertPitchActionMenu() new KAction (sharp.arg(notePitchNames[i]), SHIFT + notePitchKeys[octave][i], - this, SLOT(slotInsertNoteFromAction()), actionCollection(), - QString("insert_%1_sharp%2").arg(i).arg(octaveSuffix)); + this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1_sharp%2").arg(i).arg(octaveSuffix)); menu->insert(insertPitchAction); } @@ -1154,7 +1154,7 @@ EditView::createInsertPitchActionMenu() } int -EditView::getPitchFromNoteInsertAction(QString name, +EditView::getPitchFromNoteInsertAction(TQString name, Accidental &accidental, const Clef &clef, const ::Rosegarden::Key &key) @@ -1220,12 +1220,12 @@ void EditView::slotAddTempo() TempoDialog tempoDlg(this, getDocument()); connect(&tempoDlg, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); @@ -1268,7 +1268,7 @@ void EditView::slotAddTimeSignature() i18n("Estimated time signature shown")); } - if (dialog->exec() == QDialog::Accepted) { + if (dialog->exec() == TQDialog::Accepted) { insertionTime = dialog->getTime(); @@ -1354,7 +1354,7 @@ void EditView::slotShowPropertyControlRuler() new QListBoxRGProperty(propList, BaseProperties::VELOCITY.c_str()); int rc = propChooserDialog.exec(); - if (rc == QDialog::Accepted) { + if (rc == TQDialog::Accepted) { // fix for KDE 3.0 //QListBoxRGProperty* item = dynamic_cast<QListBoxRGProperty*>(propList->selectedItem()); QListBoxRGProperty* item = dynamic_cast<QListBoxRGProperty*> @@ -1465,7 +1465,7 @@ EditView::slotRescale() true, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Rescaling..."), this); addCommandToHistory(new RescaleCommand (*m_currentEventSelection, @@ -1674,11 +1674,11 @@ ControlRuler* EditView::findRuler(const ControlParameter& controller, int &index PropertyControlRuler* EditView::makePropertyControlRuler(PropertyName propertyName) { - QCanvas* controlRulerCanvas = new QCanvas(this); - QSize viewSize = getViewSize(); + TQCanvas* controlRulerCanvas = new TQCanvas(this); + TQSize viewSize = getViewSize(); controlRulerCanvas->resize(viewSize.width(), ControlRuler::DefaultRulerHeight); // TODO - keep it in sync with main canvas size -// QCanvas* controlRulerCanvas = ControlRulerCanvasRepository::getCanvas(getCurrentSegment(), propertyName, +// TQCanvas* controlRulerCanvas = ControlRulerCanvasRepository::getCanvas(getCurrentSegment(), propertyName, // getViewSize()); PropertyControlRuler* controlRuler = new PropertyControlRuler @@ -1692,10 +1692,10 @@ PropertyControlRuler* EditView::makePropertyControlRuler(PropertyName propertyNa ControllerEventsRuler* EditView::makeControllerEventRuler(const ControlParameter *controller) { - QCanvas* controlRulerCanvas = new QCanvas(this); - QSize viewSize = getViewSize(); + TQCanvas* controlRulerCanvas = new TQCanvas(this); + TQSize viewSize = getViewSize(); controlRulerCanvas->resize(viewSize.width(), ControlRuler::DefaultRulerHeight); // TODO - keep it in sync with main canvas size -// QCanvas* controlRulerCanvas = ControlRulerCanvasRepository::getCanvas(getCurrentSegment(), controller, +// TQCanvas* controlRulerCanvas = ControlRulerCanvasRepository::getCanvas(getCurrentSegment(), controller, // getViewSize()); diff --git a/src/gui/general/EditView.h b/src/gui/general/EditView.h index da18982..e927281 100644 --- a/src/gui/general/EditView.h +++ b/src/gui/general/EditView.h @@ -29,19 +29,19 @@ #include "base/PropertyName.h" #include "EditViewBase.h" #include "gui/dialogs/TempoDialog.h" -#include <qsize.h> -#include <qstring.h> -#include <qwmatrix.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwmatrix.h> #include <vector> #include "base/Event.h" -class QWidget; -class QVBoxLayout; -class QVBox; -class QPaintEvent; -class QMouseEvent; -class QCanvasItem; +class TQWidget; +class TQVBoxLayout; +class TQVBox; +class TQPaintEvent; +class TQMouseEvent; +class TQCanvasItem; class KTabWidget; class Accidental; @@ -81,7 +81,7 @@ public: EditView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - QWidget *parent, + TQWidget *parent, const char *name = 0); virtual ~EditView(); @@ -94,7 +94,7 @@ public: * * @arg exact if true, then set to newSize exactly */ - virtual void readjustViewSize(QSize newSize, bool exact = false); + virtual void readjustViewSize(TQSize newSize, bool exact = false); /** * Return the active item @@ -142,7 +142,7 @@ public slots: * @see ActiveItem * @see QCanvasItem#setActive */ - virtual void slotActiveItemPressed(QMouseEvent*, QCanvasItem*); + virtual void slotActiveItemPressed(TQMouseEvent*, TQCanvasItem*); virtual void slotSetInsertCursorPosition(timeT position) = 0; @@ -205,22 +205,22 @@ public slots: // add control ruler void slotAddControlRuler(int); - void slotRemoveControlRuler(QWidget*); + void slotRemoveControlRuler(TQWidget*); protected: virtual RulerScale* getHLayout() = 0; - QVBox* getBottomWidget() { return m_bottomBox; } + TQVBox* getBottomWidget() { return m_bottomBox; } virtual void updateBottomWidgetGeometry(); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); /** * Locate the given widgets in the top bar-buttons position and * connect up its scrolling signals. */ - void setTopStandardRuler(StandardRuler*, QWidget *leftBox = NULL); + void setTopStandardRuler(StandardRuler*, TQWidget *leftBox = NULL); /** * Locate the given widget in the bottom bar-buttons position and @@ -239,12 +239,12 @@ protected: * connect up its scrolling signals. * The widget has to have a slotScrollHoriz(int) slot */ - void addRuler(QWidget*); + void addRuler(TQWidget*); /** * Add a ruler control box */ - void addPropertyBox(QWidget*); + void addPropertyBox(TQWidget*); /** * Make a control ruler for the given property, @@ -269,7 +269,7 @@ protected: /** * Set zoom factor of control rulers */ - void setControlRulersZoom(QWMatrix); + void setControlRulersZoom(TQWMatrix); /** * Set current segment for control rulers @@ -331,7 +331,7 @@ protected: * Exception to mean that the action is not an insert one. Also * returns any specified accidental through the reference arg. */ - int getPitchFromNoteInsertAction(QString actionName, + int getPitchFromNoteInsertAction(TQString actionName, Accidental &acc, const Clef &clef, const ::Rosegarden::Key &key); @@ -340,13 +340,13 @@ protected: * Abstract method to get the view size * Typically implemented as canvas()->size(). */ - virtual QSize getViewSize() = 0; + virtual TQSize getViewSize() = 0; /** * Abstract method to set the view size * Typically implemented as canvas()->resize(). */ - virtual void setViewSize(QSize) = 0; + virtual void setViewSize(TQSize) = 0; /** * Abstract method to get current insert-pointer time @@ -382,15 +382,15 @@ protected: RosegardenCanvasView *m_canvasView; - QVBoxLayout *m_rulerBox; - QLabel *m_rulerBoxFiller; - QVBoxLayout *m_controlBox; - QVBox *m_bottomBox; + TQVBoxLayout *m_rulerBox; + TQLabel *m_rulerBoxFiller; + TQVBoxLayout *m_controlBox; + TQVBox *m_bottomBox; StandardRuler *m_topStandardRuler; StandardRuler *m_bottomStandardRuler; ControlRuler *m_controlRuler; KTabWidget *m_controlRulers; - QWMatrix m_currentRulerZoomMatrix; + TQWMatrix m_currentRulerZoomMatrix; static const unsigned int RULERS_ROW; static const unsigned int CONTROLS_ROW; diff --git a/src/gui/general/EditViewBase.cpp b/src/gui/general/EditViewBase.cpp index 0193beb..84bdef0 100644 --- a/src/gui/general/EditViewBase.cpp +++ b/src/gui/general/EditViewBase.cpp @@ -24,7 +24,7 @@ #include "EditViewBase.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -56,15 +56,15 @@ #include <kstdaccel.h> #include <kstdaction.h> #include <kxmlguiclient.h> -#include <qaccel.h> -#include <qcanvas.h> -#include <qdialog.h> -#include <qframe.h> -#include <qiconset.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcanvas.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -77,7 +77,7 @@ const unsigned int EditViewBase::NbLayoutRows = 6; EditViewBase::EditViewBase(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - QWidget *parent, const char *name) : + TQWidget *parent, const char *name) : KDockMainWindow(parent, name), m_viewNumber( -1), m_viewLocalPropertyPrefix(makeViewLocalPropertyPrefix()), @@ -100,7 +100,7 @@ EditViewBase::EditViewBase(RosegardenGUIDoc *doc, m_timeSigNotifier(new EditViewTimeSigNotifier(doc)) { - QPixmap dummyPixmap; // any icon will do + TQPixmap dummyPixmap; // any icon will do m_mainDockWidget = createDockWidget("Rosegarden EditView DockWidget", dummyPixmap, 0L, "editview_dock_widget"); // allow others to dock to the left and right sides only @@ -110,8 +110,8 @@ EditViewBase::EditViewBase(RosegardenGUIDoc *doc, setView(m_mainDockWidget); // central widget in a KDE mainwindow setMainDockWidget(m_mainDockWidget); // master dockwidget - m_centralFrame = new QFrame(m_mainDockWidget, "centralframe"); - m_grid = new QGridLayout(m_centralFrame, NbLayoutRows, cols); + m_centralFrame = new TQFrame(m_mainDockWidget, "centralframe"); + m_grid = new TQGridLayout(m_centralFrame, NbLayoutRows, cols); m_mainDockWidget->setWidget(m_centralFrame); @@ -119,17 +119,17 @@ EditViewBase::EditViewBase(RosegardenGUIDoc *doc, m_doc->attachEditView(this); - QObject::connect - (getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect + (getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - QObject::connect - (getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotTestClipboard())); + TQObject::connect + (getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotTestClipboard())); // create accelerators // - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } EditViewBase::~EditViewBase() @@ -152,39 +152,39 @@ void EditViewBase::readOptions() getToggleAction("options_show_toolbar")->setChecked(!toolBar()->isHidden()); } -void EditViewBase::setupActions(QString rcFileName, bool haveClipboard) +void EditViewBase::setupActions(TQString rcFileName, bool haveClipboard) { setRCFileName(rcFileName); // Actions all edit views will have - KStdAction::showToolbar(this, SLOT(slotToggleToolBar()), + KStdAction::showToolbar(this, TQT_SLOT(slotToggleToolBar()), actionCollection(), "options_show_toolbar"); - KStdAction::showStatusbar(this, SLOT(slotToggleStatusBar()), + KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), actionCollection(), "options_show_statusbar"); KStdAction::preferences(this, - SLOT(slotConfigure()), + TQT_SLOT(slotConfigure()), actionCollection()); KStdAction::keyBindings(this, - SLOT(slotEditKeys()), + TQT_SLOT(slotEditKeys()), actionCollection()); KStdAction::configureToolbars(this, - SLOT(slotEditToolbars()), + TQT_SLOT(slotEditToolbars()), actionCollection()); // File menu - KStdAction::save (this, SIGNAL(saveFile()), actionCollection()); - KStdAction::close(this, SLOT(slotCloseWindow()), actionCollection()); + KStdAction::save (this, TQT_SIGNAL(saveFile()), actionCollection()); + KStdAction::close(this, TQT_SLOT(slotCloseWindow()), actionCollection()); if (haveClipboard) { - KStdAction::cut (this, SLOT(slotEditCut()), actionCollection()); - KStdAction::copy (this, SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, SLOT(slotEditPaste()), actionCollection()); + KStdAction::cut (this, TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); } new KToolBarPopupAction(i18n("Und&o"), @@ -199,38 +199,38 @@ void EditViewBase::setupActions(QString rcFileName, bool haveClipboard) actionCollection(), KStdAction::stdName(KStdAction::Redo)); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/matrix.png"); - QIconSet icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/matrix.png"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Open in Matri&x Editor"), icon, 0, this, - SLOT(slotOpenInMatrix()), actionCollection(), + TQT_SLOT(slotOpenInMatrix()), actionCollection(), "open_in_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Percussion Matrix Editor"), icon, 0, this, - SLOT(slotOpenInPercussionMatrix()), actionCollection(), + TQT_SLOT(slotOpenInPercussionMatrix()), actionCollection(), "open_in_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Notation Editor"), icon, 0, this, - SLOT(slotOpenInNotation()), actionCollection(), + TQT_SLOT(slotOpenInNotation()), actionCollection(), "open_in_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Open in &Event List Editor"), icon, 0, this, - SLOT(slotOpenInEventList()), actionCollection(), + TQT_SLOT(slotOpenInEventList()), actionCollection(), "open_in_event_list"); new KAction(i18n("Set Segment Start Time..."), 0, this, - SLOT(slotSetSegmentStartTime()), actionCollection(), + TQT_SLOT(slotSetSegmentStartTime()), actionCollection(), "set_segment_start"); new KAction(i18n("Set Segment Duration..."), 0, this, - SLOT(slotSetSegmentDuration()), actionCollection(), + TQT_SLOT(slotSetSegmentDuration()), actionCollection(), "set_segment_duration"); // add undo and redo to edit menu and toolbar @@ -256,8 +256,8 @@ void EditViewBase::slotEditToolbars() { KEditToolbar dlg(actionCollection(), getRCFileName()); - connect(&dlg, SIGNAL(newToolbarConfig()), - SLOT(slotUpdateToolbars())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + TQT_SLOT(slotUpdateToolbars())); dlg.exec(); } @@ -308,7 +308,7 @@ EditViewBase::makeViewLocalPropertyPrefix() return buffer; } -void EditViewBase::paintEvent(QPaintEvent* e) +void EditViewBase::paintEvent(TQPaintEvent* e) { // It is possible for this function to be called re-entrantly, // because a re-layout procedure may deliberately ask the event @@ -322,13 +322,13 @@ void EditViewBase::paintEvent(QPaintEvent* e) if (e) { if (m_havePendingPaintEvent) { if (m_pendingPaintEvent) { - QRect r = m_pendingPaintEvent->rect().unite(e->rect()); - *m_pendingPaintEvent = QPaintEvent(r); + TQRect r = m_pendingPaintEvent->rect().unite(e->rect()); + *m_pendingPaintEvent = TQPaintEvent(r); } else { - m_pendingPaintEvent = new QPaintEvent(*e); + m_pendingPaintEvent = new TQPaintEvent(*e); } } else { - m_pendingPaintEvent = new QPaintEvent(*e); + m_pendingPaintEvent = new TQPaintEvent(*e); } } m_havePendingPaintEvent = true; @@ -438,7 +438,7 @@ void EditViewBase::paintEvent(QPaintEvent* e) */ } -void EditViewBase::closeEvent(QCloseEvent* e) +void EditViewBase::closeEvent(TQCloseEvent* e) { RG_DEBUG << "EditViewBase::closeEvent()\n"; @@ -492,7 +492,7 @@ void EditViewBase::slotToggleStatusBar() statusBar()->show(); } -void EditViewBase::slotStatusMsg(const QString &text) +void EditViewBase::slotStatusMsg(const TQString &text) { /////////////////////////////////////////////////////////////////// // change status message permanently @@ -500,7 +500,7 @@ void EditViewBase::slotStatusMsg(const QString &text) statusBar()->changeItem(text, ID_STATUS_MSG); } -void EditViewBase::slotStatusHelpMsg(const QString &text) +void EditViewBase::slotStatusHelpMsg(const TQString &text) { /////////////////////////////////////////////////////////////////// // change status message of whole statusbar temporary (text, msec) @@ -550,8 +550,8 @@ bool EditViewBase::getSegmentsOnlyRestsAndClefs() } -void EditViewBase::toggleWidget(QWidget* widget, - const QString& toggleActionName) +void EditViewBase::toggleWidget(TQWidget* widget, + const TQString& toggleActionName) { KToggleAction* toggleAction = getToggleAction(toggleActionName); @@ -602,7 +602,7 @@ EditViewBase::slotToggleSolo() } void -EditViewBase::slotStateChanged(const QString& s, +EditViewBase::slotStateChanged(const TQString& s, bool noReverse) { RG_DEBUG << "EditViewBase::slotStateChanged " << s << ", " << noReverse << endl; @@ -620,7 +620,7 @@ EditViewBase::slotSetSegmentStartTime() &getDocument()->getComposition(), s->getStartTime(), false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { SegmentReconfigureCommand *command = new SegmentReconfigureCommand(i18n("Set Segment Start Time")); @@ -646,7 +646,7 @@ EditViewBase::slotSetSegmentDuration() s->getStartTime(), s->getEndMarkerTime() - s->getStartTime(), false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { SegmentReconfigureCommand *command = new SegmentReconfigureCommand(i18n("Set Segment Duration")); @@ -702,7 +702,7 @@ MultiViewCommandHistory* EditViewBase::getCommandHistory() return getDocument()->getCommandHistory(); } -KToggleAction* EditViewBase::getToggleAction(const QString& actionName) +KToggleAction* EditViewBase::getToggleAction(const TQString& actionName) { return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName)); } diff --git a/src/gui/general/EditViewBase.h b/src/gui/general/EditViewBase.h index 03784cb..f263795 100644 --- a/src/gui/general/EditViewBase.h +++ b/src/gui/general/EditViewBase.h @@ -28,17 +28,17 @@ #include <set> #include <string> #include <kdockwidget.h> -#include <qstring.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QPaintEvent; -class QGridLayout; -class QFrame; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQPaintEvent; +class TQGridLayout; +class TQFrame; +class TQCloseEvent; +class TQAccel; class KToggleAction; class KConfig; class KCommand; @@ -72,7 +72,7 @@ public: EditViewBase(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - QWidget *parent, + TQWidget *parent, const char *name = 0); virtual ~EditViewBase(); @@ -114,7 +114,7 @@ public: /** * Return our local accelerator object */ - QAccel* getAccelerators() { return m_accelerators; } + TQAccel* getAccelerators() { return m_accelerators; } /** * Return a string unique to this view (amongst views currently @@ -208,7 +208,7 @@ public slots: * * @param text the text that is displayed in the statusbar */ - virtual void slotStatusMsg(const QString &text); + virtual void slotStatusMsg(const TQString &text); /** * Changes the status message of the whole statusbar for two @@ -218,7 +218,7 @@ public slots: * * @param text the text that is displayed in the statusbar */ - virtual void slotStatusHelpMsg(const QString &text); + virtual void slotStatusHelpMsg(const TQString &text); /** * A command has happened; check the clipboard in case we @@ -231,7 +231,7 @@ public slots: */ virtual void slotToggleSolo(); - void slotStateChanged(const QString&, bool noReverse); + void slotStateChanged(const TQString&, bool noReverse); virtual void slotOpenInMatrix(); virtual void slotOpenInPercussionMatrix(); @@ -257,12 +257,12 @@ protected: virtual void windowActivationChange(bool); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); /** * @see #setInCtor */ - virtual void closeEvent(QCloseEvent* e); + virtual void closeEvent(TQCloseEvent* e); /** * ignore close events while we're in ctor @@ -290,7 +290,7 @@ protected: /** * create menus and toolbars */ - virtual void setupActions(QString rcFileName, bool haveClipboard = true); + virtual void setupActions(TQString rcFileName, bool haveClipboard = true); /** * setup status bar @@ -320,7 +320,7 @@ protected slots: virtual void slotUpdateToolbars(); protected: - QWidget* getCentralWidget() { return m_centralFrame; } + TQWidget* getCentralWidget() { return m_centralFrame; } void initSegmentRefreshStatusIds(); @@ -334,16 +334,16 @@ protected: bool getSegmentsOnlyRestsAndClefs(); /// Convenience function around actionCollection()->action() - KToggleAction* getToggleAction(const QString& actionName); + KToggleAction* getToggleAction(const TQString& actionName); /** * Make a widget visible depending on the state of a * KToggleAction */ - virtual void toggleWidget(QWidget* widget, const QString& toggleActionName); + virtual void toggleWidget(TQWidget* widget, const TQString& toggleActionName); - void setRCFileName(QString s) { m_rcFileName = s; } - QString getRCFileName() { return m_rcFileName; } + void setRCFileName(TQString s) { m_rcFileName = s; } + TQString getRCFileName() { return m_rcFileName; } /** * Set the page index of the config dialog which corresponds to @@ -353,7 +353,7 @@ protected: int getConfigDialogPageIndex() { return m_configDialogPageIndex; } //--------------- Data members --------------------------------- - QString m_rcFileName; + TQString m_rcFileName; static std::set<int> m_viewNumberPool; std::string makeViewLocalPropertyPrefix(); @@ -370,18 +370,18 @@ protected: EditToolBox* m_toolBox; KDockWidget *m_mainDockWidget; - QFrame *m_centralFrame; - QGridLayout *m_grid; + TQFrame *m_centralFrame; + TQGridLayout *m_grid; unsigned int m_mainCol; unsigned int m_compositionRefreshStatusId; bool m_needUpdate; - QPaintEvent *m_pendingPaintEvent; + TQPaintEvent *m_pendingPaintEvent; bool m_havePendingPaintEvent; static bool m_inPaintEvent; // true if _any_ edit view is in a paint event - QAccel *m_accelerators; + TQAccel *m_accelerators; int m_configDialogPageIndex; diff --git a/src/gui/general/GUIPalette.cpp b/src/gui/general/GUIPalette.cpp index 4705c21..a58886e 100644 --- a/src/gui/general/GUIPalette.cpp +++ b/src/gui/general/GUIPalette.cpp @@ -29,112 +29,112 @@ #include "base/Colour.h" #include "document/ConfigGroups.h" #include <kconfig.h> -#include <qcolor.h> +#include <tqcolor.h> namespace Rosegarden { -QColor GUIPalette::getColour(const char* const colourName) +TQColor GUIPalette::getColour(const char* const colourName) { KConfig* config = kapp->config(); config->setGroup(ColoursConfigGroup); - QColor res = getInstance()->m_defaultsMap[colourName]; + TQColor res = getInstance()->m_defaultsMap[colourName]; config->readColorEntry(colourName, &res); return res; } -Colour GUIPalette::convertColour(const QColor &input) +Colour GUIPalette::convertColour(const TQColor &input) { int r, g, b; input.rgb(&r, &g, &b); return Colour(r, g, b); } -QColor GUIPalette::convertColour(const Colour& input) +TQColor GUIPalette::convertColour(const Colour& input) { - return QColor(input.getRed(), input.getGreen(), input.getBlue()); + return TQColor(input.getRed(), input.getGreen(), input.getBlue()); } GUIPalette::GUIPalette() { m_defaultsMap[ActiveRecordTrack] = Qt::red; - m_defaultsMap[SegmentCanvas] = QColor(230, 230, 230); + m_defaultsMap[SegmentCanvas] = TQColor(230, 230, 230); m_defaultsMap[SegmentBorder] = Qt::black; // 1.0 colors - // m_defaultsMap[RecordingInternalSegmentBlock] = QColor(255, 182, 193); - // m_defaultsMap[RecordingAudioSegmentBlock] = QColor(182, 222, 255); + // m_defaultsMap[RecordingInternalSegmentBlock] = TQColor(255, 182, 193); + // m_defaultsMap[RecordingAudioSegmentBlock] = TQColor(182, 222, 255); // MIDI recording preview (pale yellow) - m_defaultsMap[RecordingInternalSegmentBlock] = QColor(255, 234, 182); + m_defaultsMap[RecordingInternalSegmentBlock] = TQColor(255, 234, 182); // audio recording preview (pale red) - m_defaultsMap[RecordingAudioSegmentBlock] = QColor(255, 182, 193); + m_defaultsMap[RecordingAudioSegmentBlock] = TQColor(255, 182, 193); m_defaultsMap[RecordingSegmentBorder] = Qt::black; - m_defaultsMap[RepeatSegmentBorder] = QColor(130, 133, 170); + m_defaultsMap[RepeatSegmentBorder] = TQColor(130, 133, 170); - m_defaultsMap[SegmentAudioPreview] = QColor(39, 71, 22); + m_defaultsMap[SegmentAudioPreview] = TQColor(39, 71, 22); m_defaultsMap[SegmentInternalPreview] = Qt::white; m_defaultsMap[SegmentLabel] = Qt::black; m_defaultsMap[SegmentSplitLine] = Qt::black; m_defaultsMap[MatrixElementBorder] = Qt::black; - m_defaultsMap[MatrixElementBlock] = QColor(98, 128, 232); + m_defaultsMap[MatrixElementBlock] = TQColor(98, 128, 232); m_defaultsMap[MatrixOverlapBlock] = Qt::black; - m_defaultsMap[LoopRulerBackground] = QColor(120, 120, 120); + m_defaultsMap[LoopRulerBackground] = TQColor(120, 120, 120); m_defaultsMap[LoopRulerForeground] = Qt::white; m_defaultsMap[LoopHighlight] = Qt::white; - m_defaultsMap[TempoBase] = QColor(197, 211, 125); + m_defaultsMap[TempoBase] = TQColor(197, 211, 125); - //m_defaultsMap[TextRulerBackground] = QColor(60, 205, 230, QColor::Hsv); - // m_defaultsMap[TextRulerBackground] = QColor(120, 90, 238, QColor::Hsv); - // m_defaultsMap[TextRulerBackground] = QColor(210, 220, 140); - m_defaultsMap[TextRulerBackground] = QColor(226, 232, 187); + //m_defaultsMap[TextRulerBackground] = TQColor(60, 205, 230, TQColor::Hsv); + // m_defaultsMap[TextRulerBackground] = TQColor(120, 90, 238, TQColor::Hsv); + // m_defaultsMap[TextRulerBackground] = TQColor(210, 220, 140); + m_defaultsMap[TextRulerBackground] = TQColor(226, 232, 187); m_defaultsMap[TextRulerForeground] = Qt::white; - m_defaultsMap[ChordNameRulerBackground] = QColor(230, 230, 230); + m_defaultsMap[ChordNameRulerBackground] = TQColor(230, 230, 230); m_defaultsMap[ChordNameRulerForeground] = Qt::black; - m_defaultsMap[RawNoteRulerBackground] = QColor(240, 240, 240); + m_defaultsMap[RawNoteRulerBackground] = TQColor(240, 240, 240); m_defaultsMap[RawNoteRulerForeground] = Qt::black; - m_defaultsMap[LevelMeterGreen] = QColor(0, 200, 0); - m_defaultsMap[LevelMeterOrange] = QColor(255, 165, 0); - m_defaultsMap[LevelMeterRed] = QColor(200, 0, 0); + m_defaultsMap[LevelMeterGreen] = TQColor(0, 200, 0); + m_defaultsMap[LevelMeterOrange] = TQColor(255, 165, 0); + m_defaultsMap[LevelMeterRed] = TQColor(200, 0, 0); - // m_defaultsMap[LevelMeterSolidGreen] = QColor(0, 140, 0); - m_defaultsMap[LevelMeterSolidGreen] = QColor(84, 177, 248); // blue! - // m_defaultsMap[LevelMeterSolidOrange] = QColor(220, 120, 0); - m_defaultsMap[LevelMeterSolidOrange] = QColor(255, 225, 0); - // m_defaultsMap[LevelMeterSolidRed] = QColor(255, 50, 50); - m_defaultsMap[LevelMeterSolidRed] = QColor(255, 0, 0); + // m_defaultsMap[LevelMeterSolidGreen] = TQColor(0, 140, 0); + m_defaultsMap[LevelMeterSolidGreen] = TQColor(84, 177, 248); // blue! + // m_defaultsMap[LevelMeterSolidOrange] = TQColor(220, 120, 0); + m_defaultsMap[LevelMeterSolidOrange] = TQColor(255, 225, 0); + // m_defaultsMap[LevelMeterSolidRed] = TQColor(255, 50, 50); + m_defaultsMap[LevelMeterSolidRed] = TQColor(255, 0, 0); m_defaultsMap[BarLine] = Qt::black; - m_defaultsMap[BarLineIncorrect] = QColor(211, 0, 31); - m_defaultsMap[BeatLine] = QColor(100, 100, 100); - m_defaultsMap[SubBeatLine] = QColor(212, 212, 212); - m_defaultsMap[StaffConnectingLine] = QColor(192, 192, 192); - m_defaultsMap[StaffConnectingTerminatingLine] = QColor(128, 128, 128); + m_defaultsMap[BarLineIncorrect] = TQColor(211, 0, 31); + m_defaultsMap[BeatLine] = TQColor(100, 100, 100); + m_defaultsMap[SubBeatLine] = TQColor(212, 212, 212); + m_defaultsMap[StaffConnectingLine] = TQColor(192, 192, 192); + m_defaultsMap[StaffConnectingTerminatingLine] = TQColor(128, 128, 128); m_defaultsMap[Pointer] = Qt::darkBlue; - m_defaultsMap[PointerRuler] = QColor(100, 100, 100); + m_defaultsMap[PointerRuler] = TQColor(100, 100, 100); - m_defaultsMap[InsertCursor] = QColor(160, 104, 186); - m_defaultsMap[InsertCursorRuler] = QColor(160, 136, 170); + m_defaultsMap[InsertCursor] = TQColor(160, 104, 186); + m_defaultsMap[InsertCursorRuler] = TQColor(160, 136, 170); - m_defaultsMap[TrackDivider] = QColor(145, 145, 145); - //m_defaultsMap[MovementGuide] = QColor(172, 230, 139); - m_defaultsMap[MovementGuide] = QColor(62, 161, 194); - //m_defaultsMap[MovementGuide] = QColor(255, 189, 89); - m_defaultsMap[SelectionRectangle] = QColor(103, 128, 211); - m_defaultsMap[SelectedElement] = QColor(0, 54, 232); + m_defaultsMap[TrackDivider] = TQColor(145, 145, 145); + //m_defaultsMap[MovementGuide] = TQColor(172, 230, 139); + m_defaultsMap[MovementGuide] = TQColor(62, 161, 194); + //m_defaultsMap[MovementGuide] = TQColor(255, 189, 89); + m_defaultsMap[SelectionRectangle] = TQColor(103, 128, 211); + m_defaultsMap[SelectedElement] = TQColor(0, 54, 232); const int SelectedElementHue = 225; const int SelectedElementMinValue = 220; @@ -147,42 +147,42 @@ GUIPalette::GUIPalette() const int OutRangeNoteHue = 0; const int OutRangeNoteMinValue = 200; - m_defaultsMap[TextAnnotationBackground] = QColor(255, 255, 180); + m_defaultsMap[TextAnnotationBackground] = TQColor(255, 255, 180); - m_defaultsMap[TextLilyPondDirectiveBackground] = QColor(95, 157, 87); + m_defaultsMap[TextLilyPondDirectiveBackground] = TQColor(95, 157, 87); m_defaultsMap[AudioCountdownBackground] = Qt::darkGray; m_defaultsMap[AudioCountdownForeground] = Qt::red; // m_defaultsMap[RotaryFloatBackground] = Qt::cyan; - m_defaultsMap[RotaryFloatBackground] = QColor(182, 222, 255); + m_defaultsMap[RotaryFloatBackground] = TQColor(182, 222, 255); m_defaultsMap[RotaryFloatForeground] = Qt::black; - m_defaultsMap[RotaryPastelBlue] = QColor(205, 212, 255); - m_defaultsMap[RotaryPastelRed] = QColor(255, 168, 169); - m_defaultsMap[RotaryPastelGreen] = QColor(231, 255, 223); - m_defaultsMap[RotaryPastelOrange] = QColor(255, 233, 208); - m_defaultsMap[RotaryPastelYellow] = QColor(249, 255, 208); + m_defaultsMap[RotaryPastelBlue] = TQColor(205, 212, 255); + m_defaultsMap[RotaryPastelRed] = TQColor(255, 168, 169); + m_defaultsMap[RotaryPastelGreen] = TQColor(231, 255, 223); + m_defaultsMap[RotaryPastelOrange] = TQColor(255, 233, 208); + m_defaultsMap[RotaryPastelYellow] = TQColor(249, 255, 208); - m_defaultsMap[MatrixKeyboardFocus] = QColor(224, 112, 8); + m_defaultsMap[MatrixKeyboardFocus] = TQColor(224, 112, 8); - // m_defaultsMap[RotaryPlugin] = QColor(185, 255, 248); - m_defaultsMap[RotaryPlugin] = QColor(185, 200, 248); - // m_defaultsMap[RotaryPlugin] = QColor(185, 185, 185); + // m_defaultsMap[RotaryPlugin] = TQColor(185, 255, 248); + m_defaultsMap[RotaryPlugin] = TQColor(185, 200, 248); + // m_defaultsMap[RotaryPlugin] = TQColor(185, 185, 185); - m_defaultsMap[RotaryMeter] = QColor(255, 100, 0); + m_defaultsMap[RotaryMeter] = TQColor(255, 100, 0); - m_defaultsMap[MarkerBackground] = QColor(185, 255, 248); + m_defaultsMap[MarkerBackground] = TQColor(185, 255, 248); m_defaultsMap[QuickMarker] = Qt::red; - // m_defaultsMap[MuteTrackLED] = QColor(218, 190, 230, QColor::Hsv); - m_defaultsMap[MuteTrackLED] = QColor(211, 194, 238, QColor::Hsv); - m_defaultsMap[RecordMIDITrackLED] = QColor(45, 250, 225, QColor::Hsv); - m_defaultsMap[RecordAudioTrackLED] = QColor(0, 250, 225, QColor::Hsv); + // m_defaultsMap[MuteTrackLED] = TQColor(218, 190, 230, TQColor::Hsv); + m_defaultsMap[MuteTrackLED] = TQColor(211, 194, 238, TQColor::Hsv); + m_defaultsMap[RecordMIDITrackLED] = TQColor(45, 250, 225, TQColor::Hsv); + m_defaultsMap[RecordAudioTrackLED] = TQColor(0, 250, 225, TQColor::Hsv); - m_defaultsMap[PlaybackFaderOutline] = QColor(211, 194, 238, QColor::Hsv); - m_defaultsMap[RecordFaderOutline] = QColor(0, 250, 225, QColor::Hsv); + m_defaultsMap[PlaybackFaderOutline] = TQColor(211, 194, 238, TQColor::Hsv); + m_defaultsMap[RecordFaderOutline] = TQColor(0, 250, 225, TQColor::Hsv); } GUIPalette* GUIPalette::getInstance() diff --git a/src/gui/general/GUIPalette.h b/src/gui/general/GUIPalette.h index c8760fb..e2e2dd6 100644 --- a/src/gui/general/GUIPalette.h +++ b/src/gui/general/GUIPalette.h @@ -28,7 +28,7 @@ #include "base/Colour.h" #include <map> -#include <qcolor.h> +#include <tqcolor.h> @@ -50,10 +50,10 @@ namespace Rosegarden class GUIPalette { public: - static QColor getColour(const char* const colourName); + static TQColor getColour(const char* const colourName); - static Colour convertColour(const QColor &input); - static QColor convertColour(const Colour &input); + static Colour convertColour(const TQColor &input); + static TQColor convertColour(const Colour &input); static const char* const ActiveRecordTrack; @@ -167,13 +167,13 @@ public: protected: GUIPalette(); - QColor getDefaultColour(const char* const colourName); + TQColor getDefaultColour(const char* const colourName); //--------------- Data members --------------------------------- static GUIPalette* getInstance(); static GUIPalette* m_instance; - typedef std::map<const char* const, QColor> colourmap; + typedef std::map<const char* const, TQColor> colourmap; colourmap m_defaultsMap; }; diff --git a/src/gui/general/LinedStaff.cpp b/src/gui/general/LinedStaff.cpp index e2e5d12..5a4fbb6 100644 --- a/src/gui/general/LinedStaff.cpp +++ b/src/gui/general/LinedStaff.cpp @@ -36,13 +36,13 @@ #include "base/ViewElement.h" #include "GUIPalette.h" #include "BarLine.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpen.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpen.h> +#include <tqrect.h> +#include <tqstring.h> #include <algorithm> @@ -54,7 +54,7 @@ namespace Rosegarden const int pointerWidth = 3; -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness) : Staff(*segment), @@ -75,15 +75,15 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { initCursors(); } -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness, double pageWidth, int rowsPerPage, int rowSpacing) : @@ -105,15 +105,15 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { initCursors(); } -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness, PageMode pageMode, double pageWidth, int rowsPerPage, @@ -136,8 +136,8 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { @@ -156,7 +156,7 @@ LinedStaff::~LinedStaff() void LinedStaff::initCursors() { - QPen pen(GUIPalette::getColour(GUIPalette::Pointer)); + TQPen pen(GUIPalette::getColour(GUIPalette::Pointer)); pen.setWidth(pointerWidth); m_pointer->setPen(pen); @@ -455,7 +455,7 @@ LinedStaff::getBarExtents(double x, int y) const if (line->x() <= x) continue; - return QRect(int(m_barLines[i -1]->x()), + return TQRect(int(m_barLines[i -1]->x()), getCanvasYForTopOfStaff(barRow), int(line->x() - m_barLines[i - 1]->x()), getHeightOfRow()); @@ -463,7 +463,7 @@ LinedStaff::getBarExtents(double x, int y) const } // failure - return QRect(int(getX() + getMargin()), getCanvasYForTopOfStaff(), 4, getHeightOfRow()); + return TQRect(int(getX() + getMargin()), getCanvasYForTopOfStaff(), 4, getHeightOfRow()); } double @@ -779,12 +779,12 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, if (showBarNo) { - QFont font; + TQFont font; font.setPixelSize(m_resolution * 3 / 2); - QFontMetrics metrics(font); - QString text = QString("%1").arg(barNo + 1); + TQFontMetrics metrics(font); + TQString text = TQString("%1").arg(barNo + 1); - QCanvasItem *barNoText = new QCanvasText(text, font, m_canvas); + TQCanvasItem *barNoText = new TQCanvasText(text, font, m_canvas); barNoText->setX(x); barNoText->setY(y - metrics.height() - m_resolution * 2); barNoText->setZ( -1); @@ -796,7 +796,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, m_barNumbers.push_back(barNoText); } - QCanvasRectangle *rect = 0; + TQCanvasRectangle *rect = 0; if (showBeatLines()) { @@ -987,7 +987,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) level = 200; } - QColor lineColour(level, level, level); + TQColor lineColour(level, level, level); int h; @@ -1009,7 +1009,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) // rather arbitrary (dup in insertBar) int barThickness = m_resolution / 12 + 1; y = getCanvasYForTopLine(row); - QCanvasRectangle *line = new QCanvasRectangle + TQCanvasRectangle *line = new QCanvasRectangle (int(x + length), y, barThickness, m_connectingLineLength, m_canvas); line->setPen(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); line->setBrush(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); @@ -1041,18 +1041,18 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) // << x << "," << y << ") to (" << (x+length-1) // << "," << y << ")" << endl; - QCanvasItem *line; + TQCanvasItem *line; delete m_staffLines[row][lineIndex]; m_staffLines[row][lineIndex] = 0; if (m_lineThickness > 1) { - QCanvasRectangle *rline = new QCanvasRectangle + TQCanvasRectangle *rline = new QCanvasRectangle (int(x), y, int(length), m_lineThickness, m_canvas); rline->setPen(lineColour); rline->setBrush(lineColour); line = rline; } else { - QCanvasLine *lline = new QCanvasLine(m_canvas); + TQCanvasLine *lline = new TQCanvasLine(m_canvas); lline->setPoints(int(x), y, int(x + length), y); lline->setPen(lineColour); line = lline; diff --git a/src/gui/general/LinedStaff.h b/src/gui/general/LinedStaff.h index 1444bd2..359becf 100644 --- a/src/gui/general/LinedStaff.h +++ b/src/gui/general/LinedStaff.h @@ -29,14 +29,14 @@ #include "base/FastVector.h" #include "base/Staff.h" #include "base/ViewElement.h" -#include <qrect.h> +#include <tqrect.h> #include <utility> #include <vector> -class QCanvasLine; -class QCanvasItem; -class QCanvas; +class TQCanvasLine; +class TQCanvasItem; +class TQCanvas; class isFirstBarInRow; class barNo; @@ -99,7 +99,7 @@ protected: * \a lineThickness is the number of pixels thick a * staff line should be */ - LinedStaff(QCanvas *, Segment *, SnapGrid *, + LinedStaff(TQCanvas *, Segment *, SnapGrid *, int id, int resolution, int lineThickness); /** @@ -125,7 +125,7 @@ protected: * \a rowSpacing is the distance in pixels between * the tops of consecutive rows on this staff */ - LinedStaff(QCanvas *, Segment *, SnapGrid *, + LinedStaff(TQCanvas *, Segment *, SnapGrid *, int id, int resolution, int lineThickness, double pageWidth, int rowsPerPage, int rowSpacing); @@ -133,7 +133,7 @@ protected: * Create a new LinedStaff for the given Segment, with * either page or linear layout. */ - LinedStaff(QCanvas *, Segment *, SnapGrid *, + LinedStaff(TQCanvas *, Segment *, SnapGrid *, int id, int resolution, int lineThickness, PageMode pageMode, double pageWidth, int rowsPerPage, int rowSpacing); @@ -370,7 +370,7 @@ public: * Return the full width, height and origin of the bar containing * the given canvas cooordinates. */ - virtual QRect getBarExtents(double x, int y) const; + virtual TQRect getBarExtents(double x, int y) const; /** * Set whether this is the current staff or not. A staff that is @@ -709,7 +709,7 @@ protected: //--------------- Data members --------------------------------- - QCanvas *m_canvas; + TQCanvas *m_canvas; SnapGrid *m_snapGrid; int m_id; @@ -732,12 +732,12 @@ protected: bool m_current; - typedef std::vector<QCanvasItem *> ItemList; + typedef std::vector<TQCanvasItem *> ItemList; typedef std::vector<ItemList> ItemMatrix; ItemMatrix m_staffLines; ItemList m_staffConnectingLines; - typedef std::pair<double, QCanvasItem *> LineRec; // layout-x, line + typedef std::pair<double, TQCanvasItem *> LineRec; // layout-x, line typedef FastVector<LineRec> LineRecList; typedef FastVector<BarLine *> BarLineList;//!!! should be multiset I reckon static bool compareBars(const BarLine *, const BarLine *); @@ -747,8 +747,8 @@ protected: LineRecList m_barConnectingLines; ItemList m_barNumbers; - QCanvasLine *m_pointer; - QCanvasLine *m_insertCursor; + TQCanvasLine *m_pointer; + TQCanvasLine *m_insertCursor; timeT m_insertCursorTime; bool m_insertCursorTimeValid; }; diff --git a/src/gui/general/MidiPitchLabel.cpp b/src/gui/general/MidiPitchLabel.cpp index 47a748b..f2d714d 100644 --- a/src/gui/general/MidiPitchLabel.cpp +++ b/src/gui/general/MidiPitchLabel.cpp @@ -29,13 +29,13 @@ #include "document/ConfigGroups.h" #include <kconfig.h> #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -static QString notes[] = { +static TQString notes[] = { i18n("C%1"), i18n("C#%1"), i18n("D%1"), i18n("D#%1"), i18n("E%1"), i18n("F%1"), i18n("F#%1"), i18n("G%1"), i18n("G#%1"), i18n("A%1"), i18n("A#%1"), i18n("B%1") diff --git a/src/gui/general/MidiPitchLabel.h b/src/gui/general/MidiPitchLabel.h index 9abcc11..4bc5253 100644 --- a/src/gui/general/MidiPitchLabel.h +++ b/src/gui/general/MidiPitchLabel.h @@ -27,7 +27,7 @@ #define _RG_MIDIPITCHLABEL_H_ #include <string> -#include <qstring.h> +#include <tqstring.h> @@ -43,10 +43,10 @@ public: MidiPitchLabel(int pitch); std::string getString() const; - QString getQString() const; + TQString getQString() const; private: - QString m_midiNote; + TQString m_midiNote; }; diff --git a/src/gui/general/PixmapFunctions.cpp b/src/gui/general/PixmapFunctions.cpp index d297dad..f61ff11 100644 --- a/src/gui/general/PixmapFunctions.cpp +++ b/src/gui/general/PixmapFunctions.cpp @@ -25,11 +25,11 @@ #include "PixmapFunctions.h" -#include <qbitmap.h> -#include <qcolor.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqbitmap.h> +#include <tqcolor.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include <iostream> @@ -37,10 +37,10 @@ namespace Rosegarden { QBitmap -PixmapFunctions::generateMask(const QPixmap &map, const QRgb &px) +PixmapFunctions::generateMask(const TQPixmap &map, const QRgb &px) { - QImage i(map.convertToImage()); - QImage im(i.width(), i.height(), 1, 2, QImage::LittleEndian); + TQImage i(map.convertToImage()); + TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian); for (int y = 0; y < i.height(); ++y) { for (int x = 0; x < i.width(); ++x) { @@ -52,16 +52,16 @@ PixmapFunctions::generateMask(const QPixmap &map, const QRgb &px) } } - QBitmap m; + TQBitmap m; m.convertFromImage(im); return m; } QBitmap -PixmapFunctions::generateMask(const QPixmap &map) +PixmapFunctions::generateMask(const TQPixmap &map) { - QImage i(map.convertToImage()); - QImage im(i.width(), i.height(), 1, 2, QImage::LittleEndian); + TQImage i(map.convertToImage()); + TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian); QRgb px0(i.pixel(0, 0)); QRgb px1(i.pixel(i.width() - 1, 0)); @@ -82,18 +82,18 @@ PixmapFunctions::generateMask(const QPixmap &map) } } - QBitmap m; + TQBitmap m; m.convertFromImage(im); return m; } QPixmap -PixmapFunctions::colourPixmap(const QPixmap &map, int hue, int minValue) +PixmapFunctions::colourPixmap(const TQPixmap &map, int hue, int minValue) { // assumes pixmap is currently in shades of grey; maps black -> // solid colour and greys -> shades of colour - QImage image = map.convertToImage(); + TQImage image = map.convertToImage(); int s, v; @@ -102,7 +102,7 @@ PixmapFunctions::colourPixmap(const QPixmap &map, int hue, int minValue) for (int y = 0; y < image.height(); ++y) { for (int x = 0; x < image.width(); ++x) { - QColor pixel(image.pixel(x, y)); + TQColor pixel(image.pixel(x, y)); int oldHue; pixel.hsv(&oldHue, &s, &v); @@ -118,59 +118,59 @@ PixmapFunctions::colourPixmap(const QPixmap &map, int hue, int minValue) } image.setPixel - (x, y, QColor(hue, + (x, y, TQColor(hue, 255 - v, v > minValue ? v : minValue, - QColor::Hsv).rgb()); + TQColor::Hsv).rgb()); } } - QPixmap rmap; + TQPixmap rmap; rmap.convertFromImage(image); - if (map.mask()) - rmap.setMask(*map.mask()); + if (map.tqmask()) + rmap.setMask(*map.tqmask()); return rmap; } QPixmap -PixmapFunctions::shadePixmap(const QPixmap &map) +PixmapFunctions::shadePixmap(const TQPixmap &map) { - QImage image = map.convertToImage(); + TQImage image = map.convertToImage(); int h, s, v; for (int y = 0; y < image.height(); ++y) { for (int x = 0; x < image.width(); ++x) { - QColor pixel(image.pixel(x, y)); + TQColor pixel(image.pixel(x, y)); pixel.hsv(&h, &s, &v); image.setPixel - (x, y, QColor(h, + (x, y, TQColor(h, s, 255 - ((255 - v) / 2), - QColor::Hsv).rgb()); + TQColor::Hsv).rgb()); } } - QPixmap rmap; + TQPixmap rmap; rmap.convertFromImage(image); - if (map.mask()) - rmap.setMask(*map.mask()); + if (map.tqmask()) + rmap.setMask(*map.tqmask()); return rmap; } QPixmap -PixmapFunctions::flipVertical(const QPixmap &map) +PixmapFunctions::flipVertical(const TQPixmap &map) { - QPixmap rmap; - QImage i(map.convertToImage()); + TQPixmap rmap; + TQImage i(map.convertToImage()); rmap.convertFromImage(i.mirror(false, true)); - if (map.mask()) { - QImage im(map.mask()->convertToImage()); - QBitmap newMask; + if (map.tqmask()) { + TQImage im(map.tqmask()->convertToImage()); + TQBitmap newMask; newMask.convertFromImage(im.mirror(false, true)); rmap.setMask(newMask); } @@ -179,15 +179,15 @@ PixmapFunctions::flipVertical(const QPixmap &map) } QPixmap -PixmapFunctions::flipHorizontal(const QPixmap &map) +PixmapFunctions::flipHorizontal(const TQPixmap &map) { - QPixmap rmap; - QImage i(map.convertToImage()); + TQPixmap rmap; + TQImage i(map.convertToImage()); rmap.convertFromImage(i.mirror(true, false)); - if (map.mask()) { - QImage im(map.mask()->convertToImage()); - QBitmap newMask; + if (map.tqmask()) { + TQImage im(map.tqmask()->convertToImage()); + TQBitmap newMask; newMask.convertFromImage(im.mirror(true, false)); rmap.setMask(newMask); } @@ -195,23 +195,23 @@ PixmapFunctions::flipHorizontal(const QPixmap &map) return rmap; } -std::pair<QPixmap, QPixmap> -PixmapFunctions::splitPixmap(const QPixmap &pixmap, int x) +std::pair<TQPixmap, TQPixmap> +PixmapFunctions::splitPixmap(const TQPixmap &pixmap, int x) { - QPixmap left(x, pixmap.height(), pixmap.depth()); - QBitmap leftMask(left.width(), left.height()); + TQPixmap left(x, pixmap.height(), pixmap.depth()); + TQBitmap leftMask(left.width(), left.height()); - QPixmap right(pixmap.width() - x, pixmap.height(), pixmap.depth()); - QBitmap rightMask(right.width(), right.height()); + TQPixmap right(pixmap.width() - x, pixmap.height(), pixmap.depth()); + TQBitmap rightMask(right.width(), right.height()); - QPainter paint; + TQPainter paint; paint.begin(&left); paint.drawPixmap(0, 0, pixmap, 0, 0, left.width(), left.height()); paint.end(); paint.begin(&leftMask); - paint.drawPixmap(0, 0, *pixmap.mask(), 0, 0, left.width(), left.height()); + paint.drawPixmap(0, 0, *pixmap.tqmask(), 0, 0, left.width(), left.height()); paint.end(); left.setMask(leftMask); @@ -221,23 +221,23 @@ PixmapFunctions::splitPixmap(const QPixmap &pixmap, int x) paint.end(); paint.begin(&rightMask); - paint.drawPixmap(0, 0, *pixmap.mask(), left.width(), 0, right.width(), right.height()); + paint.drawPixmap(0, 0, *pixmap.tqmask(), left.width(), 0, right.width(), right.height()); paint.end(); right.setMask(rightMask); - return std::pair<QPixmap, QPixmap>(left, right); + return std::pair<TQPixmap, TQPixmap>(left, right); } void -PixmapFunctions::drawPixmapMasked(QPixmap &dest, QBitmap &destMask, +PixmapFunctions::drawPixmapMasked(TQPixmap &dest, TQBitmap &destMask, int x0, int y0, - const QPixmap &src) + const TQPixmap &src) { - QImage idp(dest.convertToImage()); - QImage idm(destMask.convertToImage()); - QImage isp(src.convertToImage()); - QImage ism(src.mask()->convertToImage()); + TQImage idp(dest.convertToImage()); + TQImage idm(destMask.convertToImage()); + TQImage isp(src.convertToImage()); + TQImage ism(src.tqmask()->convertToImage()); for (int y = 0; y < isp.height(); ++y) { for (int x = 0; x < isp.width(); ++x) { diff --git a/src/gui/general/PixmapFunctions.h b/src/gui/general/PixmapFunctions.h index 22da0f0..ea05693 100644 --- a/src/gui/general/PixmapFunctions.h +++ b/src/gui/general/PixmapFunctions.h @@ -26,8 +26,8 @@ #ifndef _RG_PIXMAPFUNCTIONS_H_ #define _RG_PIXMAPFUNCTIONS_H_ -#include <qbitmap.h> -#include <qpixmap.h> +#include <tqbitmap.h> +#include <tqpixmap.h> #include <utility> @@ -41,7 +41,7 @@ class PixmapFunctions public: /** * Generate a heuristic mask for the given pixmap. Unlike - * QPixmap::createHeuristicMask, this removes from the mask all + * TQPixmap::createHeuristicMask, this removes from the mask all * pixels that are apparently "background" even if they appear in * holes in the middle of the image. This is more usually what we * want than the default behaviour of createHeuristicMask. @@ -50,11 +50,11 @@ public: * * This function is slow. */ - static QBitmap generateMask(const QPixmap &map, const QRgb &rgb); + static TQBitmap generateMask(const TQPixmap &map, const QRgb &rgb); /** * Generate a heuristic mask for the given pixmap. Unlike - * QPixmap::createHeuristicMask, this removes from the mask all + * TQPixmap::createHeuristicMask, this removes from the mask all * pixels that are apparently "background" even if they appear in * holes in the middle of the image. This is more usually what we * want than the default behaviour of createHeuristicMask. @@ -64,31 +64,31 @@ public: * * This function is slow. */ - static QBitmap generateMask(const QPixmap &map); + static TQBitmap generateMask(const TQPixmap &map); /** * Colour a greyscale pixmap with the given hue. * minValue specifies the minimum value (in the HSV sense) that * will be used for any recoloured pixel. */ - static QPixmap colourPixmap(const QPixmap &map, int hue, int minValue); + static TQPixmap colourPixmap(const TQPixmap &map, int hue, int minValue); /** * Make a pixmap grey, or otherwise reduce its intensity. */ - static QPixmap shadePixmap(const QPixmap &map); + static TQPixmap shadePixmap(const TQPixmap &map); - /// Return a QPixmap that is a mirror image of map (including mask) - static QPixmap flipVertical(const QPixmap &map); + /// Return a TQPixmap that is a mirror image of map (including mask) + static TQPixmap flipVertical(const TQPixmap &map); - /// Return a QPixmap that is a mirror image of map (including mask) - static QPixmap flipHorizontal(const QPixmap &map); + /// Return a TQPixmap that is a mirror image of map (including mask) + static TQPixmap flipHorizontal(const TQPixmap &map); /// Return left and right parts of the QPixmap - static std::pair<QPixmap, QPixmap> splitPixmap(const QPixmap &original, int x); + static std::pair<TQPixmap, TQPixmap> splitPixmap(const TQPixmap &original, int x); /** - * Using QPainter::drawPixmap to draw one pixmap on another does + * Using TQPainter::drawPixmap to draw one pixmap on another does * not appear to take the mask into account properly. Background * pixels in the second pixmap erase foreground pixels in the * first one, regardless of whether they're masked or not. This @@ -96,9 +96,9 @@ public: * * Note that the source pixmap _must_ have a mask. */ - static void drawPixmapMasked(QPixmap &dest, QBitmap &destMask, + static void drawPixmapMasked(TQPixmap &dest, TQBitmap &destMask, int x, int y, - const QPixmap &source); + const TQPixmap &source); }; diff --git a/src/gui/general/PresetElement.cpp b/src/gui/general/PresetElement.cpp index 4158d69..cc3e0d1 100644 --- a/src/gui/general/PresetElement.cpp +++ b/src/gui/general/PresetElement.cpp @@ -29,13 +29,13 @@ #include "PresetElement.h" #include "misc/Debug.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -PresetElement::PresetElement(QString name, +PresetElement::PresetElement(TQString name, int clef, int transpose, int highAm, diff --git a/src/gui/general/PresetElement.h b/src/gui/general/PresetElement.h index 24d3ee4..4da78f7 100644 --- a/src/gui/general/PresetElement.h +++ b/src/gui/general/PresetElement.h @@ -29,7 +29,7 @@ #ifndef _RG_PRESETELEMENT_H_ #define _RG_PRESETELEMENT_H_ -#include <qstring.h> +#include <tqstring.h> #include <vector> @@ -46,7 +46,7 @@ class PresetElement { public: - PresetElement(QString name, + PresetElement(TQString name, int clef, int transpose, int highAm, @@ -57,7 +57,7 @@ public: ~PresetElement(); // accessors - QString getName() { return m_name; } + TQString getName() { return m_name; } int getClef() { return m_clef; } int getTranspose() { return m_transpose; } int getHighAm() { return m_highAm; } @@ -66,7 +66,7 @@ public: int getLowPro() { return m_lowPro; } private: - QString m_name; + TQString m_name; int m_clef; int m_transpose; int m_highAm; diff --git a/src/gui/general/PresetGroup.cpp b/src/gui/general/PresetGroup.cpp index 4a457a9..bd5974f 100644 --- a/src/gui/general/PresetGroup.cpp +++ b/src/gui/general/PresetGroup.cpp @@ -36,10 +36,10 @@ #include <klocale.h> #include <kstddirs.h> #include <kglobal.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -67,27 +67,27 @@ PresetGroup::PresetGroup() : { m_presetDirectory = KGlobal::dirs()->findResource("appdata", "presets/"); - QString language = KGlobal::locale()->language(); + TQString language = KGlobal::locale()->language(); - QString presetFileName = QString("%1/presets-%2.xml") + TQString presetFileName = TQString("%1/presets-%2.xml") .arg(m_presetDirectory).arg(language); - if (!QFileInfo(presetFileName).isReadable()) { + if (!TQFileInfo(presetFileName).isReadable()) { RG_DEBUG << "Failed to open " << presetFileName << endl; - language.replace(QRegExp("_.*$"), ""); - presetFileName = QString("%1/presets-%2.xml") + language.replace(TQRegExp("_.*$"), ""); + presetFileName = TQString("%1/presets-%2.xml") .arg(m_presetDirectory).arg(language); - if (!QFileInfo(presetFileName).isReadable()) { + if (!TQFileInfo(presetFileName).isReadable()) { RG_DEBUG << "Failed to open " << presetFileName << endl; - presetFileName = QString("%1/presets.xml") + presetFileName = TQString("%1/presets.xml") .arg(m_presetDirectory); - if (!QFileInfo(presetFileName).isReadable()) { + if (!TQFileInfo(presetFileName).isReadable()) { RG_DEBUG << "Failed to open " << presetFileName << endl; @@ -98,10 +98,10 @@ PresetGroup::PresetGroup() : } } - QFile presetFile(presetFileName); + TQFile presetFile(presetFileName); - QXmlInputSource source(presetFile); - QXmlSimpleReader reader; + TQXmlInputSource source(presetFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -118,17 +118,17 @@ PresetGroup::~PresetGroup() } bool -PresetGroup::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +PresetGroup::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); // RG_DEBUG << "PresetGroup::startElement: processing starting element: " << lcName << endl; if (lcName == "category") { - QString s = attributes.value("name"); + TQString s = attributes.value("name"); if (s) { m_elCategoryName = s; // increment the current category number @@ -150,7 +150,7 @@ PresetGroup::startElement(const QString &, const QString &, } else if (lcName == "instrument") { - QString s = attributes.value("name"); + TQString s = attributes.value("name"); if (s) { m_elInstrumentName = s; m_name = true; @@ -161,20 +161,20 @@ PresetGroup::startElement(const QString &, const QString &, } } else if (lcName == "clef") { - QString s = attributes.value("type"); + TQString s = attributes.value("type"); if (s) { m_elClef = clefNameToClefIndex(s); m_clef = true; } } else if (lcName == "transpose") { - QString s = attributes.value("value"); + TQString s = attributes.value("value"); if (s) { m_elTranspose = s.toInt(); m_transpose = true; } } else if (lcName == "range") { - QString s = attributes.value("class"); + TQString s = attributes.value("class"); if (s == "amateur") { s = attributes.value("low"); @@ -242,28 +242,28 @@ PresetGroup::startElement(const QString &, const QString &, } // startElement bool -PresetGroup::error(const QXmlParseException& exception) +PresetGroup::error(const TQXmlParseException& exception) { RG_DEBUG << "PresetGroup::error(): jubilation and glee, we have an error, whee!" << endl; - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::error(exception); + return TQXmlDefaultHandler::error(exception); } bool -PresetGroup::fatalError(const QXmlParseException& exception) +PresetGroup::fatalError(const TQXmlParseException& exception) { RG_DEBUG << "PresetGroup::fatalError(): double your jubilation, and triple your glee, a fatal error doth it be!" << endl; - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::fatalError(exception); + return TQXmlDefaultHandler::fatalError(exception); } } diff --git a/src/gui/general/PresetGroup.h b/src/gui/general/PresetGroup.h index 476a878..5397838 100644 --- a/src/gui/general/PresetGroup.h +++ b/src/gui/general/PresetGroup.h @@ -31,12 +31,12 @@ #include "base/Exception.h" #include "CategoryElement.h" -#include <qstring.h> -#include <qxml.h> +#include <tqstring.h> +#include <tqxml.h> -class QXmlParseException; -class QXmlAttributes; +class TQXmlParseException; +class TQXmlAttributes; namespace Rosegarden @@ -59,14 +59,14 @@ public: // Xml handler methods: - virtual bool startElement (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + virtual bool startElement (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); // I don't think I have anything to do with this, but it must return true? -// bool characters(const QString &) { return true; } +// bool characters(const TQString &) { return true; } private: @@ -74,11 +74,11 @@ private: CategoriesContainer m_categories; // For use when reading the XML file: - QString m_errorString; - QString m_presetDirectory; + TQString m_errorString; + TQString m_presetDirectory; - QString m_elCategoryName; - QString m_elInstrumentName; + TQString m_elCategoryName; + TQString m_elInstrumentName; int m_elClef; int m_elTranspose; int m_elLowAm; diff --git a/src/gui/general/PresetHandlerDialog.cpp b/src/gui/general/PresetHandlerDialog.cpp index 6081f85..383a2b6 100644 --- a/src/gui/general/PresetHandlerDialog.cpp +++ b/src/gui/general/PresetHandlerDialog.cpp @@ -27,7 +27,7 @@ #include "PresetHandlerDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -39,20 +39,20 @@ #include <kcombobox.h> #include <kconfig.h> #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qstring.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -PresetHandlerDialog::PresetHandlerDialog(QWidget *parent, bool fromNotation) +PresetHandlerDialog::PresetHandlerDialog(TQWidget *parent, bool fromNotation) : KDialogBase(parent, "presethandlerdialog", true, i18n("Load track parameters preset"), Ok | Cancel, Ok), m_config(kapp->config()), m_fromNotation(fromNotation) @@ -77,40 +77,40 @@ PresetHandlerDialog::initDialog() { RG_DEBUG << "PresetHandlerDialog::initDialog()" << endl; - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - QFrame *frame = new QFrame(vBox); + TQFrame *frame = new TQFrame(vBox); - QGridLayout *layout = new QGridLayout(frame, 6, 5, 10, 5); + TQGridLayout *layout = new TQGridLayout(frame, 6, 5, 10, 5); - QLabel *title = new QLabel(i18n("Select preset track parameters for:"), frame); + TQLabel *title = new TQLabel(i18n("Select preset track parameters for:"), frame); if (m_fromNotation) title->setText(i18n("Create appropriate notation for:")); - QLabel *catlabel = new QLabel(i18n("Category"), frame); + TQLabel *catlabel = new TQLabel(i18n("Category"), frame); m_categoryCombo = new KComboBox(frame); - QLabel *inslabel = new QLabel(i18n("Instrument"), frame); + TQLabel *inslabel = new TQLabel(i18n("Instrument"), frame); m_instrumentCombo = new KComboBox(frame); - QLabel *plylabel = new QLabel(i18n("Player Ability"), frame); + TQLabel *plylabel = new TQLabel(i18n("Player Ability"), frame); m_playerCombo = new KComboBox(frame); m_playerCombo->insertItem(i18n("Amateur")); m_playerCombo->insertItem(i18n("Professional")); - QGroupBox *scopeBox = new QButtonGroup + TQGroupBox *scopeBox = new QButtonGroup (1, Horizontal, i18n("Scope"), frame); if (m_fromNotation) { - QRadioButton *onlySelectedSegments = new - QRadioButton(i18n("Only selected segments"), scopeBox); + TQRadioButton *onlySelectedSegments = new + TQRadioButton(i18n("Only selected segments"), scopeBox); m_convertAllSegments = new - QRadioButton(i18n("All segments in this track"), scopeBox); + TQRadioButton(i18n("All segments in this track"), scopeBox); onlySelectedSegments->setChecked(true); } else { - QRadioButton *onlyNewSegments = new - QRadioButton(i18n("Only for new segments"), scopeBox); + TQRadioButton *onlyNewSegments = new + TQRadioButton(i18n("Only for new segments"), scopeBox); m_convertSegments = new - QRadioButton(i18n("Convert existing segments"), scopeBox); + TQRadioButton(i18n("Convert existing segments"), scopeBox); onlyNewSegments->setChecked(true); } @@ -147,8 +147,8 @@ PresetHandlerDialog::initDialog() } - connect(m_categoryCombo, SIGNAL(activated(int)), - SLOT(slotCategoryIndexChanged(int))); + connect(m_categoryCombo, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotCategoryIndexChanged(int))); } QString @@ -274,7 +274,7 @@ PresetHandlerDialog::slotOk() m_config->writeEntry("convert_segments", m_convertSegments->isChecked()); } - QDialog::accept(); + TQDialog::accept(); } } diff --git a/src/gui/general/PresetHandlerDialog.h b/src/gui/general/PresetHandlerDialog.h index 879ddca..c91d733 100644 --- a/src/gui/general/PresetHandlerDialog.h +++ b/src/gui/general/PresetHandlerDialog.h @@ -30,11 +30,11 @@ #define _RG_PRESETHANDLERDIALOG_H_ #include <kdialogbase.h> -#include <qradiobutton.h> -#include <qstring.h> +#include <tqradiobutton.h> +#include <tqstring.h> #include "CategoryElement.h" -class QWidget; +class TQWidget; class KConfig; class KComboBox; @@ -51,7 +51,7 @@ class PresetHandlerDialog : public KDialogBase public: - PresetHandlerDialog(QWidget* parent, bool fromNotation = false); + PresetHandlerDialog(TQWidget* parent, bool fromNotation = false); ~PresetHandlerDialog(); PresetGroup *m_presets; @@ -62,7 +62,7 @@ public: //-------[ accessor functions ]------------------------ - QString getName(); + TQString getName(); int getClef(); int getTranspose(); @@ -87,8 +87,8 @@ protected: KComboBox *m_categoryCombo; KComboBox *m_instrumentCombo; KComboBox *m_playerCombo; - QRadioButton *m_convertSegments; - QRadioButton *m_convertAllSegments; + TQRadioButton *m_convertSegments; + TQRadioButton *m_convertAllSegments; protected slots: diff --git a/src/gui/general/ProgressReporter.cpp b/src/gui/general/ProgressReporter.cpp index 0d9e896..3fdfacc 100644 --- a/src/gui/general/ProgressReporter.cpp +++ b/src/gui/general/ProgressReporter.cpp @@ -25,14 +25,14 @@ #include "ProgressReporter.h" -#include <qobject.h> +#include <tqobject.h> namespace Rosegarden { -ProgressReporter::ProgressReporter(QObject* parent, const char* name) - : QObject(parent, name), m_isCancelled(false) +ProgressReporter::ProgressReporter(TQObject* parent, const char* name) + : TQObject(parent, name), m_isCancelled(false) {} diff --git a/src/gui/general/ProgressReporter.h b/src/gui/general/ProgressReporter.h index d8aa306..3e87ba0 100644 --- a/src/gui/general/ProgressReporter.h +++ b/src/gui/general/ProgressReporter.h @@ -26,7 +26,7 @@ #ifndef _RG_PROGRESSREPORTER_H_ #define _RG_PROGRESSREPORTER_H_ -#include <qobject.h> +#include <tqobject.h> @@ -40,7 +40,7 @@ class ProgressReporter : public QObject { Q_OBJECT public: - ProgressReporter(QObject* parent, const char* name = 0); + ProgressReporter(TQObject* parent, const char* name = 0); // exception class for cancellations class Cancelled { }; @@ -66,7 +66,7 @@ signals: /// Report progress void setProgress(int); void incrementProgress(int); - void setOperationName(QString); + void setOperationName(TQString); protected: //--------------- Data members --------------------------------- diff --git a/src/gui/general/RosegardenCanvasView.cpp b/src/gui/general/RosegardenCanvasView.cpp index a829aac..4893147 100644 --- a/src/gui/general/RosegardenCanvasView.cpp +++ b/src/gui/general/RosegardenCanvasView.cpp @@ -27,24 +27,24 @@ #include "misc/Debug.h" #include "gui/general/CanvasItemGC.h" -#include <qcanvas.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qrect.h> -#include <qscrollbar.h> -#include <qsize.h> -#include <qsizepolicy.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqscrollbar.h> +#include <tqsize.h> +#include <tqsizepolicy.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden { -RosegardenCanvasView::RosegardenCanvasView(QCanvas* canvas, - QWidget* parent, +RosegardenCanvasView::RosegardenCanvasView(TQCanvas* canvas, + TQWidget* parent, const char* name, WFlags f) - : QCanvasView(canvas, parent, name, f), + : TQCanvasView(canvas, parent, name, f), m_bottomWidget(0), m_currentBottomWidgetHeight( -1), m_leftWidget(0), @@ -60,33 +60,33 @@ RosegardenCanvasView::RosegardenCanvasView(QCanvas* canvas, m_autoScrolling(false) { setDragAutoScroll(true); - connect( &m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( doAutoScroll() ) ); + connect( &m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( doAutoScroll() ) ); } void RosegardenCanvasView::fitWidthToContents() { - QRect allItemsBoundingRect; + TQRect allItemsBoundingRect; - QCanvasItemList items = canvas()->allItems(); + TQCanvasItemList items = canvas()->allItems(); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; for (it = items.begin(); it != items.end(); ++it) { allItemsBoundingRect |= (*it)->boundingRect(); } - QSize currentSize = canvas()->size(); + TQSize currentSize = canvas()->size(); resizeContents(allItemsBoundingRect.width(), currentSize.height()); } -void RosegardenCanvasView::setBottomFixedWidget(QWidget* w) +void RosegardenCanvasView::setBottomFixedWidget(TQWidget* w) { m_bottomWidget = w; if (m_bottomWidget) { int lww = m_leftWidget ? m_leftWidget->sizeHint().width() : 0; - m_bottomWidget->reparent(this, 0, QPoint(0, 0)); - m_bottomWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); + m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); setMargins(lww, 0, 0, m_bottomWidget->sizeHint().height()); } } @@ -119,7 +119,7 @@ void RosegardenCanvasView::startAutoScroll() m_autoScrollTimer.start( m_autoScrollTime ); } - QPoint autoScrollStartPoint = viewport()->mapFromGlobal( QCursor::pos() ); + TQPoint autoScrollStartPoint = viewport()->mapFromGlobal( TQCursor::pos() ); m_autoScrollYMargin = autoScrollStartPoint.y() / 10; m_autoScrollXMargin = autoScrollStartPoint.x() / 10; @@ -147,8 +147,8 @@ void RosegardenCanvasView::doAutoScroll() { // RG_DEBUG << "RosegardenCanvasView::doAutoScroll()\n"; - QPoint p = viewport()->mapFromGlobal( QCursor::pos() ); - QPoint dp = p - m_previousP; + TQPoint p = viewport()->mapFromGlobal( TQCursor::pos() ); + TQPoint dp = p - m_previousP; m_previousP = p; m_autoScrollTimer.start( m_autoScrollTime ); @@ -243,7 +243,7 @@ bool RosegardenCanvasView::isTimeForSmoothScroll() void RosegardenCanvasView::slotScrollHoriz(int hpos) { - QScrollBar* hbar = getMainHorizontalScrollBar(); + TQScrollBar* hbar = getMainHorizontalScrollBar(); int currentContentYPos = contentsY(); /* Lots of performance hitting debug @@ -285,7 +285,7 @@ void RosegardenCanvasView::slotScrollHoriz(int hpos) void RosegardenCanvasView::slotScrollHorizSmallSteps(int hpos) { - QScrollBar* hbar = getMainHorizontalScrollBar(); + TQScrollBar* hbar = getMainHorizontalScrollBar(); int currentContentYPos = contentsY(); int diff = 0; @@ -324,7 +324,7 @@ void RosegardenCanvasView::slotScrollHorizSmallSteps(int hpos) void RosegardenCanvasView::slotScrollVertSmallSteps(int vpos) { - QScrollBar* vbar = verticalScrollBar(); + TQScrollBar* vbar = verticalScrollBar(); // RG_DEBUG << "RosegardenCanvasView::slotScrollVertSmallSteps: vpos is " << vpos << ", contentsY is " << contentsY() << ", visibleHeight is " << visibleHeight() << endl; @@ -367,30 +367,30 @@ void RosegardenCanvasView::slotScrollVertSmallSteps(int vpos) void RosegardenCanvasView::slotScrollVertToTop(int vpos) { - QScrollBar* vbar = verticalScrollBar(); + TQScrollBar* vbar = verticalScrollBar(); if (vpos < visibleHeight() / 3) vbar->setValue(0); else vbar->setValue(vpos - visibleHeight() / 5); } -void RosegardenCanvasView::slotSetScrollPos(const QPoint &pos) +void RosegardenCanvasView::slotSetScrollPos(const TQPoint &pos) { getMainHorizontalScrollBar()->setValue(pos.x()); verticalScrollBar()->setValue(pos.y()); } -void RosegardenCanvasView::resizeEvent(QResizeEvent* e) +void RosegardenCanvasView::resizeEvent(TQResizeEvent* e) { - QCanvasView::resizeEvent(e); + TQCanvasView::resizeEvent(e); if (!horizontalScrollBar()->isVisible()) updateBottomWidgetGeometry(); updateLeftWidgetGeometry(); } -void RosegardenCanvasView::setHBarGeometry(QScrollBar &hbar, int x, int y, int w, int h) +void RosegardenCanvasView::setHBarGeometry(TQScrollBar &hbar, int x, int y, int w, int h) { - QCanvasView::setHBarGeometry(hbar, x, y, w, h); + TQCanvasView::setHBarGeometry(hbar, x, y, w, h); updateBottomWidgetGeometry(); } @@ -403,14 +403,14 @@ void RosegardenCanvasView::updateBottomWidgetGeometry() int leftWidgetWidth = 0; if (m_leftWidget && m_leftWidget->isVisible()) { - QScrollView * qsv = dynamic_cast<QScrollView *>(m_leftWidget); + TQScrollView * qsv = dynamic_cast<TQScrollView *>(m_leftWidget); leftWidgetWidth = qsv->contentsWidth()+2; qsv->setFixedWidth(leftWidgetWidth); } setMargins(leftWidgetWidth, 0, 0, bottomWidgetHeight); - QRect r = frameRect(); + TQRect r = frameRect(); int hScrollBarHeight = 0; if (horizontalScrollBar()->isVisible()) hScrollBarHeight = horizontalScrollBar()->height() + 2; @@ -431,7 +431,7 @@ void RosegardenCanvasView::updateBottomWidgetGeometry() } } -void RosegardenCanvasView::wheelEvent(QWheelEvent *e) +void RosegardenCanvasView::wheelEvent(TQWheelEvent *e) { if (e->state() & ControlButton) { if (e->delta() > 0) @@ -440,16 +440,16 @@ void RosegardenCanvasView::wheelEvent(QWheelEvent *e) emit zoomOut(); return ; } - QCanvasView::wheelEvent(e); + TQCanvasView::wheelEvent(e); } -void RosegardenCanvasView::setLeftFixedWidget(QWidget* w) +void RosegardenCanvasView::setLeftFixedWidget(TQWidget* w) { m_leftWidget = w; if (m_leftWidget) { int bwh = m_bottomWidget ? m_bottomWidget->sizeHint().height() : 0; - m_leftWidget->reparent(this, 0, QPoint(0, 0)); - m_leftWidget->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); + m_leftWidget->reparent(this, 0, TQPoint(0, 0)); + m_leftWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred)); setMargins(m_leftWidget->sizeHint().width(), 0, 0, bwh); } } @@ -461,7 +461,7 @@ void RosegardenCanvasView::updateLeftWidgetGeometry() int leftWidgetWidth = 0; if (m_leftWidget->isVisible()) { - QScrollView * qsv = dynamic_cast<QScrollView *>(m_leftWidget); + TQScrollView * qsv = dynamic_cast<TQScrollView *>(m_leftWidget); leftWidgetWidth = qsv->contentsWidth() + 2; } m_leftWidget->setFixedWidth(leftWidgetWidth); @@ -471,7 +471,7 @@ void RosegardenCanvasView::updateLeftWidgetGeometry() setMargins(leftWidgetWidth, 0, 0, bottomWidgetHeight); - QRect r = frameRect(); + TQRect r = frameRect(); int hScrollBarHeight = 0; if (horizontalScrollBar()->isVisible()) hScrollBarHeight = horizontalScrollBar()->height() + 2; diff --git a/src/gui/general/RosegardenCanvasView.h b/src/gui/general/RosegardenCanvasView.h index 509c1aa..3096334 100644 --- a/src/gui/general/RosegardenCanvasView.h +++ b/src/gui/general/RosegardenCanvasView.h @@ -26,23 +26,23 @@ #ifndef _RG_ROSEGARDENCANVASVIEW_H_ #define _RG_ROSEGARDENCANVASVIEW_H_ -#include <qpoint.h> -#include <qtimer.h> -#include <qcanvas.h> -#include <qdatetime.h> -#include <qwmatrix.h> +#include <tqpoint.h> +#include <tqtimer.h> +#include <tqcanvas.h> +#include <tqdatetime.h> +#include <tqwmatrix.h> -class QWidget; -class QWheelEvent; -class QScrollBar; -class QResizeEvent; +class TQWidget; +class TQWheelEvent; +class TQScrollBar; +class TQResizeEvent; namespace Rosegarden { /** - * A QCanvasView with an auxiliary horiz. scrollbar + * A TQCanvasView with an auxiliary horiz. scrollbar * That scrollbar should be provided by the parent widget * (typically an EditView). The RosegardenCanvasView keeps * the auxilliary horiz. scrollbar range in sync with the @@ -53,8 +53,8 @@ class RosegardenCanvasView : public QCanvasView { Q_OBJECT public: - RosegardenCanvasView(QCanvas*, - QWidget* parent=0, const char* name=0, WFlags f=0); + RosegardenCanvasView(TQCanvas*, + TQWidget* parent=0, const char* name=0, WFlags f=0); /** * EditTool::handleMouseMove() returns a OR-ed combination of these @@ -76,7 +76,7 @@ public: * Sets the widget which will be between the scrollable part of the view * and the horizontal scrollbar */ - void setBottomFixedWidget(QWidget*); + void setBottomFixedWidget(TQWidget*); void updateBottomWidgetGeometry(); @@ -84,12 +84,12 @@ public: * Sets the widget which will be between the scrollable part of the view * and the left edge of the view. */ - void setLeftFixedWidget(QWidget*); + void setLeftFixedWidget(TQWidget*); void updateLeftWidgetGeometry(); /// Map a point with the inverse world matrix - QPoint inverseMapPoint(const QPoint& p) { return inverseWorldMatrix().map(p); } + TQPoint inverseMapPoint(const TQPoint& p) { return inverseWorldMatrix().map(p); } void setSmoothScroll(bool s) { m_smoothScroll = s; } @@ -99,7 +99,7 @@ public: bool isAutoScrolling() const { return m_autoScrolling; } - virtual void wheelEvent(QWheelEvent *); + virtual void wheelEvent(TQWheelEvent *); public slots: /// Update the RosegardenCanvasView after a change of content @@ -135,7 +135,7 @@ public slots: /** * Set the x and y scrollbars to a particular position */ - void slotSetScrollPos(const QPoint &); + void slotSetScrollPos(const TQPoint &); void startAutoScroll(); void startAutoScroll(int directionConstraint); @@ -150,30 +150,30 @@ signals: protected: - virtual void resizeEvent(QResizeEvent*); - virtual void setHBarGeometry(QScrollBar &hbar, int x, int y, int w, int h); + virtual void resizeEvent(TQResizeEvent*); + virtual void setHBarGeometry(TQScrollBar &hbar, int x, int y, int w, int h); - virtual QScrollBar* getMainHorizontalScrollBar() { return horizontalScrollBar(); } + virtual TQScrollBar* getMainHorizontalScrollBar() { return horizontalScrollBar(); } //--------------- Data members --------------------------------- enum ScrollDirection { None, Top, Bottom, Left, Right }; - QWidget* m_bottomWidget; + TQWidget* m_bottomWidget; int m_currentBottomWidgetHeight; - QWidget* m_leftWidget; + TQWidget* m_leftWidget; bool m_smoothScroll; int m_smoothScrollTimeInterval; float m_minDeltaScroll; - QTime m_scrollTimer; - QTime m_scrollAccelerationTimer; + TQTime m_scrollTimer; + TQTime m_scrollAccelerationTimer; - QTimer m_autoScrollTimer; + TQTimer m_autoScrollTimer; int m_autoScrollTime; int m_autoScrollAccel; - QPoint m_previousP; + TQPoint m_previousP; int m_autoScrollXMargin; int m_autoScrollYMargin; ScrollDirection m_currentScrollDirection; diff --git a/src/gui/general/RosegardenScrollView.cpp b/src/gui/general/RosegardenScrollView.cpp index fbcaf79..c3184da 100644 --- a/src/gui/general/RosegardenScrollView.cpp +++ b/src/gui/general/RosegardenScrollView.cpp @@ -26,15 +26,15 @@ #include "RosegardenScrollView.h" #include "misc/Debug.h" -#include <qapplication.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qrect.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qsizepolicy.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqsizepolicy.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden @@ -49,9 +49,9 @@ const int RosegardenScrollView::InitialScrollAccel = 5; const int RosegardenScrollView::MaxScrollDelta = 100; // max a.scroll speed const double RosegardenScrollView::ScrollAccelValue = 1.04;// acceleration rate -RosegardenScrollView::RosegardenScrollView(QWidget* parent, +RosegardenScrollView::RosegardenScrollView(TQWidget* parent, const char* name, WFlags f) - : QScrollView(parent, name, f), + : TQScrollView(parent, name, f), m_bottomWidget(0), m_currentBottomWidgetHeight( -1), m_smoothScroll(true), @@ -66,16 +66,16 @@ RosegardenScrollView::RosegardenScrollView(QWidget* parent, m_autoScrolling(false) { setDragAutoScroll(true); - connect( &m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( doAutoScroll() ) ); + connect( &m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( doAutoScroll() ) ); } -void RosegardenScrollView::setBottomFixedWidget(QWidget* w) +void RosegardenScrollView::setBottomFixedWidget(TQWidget* w) { m_bottomWidget = w; if (m_bottomWidget) { - m_bottomWidget->reparent(this, 0, QPoint(0, 0)); - m_bottomWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); + m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); setMargins(0, 0, 0, m_bottomWidget->sizeHint().height()); } } @@ -90,7 +90,7 @@ void RosegardenScrollView::startAutoScroll() m_autoScrollTimer.start( m_autoScrollTime ); } - QPoint autoScrollStartPoint = viewport()->mapFromGlobal( QCursor::pos() ); + TQPoint autoScrollStartPoint = viewport()->mapFromGlobal( TQCursor::pos() ); m_autoScrollYMargin = autoScrollStartPoint.y() / 10; m_autoScrollXMargin = autoScrollStartPoint.x() / 10; @@ -118,8 +118,8 @@ void RosegardenScrollView::doAutoScroll() { // RG_DEBUG << "RosegardenScrollView::doAutoScroll()\n"; - QPoint p = viewport()->mapFromGlobal( QCursor::pos() ); - QPoint dp = p - m_previousP; + TQPoint p = viewport()->mapFromGlobal( TQCursor::pos() ); + TQPoint dp = p - m_previousP; m_previousP = p; m_autoScrollTimer.start( m_autoScrollTime ); @@ -184,8 +184,8 @@ const double RosegardenScrollView::DefaultMinDeltaScroll = 1.2; bool RosegardenScrollView::isTimeForSmoothScroll() { - static int desktopWidth = QApplication::desktop()->width(), - desktopHeight = QApplication::desktop()->height(); + static int desktopWidth = TQApplication::desktop()->width(), + desktopHeight = TQApplication::desktop()->height(); if (m_smoothScroll) { int ta = m_scrollAccelerationTimer.elapsed(); @@ -220,7 +220,7 @@ bool RosegardenScrollView::isTimeForSmoothScroll() void RosegardenScrollView::slotScrollHoriz(int hpos) { - QScrollBar* hbar = getMainHorizontalScrollBar(); + TQScrollBar* hbar = getMainHorizontalScrollBar(); int currentContentYPos = contentsY(); /* Lots of performance hitting debug @@ -262,7 +262,7 @@ void RosegardenScrollView::slotScrollHoriz(int hpos) void RosegardenScrollView::slotScrollHorizSmallSteps(int hpos) { - QScrollBar* hbar = getMainHorizontalScrollBar(); + TQScrollBar* hbar = getMainHorizontalScrollBar(); int currentContentYPos = contentsY(); int diff = 0; @@ -301,7 +301,7 @@ void RosegardenScrollView::slotScrollHorizSmallSteps(int hpos) void RosegardenScrollView::slotScrollVertSmallSteps(int vpos) { - QScrollBar* vbar = verticalScrollBar(); + TQScrollBar* vbar = verticalScrollBar(); // RG_DEBUG << "RosegardenCanvasView::slotScrollVertSmallSteps: vpos is " << vpos << ", contentsY is " << contentsY() << ", visibleHeight is " << visibleHeight() << endl; @@ -344,30 +344,30 @@ void RosegardenScrollView::slotScrollVertSmallSteps(int vpos) void RosegardenScrollView::slotScrollVertToTop(int vpos) { - QScrollBar* vbar = verticalScrollBar(); + TQScrollBar* vbar = verticalScrollBar(); if (vpos < visibleHeight() / 3) vbar->setValue(0); else vbar->setValue(vpos - visibleHeight() / 5); } -void RosegardenScrollView::slotSetScrollPos(const QPoint &pos) +void RosegardenScrollView::slotSetScrollPos(const TQPoint &pos) { horizontalScrollBar()->setValue(pos.x()); verticalScrollBar()->setValue(pos.y()); } -void RosegardenScrollView::resizeEvent(QResizeEvent* e) +void RosegardenScrollView::resizeEvent(TQResizeEvent* e) { - QScrollView::resizeEvent(e); + TQScrollView::resizeEvent(e); if (!horizontalScrollBar()->isVisible()) updateBottomWidgetGeometry(); } -void RosegardenScrollView::setHBarGeometry(QScrollBar &hbar, int x, int y, int w, int h) +void RosegardenScrollView::setHBarGeometry(TQScrollBar &hbar, int x, int y, int w, int h) { - QScrollView::setHBarGeometry(hbar, x, y, w, h); + TQScrollView::setHBarGeometry(hbar, x, y, w, h); updateBottomWidgetGeometry(); } @@ -379,7 +379,7 @@ void RosegardenScrollView::updateBottomWidgetGeometry() int bottomWidgetHeight = m_bottomWidget->sizeHint().height(); setMargins(0, 0, 0, bottomWidgetHeight); - QRect r = frameRect(); + TQRect r = frameRect(); int hScrollBarHeight = 0; if (horizontalScrollBar()->isVisible()) hScrollBarHeight = horizontalScrollBar()->height() + 2; // + 2 offset needed to preserve border shadow @@ -400,7 +400,7 @@ void RosegardenScrollView::updateBottomWidgetGeometry() } -void RosegardenScrollView::wheelEvent(QWheelEvent *e) +void RosegardenScrollView::wheelEvent(TQWheelEvent *e) { if (e->state() & ControlButton) { if (e->delta() > 0) @@ -409,7 +409,7 @@ void RosegardenScrollView::wheelEvent(QWheelEvent *e) emit zoomOut(); return ; } - QScrollView::wheelEvent(e); + TQScrollView::wheelEvent(e); } } diff --git a/src/gui/general/RosegardenScrollView.h b/src/gui/general/RosegardenScrollView.h index 6a0dab7..a0aafbb 100644 --- a/src/gui/general/RosegardenScrollView.h +++ b/src/gui/general/RosegardenScrollView.h @@ -26,16 +26,16 @@ #ifndef _RG_ROSEGARDENSCROLLVIEW_H_ #define _RG_ROSEGARDENSCROLLVIEW_H_ -#include <qpoint.h> -#include <qscrollview.h> -#include <qdatetime.h> -#include <qtimer.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqdatetime.h> +#include <tqtimer.h> -class QWidget; -class QWheelEvent; -class QScrollBar; -class QResizeEvent; +class TQWidget; +class TQWheelEvent; +class TQScrollBar; +class TQResizeEvent; namespace Rosegarden @@ -44,7 +44,7 @@ namespace Rosegarden /** - * A QScrollView with more elaborate auto-scrolling capabilities + * A TQScrollView with more elaborate auto-scrolling capabilities * and the ability to have a "fixed" (non-scrolling) widget at its bottom, * just above the bottom scrollbar. */ @@ -52,7 +52,7 @@ class RosegardenScrollView : public QScrollView { Q_OBJECT public: - RosegardenScrollView(QWidget* parent=0, const char* name=0, WFlags f=0); + RosegardenScrollView(TQWidget* parent=0, const char* name=0, WFlags f=0); /** * EditTool::handleMouseMove() returns a OR-ed combination of these @@ -74,12 +74,12 @@ public: * Sets the widget which will be between the scrollable part of the view * and the horizontal scrollbar */ - void setBottomFixedWidget(QWidget*); + void setBottomFixedWidget(TQWidget*); void updateBottomWidgetGeometry(); /// Map a point with the inverse world matrix -// QPoint inverseMapPoint(const QPoint& p) { return inverseWorldMatrix().map(p); } +// TQPoint inverseMapPoint(const TQPoint& p) { return inverseWorldMatrix().map(p); } void setSmoothScroll(bool s) { m_smoothScroll = s; } @@ -89,7 +89,7 @@ public: int getDeltaScroll() { return m_minDeltaScroll; } - virtual void wheelEvent(QWheelEvent *); + virtual void wheelEvent(TQWheelEvent *); public slots: /** @@ -122,7 +122,7 @@ public slots: /** * Set the x and y scrollbars to a particular position */ - void slotSetScrollPos(const QPoint &); + void slotSetScrollPos(const TQPoint &); void startAutoScroll(); void startAutoScroll(int directionConstraint); @@ -139,27 +139,27 @@ signals: protected: - virtual void resizeEvent(QResizeEvent*); - virtual void setHBarGeometry(QScrollBar &hbar, int x, int y, int w, int h); + virtual void resizeEvent(TQResizeEvent*); + virtual void setHBarGeometry(TQScrollBar &hbar, int x, int y, int w, int h); - virtual QScrollBar* getMainHorizontalScrollBar() { return horizontalScrollBar(); } + virtual TQScrollBar* getMainHorizontalScrollBar() { return horizontalScrollBar(); } //--------------- Data members --------------------------------- enum ScrollDirection { None, Top, Bottom, Left, Right }; - QWidget* m_bottomWidget; + TQWidget* m_bottomWidget; int m_currentBottomWidgetHeight; bool m_smoothScroll; int m_smoothScrollTimeInterval; float m_minDeltaScroll; - QTime m_scrollTimer; - QTime m_scrollAccelerationTimer; + TQTime m_scrollTimer; + TQTime m_scrollAccelerationTimer; - QTimer m_autoScrollTimer; + TQTimer m_autoScrollTimer; int m_autoScrollTime; int m_autoScrollAccel; - QPoint m_previousP; + TQPoint m_previousP; int m_autoScrollXMargin; int m_autoScrollYMargin; ScrollDirection m_currentScrollDirection; diff --git a/src/gui/general/Spline.cpp b/src/gui/general/Spline.cpp index 455cca5..297c21f 100644 --- a/src/gui/general/Spline.cpp +++ b/src/gui/general/Spline.cpp @@ -25,7 +25,7 @@ #include "Spline.h" -#include <qpoint.h> +#include <tqpoint.h> namespace Rosegarden @@ -33,25 +33,25 @@ namespace Rosegarden Spline::PointList * -Spline::calculate(const QPoint &s, const QPoint &f, const PointList &cp, - QPoint &topLeft, QPoint &bottomRight) +Spline::calculate(const TQPoint &s, const TQPoint &f, const PointList &cp, + TQPoint &topLeft, TQPoint &bottomRight) { if (cp.size() < 2) return 0; int i; PointList *acc = new PointList(); - QPoint p(s); + TQPoint p(s); - topLeft = bottomRight = QPoint(0, 0); + topLeft = bottomRight = TQPoint(0, 0); for (i = 1; i < cp.size(); ++i) { - QPoint c(cp[i - 1]); + TQPoint c(cp[i - 1]); int x = (c.x() + cp[i].x()) / 2; int y = (c.y() + cp[i].y()) / 2; - QPoint n(x, y); + TQPoint n(x, y); calculateSegment(acc, p, n, c, topLeft, bottomRight); @@ -65,8 +65,8 @@ Spline::calculate(const QPoint &s, const QPoint &f, const PointList &cp, void Spline::calculateSegment(PointList *acc, - const QPoint &s, const QPoint &f, const QPoint &c, - QPoint &topLeft, QPoint &bottomRight) + const TQPoint &s, const TQPoint &f, const TQPoint &c, + TQPoint &topLeft, TQPoint &bottomRight) { int x, y, n; @@ -99,8 +99,8 @@ Spline::calculateSegment(PointList *acc, void Spline::calculateSegmentSub(PointList *acc, - const QPoint &s, const QPoint &f, const QPoint &c, - int n, QPoint &topLeft, QPoint &bottomRight) + const TQPoint &s, const TQPoint &f, const TQPoint &c, + int n, TQPoint &topLeft, TQPoint &bottomRight) { double ax = (double)(f.x() + s.x() - 2 * c.x()) / (double)n; double ay = (double)(f.y() + s.y() - 2 * c.y()) / (double)n; @@ -123,7 +123,7 @@ Spline::calculateSegmentSub(PointList *acc, if (y > bottomRight.y()) bottomRight.setY(y); - acc->push_back(QPoint(x, y)); + acc->push_back(TQPoint(x, y)); } } diff --git a/src/gui/general/Spline.h b/src/gui/general/Spline.h index 63946a5..292c2b3 100644 --- a/src/gui/general/Spline.h +++ b/src/gui/general/Spline.h @@ -29,7 +29,7 @@ #include "base/FastVector.h" -class QPoint; +class TQPoint; class PointList; @@ -41,27 +41,27 @@ namespace Rosegarden class Spline { public: - typedef FastVector<QPoint> PointList; + typedef FastVector<TQPoint> PointList; /** * Calculate a set of polyline points to approximate * a Bezier spline. Caller takes ownership of returned * heap-allocated container. */ - static PointList *calculate(const QPoint &start, const QPoint &finish, + static PointList *calculate(const TQPoint &start, const TQPoint &finish, const PointList &controlPoints, - QPoint &topLeft, QPoint &bottomRight); + TQPoint &topLeft, TQPoint &bottomRight); private: static void calculateSegment (PointList *acc, - const QPoint &start, const QPoint &finish, const QPoint &control, - QPoint &topLeft, QPoint &bottomRight); + const TQPoint &start, const TQPoint &finish, const TQPoint &control, + TQPoint &topLeft, TQPoint &bottomRight); static void calculateSegmentSub (PointList *acc, - const QPoint &start, const QPoint &finish, const QPoint &control, int n, - QPoint &topLeft, QPoint &bottomRight); + const TQPoint &start, const TQPoint &finish, const TQPoint &control, int n, + TQPoint &topLeft, TQPoint &bottomRight); }; diff --git a/src/gui/general/StaffLine.cpp b/src/gui/general/StaffLine.cpp index ab5d5ff..90208fe 100644 --- a/src/gui/general/StaffLine.cpp +++ b/src/gui/general/StaffLine.cpp @@ -26,14 +26,14 @@ #include "StaffLine.h" #include "misc/Debug.h" -#include <qcanvas.h> -#include <qpen.h> +#include <tqcanvas.h> +#include <tqpen.h> namespace Rosegarden { -StaffLine::StaffLine(QCanvas *c, QCanvasItemGroup *g, int height) : +StaffLine::StaffLine(TQCanvas *c, QCanvasItemGroup *g, int height) : QCanvasLineGroupable(c, g), m_height(height), m_significant(true) @@ -50,7 +50,7 @@ StaffLine::setHighlighted(bool highlighted) if (highlighted) { m_normalPen = pen(); - QPen newPen = m_normalPen; + TQPen newPen = m_normalPen; newPen.setColor(red); setPen(newPen); diff --git a/src/gui/general/StaffLine.h b/src/gui/general/StaffLine.h index 7d01ff4..00a02c4 100644 --- a/src/gui/general/StaffLine.h +++ b/src/gui/general/StaffLine.h @@ -27,11 +27,11 @@ #define _RG_STAFFLINE_H_ #include "gui/kdeext/QCanvasGroupableItem.h" -#include <qpen.h> +#include <tqpen.h> class QCanvasItemGroup; -class QCanvas; +class TQCanvas; namespace Rosegarden @@ -48,7 +48,7 @@ namespace Rosegarden class StaffLine : public QCanvasLineGroupable { public: - StaffLine(QCanvas *c, QCanvasItemGroup *g, int height); + StaffLine(TQCanvas *c, QCanvasItemGroup *g, int height); enum { NoHeight = -150 }; @@ -69,7 +69,7 @@ protected: int m_height; bool m_significant; - QPen m_normalPen; + TQPen m_normalPen; }; diff --git a/src/gui/kdeext/KLedButton.cpp b/src/gui/kdeext/KLedButton.cpp index f4e2a95..1f1a3fc 100644 --- a/src/gui/kdeext/KLedButton.cpp +++ b/src/gui/kdeext/KLedButton.cpp @@ -29,26 +29,26 @@ #include "KLedButton.h" #include <kled.h> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqwidget.h> namespace Rosegarden { -KLedButton::KLedButton(const QColor &col, QWidget *parent, const char *name) +KLedButton::KLedButton(const TQColor &col, TQWidget *parent, const char *name) : KLed( col, parent, name ) {} -KLedButton::KLedButton(const QColor& col, KLed::State st, KLed::Look look, - KLed::Shape shape, QWidget *parent, const char *name) +KLedButton::KLedButton(const TQColor& col, KLed::State st, KLed::Look look, + KLed::Shape shape, TQWidget *parent, const char *name) : KLed( col, st, look, shape, parent, name ) {} KLedButton::~KLedButton() {} -void KLedButton::mousePressEvent( QMouseEvent *e ) +void KLedButton::mousePressEvent( TQMouseEvent *e ) { if (e->button() == LeftButton) { toggle(); diff --git a/src/gui/kdeext/KLedButton.h b/src/gui/kdeext/KLedButton.h index e17ecdb..c7810af 100644 --- a/src/gui/kdeext/KLedButton.h +++ b/src/gui/kdeext/KLedButton.h @@ -32,9 +32,9 @@ #include <kled.h> -class QWidget; -class QMouseEvent; -class QColor; +class TQWidget; +class TQMouseEvent; +class TQColor; namespace Rosegarden @@ -50,16 +50,16 @@ namespace Rosegarden class KLedButton : public KLed { Q_OBJECT public: - KLedButton(const QColor &col=Qt::green, QWidget *parent=0, const char *name=0); - KLedButton(const QColor& col, KLed::State st, KLed::Look look, KLed::Shape shape, - QWidget *parent=0, const char *name=0); + KLedButton(const TQColor &col=Qt::green, TQWidget *parent=0, const char *name=0); + KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape shape, + TQWidget *parent=0, const char *name=0); ~KLedButton(); signals: void stateChanged( bool newState ); protected: - void mousePressEvent ( QMouseEvent *e ); + void mousePressEvent ( TQMouseEvent *e ); }; diff --git a/src/gui/kdeext/KStartupLogo.cpp b/src/gui/kdeext/KStartupLogo.cpp index 9a04d8f..821ebb1 100644 --- a/src/gui/kdeext/KStartupLogo.cpp +++ b/src/gui/kdeext/KStartupLogo.cpp @@ -25,8 +25,8 @@ #include <unistd.h> #include <kapplication.h> -#include <qpainter.h> -#include <qfontmetrics.h> +#include <tqpainter.h> +#include <tqfontmetrics.h> #include <kapp.h> #include <kstddirs.h> @@ -36,8 +36,8 @@ #include "KStartupLogo.h" #include "misc/Debug.h" -KStartupLogo::KStartupLogo(QWidget * parent, const char *name) - : QWidget(parent, name, +KStartupLogo::KStartupLogo(TQWidget * parent, const char *name) + : TQWidget(parent, name, WStyle_Customize | #if QT_VERSION >= 0x030100 WStyle_Splash @@ -48,13 +48,13 @@ KStartupLogo::KStartupLogo(QWidget * parent, const char *name) m_readyToHide(false), m_showTip(true) { - QString pixmapFile = locate("appdata", "pixmaps/splash.png"); + TQString pixmapFile = locate("appdata", "pixmaps/splash.png"); if (!pixmapFile) return ; m_pixmap.load(pixmapFile); setBackgroundPixmap(m_pixmap); - setGeometry(QApplication::desktop()->width() / 2 - m_pixmap.width() / 2, - QApplication::desktop()->height() / 2 - m_pixmap.height() / 2, + setGeometry(TQApplication::desktop()->width() / 2 - m_pixmap.width() / 2, + TQApplication::desktop()->height() / 2 - m_pixmap.height() / 2, m_pixmap.width(), m_pixmap.height()); } @@ -64,16 +64,16 @@ KStartupLogo::~KStartupLogo() m_instance = 0; } -void KStartupLogo::paintEvent(QPaintEvent*) +void KStartupLogo::paintEvent(TQPaintEvent*) { // Print version number - QPainter paint(this); + TQPainter paint(this); - QFont defaultFont; + TQFont defaultFont; defaultFont.setPixelSize(12); paint.setFont(defaultFont); - QFontMetrics metrics(defaultFont); + TQFontMetrics metrics(defaultFont); int width = metrics.width(m_statusMessage) + 6; if (width > 200) width = 200; @@ -81,11 +81,11 @@ void KStartupLogo::paintEvent(QPaintEvent*) int y = m_pixmap.height() - 12; // grep me: splash color - // QColor bg(49, 94, 19); // color for 2006 splash - QColor bg(19, 19, 19); // color for the 2008 splash + // TQColor bg(49, 94, 19); // color for 2006 splash + TQColor bg(19, 19, 19); // color for the 2008 splash paint.setPen(bg); paint.setBrush(bg); - paint.drawRect(QRect(m_pixmap.width() - 220, m_pixmap.height() - 43, + paint.drawRect(TQRect(m_pixmap.width() - 220, m_pixmap.height() - 43, 220, (y + 8) - (m_pixmap.height() - 43))); // paint.setPen(Qt::black); @@ -93,10 +93,10 @@ void KStartupLogo::paintEvent(QPaintEvent*) paint.setPen(Qt::white); paint.setBrush(Qt::white); - //QString version(VERSION); + //TQString version(VERSION); //int sepIdx = version.find("-"); - QString versionLabel(VERSION); - //QString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1)); + TQString versionLabel(VERSION); + //TQString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1)); int versionWidth = metrics.width(versionLabel); paint.drawText(m_pixmap.width() - versionWidth - 18, @@ -106,11 +106,11 @@ void KStartupLogo::paintEvent(QPaintEvent*) paint.drawText(m_pixmap.width() - (width + 10), y, m_statusMessage); } -void KStartupLogo::slotShowStatusMessage(QString message) +void KStartupLogo::slotShowStatusMessage(TQString message) { m_statusMessage = message; paintEvent(0); - QApplication::flushX(); + TQApplication::flushX(); } void KStartupLogo::close() @@ -123,15 +123,15 @@ void KStartupLogo::close() } } - QWidget::close(); + TQWidget::close(); } -void KStartupLogo::mousePressEvent(QMouseEvent*) +void KStartupLogo::mousePressEvent(TQMouseEvent*) { // for the haters of raising startlogos if (m_readyToHide) - hide(); // don't close, main() sets up a QTimer for that + hide(); // don't close, main() sets up a TQTimer for that } KStartupLogo* KStartupLogo::getInstance() @@ -149,7 +149,7 @@ void KStartupLogo::hideIfStillThere() { if (m_instance) m_instance->hide(); - // don't close, main() sets up a QTimer for that + // don't close, main() sets up a TQTimer for that } diff --git a/src/gui/kdeext/KStartupLogo.h b/src/gui/kdeext/KStartupLogo.h index 1af80fa..a588fe4 100644 --- a/src/gui/kdeext/KStartupLogo.h +++ b/src/gui/kdeext/KStartupLogo.h @@ -25,8 +25,8 @@ #ifndef KSTARTUPLOGO_H #define KSTARTUPLOGO_H -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> class KStartupLogo : public QWidget { @@ -41,25 +41,25 @@ public: void setShowTip(bool showTip) { m_showTip = showTip; }; public slots: - void slotShowStatusMessage(QString); + void slotShowStatusMessage(TQString); virtual void close(); protected: - KStartupLogo(QWidget *parent=0, const char *name=0); + KStartupLogo(TQWidget *parent=0, const char *name=0); ~KStartupLogo(); - virtual void paintEvent(QPaintEvent*); - virtual void mousePressEvent( QMouseEvent*); + virtual void paintEvent(TQPaintEvent*); + virtual void mousePressEvent( TQMouseEvent*); bool m_readyToHide; bool m_showTip; - QPixmap m_pixmap; + TQPixmap m_pixmap; static KStartupLogo* m_instance; static bool m_wasClosed; - QString m_statusMessage; + TQString m_statusMessage; }; #endif diff --git a/src/gui/kdeext/KTmpStatusMsg.cpp b/src/gui/kdeext/KTmpStatusMsg.cpp index 81142d2..620d7c5 100644 --- a/src/gui/kdeext/KTmpStatusMsg.cpp +++ b/src/gui/kdeext/KTmpStatusMsg.cpp @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#include <qapplication.h> -#include <qeventloop.h> +#include <tqapplication.h> +#include <tqeventloop.h> #include <kmainwindow.h> #include <kstatusbar.h> @@ -29,11 +29,11 @@ #include "KTmpStatusMsg.h" #include "gui/application/RosegardenApplication.h" -KTmpStatusMsg::KTmpStatusMsg(const QString& msg, KMainWindow* window, int id) +KTmpStatusMsg::KTmpStatusMsg(const TQString& msg, KMainWindow* window, int id) : m_mainWindow(window), m_id(id) { - m_mainWindow->statusBar()->changeItem(QString(" %1").arg(msg), m_id); + m_mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), m_id); Rosegarden::rgapp->refreshGUI(50); } @@ -45,12 +45,12 @@ KTmpStatusMsg::~KTmpStatusMsg() } -void KTmpStatusMsg::setDefaultMsg(const QString& m) +void KTmpStatusMsg::setDefaultMsg(const TQString& m) { m_defaultMsg = m; } -const QString& KTmpStatusMsg::getDefaultMsg() +const TQString& KTmpStatusMsg::getDefaultMsg() { return m_defaultMsg; } @@ -67,4 +67,4 @@ int KTmpStatusMsg::getDefaultId() int KTmpStatusMsg::m_defaultId = 1; -QString KTmpStatusMsg::m_defaultMsg = ""; +TQString KTmpStatusMsg::m_defaultMsg = ""; diff --git a/src/gui/kdeext/KTmpStatusMsg.h b/src/gui/kdeext/KTmpStatusMsg.h index 6fd512c..35e1adb 100644 --- a/src/gui/kdeext/KTmpStatusMsg.h +++ b/src/gui/kdeext/KTmpStatusMsg.h @@ -45,7 +45,7 @@ public: * of the specified KMainWindow. * The id of the text widget in the status bar can be specified */ - KTmpStatusMsg(const QString& msg, KMainWindow*, int id = m_defaultId); + KTmpStatusMsg(const TQString& msg, KMainWindow*, int id = m_defaultId); ~KTmpStatusMsg(); @@ -53,13 +53,13 @@ public: * Sets the message which will replace the temporary one in the * status bar */ - static void setDefaultMsg(const QString&); + static void setDefaultMsg(const TQString&); /** * Returns the default message which will replace the temporary * one in the status bar */ - static const QString& getDefaultMsg(); + static const TQString& getDefaultMsg(); /** * Sets the default id which will be used as the id of the text @@ -81,7 +81,7 @@ protected: int m_id; static int m_defaultId; - static QString m_defaultMsg; + static TQString m_defaultMsg; }; #endif diff --git a/src/gui/kdeext/QCanvasGroupableItem.cpp b/src/gui/kdeext/QCanvasGroupableItem.cpp index 1fc2f2d..2a31934 100644 --- a/src/gui/kdeext/QCanvasGroupableItem.cpp +++ b/src/gui/kdeext/QCanvasGroupableItem.cpp @@ -19,12 +19,12 @@ COPYING included with this distribution for more information. */ -#include <qcanvas.h> +#include <tqcanvas.h> #include "misc/Debug.h" #include "QCanvasGroupableItem.h" -QCanvasGroupableItem::QCanvasGroupableItem(QCanvasItem *i, +QCanvasGroupableItem::QCanvasGroupableItem(TQCanvasItem *i, QCanvasItemGroup *g, bool withRelativeCoords) : m_group(g), @@ -66,8 +66,8 @@ QCanvasGroupableItem::detach() ////////////////////////////////////////////////////////////////////// -QCanvasItemGroup::QCanvasItemGroup(QCanvas *c) - : QCanvasItem(c) +QCanvasItemGroup::QCanvasItemGroup(TQCanvas *c) + : TQCanvasItem(c) { // RG_DEBUG << "QCanvasItemGroup() - this : " << this << endl; } @@ -77,7 +77,7 @@ QCanvasItemGroup::~QCanvasItemGroup() // RG_DEBUG << "~QCanvasItemGroup() - this : " << this << endl; // Tell all our items that we're being destroyed - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) { QCanvasGroupableItem *t = dynamic_cast<QCanvasGroupableItem*>(*i); if (t) @@ -88,9 +88,9 @@ QCanvasItemGroup::~QCanvasItemGroup() void QCanvasItemGroup::moveBy(double dx, double dy) { - QCanvasItem::moveBy(dx, dy); // move ourselves + TQCanvasItem::moveBy(dx, dy); // move ourselves - QCanvasItemList::Iterator i; // move group items + TQCanvasItemList::Iterator i; // move group items for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->moveBy(dx, dy); } @@ -98,15 +98,15 @@ QCanvasItemGroup::moveBy(double dx, double dy) void QCanvasItemGroup::advance(int stage) { - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->advance(stage); } bool -QCanvasItemGroup::collidesWith(const QCanvasItem *item) const +QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const { - QCanvasItemList::ConstIterator i; + TQCanvasItemList::ConstIterator i; for (i = m_items.begin(); i != m_items.end(); ++i) if ((*i)->collidesWith(item)) return true; @@ -115,13 +115,13 @@ QCanvasItemGroup::collidesWith(const QCanvasItem *item) const } void -QCanvasItemGroup::draw(QPainter&) +QCanvasItemGroup::draw(TQPainter&) { // There isn't anything to do - all the items will be drawn // seperately by the canvas anyway. However the function has to be - // implemented because it's an abstract virtual in QCanvasItem. + // implemented because it's an abstract virtual in TQCanvasItem. - // QCanvasItemList::Iterator i; + // TQCanvasItemList::Iterator i; // for(i = m_items.begin(); i != m_items.end(); ++i) // (*i)->draw(p); } @@ -129,7 +129,7 @@ QCanvasItemGroup::draw(QPainter&) void QCanvasItemGroup::setVisible(bool yes) { - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->setVisible(yes); } @@ -137,9 +137,9 @@ QCanvasItemGroup::setVisible(bool yes) void QCanvasItemGroup::setSelected(bool yes) { - QCanvasItem::setSelected(yes); + TQCanvasItem::setSelected(yes); - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->setVisible(yes); } @@ -147,9 +147,9 @@ QCanvasItemGroup::setSelected(bool yes) void QCanvasItemGroup::setEnabled(bool yes) { - QCanvasItem::setEnabled(yes); + TQCanvasItem::setEnabled(yes); - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->setEnabled(yes); } @@ -157,9 +157,9 @@ QCanvasItemGroup::setEnabled(bool yes) void QCanvasItemGroup::setActive(bool yes) { - QCanvasItem::setActive(yes); + TQCanvasItem::setActive(yes); - QCanvasItemList::Iterator i; + TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) (*i)->setActive(yes); } @@ -173,9 +173,9 @@ QCanvasItemGroup::rtti() const QRect QCanvasItemGroup::boundingRect() const { - QRect r; + TQRect r; - QCanvasItemList::ConstIterator i; + TQCanvasItemList::ConstIterator i; for (i = m_items.begin(); i != m_items.end(); ++i) r.unite((*i)->boundingRect()); @@ -185,9 +185,9 @@ QCanvasItemGroup::boundingRect() const QRect QCanvasItemGroup::boundingRectAdvanced() const { - QRect r; + TQRect r; - QCanvasItemList::ConstIterator i; + TQCanvasItemList::ConstIterator i; for (i = m_items.begin(); i != m_items.end(); ++i) r.unite((*i)->boundingRectAdvanced()); @@ -195,11 +195,11 @@ QCanvasItemGroup::boundingRectAdvanced() const } bool -QCanvasItemGroup::collidesWith(const QCanvasSprite *s, - const QCanvasPolygonalItem *p, - const QCanvasRectangle *r, - const QCanvasEllipse *e, - const QCanvasText *t) const +QCanvasItemGroup::collidesWith(const TQCanvasSprite *s, + const TQCanvasPolygonalItem *p, + const TQCanvasRectangle *r, + const TQCanvasEllipse *e, + const TQCanvasText *t) const { if (s) return collidesWith(s); @@ -217,20 +217,20 @@ QCanvasItemGroup::collidesWith(const QCanvasSprite *s, } void -QCanvasItemGroup::addItem(QCanvasItem *i) +QCanvasItemGroup::addItem(TQCanvasItem *i) { m_items.append(i); } void -QCanvasItemGroup::addItemWithRelativeCoords(QCanvasItem *i) +QCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i) { i->moveBy(x(), y()); addItem(i); } void -QCanvasItemGroup::removeItem(QCanvasItem *i) +QCanvasItemGroup::removeItem(TQCanvasItem *i) { // RG_DEBUG << "QCanvasItemGroup::removeItem() - this : " // << this << " - item : " << i << endl; @@ -240,40 +240,40 @@ QCanvasItemGroup::removeItem(QCanvasItem *i) ////////////////////////////////////////////////////////////////////// -QCanvasLineGroupable::QCanvasLineGroupable(QCanvas *c, +QCanvasLineGroupable::QCanvasLineGroupable(TQCanvas *c, QCanvasItemGroup *g) - : QCanvasLine(c), + : TQCanvasLine(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasRectangleGroupable::QCanvasRectangleGroupable(QCanvas *c, +QCanvasRectangleGroupable::QCanvasRectangleGroupable(TQCanvas *c, QCanvasItemGroup *g) - : QCanvasRectangle(c), + : TQCanvasRectangle(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasTextGroupable::QCanvasTextGroupable(const QString& label, - QCanvas *c, +QCanvasTextGroupable::QCanvasTextGroupable(const TQString& label, + TQCanvas *c, QCanvasItemGroup *g) - : QCanvasText(label, c), + : TQCanvasText(label, c), QCanvasGroupableItem(this, g) {} -QCanvasTextGroupable::QCanvasTextGroupable(QCanvas *c, +QCanvasTextGroupable::QCanvasTextGroupable(TQCanvas *c, QCanvasItemGroup *g) - : QCanvasText(c), + : TQCanvasText(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasSpriteGroupable::QCanvasSpriteGroupable(QCanvasPixmapArray *pa, - QCanvas *c, +QCanvasSpriteGroupable::QCanvasSpriteGroupable(TQCanvasPixmapArray *pa, + TQCanvas *c, QCanvasItemGroup *g) - : QCanvasSprite(pa, c), + : TQCanvasSprite(pa, c), QCanvasGroupableItem(this, g) {} diff --git a/src/gui/kdeext/QCanvasGroupableItem.h b/src/gui/kdeext/QCanvasGroupableItem.h index 97d1917..1e54604 100644 --- a/src/gui/kdeext/QCanvasGroupableItem.h +++ b/src/gui/kdeext/QCanvasGroupableItem.h @@ -22,12 +22,12 @@ #ifndef QCANVASGROUPABLEITEM_H #define QCANVASGROUPABLEITEM_H -#include <qcanvas.h> +#include <tqcanvas.h> class QCanvasItemGroup; /** - * This class is meant to be inherited by QCanvasItem children to make + * This class is meant to be inherited by TQCanvasItem children to make * them groupable. * * On destruction, the item will remove itself from the group it's @@ -50,7 +50,7 @@ public: * * @see QCanvasItemGroup#addItemWithRelativeCoords() */ - QCanvasGroupableItem(QCanvasItem*, QCanvasItemGroup*, + QCanvasGroupableItem(TQCanvasItem*, QCanvasItemGroup*, bool withRelativeCoords = false); virtual ~QCanvasGroupableItem(); @@ -61,8 +61,8 @@ public: /// Returns the QCanvasItemGroup this groupable item belongs to const QCanvasItemGroup* group() const { return m_group; } - /// Returns the QCanvasItem which this groupable item wraps - QCanvasItem *item() { return m_item; } + /// Returns the TQCanvasItem which this groupable item wraps + TQCanvasItem *item() { return m_item; } /** * Same as moveBy(), except that the move is done relative to the @@ -83,40 +83,40 @@ private: //--------------- Data members --------------------------------- QCanvasItemGroup* m_group; - QCanvasItem* m_item; + TQCanvasItem* m_item; }; /** - * This class implements QCanvasItem groups + * This class implements TQCanvasItem groups * * An item group will keep its items in a fixed relative position when * moved, just like in a drawing program where you can "bind" several * items together so that they'll behave as a single item. * - * Proper behavior requires collaboration from the QCanvasView, - * though. When about to move an item, the QCanvasView object should + * Proper behavior requires collaboration from the TQCanvasView, + * though. When about to move an item, the TQCanvasView object should * first check if it's not a groupable item, and if so fetch its * QCanvasItemGroup and move it instead. */ class QCanvasItemGroup : public QCanvasItem { public: - QCanvasItemGroup(QCanvas *); + QCanvasItemGroup(TQCanvas *); virtual ~QCanvasItemGroup(); virtual void moveBy(double dx, double dy); virtual void advance(int stage); - virtual bool collidesWith(const QCanvasItem*) const; - virtual void draw(QPainter&); + virtual bool collidesWith(const TQCanvasItem*) const; + virtual void draw(TQPainter&); virtual void setVisible(bool yes); virtual void setSelected(bool yes); virtual void setEnabled(bool yes); virtual void setActive(bool yes); virtual int rtti() const; - virtual QRect boundingRect() const; - virtual QRect boundingRectAdvanced() const; + virtual TQRect boundingRect() const; + virtual TQRect boundingRectAdvanced() const; /** * Add a new item to this group. @@ -125,7 +125,7 @@ public: * * @see addItemWithRelativeCoords() */ - virtual void addItem(QCanvasItem *); + virtual void addItem(TQCanvasItem *); /** * Add a new item to this group. @@ -138,63 +138,63 @@ public: * * @see addItem() */ - virtual void addItemWithRelativeCoords(QCanvasItem *); + virtual void addItemWithRelativeCoords(TQCanvasItem *); /** * Remove the specified item from the group */ - virtual void removeItem(QCanvasItem*); + virtual void removeItem(TQCanvasItem*); private: - virtual bool collidesWith(const QCanvasSprite*, - const QCanvasPolygonalItem*, - const QCanvasRectangle*, - const QCanvasEllipse*, - const QCanvasText* ) const; + virtual bool collidesWith(const TQCanvasSprite*, + const TQCanvasPolygonalItem*, + const TQCanvasRectangle*, + const TQCanvasEllipse*, + const TQCanvasText* ) const; protected: //--------------- Data members --------------------------------- - QCanvasItemList m_items; + TQCanvasItemList m_items; }; /** - * A QCanvasLine which can be put in a QCanvasGroup + * A TQCanvasLine which can be put in a QCanvasGroup */ -class QCanvasLineGroupable : public QCanvasLine, public QCanvasGroupableItem +class QCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem { public: - QCanvasLineGroupable(QCanvas *c, QCanvasItemGroup *g); + QCanvasLineGroupable(TQCanvas *c, QCanvasItemGroup *g); }; /** - * A QCanvasRectangle which can be put in a QCanvasGroup + * A TQCanvasRectangle which can be put in a QCanvasGroup */ -class QCanvasRectangleGroupable : public QCanvasRectangle, public QCanvasGroupableItem +class QCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem { public: - QCanvasRectangleGroupable(QCanvas *c, QCanvasItemGroup *g); + QCanvasRectangleGroupable(TQCanvas *c, QCanvasItemGroup *g); }; /** - * A QCanvasText which can be put in a QCanvasGroup + * A TQCanvasText which can be put in a QCanvasGroup */ -class QCanvasTextGroupable : public QCanvasText, public QCanvasGroupableItem +class QCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem { public: - QCanvasTextGroupable(QCanvas *c, QCanvasItemGroup *g); - QCanvasTextGroupable(const QString&, QCanvas *c, QCanvasItemGroup *g); + QCanvasTextGroupable(TQCanvas *c, QCanvasItemGroup *g); + QCanvasTextGroupable(const TQString&, TQCanvas *c, QCanvasItemGroup *g); }; /** - * A QCanvasSprite that can be put in a QCanvasGroup + * A TQCanvasSprite that can be put in a QCanvasGroup */ -class QCanvasSpriteGroupable : public QCanvasSprite, public QCanvasGroupableItem +class QCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem { public: - QCanvasSpriteGroupable(QCanvasPixmapArray*, - QCanvas*, + QCanvasSpriteGroupable(TQCanvasPixmapArray*, + TQCanvas*, QCanvasItemGroup*); }; diff --git a/src/gui/kdeext/QCanvasSimpleSprite.cpp b/src/gui/kdeext/QCanvasSimpleSprite.cpp index 537cc62..2b03c87 100644 --- a/src/gui/kdeext/QCanvasSimpleSprite.cpp +++ b/src/gui/kdeext/QCanvasSimpleSprite.cpp @@ -22,42 +22,42 @@ #include <vector> #include "misc/Debug.h" -#include <qpainter.h> +#include <tqpainter.h> #include "QCanvasSimpleSprite.h" namespace Rosegarden { -QCanvasSimpleSprite::QCanvasSimpleSprite(QPixmap *pixmap, QCanvas *canvas) - : QCanvasSprite(0, canvas), +QCanvasSimpleSprite::QCanvasSimpleSprite(TQPixmap *pixmap, TQCanvas *canvas) + : TQCanvasSprite(0, canvas), m_pixmapArray(0) { m_pixmapArray = makePixmapArray(pixmap); setSequence(m_pixmapArray); } -QCanvasSimpleSprite::QCanvasSimpleSprite(QCanvasPixmap *pixmap, QCanvas *canvas) - : QCanvasSprite(0, canvas), +QCanvasSimpleSprite::QCanvasSimpleSprite(TQCanvasPixmap *pixmap, TQCanvas *canvas) + : TQCanvasSprite(0, canvas), m_pixmapArray(0) { m_pixmapArray = makePixmapArray(pixmap); setSequence(m_pixmapArray); } -QCanvasSimpleSprite::QCanvasSimpleSprite(const QString &pixmapfile, - QCanvas *canvas) - : QCanvasSprite(0, canvas), +QCanvasSimpleSprite::QCanvasSimpleSprite(const TQString &pixmapfile, + TQCanvas *canvas) + : TQCanvasSprite(0, canvas), m_pixmapArray(0) { m_pixmapArray = makePixmapArray(pixmapfile); setSequence(m_pixmapArray); } -QCanvasSimpleSprite::QCanvasSimpleSprite(QCanvas *canvas) - : QCanvasSprite(0, canvas), +QCanvasSimpleSprite::QCanvasSimpleSprite(TQCanvas *canvas) + : TQCanvasSprite(0, canvas), m_pixmapArray(0) { - QCanvasPixmapArray* tmpArray = makePixmapArray(new QPixmap()); + TQCanvasPixmapArray* tmpArray = makePixmapArray(new TQPixmap()); setSequence(tmpArray); } @@ -69,66 +69,66 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite() // We can't delete m_pixmapArray or we get a core dump. // - // The reason I think is that after the QCanvasSprite is deleted, - // it is removed from the QCanvas, which therefore needs the + // The reason I think is that after the TQCanvasSprite is deleted, + // it is removed from the TQCanvas, which therefore needs the // pixmaps to know how to update itself (the crash is in - // QCanvas::removeChunks(), usually). + // TQCanvas::removeChunks(), usually). // // So instead we have to do this GCish // thingy. PixmapArrayGC::deleteAll() is called by // NotationView::redoLayout } -QCanvasPixmapArray* -QCanvasSimpleSprite::makePixmapArray(QPixmap *pixmap) +TQCanvasPixmapArray* +QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap) { - QList<QPixmap> pixlist; - pixlist.setAutoDelete(true); // the QCanvasPixmapArray creates its + QList<TQPixmap> pixlist; + pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its // own copies of the pixmaps, so we // can delete the one we're passed pixlist.append(pixmap); - QList<QPoint> spotlist; + QList<TQPoint> spotlist; spotlist.setAutoDelete(true); - spotlist.append(new QPoint(0, 0)); + spotlist.append(new TQPoint(0, 0)); - return new QCanvasPixmapArray(pixlist, spotlist); + return new TQCanvasPixmapArray(pixlist, spotlist); } -QCanvasPixmapArray* -QCanvasSimpleSprite::makePixmapArray(QCanvasPixmap *pixmap) +TQCanvasPixmapArray* +QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap) { - QList<QPixmap> pixlist; - pixlist.setAutoDelete(true); // the QCanvasPixmapArray creates its + QList<TQPixmap> pixlist; + pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its // own copies of the pixmaps, so we // can delete the one we're passed pixlist.append(pixmap); - QList<QPoint> spotlist; + QList<TQPoint> spotlist; spotlist.setAutoDelete(true); - spotlist.append(new QPoint(pixmap->offsetX(), pixmap->offsetY())); + spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY())); - return new QCanvasPixmapArray(pixlist, spotlist); + return new TQCanvasPixmapArray(pixlist, spotlist); } -QCanvasPixmapArray* -QCanvasSimpleSprite::makePixmapArray(const QString &pixmapfile) +TQCanvasPixmapArray* +QCanvasSimpleSprite::makePixmapArray(const TQString &pixmapfile) { - return new QCanvasPixmapArray(pixmapfile); + return new TQCanvasPixmapArray(pixmapfile); } ////////////////////////////////////////////////////////////////////// QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n, - QPixmap* pixmap, - QCanvas* canvas) + TQPixmap* pixmap, + TQCanvas* canvas) : QCanvasSimpleSprite(pixmap, canvas), m_notationElement(n) {} QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n, - QCanvasPixmap* pixmap, - QCanvas* canvas) + TQCanvasPixmap* pixmap, + TQCanvas* canvas) : QCanvasSimpleSprite(pixmap, canvas), m_notationElement(n) @@ -138,13 +138,13 @@ QCanvasNotationSprite::~QCanvasNotationSprite() {} -QCanvasNonElementSprite::QCanvasNonElementSprite(QPixmap *pixmap, - QCanvas *canvas) : +QCanvasNonElementSprite::QCanvasNonElementSprite(TQPixmap *pixmap, + TQCanvas *canvas) : QCanvasSimpleSprite(pixmap, canvas) {} -QCanvasNonElementSprite::QCanvasNonElementSprite(QCanvasPixmap *pixmap, - QCanvas *canvas) : +QCanvasNonElementSprite::QCanvasNonElementSprite(TQCanvasPixmap *pixmap, + TQCanvas *canvas) : QCanvasSimpleSprite(pixmap, canvas) {} @@ -152,15 +152,15 @@ QCanvasNonElementSprite::~QCanvasNonElementSprite() {} QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX, - QPixmap *pixmap, - QCanvas *canvas) : + TQPixmap *pixmap, + TQCanvas *canvas) : QCanvasNonElementSprite(pixmap, canvas), m_layoutX(layoutX) {} QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX, - QCanvasPixmap *pixmap, - QCanvas *canvas) : + TQCanvasPixmap *pixmap, + TQCanvas *canvas) : QCanvasNonElementSprite(pixmap, canvas), m_layoutX(layoutX) {} @@ -169,13 +169,13 @@ QCanvasTimeSigSprite::~QCanvasTimeSigSprite() {} -QCanvasStaffNameSprite::QCanvasStaffNameSprite(QPixmap *pixmap, - QCanvas *canvas) : +QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQPixmap *pixmap, + TQCanvas *canvas) : QCanvasNonElementSprite(pixmap, canvas) {} -QCanvasStaffNameSprite::QCanvasStaffNameSprite(QCanvasPixmap *pixmap, - QCanvas *canvas) : +QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQCanvasPixmap *pixmap, + TQCanvas *canvas) : QCanvasNonElementSprite(pixmap, canvas) {} @@ -185,7 +185,7 @@ QCanvasStaffNameSprite::~QCanvasStaffNameSprite() ////////////////////////////////////////////////////////////////////// -void PixmapArrayGC::registerForDeletion(QCanvasPixmapArray* array) +void PixmapArrayGC::registerForDeletion(TQCanvasPixmapArray* array) { m_pixmapArrays.push_back(array); } @@ -198,8 +198,8 @@ void PixmapArrayGC::deleteAll() static unsigned long total = 0; for (unsigned int i = 0; i < m_pixmapArrays.size(); ++i) { - QCanvasPixmapArray *array = m_pixmapArrays[i]; - QPixmap *pixmap = array->image(0); + TQCanvasPixmapArray *array = m_pixmapArrays[i]; + TQPixmap *pixmap = array->image(0); if (pixmap) { total += pixmap->width() * pixmap->height(); // NOTATION_DEBUG << "PixmapArrayGC::deleteAll(): " << pixmap->width() << "x" << pixmap->height() << " (" << (pixmap->width()*pixmap->height()) << " px, " << total << " total)" << endl; @@ -210,7 +210,7 @@ void PixmapArrayGC::deleteAll() m_pixmapArrays.clear(); } -std::vector<QCanvasPixmapArray*> PixmapArrayGC::m_pixmapArrays; +std::vector<TQCanvasPixmapArray*> PixmapArrayGC::m_pixmapArrays; } diff --git a/src/gui/kdeext/QCanvasSimpleSprite.h b/src/gui/kdeext/QCanvasSimpleSprite.h index 15a02f9..7613b64 100644 --- a/src/gui/kdeext/QCanvasSimpleSprite.h +++ b/src/gui/kdeext/QCanvasSimpleSprite.h @@ -22,50 +22,50 @@ #ifndef QCANVASSIMPLESPRITE_H #define QCANVASSIMPLESPRITE_H -#include <qwmatrix.h> -#include <qcanvas.h> +#include <tqwmatrix.h> +#include <tqcanvas.h> #include "gui/editors/notation/NotePixmapFactory.h" namespace Rosegarden { /** - * A QCanvasSprite with 1 frame only + * A TQCanvasSprite with 1 frame only */ class QCanvasSimpleSprite : public QCanvasSprite { public: - QCanvasSimpleSprite(QPixmap*, QCanvas*); - QCanvasSimpleSprite(QCanvasPixmap*, QCanvas*); - QCanvasSimpleSprite(const QString &pixmapfile, QCanvas*); + QCanvasSimpleSprite(TQPixmap*, TQCanvas*); + QCanvasSimpleSprite(TQCanvasPixmap*, TQCanvas*); + QCanvasSimpleSprite(const TQString &pixmapfile, TQCanvas*); // For lazy pixmap rendering, when we get around looking at it - QCanvasSimpleSprite(QCanvas*); + QCanvasSimpleSprite(TQCanvas*); virtual ~QCanvasSimpleSprite(); protected: - static QCanvasPixmapArray* makePixmapArray(QPixmap *pixmap); + static TQCanvasPixmapArray* makePixmapArray(TQPixmap *pixmap); - static QCanvasPixmapArray* makePixmapArray(QCanvasPixmap *pixmap); + static TQCanvasPixmapArray* makePixmapArray(TQCanvasPixmap *pixmap); - static QCanvasPixmapArray* makePixmapArray(const QString &pixmapfile); + static TQCanvasPixmapArray* makePixmapArray(const TQString &pixmapfile); //--------------- Data members --------------------------------- - QCanvasPixmapArray* m_pixmapArray; + TQCanvasPixmapArray* m_pixmapArray; }; class NotationElement; /** - * A QCanvasSprite referencing a NotationElement + * A TQCanvasSprite referencing a NotationElement */ class QCanvasNotationSprite : public QCanvasSimpleSprite { public: - QCanvasNotationSprite(Rosegarden::NotationElement&, QPixmap*, QCanvas*); - QCanvasNotationSprite(Rosegarden::NotationElement&, QCanvasPixmap*, QCanvas*); + QCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*); + QCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*); virtual ~QCanvasNotationSprite(); @@ -80,19 +80,19 @@ protected: class QCanvasNonElementSprite : public QCanvasSimpleSprite { public: - QCanvasNonElementSprite(QPixmap *, QCanvas *); - QCanvasNonElementSprite(QCanvasPixmap *, QCanvas *); + QCanvasNonElementSprite(TQPixmap *, TQCanvas *); + QCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *); virtual ~QCanvasNonElementSprite(); }; /** - * A QCanvasSprite used for a time signature + * A TQCanvasSprite used for a time signature */ class QCanvasTimeSigSprite : public QCanvasNonElementSprite { public: - QCanvasTimeSigSprite(double layoutX, QPixmap *, QCanvas *); - QCanvasTimeSigSprite(double layoutX, QCanvasPixmap *, QCanvas *); + QCanvasTimeSigSprite(double layoutX, TQPixmap *, TQCanvas *); + QCanvasTimeSigSprite(double layoutX, TQCanvasPixmap *, TQCanvas *); virtual ~QCanvasTimeSigSprite(); void setLayoutX(double layoutX) { m_layoutX = layoutX; } @@ -103,29 +103,29 @@ protected: }; /** - * A QCanvasSprite used for a staff name + * A TQCanvasSprite used for a staff name */ class QCanvasStaffNameSprite : public QCanvasNonElementSprite { public: - QCanvasStaffNameSprite(QPixmap *, QCanvas *); - QCanvasStaffNameSprite(QCanvasPixmap *, QCanvas *); + QCanvasStaffNameSprite(TQPixmap *, TQCanvas *); + QCanvasStaffNameSprite(TQCanvasPixmap *, TQCanvas *); virtual ~QCanvasStaffNameSprite(); }; /** - * A GC for QCanvasPixmapArray which have to be deleted seperatly + * A GC for TQCanvasPixmapArray which have to be deleted seperatly */ class PixmapArrayGC { public: - static void registerForDeletion(QCanvasPixmapArray*); + static void registerForDeletion(TQCanvasPixmapArray*); static void deleteAll(); protected: //--------------- Data members --------------------------------- - static std::vector<QCanvasPixmapArray*> m_pixmapArrays; + static std::vector<TQCanvasPixmapArray*> m_pixmapArrays; }; } diff --git a/src/gui/kdeext/RGLed.cpp b/src/gui/kdeext/RGLed.cpp index 54b91b2..c5e5934 100644 --- a/src/gui/kdeext/RGLed.cpp +++ b/src/gui/kdeext/RGLed.cpp @@ -52,7 +52,7 @@ * kapp-- * * Revision 1.21 2002/01/22 10:23:55 hausmann - * - minor API fix (don't return a const QColor object) + * - minor API fix (don't return a const TQColor object) * * Revision 1.20 2001/10/10 17:40:39 mueller * CVS_SILENT: fixincludes @@ -131,14 +131,14 @@ #undef PAINT_BENCH #ifdef PAINT_BENCH -#include <qdatetime.h> +#include <tqdatetime.h> #include <stdio.h> #endif -#include <qpainter.h> -#include <qimage.h> -#include <qcolor.h> +#include <tqpainter.h> +#include <tqimage.h> +#include <tqcolor.h> #include <kapplication.h> #include <kpixmapeffect.h> #include "kled.h" @@ -149,20 +149,20 @@ class KLed::KLedPrivate friend class KLed; int dark_factor; - QColor offcolor; - QPixmap *off_map; - QPixmap *on_map; + TQColor offcolor; + TQPixmap *off_map; + TQPixmap *on_map; }; -KLed::KLed(QWidget *parent, const char *name) - : QWidget( parent, name), +KLed::KLed(TQWidget *parent, const char *name) + : TQWidget( parent, name), led_state(On), led_look(Raised), led_shape(Circular) { - QColor col(green); + TQColor col(green); d = new KLed::KLedPrivate; d->dark_factor = 300; d->offcolor = col.dark(300); @@ -173,8 +173,8 @@ KLed::KLed(QWidget *parent, const char *name) } -KLed::KLed(const QColor& col, QWidget *parent, const char *name) - : QWidget( parent, name), +KLed::KLed(const TQColor& col, TQWidget *parent, const char *name) + : TQWidget( parent, name), led_state(On), led_look(Raised), led_shape(Circular) @@ -189,9 +189,9 @@ KLed::KLed(const QColor& col, QWidget *parent, const char *name) //setShape(Circular); } -KLed::KLed(const QColor& col, KLed::State state, - KLed::Look look, KLed::Shape shape, QWidget *parent, const char *name ) - : QWidget(parent, name), +KLed::KLed(const TQColor& col, KLed::State state, + KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name ) + : TQWidget(parent, name), led_state(state), led_look(look), led_shape(shape) @@ -215,11 +215,11 @@ KLed::~KLed() } void -KLed::paintEvent(QPaintEvent *) +KLed::paintEvent(TQPaintEvent *) { #ifdef PAINT_BENCH const int rounds = 1000; - QTime t; + TQTime t; t.start(); for (int i = 0; i < rounds; i++) { #endif @@ -269,10 +269,10 @@ KLed::paintEvent(QPaintEvent *) void KLed::paintFlat() // paint a ROUND FLAT led lamp { - QPainter paint; - QColor color; - QBrush brush; - QPen pen; + TQPainter paint; + TQColor color; + TQBrush brush; + TQPen pen; // Initialize coordinates, width, and height of the LED // @@ -294,7 +294,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn with a thin grey "border" (pen) - brush.setStyle( QBrush::SolidPattern ); + brush.setStyle( TQBrush::SolidPattern ); brush.setColor( color ); pen.setWidth( 1 ); @@ -315,10 +315,10 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp void KLed::paintRound() // paint a ROUND RAISED led lamp { - QPainter paint; - QColor color; - QBrush brush; - QPen pen; + TQPainter paint; + TQColor color; + TQBrush brush; + TQPen pen; // Initialize coordinates, width, and height of the LED int width = this->width(); @@ -339,7 +339,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( QBrush::SolidPattern ); + brush.setStyle( TQBrush::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -389,7 +389,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing - brush.setStyle( QBrush::NoBrush ); // Switch off the brush + brush.setStyle( TQBrush::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse paint.drawEllipse( 1, 1, width, width ); @@ -402,10 +402,10 @@ KLed::paintRound() // paint a ROUND RAISED led lamp void KLed::paintSunken() // paint a ROUND SUNKEN led lamp { - QPainter paint; - QColor color; - QBrush brush; - QPen pen; + TQPainter paint; + TQColor color; + TQBrush brush; + TQPen pen; // First of all we want to know what area should be updated // Initialize coordinates, width, and height of the LED @@ -421,7 +421,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // maybe we could stop HERE, if width <=0 ? int scale = 1; - QPixmap *tmpMap = 0; + TQPixmap *tmpMap = 0; bool smooth = true; if (smooth) @@ -445,7 +445,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp scale = 3; width *= scale; - tmpMap = new QPixmap(width, width); + tmpMap = new TQPixmap(width, width); tmpMap->fill(paletteBackgroundColor()); paint.begin(tmpMap); @@ -459,7 +459,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( QBrush::SolidPattern ); + brush.setStyle( TQBrush::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -506,7 +506,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // from the upper left. pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs? - brush.setStyle( QBrush::NoBrush ); // Switch off the brush + brush.setStyle( TQBrush::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse // Set the initial color value to colorGroup().light() (bright) and start @@ -531,12 +531,12 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp if (smooth) { - QPixmap *&dest = led_state ? d->on_map : d->off_map; - QImage i = tmpMap->convertToImage(); + TQPixmap *&dest = led_state ? d->on_map : d->off_map; + TQImage i = tmpMap->convertToImage(); width /= 3; i = i.smoothScale(width, width); delete tmpMap; - dest = new QPixmap(i); + dest = new TQPixmap(i); paint.begin(this); paint.drawPixmap(0, 0, *dest); paint.end(); @@ -546,10 +546,10 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp void KLed::paintRect() { - QPainter painter(this); - QBrush lightBrush(led_color); - QBrush darkBrush(d->offcolor); - QPen pen(led_color.dark(300)); + TQPainter painter(this); + TQBrush lightBrush(led_color); + TQBrush darkBrush(d->offcolor); + TQPen pen(led_color.dark(300)); int w = width(); int h = height(); // ----- @@ -577,13 +577,13 @@ KLed::paintRect() void KLed::paintRectFrame(bool raised) { - QPainter painter(this); - QBrush lightBrush(led_color); - QBrush darkBrush(d->offcolor); + TQPainter painter(this); + TQBrush lightBrush(led_color); + TQBrush darkBrush(d->offcolor); int w = width(); int h = height(); - QColor black = Qt::black; - QColor white = Qt::white; + TQColor black = Qt::black; + TQColor white = Qt::white; // ----- if (raised) { painter.setPen(white); @@ -656,7 +656,7 @@ KLed::setShape(KLed::Shape s) } void -KLed::setColor(const QColor& col) +KLed::setColor(const TQColor& col) { if (led_color != col) { led_color = col; @@ -715,13 +715,13 @@ KLed::off() QSize KLed::sizeHint() const { - return QSize(16, 16); + return TQSize(16, 16); } QSize KLed::minimumSizeHint() const { - return QSize(16, 16 ); + return TQSize(16, 16 ); } void KLed::virtual_hook( int, void* ) diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp index 3e5b986..7263370 100644 --- a/src/gui/kdeext/klearlook.cpp +++ b/src/gui/kdeext/klearlook.cpp @@ -36,47 +36,47 @@ DEALINGS IN THE SOFTWARE. */ #include <kdeversion.h> -#include <qmenubar.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qdrawutil.h> -#include <qscrollbar.h> -#include <qtabbar.h> -#include <qtabwidget.h> -#include <qguardedptr.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistview.h> -#include <qbitmap.h> -#include <qcleanuphandler.h> -#include <qimage.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qslider.h> -#include <qstylefactory.h> -#include <qcleanuphandler.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtoolbutton.h> -#include <qtoolbar.h> -#include <qprogressbar.h> -#include <qcursor.h> -#include <qheader.h> -#include <qwidgetstack.h> -#include <qsplitter.h> +#include <tqmenubar.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqdrawutil.h> +#include <tqscrollbar.h> +#include <tqtabbar.h> +#include <tqtabwidget.h> +#include <tqguardedptr.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistview.h> +#include <tqbitmap.h> +#include <tqcleanuphandler.h> +#include <tqimage.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqslider.h> +#include <tqstylefactory.h> +#include <tqcleanuphandler.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtoolbutton.h> +#include <tqtoolbar.h> +#include <tqprogressbar.h> +#include <tqcursor.h> +#include <tqheader.h> +#include <tqwidgetstack.h> +#include <tqsplitter.h> #include <math.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include "klearlook.h" -#include <qsettings.h> +#include <tqsettings.h> #if KDE_VERSION >= 0x30200 -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #endif // Uncomment the following to enable gradients in toolbars and menubars @@ -105,29 +105,29 @@ static const int rightBorder = 12; #if KDE_VERSION >= 0x30200 // Try to read $KDEHOME/share/config/kickerrc to find out if kicker is transparent... -static QString readEnvPath( const char *env ) { - QCString path = getenv( env ); +static TQString readEnvPath( const char *env ) { + TQCString path = getenv( env ); return path.isEmpty() - ? QString::null - : QFile::decodeName( path ); + ? TQString::null + : TQFile::decodeName( path ); } static bool kickerIsTrans() { - QString kdeHome( readEnvPath( getuid() ? "KDEHOME" : "KDEROOTHOME" ) ), + TQString kdeHome( readEnvPath( getuid() ? "KDEHOME" : "KDEROOTHOME" ) ), cfgFileName; bool trans = false; if ( kdeHome.isEmpty() ) - cfgFileName = QDir::homeDirPath() + "/.kde/share/config/kickerrc"; + cfgFileName = TQDir::homeDirPath() + "/.kde/share/config/kickerrc"; else - cfgFileName = QString( kdeHome ) + "/share/config/kickerrc"; + cfgFileName = TQString( kdeHome ) + "/share/config/kickerrc"; - QFile cfgFile( cfgFileName ); + TQFile cfgFile( cfgFileName ); if ( cfgFile.open( IO_ReadOnly ) ) { - QTextStream stream( &cfgFile ); - QString line; + TQTextStream stream( &cfgFile ); + TQString line; bool stop = false, inGen = false; @@ -140,7 +140,7 @@ static bool kickerIsTrans() { if ( -1 != line.find( "true" ) ) trans = true; stop = true; - } else if ( line[ 0 ] == QChar( '[' ) ) // Then wasn't in General section... + } else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section... stop = true; } else if ( 0 == line.find( "[General]" ) ) inGen = true; @@ -160,27 +160,27 @@ inline int limit( double c ) { : ( int ) c; } -inline QColor midColor( const QColor &a, const QColor &b, double factor = 1.0 ) { - return QColor( ( a.red() + limit( b.red() * factor ) ) >> 1, +inline TQColor midColor( const TQColor &a, const TQColor &b, double factor = 1.0 ) { + return TQColor( ( a.red() + limit( b.red() * factor ) ) >> 1, ( a.green() + limit( b.green() * factor ) ) >> 1, ( a.blue() + limit( b.blue() * factor ) ) >> 1 ); } // Copied from Keramik... -static bool isFormWidget( const QWidget *widget ) { +static bool isFormWidget( const TQWidget *widget ) { //Form widgets are in the KHTMLView, but that has 2 further inner levels //of widgets - QClipperWidget, and outside of that, QViewportWidget - QWidget * potentialClipPort = widget->parentWidget(); + TQWidget * potentialClipPort = widget->parentWidget(); if ( !potentialClipPort || potentialClipPort->isTopLevel() ) return false; - QWidget *potentialViewPort = potentialClipPort->parentWidget(); + TQWidget *potentialViewPort = potentialClipPort->parentWidget(); if ( !potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp( potentialViewPort->name(), "qt_viewport" ) ) return false; - QWidget *potentialKHTML = potentialViewPort->parentWidget(); + TQWidget *potentialKHTML = potentialViewPort->parentWidget(); if ( !potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp( potentialKHTML->className(), "KHTMLView" ) ) return false; @@ -337,7 +337,7 @@ static bool equal( double d1, double d2 ) { return ( fabs( d1 - d2 ) < 0.0001 ); } -static void shade( const QColor &a, QColor *b, float k ) { +static void shade( const TQColor &a, TQColor *b, float k ) { if ( equal( k, 1.0 ) ) * b = a; @@ -366,7 +366,7 @@ static void shade( const QColor &a, QColor *b, float k ) { } } -static void shadeGradient( const QColor &base, QColor *vals ) { +static void shadeGradient( const TQColor &base, TQColor *vals ) { vals[ KlearlookStyle::GRADIENT_BASE ] = base; shade( vals[ KlearlookStyle::GRADIENT_BASE ], @@ -381,7 +381,7 @@ static void shadeGradient( const QColor &base, QColor *vals ) { &( vals[ KlearlookStyle::GRADIENT_DARK ] ), SHADE_GRADIENT_DARK ); } -static void drawLines( QPainter *p, const QRect &r, bool horiz, int nLines, int offset, const QColor *cols, +static void drawLines( TQPainter *p, const TQRect &r, bool horiz, int nLines, int offset, const TQColor *cols, int startOffset, bool etched, bool lightGradient ) { int space = ( nLines * 2 ) + ( nLines - 1 ), x = horiz ? r.x() : r.x() + ( ( r.width() - space ) >> 1 ), @@ -416,16 +416,16 @@ static void drawLines( QPainter *p, const QRect &r, bool horiz, int nLines, int } } -inline QColor getFill( QStyle::SFlags flags, const QColor *use ) { - return !( flags & QStyle::Style_Enabled ) +inline TQColor getFill( TQStyle::SFlags flags, const TQColor *use ) { + return !( flags & TQStyle::Style_Enabled ) ? use[ 1 ] - : flags & QStyle::Style_Down + : flags & TQStyle::Style_Down ? use[ 3 ] - : flags & QStyle::Style_MouseOver - ? flags & ( QStyle::Style_On | QStyle::Style_Sunken ) + : flags & TQStyle::Style_MouseOver + ? flags & ( TQStyle::Style_On | TQStyle::Style_Sunken ) ? use[ 3 ].light( QTC_HIGHLIGHT_FACTOR ) : use[ NUM_SHADES ].light( QTC_HIGHLIGHT_FACTOR ) - : flags & ( QStyle::Style_On | QStyle::Style_Sunken ) + : flags & ( TQStyle::Style_On | TQStyle::Style_Sunken ) ? use[ 3 ] : use[ NUM_SHADES ]; } @@ -453,7 +453,7 @@ oldCursor( -1, -1 ), formMode( false ), hoverWidget( NULL ), hoverSect( QTC_NO_SECT ) { - QSettings s; + TQSettings s; contrast = s.readNumEntry( "/Qt/KDE/contrast", 7 ); if ( contrast < 0 || contrast > 10 ) @@ -466,24 +466,24 @@ hoverSect( QTC_NO_SECT ) { darkMenubar = s.readBoolEntry( "/klearlookstyle/Settings/darkMenubar", true ); popupmenuHighlightLevel = s.readNumEntry( "/klearlookstyle/Settings/popupmenuHighlightLevel", 3); - QString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", QString::null ); + TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString::null ); toolbarBorders = tmp.isEmpty() ? TB_LIGHT : qtc_to_tbar_border( tmp.latin1() ); bool etched = s.readBoolEntry( "/klearlookstyle/Settings/etched", true ); - tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", QString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString::null ); sliderThumbs = tmp.isEmpty() ? etched ? GROOVE_SUNKEN : GROOVE_RAISED : qtc_to_groove( tmp.latin1() ); - tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", QString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString::null ); lvExpander = tmp.isEmpty() ? LV_EXP_ARR : qtc_to_lv_expander( tmp.latin1() ); - tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", QString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString::null ); lvLines = tmp.isEmpty() ? LV_LINES_SOLID : qtc_to_lv_lines( tmp.latin1() ); @@ -518,7 +518,7 @@ hoverSect( QTC_NO_SECT ) { shadeColors( qApp->palette().active().button(), button ); } -void KlearlookStyle::polish( QApplication *app ) { +void KlearlookStyle::polish( TQApplication *app ) { if ( !qstrcmp( app->argv() [ 0 ], "kicker" ) || !qstrcmp( app->argv() [ 0 ], "appletproxy" ) ) { themedApp = APP_KICKER; #if KDE_VERSION >= 0x30200 @@ -537,8 +537,8 @@ void KlearlookStyle::polish( QApplication *app ) { themedApp = qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE; } -void KlearlookStyle::polish( QPalette &pal ) { - int c = QSettings().readNumEntry( "/Qt/KDE/contrast", 7 ); +void KlearlookStyle::polish( TQPalette &pal ) { + int c = TQSettings().readNumEntry( "/Qt/KDE/contrast", 7 ); bool newContrast = false; if ( c < 0 || c > 10 ) @@ -562,100 +562,100 @@ void KlearlookStyle::polish( QPalette &pal ) { if ( qApp->palette().active().highlight() != menuPbar[ GRADIENT_BASE ] ) shadeGradient( qApp->palette().active().highlight(), menuPbar ); - const QColorGroup &actGroup = pal.active(), + const TQColorGroup &actGroup = pal.active(), &inactGroup = pal.inactive(); - const QColor *use = backgroundColors( actGroup ); - QColorGroup newAct( actGroup.foreground(), actGroup.button(), + const TQColor *use = backgroundColors( actGroup ); + TQColorGroup newAct( actGroup.foreground(), actGroup.button(), use[ 0 ], use[ 5 ], actGroup.mid(), actGroup.text(), actGroup.brightText(), actGroup.base(), actGroup.background() ); - newAct.setColor( QColorGroup::Highlight, actGroup.color( QColorGroup::Highlight ) ); + newAct.setColor( TQColorGroup::Highlight, actGroup.color( TQColorGroup::Highlight ) ); pal.setActive( newAct ); use = backgroundColors( inactGroup ); - QColorGroup newInact( inactGroup.foreground(), inactGroup.button(), + TQColorGroup newInact( inactGroup.foreground(), inactGroup.button(), use[ 0 ], use[ 5 ], inactGroup.mid(), inactGroup.text(), inactGroup.brightText(), inactGroup.base(), inactGroup.background() ); - newInact.setColor( QColorGroup::Highlight, inactGroup.color( QColorGroup::Highlight ) ); + newInact.setColor( TQColorGroup::Highlight, inactGroup.color( TQColorGroup::Highlight ) ); pal.setInactive( newInact ); } static const char * kdeToolbarWidget = "kde toolbar widget"; -void KlearlookStyle::polish( QWidget *widget ) { - if ( ::qt_cast<QRadioButton *>( widget ) - || ::qt_cast<QCheckBox *>( widget ) - || ::qt_cast<QSpinWidget *>( widget ) +void KlearlookStyle::polish( TQWidget *widget ) { + if ( tqqt_cast<TQRadioButton *>( widget ) + || tqqt_cast<TQCheckBox *>( widget ) + || tqqt_cast<TQSpinWidget *>( widget ) || widget->inherits( "QSplitterHandle" ) ) { #if QT_VERSION >= 0x030200 widget->setMouseTracking( true ); #endif widget->installEventFilter( this ); - } else if ( ::qt_cast<QButton *>( widget ) || ::qt_cast<QComboBox *>( widget ) || + } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) || widget->inherits( "QToolBarExtensionWidget" ) ) { - widget->setBackgroundMode( QWidget::PaletteBackground ); + widget->setBackgroundMode( TQWidget::PaletteBackground ); widget->installEventFilter( this ); - } else if ( ::qt_cast<QMenuBar *>( widget ) - || ::qt_cast<QToolBar *>( widget ) - || ::qt_cast<QPopupMenu *>( widget ) ) - widget->setBackgroundMode( QWidget::PaletteBackground ); + } else if ( tqqt_cast<TQMenuBar *>( widget ) + || tqqt_cast<TQToolBar *>( widget ) + || tqqt_cast<TQPopupMenu *>( widget ) ) + widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "KToolBarSeparator" ) ) { - widget->setBackgroundMode( QWidget::NoBackground ); + widget->setBackgroundMode( TQWidget::NoBackground ); widget->installEventFilter( this ); - } else if ( ::qt_cast<QScrollBar *>( widget ) ) { + } else if ( tqqt_cast<TQScrollBar *>( widget ) ) { widget->setMouseTracking( true ); widget->installEventFilter( this ); - widget->setBackgroundMode( QWidget::NoBackground ); + widget->setBackgroundMode( TQWidget::NoBackground ); - } else if ( ::qt_cast<QSlider *>( widget ) || ::qt_cast<QHeader *>( widget ) ) { + } else if ( tqqt_cast<TQSlider *>( widget ) || tqqt_cast<TQHeader *>( widget ) ) { widget->setMouseTracking( true ); widget->installEventFilter( this ); } else if ( 0 == qstrcmp( widget->name(), kdeToolbarWidget ) ) { widget->installEventFilter( this ); - widget->setBackgroundMode( QWidget::NoBackground ); // We paint the whole background. + widget->setBackgroundMode( TQWidget::NoBackground ); // We paint the whole background. } KStyle::polish( widget ); } -void KlearlookStyle::unPolish( QWidget *widget ) { - if ( ::qt_cast<QRadioButton *>( widget ) || - ::qt_cast<QCheckBox *>( widget ) || - ::qt_cast<QSpinWidget *>( widget ) || +void KlearlookStyle::unPolish( TQWidget *widget ) { + if ( tqqt_cast<TQRadioButton *>( widget ) || + tqqt_cast<TQCheckBox *>( widget ) || + tqqt_cast<TQSpinWidget *>( widget ) || widget->inherits( "QSplitterHandle" ) ) { #if QT_VERSION >= 0x030200 widget->setMouseTracking( false ); #endif widget->removeEventFilter( this ); - } else if ( ::qt_cast<QButton *>( widget ) || ::qt_cast<QComboBox *>( widget ) || + } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) || widget->inherits( "QToolBarExtensionWidget" ) ) { - widget->setBackgroundMode( QWidget::PaletteButton ); + widget->setBackgroundMode( TQWidget::PaletteButton ); widget->removeEventFilter( this ); - } else if ( ::qt_cast<QMenuBar *>( widget ) || - ::qt_cast<QToolBar *>( widget ) || - ::qt_cast<QPopupMenu *>( widget ) ) - widget->setBackgroundMode( QWidget::PaletteBackground ); + } else if ( tqqt_cast<TQMenuBar *>( widget ) || + tqqt_cast<TQToolBar *>( widget ) || + tqqt_cast<TQPopupMenu *>( widget ) ) + widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "KToolBarSeparator" ) ) { widget->setBackgroundMode( PaletteBackground ); widget->removeEventFilter( this ); - } else if ( ::qt_cast<QScrollBar *>( widget ) ) { + } else if ( tqqt_cast<TQScrollBar *>( widget ) ) { widget->setMouseTracking( false ); widget->removeEventFilter( this ); - widget->setBackgroundMode( QWidget::PaletteButton ); + widget->setBackgroundMode( TQWidget::PaletteButton ); - } else if ( ::qt_cast<QSlider *>( widget ) || - ::qt_cast<QHeader *>( widget ) ) { + } else if ( tqqt_cast<TQSlider *>( widget ) || + tqqt_cast<TQHeader *>( widget ) ) { widget->setMouseTracking( false ); widget->removeEventFilter( this ); @@ -667,12 +667,12 @@ void KlearlookStyle::unPolish( QWidget *widget ) { KStyle::unPolish( widget ); } -bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) { +bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { if ( object->parent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) { // Draw background for custom widgets in the toolbar that have specified a "kde toolbar widget" name. - if ( QEvent::Paint == event->type() ) { - QWidget * widget = static_cast<QWidget*>( object ), - *parent = static_cast<QWidget*>( object->parent() ); + if ( TQEvent::Paint == event->type() ) { + TQWidget * widget = static_cast<TQWidget*>( object ), + *parent = static_cast<TQWidget*>( object->parent() ); #ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS // Find the top-level toolbar of this widget, since it may be nested in other // widgets that are on the toolbar. @@ -682,37 +682,37 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) { while ( parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) { x_offset += parent->x(); y_offset += parent->y(); - parent = static_cast<QWidget*>( parent->parent() ); + parent = static_cast<TQWidget*>( parent->parent() ); } - QRect pr( parent->rect() ); + TQRect pr( parent->rect() ); bool horiz_grad = pr.width() < pr.height(); // Check if the parent is a QToolbar, and use its orientation, else guess. - QToolBar *toolbar = dynamic_cast<QToolBar*>( parent ); + TQToolBar *toolbar = dynamic_cast<TQToolBar*>( parent ); if ( toolbar ) horiz_grad = toolbar->orientation() == Qt::Vertical; - drawBevelGradient( parent->colorGroup().background(), true, 1, &QPainter( widget ), - QRect( x_offset, y_offset, pr.width(), pr.height() ), + drawBevelGradient( parent->colorGroup().background(), true, 1, &TQPainter( widget ), + TQRect( x_offset, y_offset, pr.width(), pr.height() ), horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); #else - QPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() ); + TQPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() ); #endif return false; // Now draw the contents } - } else if ( object->inherits( "KToolBarSeparator" ) && QEvent::Paint == event->type() ) { - QFrame * frame = dynamic_cast<QFrame*>( object ); + } else if ( object->inherits( "KToolBarSeparator" ) && TQEvent::Paint == event->type() ) { + TQFrame * frame = dynamic_cast<TQFrame*>( object ); - if ( frame && QFrame::NoFrame != frame->frameShape() ) { - QPainter painter( frame ); - if ( QFrame::VLine == frame->frameShape() ) + if ( frame && TQFrame::NoFrame != frame->frameShape() ) { + TQPainter painter( frame ); + if ( TQFrame::VLine == frame->frameShape() ) drawPrimitive( PE_DockWindowSeparator, &painter, frame->rect(), frame->colorGroup(), Style_Horizontal ); - else if ( QFrame::HLine == frame->frameShape() ) + else if ( TQFrame::HLine == frame->frameShape() ) drawPrimitive( PE_DockWindowSeparator, &painter, frame->rect(), frame->colorGroup() ); else @@ -721,36 +721,36 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) { } } switch ( event->type() ) { - case QEvent::Enter: + case TQEvent::Enter: if ( object->isWidgetType() ) { - hoverWidget = ( QWidget * ) object; + hoverWidget = ( TQWidget * ) object; if ( hoverWidget && hoverWidget->isEnabled() ) { if ( redrawHoverWidget() ) { hoverWidget->repaint( false ); if ( APP_KICKER == themedApp ) hover = HOVER_NONE; } - oldCursor = QCursor::pos(); + oldCursor = TQCursor::pos(); } else hoverWidget = NULL; } break; - case QEvent::Leave: + case TQEvent::Leave: if ( hoverWidget && object == hoverWidget ) { oldCursor.setX( -1 ); oldCursor.setY( -1 ); hoverWidget = NULL; - ( ( QWidget * ) object ) ->repaint( false ); + ( ( TQWidget * ) object ) ->repaint( false ); } break; - case QEvent::MouseMove: + case TQEvent::MouseMove: if ( hoverWidget && object->isWidgetType() ) { if ( redrawHoverWidget() ) { hoverWidget->repaint( false ); if ( APP_KICKER == themedApp ) hover = HOVER_NONE; } - oldCursor = QCursor::pos(); + oldCursor = TQCursor::pos(); } break; default: @@ -761,18 +761,18 @@ bool KlearlookStyle::eventFilter( QObject *object, QEvent *event ) { } void KlearlookStyle::drawLightBevelButton( - QPainter *p, - const QRect &r, - const QColorGroup &cg, - QStyle::SFlags flags, + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, + TQStyle::SFlags flags, bool useGrad, ERound round, - const QColor &fill, - const QColor *custom, + const TQColor &fill, + const TQColor *custom, bool light ) const { - QRect br( r ); - bool sunken = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) ); + TQRect br( r ); + bool sunken = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) ); int dark = borderButton ? 4 : 5, c1 = sunken ? dark : light ? 6 : 0; @@ -781,7 +781,7 @@ void KlearlookStyle::drawLightBevelButton( if ( !borderButton ) br.addCoords( -1, -1, 1, 1 ); - if ( ( sunken && !borderButton ) || ( !sunken && flags & QStyle::Style_Raised ) ) { + if ( ( sunken && !borderButton ) || ( !sunken && flags & TQStyle::Style_Raised ) ) { p->setPen( custom ? custom[ c1 ] : gray[ c1 ] ); if ( APPEARANCE_LIGHT_GRADIENT != appearance ) { int c2 = sunken ? 0 : dark; @@ -809,7 +809,7 @@ void KlearlookStyle::drawLightBevelButton( // fill if ( useGrad && APPEARANCE_FLAT != appearance ) { drawBevelGradient( fill.dark( 100 ), !sunken, 0, p, - QRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), flags & Style_Horizontal, + TQRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), flags & Style_Horizontal, sunken ? SHADE_BEVEL_BUTTON_GRAD_LIGHT( appearance ) : SHADE_BEVEL_BUTTON_GRAD_LIGHT( appearance ), @@ -823,7 +823,7 @@ void KlearlookStyle::drawLightBevelButton( if ( rounded && ROUNDED_NONE != round ) { bool wide = r.width() >= QTC_MIN_BTN_SIZE, tall = r.height() >= QTC_MIN_BTN_SIZE; - QColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled + TQColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled ? cg.text() : custom ? custom[ 5 ] : gray[ 5 ] ); p->setPen( border.light(80) ); @@ -977,18 +977,18 @@ void KlearlookStyle::drawLightBevelButton( p->restore(); } void KlearlookStyle::drawLightBevel( - QPainter *p, - const QRect &r, - const QColorGroup &cg, - QStyle::SFlags flags, + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, + TQStyle::SFlags flags, bool useGrad, ERound round, - const QColor &fill, - const QColor *custom, + const TQColor &fill, + const TQColor *custom, bool light ) const { - QRect br( r ); - bool sunken = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) ); + TQRect br( r ); + bool sunken = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) ); int dark = borderButton ? 4 : 5, c1 = sunken ? dark : light ? 6 : 0; p->save(); @@ -996,7 +996,7 @@ void KlearlookStyle::drawLightBevel( if ( !borderButton ) br.addCoords( -1, -1, 1, 1 ); - if ( ( sunken && !borderButton ) || ( !sunken && flags & QStyle::Style_Raised ) ) { + if ( ( sunken && !borderButton ) || ( !sunken && flags & TQStyle::Style_Raised ) ) { p->setPen( custom ? custom[ c1 ] : gray[ c1 ] ); if ( APPEARANCE_LIGHT_GRADIENT != appearance ) { int c2 = sunken ? 0 : dark; @@ -1023,7 +1023,7 @@ void KlearlookStyle::drawLightBevel( // fill if ( useGrad && APPEARANCE_FLAT != appearance ) { drawBevelGradient( fill, !sunken, 0, p, - QRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), + TQRect( br.left() - 1, br.top() - 1, br.width() + 2, br.height() + 2 ), flags & Style_Horizontal, sunken ? SHADE_BEVEL_GRAD_SEL_LIGHT( appearance ) : @@ -1040,7 +1040,7 @@ void KlearlookStyle::drawLightBevel( bool wide = r.width() >= QTC_MIN_BTN_SIZE, tall = r.height() >= QTC_MIN_BTN_SIZE; - QColor border = menuPbar[ GRADIENT_BASE ].dark( 130 ); + TQColor border = menuPbar[ GRADIENT_BASE ].dark( 130 ); p->setPen( border ); @@ -1193,10 +1193,10 @@ void KlearlookStyle::drawLightBevel( p->restore(); } -void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, - QStyle::PrimitiveElement pe, bool small, bool checkActive ) const { - QPointArray a; - const QColor &col = flags & Style_Enabled +void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, + TQStyle::PrimitiveElement pe, bool small, bool checkActive ) const { + TQPointArray a; + const TQColor &col = flags & Style_Enabled ? checkActive && flags & Style_Active ? cg.highlightedText() : cg.text() @@ -1205,16 +1205,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup & if ( vArrow ) if ( small ) switch ( pe ) { - case QStyle::PE_ArrowUp: + case TQStyle::PE_ArrowUp: a.setPoints( 7, 2, 1, 2, 0, 0, -2, -2, 0, -2, 1, -2, 0, 2, 0 ); break; - case QStyle::PE_ArrowDown: + case TQStyle::PE_ArrowDown: a.setPoints( 7, 2, -1, 2, 0, 0, 2, -2, 0, -2, -1, -2, 0, 2, 0 ); break; - case QStyle::PE_ArrowRight: + case TQStyle::PE_ArrowRight: a.setPoints( 7, 1, -2, 0, -2, -2, 0, 0, 2, 1, 2, 0, 2, 0, -2 ); break; - case QStyle::PE_ArrowLeft: + case TQStyle::PE_ArrowLeft: a.setPoints( 7, -1, -2, 0, -2, 2, 0, 0, 2, -1, 2, 0, 2, 0, -2 ); break; default: @@ -1222,16 +1222,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup & } else switch ( pe ) { - case QStyle::PE_ArrowUp: + case TQStyle::PE_ArrowUp: a.setPoints( 7, 3, 1, 0, -2, -3, 1, -2, 2, -1, 1, 1, 1, 2, 2 ); break; - case QStyle::PE_ArrowDown: + case TQStyle::PE_ArrowDown: a.setPoints( 7, 3, -1, 0, 2, -3, -1, -2, -2, -1, -1, 1, -1, 2, -2 ); break; - case QStyle::PE_ArrowRight: + case TQStyle::PE_ArrowRight: a.setPoints( 7, -1, -3, 2, 0, -1, 3, -2, 2, -1, 1, -1, -1, -2, -2 ); break; - case QStyle::PE_ArrowLeft: + case TQStyle::PE_ArrowLeft: a.setPoints( 7, 1, -3, -2, 0, 1, 3, 2, 2, 1, 1, 1, -1, 2, -2 ); break; default: @@ -1240,16 +1240,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup & else if ( small ) switch ( pe ) { - case QStyle::PE_ArrowUp: + case TQStyle::PE_ArrowUp: a.setPoints( 4, 2, 0, 0, -2, -2, 0, 2, 0 ); break; - case QStyle::PE_ArrowDown: + case TQStyle::PE_ArrowDown: a.setPoints( 4, 2, 0, 0, 2, -2, 0, 2, 0 ); break; - case QStyle::PE_ArrowRight: + case TQStyle::PE_ArrowRight: a.setPoints( 4, 0, -2, -2, 0, 0, 2, 0, -2 ); break; - case QStyle::PE_ArrowLeft: + case TQStyle::PE_ArrowLeft: a.setPoints( 4, 0, -2, 2, 0, 0, 2, 0, -2 ); break; default: @@ -1257,16 +1257,16 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup & } else switch ( pe ) { - case QStyle::PE_ArrowUp: + case TQStyle::PE_ArrowUp: a.setPoints( 4, 3, 1, 0, -2, -3, 1, 3, 1 ); break; - case QStyle::PE_ArrowDown: + case TQStyle::PE_ArrowDown: a.setPoints( 4, 3, -1, 0, 2, -3, -1, 3, -1 ); break; - case QStyle::PE_ArrowRight: + case TQStyle::PE_ArrowRight: a.setPoints( 4, -1, -3, 2, 0, -1, 3, -1, -3 ); break; - case QStyle::PE_ArrowLeft: + case TQStyle::PE_ArrowLeft: a.setPoints( 4, 1, -3, -2, 0, 1, 3, 1, -3 ); break; default: @@ -1284,13 +1284,13 @@ void KlearlookStyle::drawArrow( QPainter *p, const QRect &r, const QColorGroup & p->restore(); } -void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, - SFlags flags, const QStyleOption &data ) const { +void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, + SFlags flags, const TQStyleOption &data ) const { switch ( pe ) { case PE_CheckMark: if ( flags & Style_On || !( flags & Style_Off ) ) // !(flags&Style_Off) is for tri-state { - QPointArray check; + TQPointArray check; int x = r.center().x() - 3, y = r.center().y() - 3; @@ -1323,15 +1323,15 @@ void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, QPainter *p, const } } -void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg, - SFlags flags, const QStyleOption &data ) const { +void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, + SFlags flags, const TQStyleOption &data ) const { int x, y, w, h; r.rect(&x, &y, &w, &h); switch ( pe ) { case PE_HeaderSection: { - const QColor * use = buttonColors( cg ); + const TQColor * use = buttonColors( cg ); if ( APP_KICKER == themedApp ) { @@ -1359,7 +1359,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec flags = ( ( flags | Style_Sunken ) ^ Style_Sunken ) | Style_Raised; if ( QTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) { - QHeader * hd = dynamic_cast<QHeader *>( hoverWidget ); + TQHeader * hd = dynamic_cast<TQHeader *>( hoverWidget ); if ( hd && hd->isClickEnabled( hoverSect ) && r == hd->sectionRect( hoverSect ) ) flags |= Style_MouseOver; @@ -1376,10 +1376,10 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec case PE_ButtonBevel: case PE_ButtonTool: case PE_ButtonDropDown: { - const QColor *use = buttonColors( cg ); + const TQColor *use = buttonColors( cg ); - if ( !( flags & QStyle::Style_Sunken ) ) // If its not sunken, its raised-don't want flat buttons. - flags |= QStyle::Style_Raised; + if ( !( flags & TQStyle::Style_Sunken ) ) // If its not sunken, its raised-don't want flat buttons. + flags |= TQStyle::Style_Raised; drawLightBevelButton( p, r, cg, flags | Style_Horizontal, true, r.width() < 16 || r.height() < 16 @@ -1396,7 +1396,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec p->setBrush( NoBrush ); if ( rounded ) // borderButton) CPD Only use color[4] for rounded def buttons! { - const QColor * use = buttonColors( cg ); + const TQColor * use = buttonColors( cg ); p->setPen( use[ 4 ] ); int offset = r.width() >= QTC_MIN_BTN_SIZE && r.height() >= QTC_MIN_BTN_SIZE ? 4 : 3; @@ -1413,9 +1413,9 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } break; case IND_CORNER: { - const QColor *use = buttonColors( cg ); - QPointArray points; - bool sunken = flags & Style_Down || flags & QStyle::Style_Sunken; + const TQColor *use = buttonColors( cg ); + TQPointArray points; + bool sunken = flags & Style_Down || flags & TQStyle::Style_Sunken; int offset = sunken ? 4 : 3; points.setPoints( 3, r.x() + offset, r.y() + offset, r.x() + offset + 6, r.y() + offset, @@ -1445,7 +1445,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec case PE_CheckMark: if ( flags & Style_On || !( flags & Style_Off ) ) // !(flags&Style_Off) is for tri-state { - QPointArray check; + TQPointArray check; int x = r.center().x() - 3, y = r.center().y() - 3; @@ -1472,66 +1472,66 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } break; case PE_CheckListController: { - QCheckListItem *item = data.checkListItem(); + TQCheckListItem *item = data.checkListItem(); if ( item ) { - QListView * lv = item->listView(); + TQListView * lv = item->listView(); int x = r.x(), y = r.y(), w = r.width(), h = r.height(), marg = lv->itemMargin(); - p->setPen( QPen( flags & Style_Enabled ? cg.text() - : lv->palette().color( QPalette::Disabled, QColorGroup::Text ) ) ); + p->setPen( TQPen( flags & Style_Enabled ? cg.text() + : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ) ) ); if ( flags & Style_Selected && !lv->rootIsDecorated() && !( ( item->parent() && 1 == item->parent() ->rtti() && - QCheckListItem::Controller == ( ( QCheckListItem* ) item->parent() ) ->type() ) )) { + TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->parent() ) ->type() ) )) { p->fillRect( 0, 0, x + marg + w + 4, item->height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) - p->setPen( QPen( cg.highlightedText() ) ); + p->setPen( TQPen( cg.highlightedText() ) ); } if ( flags & Style_NoChange ) - p->setBrush( cg.brush( QColorGroup::Button ) ); + p->setBrush( cg.brush( TQColorGroup::Button ) ); p->drawRect( x + marg + 2, y + 4 + 2, w - 7, h - 8 ); p->drawRect( x + marg, y + 4, w - 7, h - 8 ); } break; } case PE_CheckListIndicator: { - QCheckListItem *item = data.checkListItem(); + TQCheckListItem *item = data.checkListItem(); if ( item ) { - QListView * lv = item->listView(); + TQListView * lv = item->listView(); - p->setPen( QPen( flags & Style_Enabled ? cg.text() - : lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) ); + p->setPen( TQPen( flags & Style_Enabled ? cg.text() + : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) ); if ( flags & Style_Selected ) { flags -= Style_Selected; if ( !lv->rootIsDecorated() && !( ( item->parent() && 1 == item->parent() ->rtti() && - QCheckListItem::Controller == - ( ( QCheckListItem* ) item->parent() ) ->type() ) ) ) { + TQCheckListItem::Controller == + ( ( TQCheckListItem* ) item->parent() ) ->type() ) ) ) { p->fillRect( 0, 0, r.x() + lv->itemMargin() + r.width() + 4, item->height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) { - p->setPen( QPen( cg.highlightedText(), 2 ) ); + p->setPen( TQPen( cg.highlightedText(), 2 ) ); flags += Style_Selected; } } } if ( flags & Style_NoChange ) - p->setBrush( cg.brush( QColorGroup::Button ) ); + p->setBrush( cg.brush( TQColorGroup::Button ) ); p->drawRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 ); - if ( flags & QStyle::Style_On || !( flags & Style_Off ) ) - drawPrimitive( PE_CheckMark, p, QRect( r.x() + lv->itemMargin(), + if ( flags & TQStyle::Style_On || !( flags & Style_Off ) ) + drawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 ), cg, flags ); } break; } case PE_Indicator: { - const QColor *use = buttonColors( cg ); - bool on = flags & QStyle::Style_On || !( flags & Style_Off ); + const TQColor *use = buttonColors( cg ); + bool on = flags & TQStyle::Style_On || !( flags & Style_Off ); if ( APPEARANCE_FLAT != appearance ) drawPrimitive( PE_ButtonTool, p, r, cg, flags ); @@ -1563,16 +1563,16 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; } case PE_CheckListExclusiveIndicator: { - QCheckListItem *item = data.checkListItem(); + TQCheckListItem *item = data.checkListItem(); if ( item ) { - const QColor & bgnd = cg.background(), + const TQColor & bgnd = cg.background(), &on = flags & Style_Enabled ? cg.text() : cg.mid(); bool set - = flags & QStyle::Style_On; - QPointArray outer, + = flags & TQStyle::Style_On; + TQPointArray outer, inner, aa; int x = r.x(), y = r.y() + 2; @@ -1615,7 +1615,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec case PE_ExclusiveIndicator: case PE_ExclusiveIndicatorMask: { int x = r.x(), y = r.y(); - QPointArray outer; + TQPointArray outer; outer.setPoints( 24, x, y + 8, x, y + 4, x + 1, y + 3, x + 1, y + 2, x + 2, y + 1, x + 3, y + 1, x + 4, y, x + 8, y, x + 9, y + 1, x + 10, y + 1, x + 11, y + 2, x + 11, y + 3, @@ -1629,21 +1629,21 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec p->setBrush( Qt::color1 ); p->drawPolygon( outer ); } else { - QPointArray shadow; - const QColor &bgnd = flags & Style_Enabled ? cg.base() : cg.background(), + TQPointArray shadow; + const TQColor &bgnd = flags & Style_Enabled ? cg.base() : cg.background(), &on = flags & Style_Enabled ? flags & Style_Selected ? cg.highlightedText() : cg.text() : cg.mid(); - QColor indBgnd = bgnd; - const QColor *use = buttonColors( cg ); - QColor leftShadowColor, + TQColor indBgnd = bgnd; + const TQColor *use = buttonColors( cg ); + TQColor leftShadowColor, rightShadowColor, outerLeftColor, outerRightColor; bool set - = flags & QStyle::Style_On; + = flags & TQStyle::Style_On; if ( APPEARANCE_FLAT != appearance && !borderButton ) shadow.setPoints( 14, x + 1, y + 10, x + 1, y + 9, x, y + 8, x, y + 4, @@ -1660,9 +1660,9 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec if ( APPEARANCE_FLAT != appearance ) { indBgnd = getFill( flags, use ); - p->setClipRegion( QRegion( outer ) ); + p->setClipRegion( TQRegion( outer ) ); drawBevelGradient( indBgnd, !set, 0, p, - QRect( x + 1, y + 1, r.width() - 2, r.height() - 2 ), true, + TQRect( x + 1, y + 1, r.width() - 2, r.height() - 2 ), true, set ? SHADE_BEVEL_GRAD_SEL_LIGHT( appearance ) : SHADE_BEVEL_GRAD_LIGHT( appearance ), set ? SHADE_BEVEL_GRAD_SEL_DARK( appearance ) : SHADE_BEVEL_GRAD_DARK( appearance ) ); @@ -1726,7 +1726,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } if ( !formMode ) { - QPointArray outerAaLeft, + TQPointArray outerAaLeft, outerAaRight; outerAaLeft.setPoints( 8, x, y + 3, x + 1, y + 1, x + 3, y, @@ -1746,7 +1746,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec p->setPen( midColor( use[ 5 ], indBgnd, 1.5 ) ); if ( APPEARANCE_FLAT != appearance ) { - QPointArray innerAa; + TQPointArray innerAa; if ( !set && !( flags & Style_Down ) ) { @@ -1762,7 +1762,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } } } else { - QPointArray innerAa; + TQPointArray innerAa; innerAa.setPoints( 6, x + 4, y + 11, x + 8, y + 11, x + 10, y + 10, x + 11, y + 8, x + 11, y + 4, x + 10, y + 2 ); @@ -1773,20 +1773,20 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; } case PE_DockWindowSeparator: { - QPoint p1, + TQPoint p1, p2; - //const QColor *use=backgroundColors(cg); + //const TQColor *use=backgroundColors(cg); if ( flags & Style_Horizontal ) { int offset = r.height() > 18 ? 6 : r.height() > 12 ? 4 : r.height() > 6 ? 2 : 0; - p1 = QPoint( r.width() >> 1, 0 + offset ); - p2 = QPoint( p1.x(), r.height() - offset ); + p1 = TQPoint( r.width() >> 1, 0 + offset ); + p2 = TQPoint( p1.x(), r.height() - offset ); } else { int offset = r.width() > 18 ? 6 : r.width() > 12 ? 4 : r.width() > 6 ? 2 : 0; - p1 = QPoint( 0 + offset, r.height() >> 1 ); - p2 = QPoint( r.width() - offset, p1.y() ); + p1 = TQPoint( 0 + offset, r.height() >> 1 ); + p2 = TQPoint( r.width() - offset, p1.y() ); } p->fillRect( r, cg.background() ); p->setPen( cg.background().dark( 111 ) ); @@ -1795,17 +1795,17 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; } case PE_Splitter: { - const QColor *use = buttonColors( cg ); + const TQColor *use = buttonColors( cg ); if ( hoverWidget && hoverWidget == p->device() ) flags |= Style_MouseOver; if ( borderSplitter ) - drawLightBevelButton( p, r, cg, QStyle::Style_Raised, false, + drawLightBevelButton( p, r, cg, TQStyle::Style_Raised, false, ROUNDED_NONE, getFill( flags, use ), use ); else { p->fillRect( r, - QColor( flags & Style_MouseOver ? + TQColor( flags & Style_MouseOver ? cg.background().light( QTC_HIGHLIGHT_FACTOR ) : cg.background() ) ); drawLines( p, r, flags & Style_Horizontal, 70, 1, use, 0, TRUE, @@ -1839,14 +1839,14 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } case PE_PanelLineEdit: { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); p->setPen( use[ 4 ].light(80) ); p->drawRect( r ); break; } case PE_PanelPopup: { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); if ( borderFrame && ( data.isDefault() || data.lineWidth() > 1 ) ) { p->setPen( use[ 4 ].light(70) ); @@ -1856,7 +1856,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec #ifdef MENU_POPUP_SHADOW qDrawShadePanel( p, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, - QColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], + TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), flags & Style_Sunken, data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); @@ -1864,7 +1864,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } else qDrawShadePanel( p, r, - QColorGroup( + TQColorGroup( use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), @@ -1872,7 +1872,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; } case PE_PanelTabWidget: { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); if ( borderFrame && ( data.isDefault() || data.lineWidth() > 1 ) ) { p->setPen( use[ 4 ] ); @@ -1881,7 +1881,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec #ifdef MENU_POPUP_SHADOW qDrawShadePanel( p, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, - QColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], + TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), flags & Style_Sunken, data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); @@ -1889,7 +1889,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } else qDrawShadePanel( p, r, - QColorGroup( + TQColorGroup( use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), @@ -1898,12 +1898,12 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } case PE_PanelDockWindow: case PE_PanelMenuBar: { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); switch ( toolbarBorders ) { case TB_DARK: qDrawShadePanel( p, r.x(), r.y(), r.width(), r.height(), - QColorGroup( + TQColorGroup( use[ 5 ].dark( 120 ), use[ NUM_SHADES ], use[ 0 ], use[ 5 ].dark( 120 ), use[ 2 ], cg.text(), use[ NUM_SHADES ] ), @@ -1923,7 +1923,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec case TB_LIGHT: qDrawShadePanel( p, r.x(), r.y(), r.width(), r.height(), - QColorGroup( + TQColorGroup( use[ 3 ], use[ NUM_SHADES ], use[ 0 ], use[ 3 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] @@ -1949,8 +1949,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } case PE_ScrollBarAddLine: case PE_ScrollBarSubLine: { - bool down = ( flags & ( QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken ) ); - const QColor *use = buttonColors( cg ); + bool down = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken ) ); + const TQColor *use = buttonColors( cg ); pe = flags & Style_Horizontal ? PE_ScrollBarAddLine == pe @@ -1973,7 +1973,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } case PE_ScrollBarSubPage: case PE_ScrollBarAddPage: { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); if ( borderButton ) { if ( flags & Style_Horizontal ) { @@ -1992,7 +1992,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; } case PE_ScrollBarSlider: { - const QColor *use = buttonColors( cg ); + const TQColor *use = buttonColors( cg ); @@ -2020,8 +2020,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec break; case PE_SpinWidgetUp: case PE_SpinWidgetDown: { - QRect sr( r ); - const QColor *use = buttonColors( cg ); + TQRect sr( r ); + const TQColor *use = buttonColors( cg ); drawLightBevelButton( p, sr, cg, flags | Style_Horizontal, true, PE_SpinWidgetDown == pe ? ROUNDED_BOTTOM : ROUNDED_TOP, @@ -2041,8 +2041,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRec } } -void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, const QWidget *widget, const QRect &r, - const QColorGroup &cg, SFlags flags, const QStyleOption &opt ) const { +void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, const TQWidget *widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const { switch ( kpe ) { case KPE_ToolBarHandle: case KPE_GeneralHandle: @@ -2059,7 +2059,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons break; case KPE_ListViewExpander: { int lvSize = QTC_LV_SIZE( lvExpander ); - QRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ), + TQRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ), r.y() + ( ( r.height() - ( lvSize + 4 ) ) >> 1 ), lvSize + 4, lvSize + 4 ); p->setPen( /*lvDark ? cg.text() : */cg.mid() ); @@ -2090,7 +2090,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons if ( LV_EXP_ARR == lvExpander ) drawArrow( p, ar, cg, flags | Style_Enabled, flags & Style_On // Collapsed = On - ? QApplication::reverseLayout() + ? TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight : PE_ArrowDown ); @@ -2116,17 +2116,17 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons // Taken and modified (colour wise) from kstyle.cpp - which in turn comes from // qwindowsstyl.cpp { - static QBitmap *verticalLine = 0, + static TQBitmap *verticalLine = 0, *horizontalLine = 0; - static QCleanupHandler<QBitmap> lvCleanupBitmap; + static TQCleanupHandler<TQBitmap> lvCleanupBitmap; // Create the dotline pixmaps if not already created if ( !verticalLine ) { // make 128*1 and 1*128 bitmaps that can be used for drawing the right sort of lines. - verticalLine = new QBitmap( 1, 129, true ); - horizontalLine = new QBitmap( 128, 1, true ); - QPointArray a( 64 ); - QPainter p2; + verticalLine = new TQBitmap( 1, 129, true ); + horizontalLine = new TQBitmap( 128, 1, true ); + TQPointArray a( 64 ); + TQPainter p2; p2.begin( verticalLine ); @@ -2137,7 +2137,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons p2.setPen( color1 ); p2.drawPoints( a ); p2.end(); - QApplication::flushX(); + TQApplication::flushX(); verticalLine->setMask( *verticalLine ); p2.begin( horizontalLine ); @@ -2148,7 +2148,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons p2.setPen( color1 ); p2.drawPoints( a ); p2.end(); - QApplication::flushX(); + TQApplication::flushX(); horizontalLine->setMask( *horizontalLine ); lvCleanupBitmap.add( &verticalLine ); @@ -2202,22 +2202,22 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter *p, cons void KlearlookStyle::drawControl( ControlElement control, - QPainter *p, - const QWidget *widget, - const QRect &r, - const QColorGroup &cg, SFlags flags, const QStyleOption &data ) const + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, SFlags flags, const TQStyleOption &data ) const { if ( widget == hoverWidget ) flags |= Style_MouseOver; switch ( control ) { case CE_TabBarTab: { - const QTabBar * tb = ( const QTabBar * ) widget; + const TQTabBar * tb = ( const TQTabBar * ) widget; bool cornerWidget = false, firstTab = 0 == tb->indexOf( data.tab() ->identifier() ); - if ( ::qt_cast<const QTabWidget *>( tb->parent() ) ) { - const QTabWidget * tw = ( const QTabWidget* ) tb->parent(); + if ( tqqt_cast<const TQTabWidget *>( tb->parent() ) ) { + const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent(); // is there a corner widget in the (top) left edge? if ( tw->cornerWidget( Qt::TopLeft ) ) @@ -2225,13 +2225,13 @@ void KlearlookStyle::drawControl( } if ( borderFrame ) { - QRect tr( r ), + TQRect tr( r ), fr( r ); int offset = rounded ? 2 : 0; switch ( tb->shape() ) { - case QTabBar::TriangularAbove: - case QTabBar::RoundedAbove: + case TQTabBar::TriangularAbove: + case TQTabBar::RoundedAbove: if ( flags & Style_Selected ) { tr.addCoords( 0, 0, 0, -1 ); fr.addCoords( 2, 2, -2, -2 ); @@ -2317,8 +2317,8 @@ void KlearlookStyle::drawControl( p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] ); break; - case QTabBar::TriangularBelow: - case QTabBar::RoundedBelow: + case TQTabBar::TriangularBelow: + case TQTabBar::RoundedBelow: if ( flags & Style_Selected ) { fr.addCoords( 3, 2, -3, -3 ); p->setPen( gray[ 5 ] ); @@ -2382,11 +2382,11 @@ void KlearlookStyle::drawControl( KStyle::drawControl( control, p, widget, r, cg, flags, data ); } } else { - QRect br( r ); + TQRect br( r ); switch ( tb->shape() ) { - case QTabBar::TriangularAbove: - case QTabBar::RoundedAbove: + case TQTabBar::TriangularAbove: + case TQTabBar::RoundedAbove: if ( flags & Style_Selected ) { p->setPen( cg.background() ); p->drawLine( br.bottomLeft(), br.bottomRight() ); @@ -2419,8 +2419,8 @@ void KlearlookStyle::drawControl( else p->fillRect( br, flags & Style_Selected ? cg.background() : gray[ 2 ] ); break; - case QTabBar::TriangularBelow: - case QTabBar::RoundedBelow: + case TQTabBar::TriangularBelow: + case TQTabBar::RoundedBelow: if ( flags & Style_Selected ) { p->setPen( cg.background() ); p->drawLine( br.topLeft(), br.topRight() ); @@ -2465,16 +2465,16 @@ void KlearlookStyle::drawControl( if ( data.isDefault() ) break; - const QTabBar *tb = ( const QTabBar * ) widget; - QTab *t = data.tab(); - QRect tr = r; + const TQTabBar *tb = ( const TQTabBar * ) widget; + TQTab *t = data.tab(); + TQRect tr = r; if ( t->identifier() == tb->currentTab() ) { - if ( QTabBar::RoundedAbove == tb->shape() || QTabBar::TriangularAbove == tb->shape() ) - tr.setBottom( tr.bottom() - pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) ); + if ( TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() ) + tr.setBottom( tr.bottom() - pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); } else - if ( QTabBar::RoundedBelow == tb->shape() || QTabBar::TriangularBelow == tb->shape() ) - tr.setTop( tr.top() + pixelMetric( QStyle::PM_TabBarTabShiftVertical, tb ) ); + if ( TQTabBar::RoundedBelow == tb->shape() || TQTabBar::TriangularBelow == tb->shape() ) + tr.setTop( tr.top() + pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() ); @@ -2489,7 +2489,7 @@ void KlearlookStyle::drawControl( r.rect( &x, &y, &w, &h ); - const QPushButton *button = static_cast<const QPushButton *>( widget ); + const TQPushButton *button = static_cast<const TQPushButton *>( widget ); bool active = button->isOn() || button->isDown(), cornArrow = false; @@ -2506,12 +2506,12 @@ void KlearlookStyle::drawControl( margin = pixelMetric( PM_ButtonMargin, widget ); if ( button->iconSet() && !button->iconSet() ->isNull() && - ( dx + button->iconSet() ->pixmap ( QIconSet::Small, QIconSet::Normal, - QIconSet::Off ).width() ) >= w ) + ( dx + button->iconSet() ->pixmap ( TQIconSet::Small, TQIconSet::Normal, + TQIconSet::Off ).width() ) >= w ) cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget else { drawPrimitive( PE_ArrowDown, - p, visualRect( QRect( + p, visualRect( TQRect( ( x + w ) - ( dx + margin ), y, dx, h ), r ), cg, flags, data ); @@ -2521,15 +2521,15 @@ void KlearlookStyle::drawControl( // Draw the icon if there is one if ( button->iconSet() && !button->iconSet() ->isNull() ) { - QIconSet::Mode mode = QIconSet::Disabled; - QIconSet::State state = QIconSet::Off; + TQIconSet::Mode mode = TQIconSet::Disabled; + TQIconSet::State state = TQIconSet::Off; if ( button->isEnabled() ) - mode = button->hasFocus() ? QIconSet::Active : QIconSet::Normal; + mode = button->hasFocus() ? TQIconSet::Active : TQIconSet::Normal; if ( button->isToggleButton() && button->isOn() ) - state = QIconSet::On; + state = TQIconSet::On; - QPixmap pixmap = button->iconSet() ->pixmap( QIconSet::Small, mode, state ); + TQPixmap pixmap = button->iconSet() ->pixmap( TQIconSet::Small, mode, state ); static const int constSpace = 2; @@ -2553,7 +2553,7 @@ void KlearlookStyle::drawControl( } if ( cornArrow ) //Draw over the icon - drawPrimitive( PE_ArrowDown, p, visualRect( QRect( x + w - 6, x + h - 6, 7, 7 ), r ), + drawPrimitive( PE_ArrowDown, p, visualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ), cg, flags, data ); if ( xo && iw ) { @@ -2570,7 +2570,7 @@ void KlearlookStyle::drawControl( j = boldDefText && button->isDefault() ? 2 : 1; for ( i = 0; i < j; i++ ) - drawItem( p, QRect( x + i, y, w, h ), + drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), button->isEnabled(), @@ -2581,7 +2581,7 @@ void KlearlookStyle::drawControl( //Draw a focus rect if the button has focus if ( flags & Style_HasFocus ) drawPrimitive( PE_FocusRect, p, - QStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); + TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -2589,8 +2589,8 @@ void KlearlookStyle::drawControl( if ( !widget || data.isDefault() ) break; - const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget; - QMenuItem *mi = data.menuItem(); + const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget; + TQMenuItem *mi = data.menuItem(); int tab = data.tabWidth(), maxpmw = data.maxIconWidth(), x, y, w, h; @@ -2610,7 +2610,7 @@ void KlearlookStyle::drawControl( break; if ( mi->isSeparator() ) { - const QColor * use = backgroundColors( cg ); + const TQColor * use = backgroundColors( cg ); p->setPen( cg.background().dark(105) ); p->drawLine( r.left() + 5, r.top() + 3, r.right() - 5, r.top() + 3 ); break; @@ -2618,7 +2618,7 @@ void KlearlookStyle::drawControl( maxpmw = QMAX( maxpmw, 16 ); - QRect cr, ir, tr, sr; + TQRect cr, ir, tr, sr; if (menuIcons) { // check column cr.setRect( r.left(), r.top(), maxpmw, r.height() ); @@ -2639,7 +2639,7 @@ void KlearlookStyle::drawControl( tr.setCoords( sr.left() - tab - 4, r.top(), sr.left(), r.bottom() ); } - bool reverse = QApplication::reverseLayout(); + bool reverse = TQApplication::reverseLayout(); if ( reverse ) { cr = visualRect( cr, r ); @@ -2650,26 +2650,26 @@ void KlearlookStyle::drawControl( if ( mi->iconSet() && menuIcons ) { // Select the correct icon from the iconset - QIconSet::Mode mode = flags & Style_Active - ? ( mi->isEnabled() ? QIconSet::Active : QIconSet::Disabled ) - : ( mi->isEnabled() ? QIconSet::Normal : QIconSet::Disabled ); - cr = visualRect( QRect( x, y, maxpmw, h ), r ); + TQIconSet::Mode mode = flags & Style_Active + ? ( mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled ) + : ( mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled ); + cr = visualRect( TQRect( x, y, maxpmw, h ), r ); // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon if ( popupmenu->isCheckable() && mi->isChecked() ) { - QBrush brush( gray[ 3 ] ); + TQBrush brush( gray[ 3 ] ); qDrawShadePanel( p, cr.x() + 1, cr.y() + 2, cr.width() - 2, cr.height() - 4, - QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], + TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ), true, 1, &brush ); } // Draw the icon - QPixmap pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode ); - QRect pmr( 0, 0, pixmap.width(), pixmap.height() ); + TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode ); + TQRect pmr( 0, 0, pixmap.width(), pixmap.height() ); pmr.moveCenter( cr.center() ); p->drawPixmap( pmr.topLeft(), pixmap ); @@ -2685,12 +2685,12 @@ void KlearlookStyle::drawControl( // item column ir.setCoords( cr.right() + 2, r.top(), tr.right() - 4, r.bottom() ); - QBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() ); + TQBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() ); drawPrimitiveMenu( PE_CheckMark, p, cr, cg, ( flags & ( Style_Enabled | Style_Active ) ) | Style_On ); } - QColor textcolor, embosscolor; + TQColor textcolor, embosscolor; if ( flags & Style_Active ) { if ( !( flags & Style_Enabled ) ) { @@ -2721,7 +2721,7 @@ void KlearlookStyle::drawControl( p->restore(); } - QString text = mi->text(); + TQString text = mi->text(); if ( !text.isNull() ) { int t = text.find( '\t' ); @@ -2757,7 +2757,7 @@ void KlearlookStyle::drawControl( p->drawText( ir, alignFlag, text, t ); } else if ( mi->pixmap() ) { - QPixmap pixmap = *mi->pixmap(); + TQPixmap pixmap = *mi->pixmap(); if ( 1 == pixmap.depth() ) p->setBackgroundMode( OpaqueMode ); @@ -2774,7 +2774,7 @@ void KlearlookStyle::drawControl( if ( ( flags & Style_Enabled ) && ( flags & Style_Active ) && ( flags & Style_Down ) ) { - drawPBarOrMenu2( p, QRect(r.x(), r.y(), r.width(), r.height()), + drawPBarOrMenu2( p, TQRect(r.x(), r.y(), r.width(), r.height()), true, cg, true ); } else #ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS @@ -2786,7 +2786,7 @@ void KlearlookStyle::drawControl( #endif if (darkMenubar) { drawBevelGradient( cg.background(), true, 1, p, - QRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2), + TQRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2), true, SHADE_BEVEL_MENU_GRAD_LIGHT( appearance ), SHADE_BEVEL_MENU_GRAD_DARK( appearance )); } else @@ -2795,7 +2795,7 @@ void KlearlookStyle::drawControl( if ( data.isDefault() ) break; - QMenuItem *mi = data.menuItem(); + TQMenuItem *mi = data.menuItem(); if ( flags & Style_Active && ( flags & Style_Down ) ) drawItem( p, r, AlignCenter | ShowPrefix | DontClip | SingleLine, @@ -2808,10 +2808,10 @@ void KlearlookStyle::drawControl( case CE_MenuBarEmptyArea: if (darkMenubar) { //p->fillRect( r, cg.background().dark( 106 ) ); - QColor b; + TQColor b; b.setRgb(cg.background().red(), cg.background().green(), cg.background().blue()); drawBevelGradient( b, true, 1, p, - QRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2 ), + TQRect(r.x()-1, r.y()-1, r.width()+2, r.height()+2 ), true, SHADE_BEVEL_MENU_GRAD_LIGHT( appearance ), SHADE_BEVEL_MENU_GRAD_DARK( appearance )); } else @@ -2832,17 +2832,17 @@ void KlearlookStyle::drawControl( p->setBrush( gray[ NUM_SHADES ] ); p->drawRect( r ); qDrawShadePanel( p, r, - QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ], + TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ), true, 1 ); break; case CE_ProgressBarContents: { // ### Take into account totalSteps()for busy indicator - const QProgressBar *pb = ( const QProgressBar* ) widget; - QRect cr = subRect( SR_ProgressBarContents, widget ); + const TQProgressBar *pb = ( const TQProgressBar* ) widget; + TQRect cr = subRect( SR_ProgressBarContents, widget ); double progress = pb->progress(); - bool reverse = QApplication::reverseLayout(); + bool reverse = TQApplication::reverseLayout(); int steps = pb->totalSteps(); if ( cr.isValid() && ( progress > 0 || steps == 0 ) ) { @@ -2868,23 +2868,23 @@ void KlearlookStyle::drawControl( } if ( reverse ) - drawPBarOrMenu( p, QRect( cr.x() + cr.width() - width - pstep, + drawPBarOrMenu( p, TQRect( cr.x() + cr.width() - width - pstep, cr.y(), width, cr.height() ), true, cg ); else - drawPBarOrMenu( p, QRect( cr.x() + pstep, cr.y(), width, + drawPBarOrMenu( p, TQRect( cr.x() + pstep, cr.y(), width, cr.height() ), true, cg ); } else if ( reverse ) - drawPBarOrMenu( p, QRect( cr.x() + ( cr.width() - width ), + drawPBarOrMenu( p, TQRect( cr.x() + ( cr.width() - width ), cr.y(), width, cr.height() ), true, cg ); else - drawPBarOrMenu( p, QRect( cr.x(), cr.y(), width, cr.height() ), true, cg ); + drawPBarOrMenu( p, TQRect( cr.x(), cr.y(), width, cr.height() ), true, cg ); } break; } case CE_PushButton: { - const QPushButton *button = static_cast<const QPushButton *>( widget ); - QRect br( r ); + const TQPushButton *button = static_cast<const TQPushButton *>( widget ); + TQRect br( r ); int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ); if ( rounded && isFormWidget( widget ) ) @@ -2913,7 +2913,7 @@ void KlearlookStyle::drawControl( break; case CE_CheckBoxLabel: if ( crLabelHighlight ) { - const QCheckBox * checkbox = ( const QCheckBox * ) widget; + const TQCheckBox * checkbox = ( const TQCheckBox * ) widget; if ( flags & Style_MouseOver && #if QT_VERSION >= 0x030200 @@ -2921,14 +2921,14 @@ void KlearlookStyle::drawControl( #endif !isFormWidget( widget ) ) { #if QT_VERSION >= 0x030200 - QRect cr( checkbox->rect() ); - QRegion r( QRect( cr.x(), cr.y(), + TQRect cr( checkbox->rect() ); + TQRegion r( TQRect( cr.x(), cr.y(), visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() + pixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) ); #else - QRegion r( checkbox->rect() ); + TQRegion r( checkbox->rect() ); #endif r -= visualRect( subRect( SR_CheckBoxIndicator, widget ), widget ); @@ -2936,7 +2936,7 @@ void KlearlookStyle::drawControl( p->fillRect( checkbox->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) ); p->setClipping( false ); } - int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft; + int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, checkbox->pixmap(), checkbox->text() ); @@ -2954,7 +2954,7 @@ void KlearlookStyle::drawControl( break; case CE_RadioButtonLabel: if ( crLabelHighlight ) { - const QRadioButton * radiobutton = ( const QRadioButton * ) widget; + const TQRadioButton * radiobutton = ( const TQRadioButton * ) widget; if ( flags & Style_MouseOver && #if QT_VERSION >= 0x030200 @@ -2962,13 +2962,13 @@ void KlearlookStyle::drawControl( #endif !isFormWidget( widget ) ) { #if QT_VERSION >= 0x030200 - QRect rb( radiobutton->rect() ); - QRegion r( QRect( rb.x(), rb.y(), + TQRect rb( radiobutton->rect() ); + TQRegion r( TQRect( rb.x(), rb.y(), visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() + pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) ); #else - QRegion r( radiobutton->rect() ); + TQRegion r( radiobutton->rect() ); #endif r -= visualRect( subRect( SR_RadioButtonIndicator, widget ), widget ); @@ -2977,7 +2977,7 @@ void KlearlookStyle::drawControl( p->setClipping( false ); } - int alignment = QApplication::reverseLayout() ? AlignRight : AlignLeft; + int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text() ); @@ -2992,8 +2992,8 @@ void KlearlookStyle::drawControl( } } -void KlearlookStyle::drawControlMask( ControlElement control, QPainter *p, const QWidget *widget, const QRect &r, - const QStyleOption &data ) const { +void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, + const TQStyleOption &data ) const { switch ( control ) { case CE_PushButton: if ( rounded ) { @@ -3016,8 +3016,8 @@ void KlearlookStyle::drawControlMask( ControlElement control, QPainter *p, const } } -void KlearlookStyle::drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, - const QStyleOption &data ) const { +void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, + const TQStyleOption &data ) const { switch ( control ) { case CC_ToolButton: case CC_ComboBox: @@ -3028,13 +3028,13 @@ void KlearlookStyle::drawComplexControlMask( ComplexControl control, QPainter *p } } -QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const { - QRect rect, +TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const { + TQRect rect, wrect( widget->rect() ); switch ( subrect ) { case SR_PushButtonFocusRect: { - // const QPushButton *button=(const QPushButton *)widget; + // const TQPushButton *button=(const TQPushButton *)widget; int dbw1 = 0, dbw2 = 0; @@ -3068,7 +3068,7 @@ QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const { break; } case SR_ProgressBarContents: - rect = QRect( wrect.x() + 1, + rect = TQRect( wrect.x() + 1, wrect.y() + 1, wrect.width() - 2, wrect.height() - 2 ); @@ -3082,14 +3082,14 @@ QRect KlearlookStyle::subRect( SubRect subrect, const QWidget *widget ) const { void KlearlookStyle::drawComplexControl( ComplexControl control, - QPainter *p, - const QWidget *widget, - const QRect &r, - const QColorGroup &cg, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, - const QStyleOption &data ) const + const TQStyleOption &data ) const { if ( widget == hoverWidget ) flags |= Style_MouseOver; @@ -3097,8 +3097,8 @@ void KlearlookStyle::drawComplexControl( switch ( control ) { case CC_ToolButton: { - const QToolButton * toolbutton = ( const QToolButton * ) widget; - QRect button ( querySubControlMetrics( control, widget, SC_ToolButton, data ) ), + const TQToolButton * toolbutton = ( const TQToolButton * ) widget; + TQRect button ( querySubControlMetrics( control, widget, SC_ToolButton, data ) ), menuarea( querySubControlMetrics( control, widget, SC_ToolButtonMenu, data ) ); SFlags bflags = flags, mflags = flags; @@ -3109,11 +3109,11 @@ void KlearlookStyle::drawComplexControl( } bool onControlButtons = false, - onToolbar = widget->parentWidget() && ::qt_cast<QToolBar *>( widget->parentWidget() ), + onToolbar = widget->parentWidget() && tqqt_cast<TQToolBar *>( widget->parentWidget() ), onExtender = !onToolbar && widget->parentWidget() && widget->parentWidget() ->inherits( "QToolBarExtensionWidget" ) && - ::qt_cast<QToolBar *>( widget->parentWidget() ->parentWidget() ); + tqqt_cast<TQToolBar *>( widget->parentWidget() ->parentWidget() ); if ( !onToolbar && !onExtender && widget->parentWidget() && !qstrcmp( widget->parentWidget() ->name(), "qt_maxcontrols" ) ) @@ -3149,8 +3149,8 @@ void KlearlookStyle::drawComplexControl( p->drawTiledPixmap( r, *( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() ); } else if ( widget->parent() ) { - if ( ::qt_cast<const QToolBar *>( widget->parent() ) ) { - QToolBar * parent = ( QToolBar* ) widget->parent(); + if ( tqqt_cast<const TQToolBar *>( widget->parent() ) ) { + TQToolBar * parent = ( TQToolBar* ) widget->parent(); #ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS @@ -3162,8 +3162,8 @@ void KlearlookStyle::drawComplexControl( p->fillRect( parent->rect(), cg.background() ); } else if ( widget->parent() ->inherits( "QToolBarExtensionWidget" ) ) { - QWidget * parent = ( QWidget* ) widget->parent(); - QToolBar *toolbar = ( QToolBar* ) parent->parent(); + TQWidget * parent = ( TQWidget* ) widget->parent(); + TQToolBar *toolbar = ( TQToolBar* ) parent->parent(); #ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS @@ -3185,33 +3185,33 @@ void KlearlookStyle::drawComplexControl( } if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) { - QRect fr = toolbutton->rect(); + TQRect fr = toolbutton->rect(); fr.addCoords( 3, 3, -3, -3 ); drawPrimitive( PE_FocusRect, p, fr, cg ); } break; } case CC_ComboBox: { - const QComboBox *combobox = ( const QComboBox * ) widget; + const TQComboBox *combobox = ( const TQComboBox * ) widget; - QRect frame( QStyle::visualRect( querySubControlMetrics( CC_ComboBox, + TQRect frame( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,SC_ComboBoxFrame,data ),widget ) ), - arrow( QStyle::visualRect( querySubControlMetrics( CC_ComboBox, + arrow( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, widget,SC_ComboBoxArrow,data),widget)), - field( QStyle::visualRect( querySubControlMetrics(CC_ComboBox, + field( TQStyle::visualRect( querySubControlMetrics(CC_ComboBox, widget,SC_ComboBoxEditField,data),widget)); - const QColor *use = buttonColors( cg ); + const TQColor *use = buttonColors( cg ); if ( rounded && isFormWidget( widget ) ) formMode = true; if ( controls & SC_ComboBoxFrame && frame.isValid() ) { if ( controls & SC_ComboBoxEditField && field.isValid() && combobox->editable() ) { - QRect f2( field ); - QRegion reg( r ); + TQRect f2( field ); + TQRegion reg( r ); f2.addCoords( -1, -1, 1, 1 ); reg -= f2; @@ -3232,11 +3232,11 @@ void KlearlookStyle::drawComplexControl( if ( controls & SC_ComboBoxEditField && field.isValid() ) { if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) { - QRect fr = QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); + TQRect fr = TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); fr.addCoords( 0, 0, -2, 0 ); drawPrimitive( PE_FocusRect, - p, fr, cg, flags | Style_FocusAtBorder, QStyleOption( cg.highlight() ) ); + p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption( cg.highlight() ) ); } } @@ -3245,8 +3245,8 @@ void KlearlookStyle::drawComplexControl( break; } case CC_SpinWidget: { - const QSpinWidget *spinwidget = ( const QSpinWidget * ) widget; - QRect frame( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetFrame, data ) ), + const TQSpinWidget *spinwidget = ( const TQSpinWidget * ) widget; + TQRect frame( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetFrame, data ) ), up( spinwidget->upRect() ), down( spinwidget->downRect() ); @@ -3255,7 +3255,7 @@ void KlearlookStyle::drawComplexControl( if ( ( controls & SC_SpinWidgetFrame ) && frame.isValid() ) qDrawShadePanel( - p, r, QColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], + p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ), true, pixelMetric( PM_SpinBoxFrameWidth ) ); @@ -3264,7 +3264,7 @@ void KlearlookStyle::drawComplexControl( PrimitiveElement pe = PE_SpinWidgetUp; SFlags upflags = flags; - if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus ) + if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus ) pe = PE_SpinWidgetPlus; if ( !spinwidget->isUpEnabled() ) upflags ^= Style_Enabled; @@ -3278,7 +3278,7 @@ void KlearlookStyle::drawComplexControl( PrimitiveElement pe = PE_SpinWidgetDown; SFlags downflags = flags; - if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus ) + if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus ) pe = PE_SpinWidgetMinus; if ( !spinwidget->isDownEnabled() ) downflags ^= Style_Enabled; @@ -3287,15 +3287,15 @@ void KlearlookStyle::drawComplexControl( downflags | ( ( active == SC_SpinWidgetDown ) ? Style_On | Style_Sunken : Style_Raised ) ); } - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); p->setPen( use[ 4 ].light(80) ); p->drawRect( r ); break; } case CC_ScrollBar: { - const QScrollBar *scrollbar = ( const QScrollBar * ) widget; + const TQScrollBar *scrollbar = ( const TQScrollBar * ) widget; bool hw = hoverWidget == scrollbar; - QRect subline( querySubControlMetrics( control, widget, SC_ScrollBarSubLine, data ) ), + TQRect subline( querySubControlMetrics( control, widget, SC_ScrollBarSubLine, data ) ), addline( querySubControlMetrics( control, widget, SC_ScrollBarAddLine, data ) ), subpage( querySubControlMetrics( control, widget, SC_ScrollBarSubPage, data ) ), addpage( querySubControlMetrics( control, widget, SC_ScrollBarAddPage, data ) ), @@ -3349,13 +3349,13 @@ void KlearlookStyle::drawComplexControl( // ### perhaps this should not be able to accept focus if maxedOut? if ( scrollbar->hasFocus() ) drawPrimitive( PE_FocusRect, p, - QRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ), + TQRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ), cg, Style_Default ); } break; } case CC_Slider: { - QRect groove = querySubControlMetrics( CC_Slider, widget, SC_SliderGroove, data ), + TQRect groove = querySubControlMetrics( CC_Slider, widget, SC_SliderGroove, data ), handle = querySubControlMetrics( CC_Slider, widget, SC_SliderHandle, data ); if ( ( controls & SC_SliderGroove ) && groove.isValid() ) @@ -3363,7 +3363,7 @@ void KlearlookStyle::drawComplexControl( if ( ( controls & SC_SliderHandle ) && handle.isValid() ) drawSliderHandle( p, handle, cg, flags ); if ( controls & SC_SliderTickmarks ) - QCommonStyle::drawComplexControl( + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; @@ -3373,21 +3373,21 @@ void KlearlookStyle::drawComplexControl( } } -QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl sc, - const QStyleOption &data ) const { +TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc, + const TQStyleOption &data ) const { switch ( control ) { case CC_SpinWidget: { if ( !widget ) - return QRect(); + return TQRect(); int fw = pixelMetric( PM_SpinBoxFrameWidth, 0 ); - QSize bs; + TQSize bs; bs.setHeight( widget->height() >> 1 ); if ( bs.height() < 8 ) bs.setHeight( 8 ); bs.setWidth( QMIN( bs.height() * 8 / 6, widget->width() / 4 ) ); - bs = bs.expandedTo( QApplication::globalStrut() ); + bs = bs.expandedTo( TQApplication::globalStrut() ); if ( !( bs.width() % 2 ) ) bs.setWidth( bs.width() + 1 ); @@ -3400,15 +3400,15 @@ QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWid switch ( sc ) { case SC_SpinWidgetUp: - return QRect( x, y, bs.width(), bs.height() ); + return TQRect( x, y, bs.width(), bs.height() ); case SC_SpinWidgetDown: - return QRect( x, y + bs.height(), bs.width(), bs.height() + extra ); + return TQRect( x, y + bs.height(), bs.width(), bs.height() + extra ); case SC_SpinWidgetButtonField: - return QRect( x, y, bs.width(), widget->height() - 2 * fw ); + return TQRect( x, y, bs.width(), widget->height() - 2 * fw ); case SC_SpinWidgetEditField: - return QRect( lx, fw, rx, widget->height() - 2 * fw ); + return TQRect( lx, fw, rx, widget->height() - 2 * fw ); case SC_SpinWidgetFrame: - return QRect( widget->x(), widget->y(), widget->width() - bs.width(), widget->height() ); + return TQRect( widget->x(), widget->y(), widget->width() - bs.width(), widget->height() ); } } default: @@ -3416,7 +3416,7 @@ QRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const QWid } } -int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) const { +int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) const { switch ( metric ) { case PM_MenuButtonIndicator: return 7; @@ -3428,9 +3428,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con #if QT_VERSION >= 0x030200 case PM_TabBarTabShiftVertical: { - const QTabBar *tb = ::qt_cast<const QTabBar *>( widget ); + const TQTabBar *tb = tqqt_cast<const TQTabBar *>( widget ); - return QTabBar::RoundedAbove == tb->shape() || QTabBar::TriangularAbove == tb->shape() + return TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() ? 1 : -1; } @@ -3439,9 +3439,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con #endif case PM_TabBarTabVSpace: { - const QTabBar * tb = ( const QTabBar * ) widget; - if ( tb->shape() == QTabBar::RoundedAbove || - tb->shape() == QTabBar::RoundedBelow ) + const TQTabBar * tb = ( const TQTabBar * ) widget; + if ( tb->shape() == TQTabBar::RoundedAbove || + tb->shape() == TQTabBar::RoundedBelow ) return 12; else return 4; @@ -3454,9 +3454,9 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con case PM_ButtonDefaultIndicator: return IND_BORDER == defBtnIndicator ? 1 : 0; case PM_DefaultFrameWidth: - return borderFrame && widget && ( ::qt_cast<const QTabBar *>( widget ) || - ::qt_cast<const QWidgetStack *>( widget ) || - ::qt_cast<const QPopupMenu *>( widget ) ) + return borderFrame && widget && ( tqqt_cast<const TQTabBar *>( widget ) || + tqqt_cast<const TQWidgetStack *>( widget ) || + tqqt_cast<const TQPopupMenu *>( widget ) ) ? 2 : QTC_DEF_FRAME_WIDTH; case PM_SpinBoxFrameWidth: @@ -3494,7 +3494,7 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const QWidget *widget ) con } } -int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) const { +int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const { switch ( kpm ) { case KPM_MenuItemSeparatorHeight: return 4; @@ -3503,17 +3503,17 @@ int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) } } -QSize KlearlookStyle::sizeFromContents( ContentsType t, - const QWidget *widget, - const QSize &s, - const QStyleOption &opt ) const { +TQSize KlearlookStyle::sizeFromContents( ContentsType t, + const TQWidget *widget, + const TQSize &s, + const TQStyleOption &opt ) const { switch ( t ) { case CT_PopupMenuItem: { if ( !widget || opt.isDefault() ) return s; - const QPopupMenu *popup = dynamic_cast<const QPopupMenu *>( widget ); - QMenuItem *mi = opt.menuItem(); + const TQPopupMenu *popup = dynamic_cast<const TQPopupMenu *>( widget ); + TQMenuItem *mi = opt.menuItem(); int maxpmw = opt.maxIconWidth(); int w = s.width(), h = s.height(); bool checkable = popup->isCheckable(); @@ -3533,7 +3533,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t, h = QMAX( h, mi->pixmap() ->height() + 2 ); } else { h = QMAX( h, 21 ); - QSettings s; + TQSettings s; if ( menuIcons ) h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI ); else @@ -3541,7 +3541,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t, } if ( mi->iconSet() ) { - h = QMAX( h, mi->iconSet() ->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 2 ); + h = QMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 ); } } @@ -3563,23 +3563,23 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t, w += rightBorder; - return QSize( w-25, h ); + return TQSize( w-25, h ); } case CT_PushButton: { - const QPushButton* btn = static_cast<const QPushButton*>( widget ); + const TQPushButton* btn = static_cast<const TQPushButton*>( widget ); int w = s.width() + 2 * pixelMetric( PM_ButtonMargin, widget ); int h = s.height() + 2 * pixelMetric( PM_ButtonMargin, widget ); if ( btn->text().isEmpty() && s.width() < 32 ) - return QSize( w, h ); + return TQSize( w, h ); // return button size - return QSize( w + 25, h + 3 ); + return TQSize( w + 25, h + 3 ); } case CT_ToolButton: { - if ( widget->parent() && ::qt_cast<QToolBar*>( widget->parent() ) ) - return QSize( s.width() + 2 * 4, s.height() + 2 * 4 ); + if ( widget->parent() && tqqt_cast<TQToolBar*>( widget->parent() ) ) + return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 ); else { return KStyle::sizeFromContents ( t, widget, s, opt ); } @@ -3594,7 +3594,7 @@ QSize KlearlookStyle::sizeFromContents( ContentsType t, -int KlearlookStyle::styleHint( StyleHint stylehint, const QWidget *widget, const QStyleOption &option, QStyleHintReturn *returnData ) const { +int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, QStyleHintReturn *returnData ) const { switch ( stylehint ) { case SH_EtchDisabledText: case SH_Slider_SnapToValue: @@ -3621,10 +3621,10 @@ int KlearlookStyle::styleHint( StyleHint stylehint, const QWidget *widget, const } void KlearlookStyle::drawPBarOrMenu( - QPainter *p, - QRect const &r, + TQPainter *p, + TQRect const &r, bool horiz, - const QColorGroup &cg, + const TQColorGroup &cg, bool menu ) const { switch ( pmProfile ) { @@ -3632,7 +3632,7 @@ void KlearlookStyle::drawPBarOrMenu( drawGradientWithBorder( p, r, horiz ); break; case PROFILE_RAISED: { - int flags = QStyle::Style_Raised; + int flags = TQStyle::Style_Raised; if ( horiz ) flags |= Style_Horizontal; @@ -3652,10 +3652,10 @@ void KlearlookStyle::drawPBarOrMenu( } } void KlearlookStyle::drawPBarOrMenu2( - QPainter *p, - QRect const &r, + TQPainter *p, + TQRect const &r, bool horiz, - const QColorGroup &cg, + const TQColorGroup &cg, bool menu ) const { switch ( pmProfile ) { @@ -3663,7 +3663,7 @@ void KlearlookStyle::drawPBarOrMenu2( drawGradientWithBorder( p, r, horiz ); break; case PROFILE_RAISED: { - int flags = QStyle::Style_Raised; + int flags = TQStyle::Style_Raised; if ( horiz ) flags |= Style_Horizontal; @@ -3684,11 +3684,11 @@ void KlearlookStyle::drawPBarOrMenu2( } void KlearlookStyle::drawGradientWithBorder( - QPainter *p, - QRect const &r, + TQPainter *p, + TQRect const &r, bool horiz ) const { - QRect r2( r ); + TQRect r2( r ); drawGradient( menuPbar[ GRADIENT_TOP ], menuPbar[ GRADIENT_BOTTOM ], true, borderFrame ? 2 : 1, p, r, horiz ); @@ -3709,15 +3709,15 @@ void KlearlookStyle::drawGradientWithBorder( } void KlearlookStyle::drawBevelGradient( - const QColor &base, + const TQColor &base, bool increase, int border, - QPainter *p, - QRect const &r, + TQPainter *p, + TQRect const &r, bool horiz, double shadeTop, double shadeBot ) const { //CPD TODO: Store last settings to make faster! - QColor top, bot; + TQColor top, bot; if ( equal( 1.0, shadeTop ) ) top = base; @@ -3732,16 +3732,16 @@ const { } void KlearlookStyle::drawGradient( - const QColor &top, - const QColor &bot, + const TQColor &top, + const TQColor &bot, bool increase, int border, - QPainter *p, - QRect const &r, + TQPainter *p, + TQRect const &r, bool horiz ) const { if ( r.width() > 0 && r.height() > 0 ) { - QRect grad( + TQRect grad( r.left() + border, r.top() + border, r.width() - ( border * 2 ), @@ -3751,7 +3751,7 @@ void KlearlookStyle::drawGradient( if ( top == bot ) p->fillRect( grad, top ); else { - QRect grad( + TQRect grad( r.left() + border, r.top() + border, r.width() - ( border * 2 ), @@ -3770,7 +3770,7 @@ void KlearlookStyle::drawGradient( if ( increase ) for ( i = s; i <= e ; i++ ) { - p->setPen( QColor( + p->setPen( TQColor( limit( top.red() + rc ), limit( top.green() + gc ), limit( top.blue() + bc ) @@ -3787,7 +3787,7 @@ void KlearlookStyle::drawGradient( else for ( i = e; i >= s; i-- ) { p->setPen( - QColor( + TQColor( limit( top.red() + rc ), limit( top.green() + gc ), limit( top.blue() + bc ) @@ -3808,21 +3808,21 @@ void KlearlookStyle::drawGradient( } -void KlearlookStyle::drawPopupRect( QPainter *p, const QRect &r, const QColorGroup &cg ) const +void KlearlookStyle::drawPopupRect( TQPainter *p, const TQRect &r, const TQColorGroup &cg ) const { - const QColor *use = backgroundColors( cg ); + const TQColor *use = backgroundColors( cg ); p->setPen( use[ 4 ].light(70) ); p->setBrush( NoBrush ); p->drawRect( r ); } void KlearlookStyle::drawSliderHandle( - QPainter *p, - const QRect &r, - const QColorGroup &cg, QStyle::SFlags flags + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, TQStyle::SFlags flags ) const { - const QColor * use = buttonColors( cg ); + const TQColor * use = buttonColors( cg ); if ( r.width() > r.height() ) flags |= Style_Horizontal; @@ -3840,19 +3840,19 @@ void KlearlookStyle::drawSliderHandle( } void KlearlookStyle::drawSliderGroove - ( QPainter *p, - const QRect &r, - QStyle::SFlags flags, - const QWidget *widget ) const + ( TQPainter *p, + const TQRect &r, + TQStyle::SFlags flags, + const TQWidget *widget ) const { - const QSlider * slider = ( const QSlider * ) widget; - QRect groove( r ); + const TQSlider * slider = ( const TQSlider * ) widget; + TQRect groove( r ); if ( flags & Style_HasFocus ) { - QRect fr( groove ); + TQRect fr( groove ); fr.addCoords( -1, -1, 1, 1 ); - drawPrimitive( PE_FocusRect, p, fr, QColorGroup() ); + drawPrimitive( PE_FocusRect, p, fr, TQColorGroup() ); } if ( Qt::Horizontal == slider->orientation() ) { @@ -3872,7 +3872,7 @@ void KlearlookStyle::drawSliderGroove p->drawLine( groove.x() + 1, groove.y() + 1, groove.x() + 1, groove.y() + groove.height() - 2 ); } -void KlearlookStyle::shadeColors( const QColor &base, QColor *vals ) const { +void KlearlookStyle::shadeColors( const TQColor &base, TQColor *vals ) const { QTC_SHADES int i; @@ -3883,7 +3883,7 @@ void KlearlookStyle::shadeColors( const QColor &base, QColor *vals ) const { vals[ NUM_SHADES ] = base; } -const QColor * KlearlookStyle::buttonColors( const QColorGroup &cg ) const { +const TQColor * KlearlookStyle::buttonColors( const TQColorGroup &cg ) const { if ( cg.button() != button[ NUM_SHADES ] ) { shadeColors( cg.button(), buttonColoured ); return buttonColoured; @@ -3892,7 +3892,7 @@ const QColor * KlearlookStyle::buttonColors( const QColorGroup &cg ) const { return button; } -const QColor * KlearlookStyle::backgroundColors( const QColorGroup &cg ) const { +const TQColor * KlearlookStyle::backgroundColors( const TQColorGroup &cg ) const { if ( cg.background() != gray[ NUM_SHADES ] ) { shadeColors( cg.background(), backgroundColoured ); return backgroundColoured; @@ -3905,8 +3905,8 @@ bool KlearlookStyle::redrawHoverWidget() { if ( !hoverWidget ) return false; - QPoint cursor( QCursor::pos() ), - widgetZero( hoverWidget->mapToGlobal( QPoint( 0, 0 ) ) ); + TQPoint cursor( TQCursor::pos() ), + widgetZero( hoverWidget->mapToGlobal( TQPoint( 0, 0 ) ) ); #if QT_VERSION >= 0x030200 @@ -3916,10 +3916,10 @@ bool KlearlookStyle::redrawHoverWidget() { // the widget can ocupy a larger area - and this whole are will react to mouse over. // This needs to be coounteracted // so that it looks as if only the sensitive area mouse-overs... - QRadioButton *rb = dynamic_cast<QRadioButton *>( hoverWidget ); + TQRadioButton *rb = dynamic_cast<TQRadioButton *>( hoverWidget ); if ( rb ) { - QRect rect( widgetZero.x(), widgetZero.y(), + TQRect rect( widgetZero.x(), widgetZero.y(), visualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() + pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() ); @@ -3927,10 +3927,10 @@ bool KlearlookStyle::redrawHoverWidget() { return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) || ( HOVER_NONE == hover && rect.contains( oldCursor ) ); } else { - QCheckBox *cb = dynamic_cast<QCheckBox *>( hoverWidget ); + TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget ); if ( cb ) { - QRect rect( widgetZero.x(), widgetZero.y(), + TQRect rect( widgetZero.x(), widgetZero.y(), visualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() + pixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() ); @@ -3939,11 +3939,11 @@ bool KlearlookStyle::redrawHoverWidget() { ( HOVER_NONE == hover && rect.contains( oldCursor ) ); } else { #endif - QScrollBar *sb = dynamic_cast<QScrollBar *>( hoverWidget ); + TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget ); if ( sb ) // So, are we over add button, sub button, slider, or none? { - QRect subline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSubLine ) ), + TQRect subline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSubLine ) ), addline( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarAddLine ) ), slider( querySubControlMetrics( CC_ScrollBar, hoverWidget, SC_ScrollBarSlider ) ); @@ -3971,20 +3971,20 @@ bool KlearlookStyle::redrawHoverWidget() { ( HOVER_SB_ADD != hover && addline.contains( oldCursor ) ); } else { #if KDE_VERSION >= 0x30400 - QToolButton *tb = dynamic_cast<QToolButton *>( hoverWidget ); + TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget ); if ( tb ) { hover = APP_KICKER == themedApp ? HOVER_KICKER : HOVER_NONE; return HOVER_KICKER == hover; } else { #endif - QHeader *hd = dynamic_cast<QHeader *>( hoverWidget ); + TQHeader *hd = dynamic_cast<TQHeader *>( hoverWidget ); if ( hd ) { // Hmm... this ones tricky, as there's only 1 widget - but it has different sections... // and the ones that aren't clickable should not highlight on mouse over! - QRect rect( + TQRect rect( widgetZero.x(), widgetZero.y(), hoverWidget->width(), @@ -3998,7 +3998,7 @@ bool KlearlookStyle::redrawHoverWidget() { hoverSect = QTC_NO_SECT; for ( s = 0; s < hd->count() && ( QTC_NO_SECT == hoverSect || !redraw ); ++s ) { - QRect r( hd->sectionRect( s ) ); + TQRect r( hd->sectionRect( s ) ); r.moveLeft( r.x() + widgetZero.x() ); r.moveTop( r.y() + widgetZero.y() ); @@ -4017,7 +4017,7 @@ bool KlearlookStyle::redrawHoverWidget() { } return redraw; } else - return oldCursor == QPoint( -1, -1 ); + return oldCursor == TQPoint( -1, -1 ); #if KDE_VERSION >= 0x30400 } diff --git a/src/gui/kdeext/klearlook.h b/src/gui/kdeext/klearlook.h index dd3ab74..26775c5 100644 --- a/src/gui/kdeext/klearlook.h +++ b/src/gui/kdeext/klearlook.h @@ -40,8 +40,8 @@ #include <kdeversion.h> #include <kstyle.h> -#include <qcolor.h> -#include <qpoint.h> +#include <tqcolor.h> +#include <tqpoint.h> #define QTC_CHECK_SIZE 13 #define QTC_RADIO_SIZE 13 @@ -243,71 +243,71 @@ class KlearlookStyle : public KStyle { virtual ~KlearlookStyle() {} - void polish( QApplication *app ); - void polish( QPalette &pal ); - void polish( QWidget *widget ); - void unPolish( QWidget *widget ); - void drawLightBevel( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, bool useGrad, ERound round, - const QColor &fill, const QColor *custom = NULL, bool light = false ) const; - void drawLightBevelButton( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, bool useGrad, ERound round, - const QColor &fill, const QColor *custom = NULL, bool light = false ) const; - void drawArrow( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags, QStyle::PrimitiveElement pe, + void polish( TQApplication *app ); + void polish( TQPalette &pal ); + void polish( TQWidget *widget ); + void unPolish( TQWidget *widget ); + void drawLightBevel( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, bool useGrad, ERound round, + const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const; + void drawLightBevelButton( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, bool useGrad, ERound round, + const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const; + void drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, TQStyle::PrimitiveElement pe, bool small = false, bool checkActive = false ) const; - void drawPrimitive( PrimitiveElement, QPainter *, const QRect &, const QColorGroup &, SFlags = Style_Default, - const QStyleOption & = QStyleOption::Default ) const; - void drawPrimitiveMenu( PrimitiveElement, QPainter *, const QRect &, const QColorGroup &, SFlags = Style_Default, - const QStyleOption & = QStyleOption::Default ) const; - void drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r, - const QColorGroup &cg, SFlags flags, const QStyleOption &opt ) const; - void drawControl( ControlElement, QPainter *, const QWidget *, const QRect &, const QColorGroup &, - SFlags = Style_Default, const QStyleOption & = QStyleOption::Default ) const; - void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, - const QStyleOption & = QStyleOption::Default ) const; - void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, - const QStyleOption &data ) const; - QRect subRect( SubRect, const QWidget * ) const; - void drawComplexControl( ComplexControl, QPainter *, const QWidget *, const QRect &, const QColorGroup &, + void drawPrimitive( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, + const TQStyleOption & = TQStyleOption::Default ) const; + void drawPrimitiveMenu( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, + const TQStyleOption & = TQStyleOption::Default ) const; + void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const; + void drawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; + void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, + const TQStyleOption & = TQStyleOption::Default ) const; + void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, + const TQStyleOption &data ) const; + TQRect subRect( SubRect, const TQWidget * ) const; + void drawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, - const QStyleOption & = QStyleOption::Default ) const; - QRect querySubControlMetrics( ComplexControl, const QWidget *, SubControl, - const QStyleOption & = QStyleOption::Default ) const; - int pixelMetric( PixelMetric, const QWidget *widget = 0 ) const; - int kPixelMetric( KStylePixelMetric kpm, const QWidget *widget ) const; - QSize sizeFromContents( ContentsType, const QWidget *, const QSize &, - const QStyleOption & = QStyleOption::Default ) const; - int styleHint( StyleHint, const QWidget *widget = 0, const QStyleOption & = QStyleOption::Default, + const TQStyleOption & = TQStyleOption::Default ) const; + TQRect querySubControlMetrics( ComplexControl, const TQWidget *, SubControl, + const TQStyleOption & = TQStyleOption::Default ) const; + int pixelMetric( PixelMetric, const TQWidget *widget = 0 ) const; + int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const; + TQSize sizeFromContents( ContentsType, const TQWidget *, const TQSize &, + const TQStyleOption & = TQStyleOption::Default ) const; + int styleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default, QStyleHintReturn *returnData = 0 ) const; protected: - bool eventFilter( QObject *object, QEvent *event ); - void drawPBarOrMenu( QPainter *p, QRect const &r, bool horiz, const QColorGroup &cg, bool menu = false ) const; - void drawPBarOrMenu2( QPainter *p, QRect const &r, bool horiz, const QColorGroup &cg, bool menu = false ) const; - void drawGradientWithBorder( QPainter *p, QRect const &r, bool horiz = true ) const; - void drawBevelGradient( const QColor &base, bool increase, int border, QPainter *p, QRect const &r, bool horiz, + bool eventFilter( TQObject *object, TQEvent *event ); + void drawPBarOrMenu( TQPainter *p, TQRect const &r, bool horiz, const TQColorGroup &cg, bool menu = false ) const; + void drawPBarOrMenu2( TQPainter *p, TQRect const &r, bool horiz, const TQColorGroup &cg, bool menu = false ) const; + void drawGradientWithBorder( TQPainter *p, TQRect const &r, bool horiz = true ) const; + void drawBevelGradient( const TQColor &base, bool increase, int border, TQPainter *p, TQRect const &r, bool horiz, double shadeTop, double shadeBot ) const; - void drawGradient( const QColor &top, const QColor &bot, bool increase, int border, QPainter *p, QRect const &r, + void drawGradient( const TQColor &top, const TQColor &bot, bool increase, int border, TQPainter *p, TQRect const &r, bool horiz = true ) const; - void drawSliderHandle( QPainter *p, const QRect &r, const QColorGroup &cg, QStyle::SFlags flags ) const; - void drawPopupRect( QPainter *p, const QRect &r, const QColorGroup &cg) const ; + void drawSliderHandle( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags ) const; + void drawPopupRect( TQPainter *p, const TQRect &r, const TQColorGroup &cg) const ; - void drawSliderGroove( QPainter *p, const QRect &r, QStyle::SFlags flags, const QWidget *widget ) const; + void drawSliderGroove( TQPainter *p, const TQRect &r, TQStyle::SFlags flags, const TQWidget *widget ) const; private: - void shadeColors( const QColor &base, QColor *vals ) const; - const QColor * buttonColors( const QColorGroup &cg ) const; - const QColor * backgroundColors( const QColorGroup &cg ) const; + void shadeColors( const TQColor &base, TQColor *vals ) const; + const TQColor * buttonColors( const TQColorGroup &cg ) const; + const TQColor * backgroundColors( const TQColorGroup &cg ) const; bool redrawHoverWidget(); private: - QColor menuPbar[ GRADIENT_NUM_COLS < NUM_SHADES + 1 ? NUM_SHADES + 1 : GRADIENT_NUM_COLS ], + TQColor menuPbar[ GRADIENT_NUM_COLS < NUM_SHADES + 1 ? NUM_SHADES + 1 : GRADIENT_NUM_COLS ], gray[ NUM_SHADES + 1 ], button[ NUM_SHADES + 1 ]; // Last color = base color, for comparisons! - mutable QColor buttonColoured[ NUM_SHADES + 1 ]; - mutable QColor backgroundColoured[ NUM_SHADES + 1 ]; + mutable TQColor buttonColoured[ NUM_SHADES + 1 ]; + mutable TQColor backgroundColoured[ NUM_SHADES + 1 ]; EApp themedApp; int popupmenuHighlightLevel; bool borderButton, @@ -335,9 +335,9 @@ class KlearlookStyle : public KStyle { EHover hover; int contrast; - QPoint oldCursor; + TQPoint oldCursor; mutable bool formMode; - QWidget *hoverWidget; + TQWidget *hoverWidget; int hoverSect; }; diff --git a/src/gui/rulers/ChordNameRuler.cpp b/src/gui/rulers/ChordNameRuler.cpp index 2fc98f2..001d5fd 100644 --- a/src/gui/rulers/ChordNameRuler.cpp +++ b/src/gui/rulers/ChordNameRuler.cpp @@ -45,14 +45,14 @@ #include "document/RosegardenGUIDoc.h" #include "document/MultiViewCommandHistory.h" #include "gui/general/GUIPalette.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qobject.h> -#include <qpainter.h> -#include <qrect.h> -#include <qsize.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqtooltip.h> +#include <tqwidget.h> namespace Rosegarden @@ -62,9 +62,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, RosegardenGUIDoc *doc, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -85,15 +85,15 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, m_boldFont.setPointSize(11); m_boldFont.setPixelSize(12); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground)); m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId(); - QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - QToolTip::add + TQToolTip::add (this, i18n("Chord name ruler.\nTurn it on and off from the Settings->Rulers menu.")); } @@ -103,9 +103,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, std::vector<Segment *> &segments, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -126,13 +126,13 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, m_boldFont.setPointSize(11); m_boldFont.setPixelSize(12); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::ChordNameRulerBackground)); m_compositionRefreshStatusId = m_composition->getNewRefreshStatusId(); - QObject::connect(doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); for (std::vector<Segment *>::iterator i = segments.begin(); i != segments.end(); ++i) { @@ -198,7 +198,7 @@ ChordNameRuler::sizeHint() const NOTATION_DEBUG << "Returning chord-label ruler width as " << width << endl; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -207,7 +207,7 @@ QSize ChordNameRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -407,7 +407,7 @@ ChordNameRuler::recalculate(timeT from, timeT to) } void -ChordNameRuler::paintEvent(QPaintEvent* e) +ChordNameRuler::paintEvent(TQPaintEvent* e) { if (!m_composition || !m_ready) return ; @@ -416,13 +416,13 @@ ChordNameRuler::paintEvent(QPaintEvent* e) Profiler profiler1("ChordNameRuler::paintEvent (whole)"); - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::ChordNameRulerForeground)); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - m_xorigin - 50); @@ -436,7 +436,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e) Profiler profiler2("ChordNameRuler::paintEvent (paint)"); - QRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM"); + TQRect boundsForHeight = m_fontMetrics.boundingRect("^j|lM"); int fontHeight = boundsForHeight.height(); int textY = (height() - 6) / 2 + fontHeight / 2; @@ -475,7 +475,7 @@ ChordNameRuler::paintEvent(QPaintEvent* e) (*i)->set <Int>(TEXT_FORMAL_X, (long)x); - QRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text)); + TQRect textBounds = m_fontMetrics.boundingRect(strtoqstr(text)); int width = textBounds.width(); x -= width / 2; diff --git a/src/gui/rulers/ChordNameRuler.h b/src/gui/rulers/ChordNameRuler.h index 70cdc12..988b1f4 100644 --- a/src/gui/rulers/ChordNameRuler.h +++ b/src/gui/rulers/ChordNameRuler.h @@ -28,15 +28,15 @@ #include "base/PropertyName.h" #include <map> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqsize.h> +#include <tqwidget.h> #include <vector> #include "base/Event.h" -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -69,7 +69,7 @@ public: RosegardenGUIDoc *doc, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); /** @@ -83,7 +83,7 @@ public: std::vector<Segment *> &segments, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~ChordNameRuler(); @@ -97,8 +97,8 @@ public: // may have one of these (to avoid using percussion tracks in chords): void setStudio(Studio *studio); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -106,7 +106,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: void recalculate(timeT from = 0, @@ -132,9 +132,9 @@ private: Segment *m_chordSegment; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; const PropertyName TEXT_FORMAL_X; const PropertyName TEXT_ACTUAL_X; diff --git a/src/gui/rulers/ControlChangeCommand.cpp b/src/gui/rulers/ControlChangeCommand.cpp index f6f5d0e..6d90d0d 100644 --- a/src/gui/rulers/ControlChangeCommand.cpp +++ b/src/gui/rulers/ControlChangeCommand.cpp @@ -29,7 +29,7 @@ namespace Rosegarden { -ControlChangeCommand::ControlChangeCommand(QCanvasItemList selectedItems, +ControlChangeCommand::ControlChangeCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end) : BasicCommand(i18n("Control Change"), segment, start, end, true), @@ -41,7 +41,7 @@ ControlChangeCommand::ControlChangeCommand(QCanvasItemList selectedItems, void ControlChangeCommand::modifySegment() { - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) item->updateValue(); } diff --git a/src/gui/rulers/ControlChangeCommand.h b/src/gui/rulers/ControlChangeCommand.h index cc334a4..b091f6c 100644 --- a/src/gui/rulers/ControlChangeCommand.h +++ b/src/gui/rulers/ControlChangeCommand.h @@ -26,7 +26,7 @@ #define _RG_CONTROLCHANGECOMMAND_H_ #include "document/BasicCommand.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -37,7 +37,7 @@ class ControlChangeCommand : public BasicCommand { public: - ControlChangeCommand(QCanvasItemList selectedItems, + ControlChangeCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end); virtual ~ControlChangeCommand() {;} @@ -47,7 +47,7 @@ protected: virtual void modifySegment(); - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; }; } diff --git a/src/gui/rulers/ControlItem.cpp b/src/gui/rulers/ControlItem.cpp index 623fbf3..8eb17ed 100644 --- a/src/gui/rulers/ControlItem.cpp +++ b/src/gui/rulers/ControlItem.cpp @@ -35,7 +35,7 @@ static int _canvasItemZ = 30; ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter, int xx, int width) - : QCanvasRectangle(ruler->canvas()), + : TQCanvasRectangle(ruler->canvas()), m_value(0), m_controlRuler(ruler), m_elementAdapter(elementAdapter) @@ -44,7 +44,7 @@ ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter, width = DefaultWidth/4; // avoid invisible zero-duration items } setWidth(width); - setPen(QPen(Qt::black, BorderThickness)); + setPen(TQPen(Qt::black, BorderThickness)); setBrush(Qt::blue); setX(xx); @@ -85,7 +85,7 @@ void ControlItem::updateFromValue() } } -typedef std::pair<int, QCanvasItem*> ItemPair; +typedef std::pair<int, TQCanvasItem*> ItemPair; struct ItemCmp { bool operator()(const ItemPair &i1, const ItemPair &i2) @@ -94,14 +94,14 @@ struct ItemCmp } }; -void ControlItem::draw(QPainter &painter) +void ControlItem::draw(TQPainter &painter) { if (!isEnabled()) updateFromValue(); setBrush(m_controlRuler->valueToColour(m_controlRuler->getMaxItemValue(), m_value)); - QCanvasRectangle::draw(painter); + TQCanvasRectangle::draw(painter); /* @@ -111,16 +111,16 @@ void ControlItem::draw(QPainter &painter) // calculate collisions and assign Z values accordingly // - QCanvasItemList l = collisions(false); + TQCanvasItemList l = collisions(false); std::vector<ItemPair> sortList; - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) continue; + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; - if (QCanvasRectangle *rect = dynamic_cast<QCanvasRectangle*>(*it)) + if (TQCanvasRectangle *rect = dynamic_cast<TQCanvasRectangle*>(*it)) sortList.push_back(ItemPair(rect->height(), *it)); } @@ -144,19 +144,19 @@ void ControlItem::draw(QPainter &painter) } -void ControlItem::handleMouseButtonPress(QMouseEvent*) +void ControlItem::handleMouseButtonPress(TQMouseEvent*) { // RG_DEBUG << "ControlItem::handleMouseButtonPress()" << this << endl; setEnabled(true); } -void ControlItem::handleMouseButtonRelease(QMouseEvent*) +void ControlItem::handleMouseButtonRelease(TQMouseEvent*) { // RG_DEBUG << "ControlItem::handleMouseButtonRelease()" << this << endl; setEnabled(false); } -void ControlItem::handleMouseMove(QMouseEvent*, int /*deltaX*/, int deltaY) +void ControlItem::handleMouseMove(TQMouseEvent*, int /*deltaX*/, int deltaY) { // RG_DEBUG << "ControlItem::handleMouseMove()" << this << endl; @@ -177,17 +177,17 @@ void ControlItem::handleMouseMove(QMouseEvent*, int /*deltaX*/, int deltaY) setValue(m_controlRuler->heightToValue(getHeight())); } -void ControlItem::handleMouseWheel(QWheelEvent *) +void ControlItem::handleMouseWheel(TQWheelEvent *) { // RG_DEBUG << "ControlItem::handleMouseWheel - got wheel event" << endl; } void ControlItem::setSelected(bool s) { - QCanvasItem::setSelected(s); + TQCanvasItem::setSelected(s); - if (s) setPen(QPen(Qt::red, BorderThickness)); - else setPen(QPen(Qt::black, BorderThickness)); + if (s) setPen(TQPen(Qt::red, BorderThickness)); + else setPen(TQPen(Qt::black, BorderThickness)); canvas()->update(); } diff --git a/src/gui/rulers/ControlItem.h b/src/gui/rulers/ControlItem.h index 44f9e22..e90a06d 100644 --- a/src/gui/rulers/ControlItem.h +++ b/src/gui/rulers/ControlItem.h @@ -22,7 +22,7 @@ COPYING included with this distribution for more information. */ -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -45,12 +45,12 @@ public: void setHeight(int h) { setSize(width(), h); } int getHeight() { return size().height(); } - virtual void draw(QPainter &painter); + virtual void draw(TQPainter &painter); - virtual void handleMouseButtonPress(QMouseEvent *e); - virtual void handleMouseButtonRelease(QMouseEvent *e); - virtual void handleMouseMove(QMouseEvent *e, int deltaX, int deltaY); - virtual void handleMouseWheel(QWheelEvent *e); + virtual void handleMouseButtonPress(TQMouseEvent *e); + virtual void handleMouseButtonRelease(TQMouseEvent *e); + virtual void handleMouseMove(TQMouseEvent *e, int deltaX, int deltaY); + virtual void handleMouseWheel(TQWheelEvent *e); virtual void setSelected(bool yes); diff --git a/src/gui/rulers/ControlRuler.cpp b/src/gui/rulers/ControlRuler.cpp index 12064f5..7fea1fc 100644 --- a/src/gui/rulers/ControlRuler.cpp +++ b/src/gui/rulers/ControlRuler.cpp @@ -40,15 +40,15 @@ #include "gui/general/RosegardenCanvasView.h" #include "gui/widgets/TextFloat.h" #include <kmainwindow.h> -#include <qcanvas.h> -#include <qcolor.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> @@ -63,7 +63,7 @@ const int ControlRuler::ItemHeightRange = 64; ControlRuler::ControlRuler(Segment *segment, RulerScale* rulerScale, EditViewBase* parentView, - QCanvas* c, QWidget* parent, + TQCanvas* c, TQWidget* parent, const char* name, WFlags f) : RosegardenCanvasView(c, parent, name, f), m_parentEditView(parentView), @@ -79,17 +79,17 @@ ControlRuler::ControlRuler(Segment *segment, m_itemMoved(false), m_selecting(false), m_selector(new ControlSelector(this)), - m_selectionRect(new QCanvasRectangle(canvas())), + m_selectionRect(new TQCanvasRectangle(canvas())), m_menu(0) { - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); m_selectionRect->setPen(Qt::red); setFixedHeight(sizeHint().height()); - connect(this, SIGNAL(stateChange(const QString&, bool)), - m_parentEditView, SLOT(slotStateChanged(const QString&, bool))); + connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)), + m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool))); m_numberFloat = new TextFloat(this); m_numberFloat->hide(); @@ -120,9 +120,9 @@ void ControlRuler::slotUpdateElementsHPos() { computeStaffOffset(); - QCanvasItemList list = canvas()->allItems(); + TQCanvasItemList list = canvas()->allItems(); - QCanvasItemList::Iterator it = list.begin(); + TQCanvasItemList::Iterator it = list.begin(); for (; it != list.end(); ++it) { ControlItem* item = dynamic_cast<ControlItem*>(*it); if (!item) @@ -162,7 +162,7 @@ ControlRuler::segmentDeleted(const Segment *) m_segment = 0; } -void ControlRuler::contentsMousePressEvent(QMouseEvent* e) +void ControlRuler::contentsMousePressEvent(TQMouseEvent* e) { if (e->button() != Qt::LeftButton) { m_numberFloat->hide(); @@ -172,9 +172,9 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) RG_DEBUG << "ControlRuler::contentsMousePressEvent()\n"; - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); - QCanvasItemList l = canvas()->collisions(p); + TQCanvasItemList l = canvas()->collisions(p); if (l.count() == 0) { // de-select current item clearSelectedItems(); @@ -186,12 +186,12 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) // clear selection unless control was pressed, in which case // add the event to the current selection - if (!(e->state() && QMouseEvent::ControlButton)) { + if (!(e->state() && TQMouseEvent::ControlButton)) { clearSelectedItems(); } ControlItem *topItem = 0; - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { @@ -205,7 +205,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) item->handleMouseButtonPress(e); - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *selectedItem = dynamic_cast<ControlItem*>(*it)) { @@ -216,7 +216,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) } else { // select it - if (!(e->state() && QMouseEvent::ControlButton)) { + if (!(e->state() && TQMouseEvent::ControlButton)) { if (item->z() > topItem->z()) topItem = item; @@ -243,7 +243,7 @@ void ControlRuler::contentsMousePressEvent(QMouseEvent* e) m_lastEventPos = p; } -void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) +void ControlRuler::contentsMouseReleaseEvent(TQMouseEvent* e) { if (e->button() != Qt::LeftButton) { m_numberFloat->hide(); @@ -259,7 +259,7 @@ void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) return ; } - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { ElementAdapter * adapter = item->getElementAdapter(); @@ -289,9 +289,9 @@ void ControlRuler::contentsMouseReleaseEvent(QMouseEvent* e) m_numberFloat->hide(); } -void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) +void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); int deltaX = p.x() - m_lastEventPos.x(), deltaY = p.y() - m_lastEventPos.y(); @@ -308,7 +308,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) // Borrowed from Rotary - compute total position within window // - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); int scrollX = dynamic_cast<EditView*>(m_parentEditView)->getRawCanvasView()-> horizontalScrollBar()->value(); @@ -327,7 +327,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) int value = 0; - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { item->handleMouseMove(e, deltaX, deltaY); // ElementAdapter* adapter = item->getElementAdapter(); @@ -335,7 +335,7 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) // set value to highest in selection if (item->getValue() >= value) { value = item->getValue(); - m_numberFloat->setText(QString("%1").arg(value)); + m_numberFloat->setText(TQString("%1").arg(value)); } } } @@ -346,10 +346,10 @@ void ControlRuler::contentsMouseMoveEvent(QMouseEvent* e) } void -ControlRuler::contentsWheelEvent(QWheelEvent *e) +ControlRuler::contentsWheelEvent(TQWheelEvent *e) { // not sure what to do yet - QCanvasView::contentsWheelEvent(e); + TQCanvasView::contentsWheelEvent(e); } void ControlRuler::updateSelection() @@ -358,9 +358,9 @@ void ControlRuler::updateSelection() bool haveSelectedItems = false; - QCanvasItemList l = getSelectionRectangle()->collisions(true); + TQCanvasItemList l = getSelectionRectangle()->collisions(true); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { item->setSelected(true); @@ -375,7 +375,7 @@ void ControlRuler::updateSelection() emit stateChange("have_controller_item_selected", haveSelectedItems); } -void ControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) +void ControlRuler::contentsContextMenuEvent(TQContextMenuEvent* e) { if (!m_menu && !m_menuName.isEmpty()) createMenu(); @@ -383,7 +383,7 @@ void ControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) if (m_menu) { RG_DEBUG << "ControlRuler::showMenu() - show menu with" << m_menu->count() << " items\n"; m_lastEventPos = inverseMapPoint(e->pos()); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } else RG_DEBUG << "ControlRuler::showMenu() : no menu to show\n"; @@ -396,7 +396,7 @@ void ControlRuler::createMenu() KMainWindow* parentMainWindow = dynamic_cast<KMainWindow*>(topLevelWidget()); if (parentMainWindow && parentMainWindow->factory()) { - m_menu = static_cast<QPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); + m_menu = static_cast<TQPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); if (!m_menu) { RG_DEBUG << "ControlRuler::createMenu() failed\n"; @@ -409,7 +409,7 @@ void ControlRuler::createMenu() void ControlRuler::clearSelectedItems() { - for (QCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = m_selectedItems.begin(); it != m_selectedItems.end(); ++it) { (*it)->setSelected(false); } m_selectedItems.clear(); @@ -420,9 +420,9 @@ ControlRuler::clearSelectedItems() void ControlRuler::clear() { - QCanvasItemList allItems = canvas()->allItems(); + TQCanvasItemList allItems = canvas()->allItems(); - for (QCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { delete item; } @@ -451,7 +451,7 @@ long ControlRuler::heightToValue(int h) return val; } -QColor ControlRuler::valueToColour(int max, int val) +TQColor ControlRuler::valueToColour(int max, int val) { int maxDefault = DefaultVelocityColour::getInstance()->getMaxValue(); @@ -476,11 +476,11 @@ void ControlRuler::flipForwards() { std::pair<int, int> minMax = getZMinMax(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; // match min @@ -497,11 +497,11 @@ void ControlRuler::flipBackwards() { std::pair<int, int> minMax = getZMinMax(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; // match min @@ -516,12 +516,12 @@ void ControlRuler::flipBackwards() std::pair<int, int> ControlRuler::getZMinMax() { - QCanvasItemList l = canvas()->allItems(); + TQCanvasItemList l = canvas()->allItems(); std::vector<int> zList; - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { // skip all but rectangles - if ((*it)->rtti() != QCanvasItem::Rtti_Rectangle) continue; + if ((*it)->rtti() != TQCanvasItem::Rtti_Rectangle) continue; zList.push_back(int((*it)->z())); } @@ -530,7 +530,7 @@ std::pair<int, int> ControlRuler::getZMinMax() return std::pair<int, int>(zList[0], zList[zList.size() - 1]); } -QScrollBar* ControlRuler::getMainHorizontalScrollBar() +TQScrollBar* ControlRuler::getMainHorizontalScrollBar() { return m_mainHorizontalScrollBar ? m_mainHorizontalScrollBar : horizontalScrollBar(); } diff --git a/src/gui/rulers/ControlRuler.h b/src/gui/rulers/ControlRuler.h index ac6eba4..d9f4882 100644 --- a/src/gui/rulers/ControlRuler.h +++ b/src/gui/rulers/ControlRuler.h @@ -28,20 +28,20 @@ #include "base/Segment.h" #include "gui/general/RosegardenCanvasView.h" -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> #include <utility> -class QWidget; -class QWheelEvent; -class QScrollBar; -class QPopupMenu; -class QMouseEvent; -class QContextMenuEvent; -class QCanvasRectangle; -class QCanvas; +class TQWidget; +class TQWheelEvent; +class TQScrollBar; +class TQPopupMenu; +class TQMouseEvent; +class TQContextMenuEvent; +class TQCanvasRectangle; +class TQCanvas; namespace Rosegarden @@ -70,11 +70,11 @@ public: ControlRuler(Segment*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, const char* name=0, WFlags f=0); + TQCanvas*, + TQWidget* parent=0, const char* name=0, WFlags f=0); virtual ~ControlRuler(); - virtual QString getName() = 0; + virtual TQString getName() = 0; int getMaxItemValue() { return m_maxItemValue; } void setMaxItemValue(int val) { m_maxItemValue = val; } @@ -85,7 +85,7 @@ public: int applyTool(double x, int val); - QCanvasRectangle* getSelectionRectangle() { return m_selectionRect; } + TQCanvasRectangle* getSelectionRectangle() { return m_selectionRect; } RulerScale* getRulerScale() { return m_rulerScale; } @@ -100,10 +100,10 @@ public: void flipForwards(); void flipBackwards(); - void setMainHorizontalScrollBar(QScrollBar* s ) { m_mainHorizontalScrollBar = s; } + void setMainHorizontalScrollBar(TQScrollBar* s ) { m_mainHorizontalScrollBar = s; } signals: - void stateChange(const QString&, bool); + void stateChange(const TQString&, bool); public slots: /// override RosegardenCanvasView - we don't want to change the main hscrollbar @@ -111,13 +111,13 @@ public slots: virtual void slotUpdateElementsHPos(); protected: - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); - virtual void contentsWheelEvent(QWheelEvent*); - virtual void contentsContextMenuEvent(QContextMenuEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); + virtual void contentsWheelEvent(TQWheelEvent*); + virtual void contentsContextMenuEvent(TQContextMenuEvent*); - virtual QScrollBar* getMainHorizontalScrollBar(); + virtual TQScrollBar* getMainHorizontalScrollBar(); virtual void computeStaffOffset() {}; @@ -134,24 +134,24 @@ protected: int valueToHeight(long val); long heightToValue(int height); - QColor valueToColour(int max, int val); + TQColor valueToColour(int max, int val); void clearSelectedItems(); void updateSelection(); - void setMenuName(QString menuName) { m_menuName = menuName; } + void setMenuName(TQString menuName) { m_menuName = menuName; } void createMenu(); //--------------- Data members --------------------------------- EditViewBase* m_parentEditView; - QScrollBar* m_mainHorizontalScrollBar; + TQScrollBar* m_mainHorizontalScrollBar; RulerScale* m_rulerScale; EventSelection* m_eventSelection; Segment* m_segment; ControlItem* m_currentItem; - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; ControlTool *m_tool; @@ -161,15 +161,15 @@ protected: double m_currentX; - QPoint m_lastEventPos; + TQPoint m_lastEventPos; bool m_itemMoved; bool m_selecting; ControlSelector* m_selector; - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; - QString m_menuName; - QPopupMenu* m_menu; + TQString m_menuName; + TQPopupMenu* m_menu; TextFloat *m_numberFloat; diff --git a/src/gui/rulers/ControlRulerEventEraseCommand.cpp b/src/gui/rulers/ControlRulerEventEraseCommand.cpp index 7a1e493..743ee16 100644 --- a/src/gui/rulers/ControlRulerEventEraseCommand.cpp +++ b/src/gui/rulers/ControlRulerEventEraseCommand.cpp @@ -31,7 +31,7 @@ namespace Rosegarden { -ControlRulerEventEraseCommand::ControlRulerEventEraseCommand(QCanvasItemList selectedItems, +ControlRulerEventEraseCommand::ControlRulerEventEraseCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end) : BasicCommand(i18n("Erase Controller Event(s)"), @@ -49,7 +49,7 @@ void ControlRulerEventEraseCommand::modifySegment() { Segment &segment(getSegment()); - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) segment.eraseSingle(item->getElementAdapter()->getEvent()); } diff --git a/src/gui/rulers/ControlRulerEventEraseCommand.h b/src/gui/rulers/ControlRulerEventEraseCommand.h index 15e213b..7142179 100644 --- a/src/gui/rulers/ControlRulerEventEraseCommand.h +++ b/src/gui/rulers/ControlRulerEventEraseCommand.h @@ -27,7 +27,7 @@ #include "base/Event.h" #include "document/BasicCommand.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -36,7 +36,7 @@ class ControlRulerEventEraseCommand : public BasicCommand { public: - ControlRulerEventEraseCommand(QCanvasItemList selectedItems, + ControlRulerEventEraseCommand(TQCanvasItemList selectedItems, Segment &segment, Rosegarden::timeT start, Rosegarden::timeT end); virtual ~ControlRulerEventEraseCommand() {;} @@ -46,7 +46,7 @@ protected: virtual void modifySegment(); - QCanvasItemList m_selectedItems; + TQCanvasItemList m_selectedItems; }; } diff --git a/src/gui/rulers/ControlSelector.cpp b/src/gui/rulers/ControlSelector.cpp index fb4abbb..15e2814 100644 --- a/src/gui/rulers/ControlSelector.cpp +++ b/src/gui/rulers/ControlSelector.cpp @@ -30,14 +30,14 @@ namespace Rosegarden { ControlSelector::ControlSelector(ControlRuler* parent) - : QObject(parent), + : TQObject(parent), m_ruler(parent) { } -void ControlSelector::handleMouseButtonPress(QMouseEvent *e) +void ControlSelector::handleMouseButtonPress(TQMouseEvent *e) { - QPoint p = m_ruler->inverseMapPoint(e->pos()); + TQPoint p = m_ruler->inverseMapPoint(e->pos()); getSelectionRectangle()->setX(p.x()); getSelectionRectangle()->setY(p.y()); @@ -47,15 +47,15 @@ void ControlSelector::handleMouseButtonPress(QMouseEvent *e) m_ruler->canvas()->update(); } -void ControlSelector::handleMouseButtonRelease(QMouseEvent*) +void ControlSelector::handleMouseButtonRelease(TQMouseEvent*) { getSelectionRectangle()->hide(); m_ruler->canvas()->update(); } -void ControlSelector::handleMouseMove(QMouseEvent *e, int, int) +void ControlSelector::handleMouseMove(TQMouseEvent *e, int, int) { - QPoint p = m_ruler->inverseMapPoint(e->pos()); + TQPoint p = m_ruler->inverseMapPoint(e->pos()); int w = int(p.x() - getSelectionRectangle()->x()); int h = int(p.y() - getSelectionRectangle()->y()); diff --git a/src/gui/rulers/ControlSelector.h b/src/gui/rulers/ControlSelector.h index 99ec773..9b01785 100644 --- a/src/gui/rulers/ControlSelector.h +++ b/src/gui/rulers/ControlSelector.h @@ -27,7 +27,7 @@ #include "ControlRuler.h" -class QCanvasRectangle; +class TQCanvasRectangle; namespace Rosegarden { @@ -44,11 +44,11 @@ public: ControlSelector(ControlRuler* parent); virtual ~ControlSelector() {}; - virtual void handleMouseButtonPress(QMouseEvent *e); - virtual void handleMouseButtonRelease(QMouseEvent *e); - virtual void handleMouseMove(QMouseEvent *e, int deltaX, int deltaY); + virtual void handleMouseButtonPress(TQMouseEvent *e); + virtual void handleMouseButtonRelease(TQMouseEvent *e); + virtual void handleMouseMove(TQMouseEvent *e, int deltaX, int deltaY); - QCanvasRectangle* getSelectionRectangle() { return m_ruler->getSelectionRectangle(); } + TQCanvasRectangle* getSelectionRectangle() { return m_ruler->getSelectionRectangle(); } protected: //--------------- Data members --------------------------------- diff --git a/src/gui/rulers/ControllerEventsRuler.cpp b/src/gui/rulers/ControllerEventsRuler.cpp index 265a701..3cb6788 100644 --- a/src/gui/rulers/ControllerEventsRuler.cpp +++ b/src/gui/rulers/ControllerEventsRuler.cpp @@ -44,12 +44,12 @@ #include "gui/general/EditViewBase.h" #include "gui/widgets/TextFloat.h" #include <klineeditdlg.h> -#include <qcanvas.h> -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> -#include <qvalidator.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqvalidator.h> +#include <tqwidget.h> namespace Rosegarden @@ -58,13 +58,13 @@ namespace Rosegarden ControllerEventsRuler::ControllerEventsRuler(Segment *segment, RulerScale* rulerScale, EditViewBase* parentView, - QCanvas* c, - QWidget* parent, + TQCanvas* c, + TQWidget* parent, const ControlParameter *controller, const char* name, WFlags f) : ControlRuler(segment, rulerScale, parentView, c, parent, name, f), m_defaultItemWidth(20), - m_controlLine(new QCanvasLine(canvas())), + m_controlLine(new TQCanvasLine(canvas())), m_controlLineShowing(false), m_controlLineX(0), m_controlLineY(0) @@ -142,36 +142,36 @@ ControllerEventsRuler::drawBackground() { // Draw some minimum and maximum controller value guide lines // - QCanvasLine *topLine = new QCanvasLine(canvas()); - QCanvasLine *topQLine = new QCanvasLine(canvas()); - QCanvasLine *midLine = new QCanvasLine(canvas()); - QCanvasLine *botQLine = new QCanvasLine(canvas()); - QCanvasLine *bottomLine = new QCanvasLine(canvas()); + TQCanvasLine *topLine = new TQCanvasLine(canvas()); + TQCanvasLine *topQLine = new TQCanvasLine(canvas()); + TQCanvasLine *midLine = new TQCanvasLine(canvas()); + TQCanvasLine *botQLine = new TQCanvasLine(canvas()); + TQCanvasLine *bottomLine = new TQCanvasLine(canvas()); //m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY); int cHeight = canvas()->height(); int cWidth = canvas()->width(); - topLine->setPen(QColor(127, 127, 127)); + topLine->setPen(TQColor(127, 127, 127)); topLine->setPoints(0, 0, cWidth, 0); topLine->setZ( -10); topLine->show(); - topQLine->setPen(QColor(192, 192, 192)); + topQLine->setPen(TQColor(192, 192, 192)); topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); topQLine->setZ( -10); topQLine->show(); - midLine->setPen(QColor(127, 127, 127)); + midLine->setPen(TQColor(127, 127, 127)); midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2); midLine->setZ( -10); midLine->show(); - botQLine->setPen(QColor(192, 192, 192)); + botQLine->setPen(TQColor(192, 192, 192)); botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); botQLine->setZ( -10); botQLine->show(); - bottomLine->setPen(QColor(127, 127, 127)); + bottomLine->setPen(TQColor(127, 127, 127)); bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1); bottomLine->setZ( -10); bottomLine->show(); @@ -182,16 +182,16 @@ ControllerEventsRuler::drawBackground() ControllerEventsRuler::~ControllerEventsRuler() {} -QString ControllerEventsRuler::getName() +TQString ControllerEventsRuler::getName() { if (m_controller) { - QString name = i18n("Unsupported Event Type"); + TQString name = i18n("Unsupported Event Type"); if (m_controller->getType() == Controller::EventType) { - QString hexValue; + TQString hexValue; hexValue.sprintf("0x%x", m_controller->getControllerValue()); - name = QString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName())) + name = TQString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName())) .arg(int(m_controller->getControllerValue())) .arg(hexValue); } else if (m_controller->getType() == PitchBend::EventType) { @@ -240,9 +240,9 @@ void ControllerEventsRuler::eventRemoved(const Segment*, Event *e) clearSelectedItems(); - QCanvasItemList allItems = canvas()->allItems(); + TQCanvasItemList allItems = canvas()->allItems(); - for (QCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { ControllerEventAdapter * adapter = dynamic_cast<ControllerEventAdapter*>(item->getElementAdapter()); if (adapter->getEvent() == e) { @@ -274,8 +274,8 @@ void ControllerEventsRuler::insertControllerEvent() number = m_controller->getControllerValue(); } else { bool ok = false; - QIntValidator intValidator(0, 128, this); - QString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0", + TQIntValidator intValidator(0, 128, this); + TQString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0", &ok, this, &intValidator); if (ok) number = res.toULong(); @@ -339,7 +339,7 @@ void ControllerEventsRuler::startControlLine() this->setCursor(Qt::pointingHandCursor); } -void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e) +void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { if (e->button() == MidButton) @@ -360,7 +360,7 @@ void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e) } if (e->button() == LeftButton) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_controlLine->show(); m_controlLineX = p.x(); @@ -370,7 +370,7 @@ void ControllerEventsRuler::contentsMousePressEvent(QMouseEvent *e) } } -void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e) +void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { if (e->button() == MidButton) @@ -380,7 +380,7 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e) return ; } else { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); timeT startTime = m_rulerScale->getTimeForX(m_controlLineX); timeT endTime = m_rulerScale->getTimeForX(p.x()); @@ -404,7 +404,7 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(QMouseEvent *e) } } -void ControllerEventsRuler::contentsMouseMoveEvent(QMouseEvent *e) +void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { // Don't send super if we're using the middle button @@ -418,7 +418,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(QMouseEvent *e) return ; } - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_controlLine->setPoints(m_controlLineX, m_controlLineY, p.x(), p.y()); canvas()->update(); diff --git a/src/gui/rulers/ControllerEventsRuler.h b/src/gui/rulers/ControllerEventsRuler.h index 2b42274..9f077fc 100644 --- a/src/gui/rulers/ControllerEventsRuler.h +++ b/src/gui/rulers/ControllerEventsRuler.h @@ -27,14 +27,14 @@ #define _RG_CONTROLLEREVENTSRULER_H_ #include "ControlRuler.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QMouseEvent; -class QCanvasLine; -class QCanvas; +class TQWidget; +class TQMouseEvent; +class TQCanvasLine; +class TQCanvas; namespace Rosegarden @@ -57,14 +57,14 @@ public: ControllerEventsRuler(Segment*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, + TQCanvas*, + TQWidget* parent=0, const ControlParameter *controller = 0, const char* name=0, WFlags f=0); virtual ~ControllerEventsRuler(); - virtual QString getName(); + virtual TQString getName(); int getDefaultItemWidth() { return m_defaultItemWidth; } // Allow something external to reset the selection of Events @@ -90,9 +90,9 @@ protected: // Let's override these again here // - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); virtual void layoutItem(ControlItem*); @@ -105,7 +105,7 @@ protected: int m_defaultItemWidth; ControlParameter *m_controller; - QCanvasLine *m_controlLine; + TQCanvasLine *m_controlLine; bool m_controlLineShowing; int m_controlLineX; diff --git a/src/gui/rulers/DefaultVelocityColour.cpp b/src/gui/rulers/DefaultVelocityColour.cpp index 21cf75e..9962cf0 100644 --- a/src/gui/rulers/DefaultVelocityColour.cpp +++ b/src/gui/rulers/DefaultVelocityColour.cpp @@ -26,7 +26,7 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" -#include <qcolor.h> +#include <tqcolor.h> #include "VelocityColour.h" diff --git a/src/gui/rulers/LoopRuler.cpp b/src/gui/rulers/LoopRuler.cpp index bdf6c5e..0a0adb2 100644 --- a/src/gui/rulers/LoopRuler.cpp +++ b/src/gui/rulers/LoopRuler.cpp @@ -31,15 +31,15 @@ #include "gui/general/GUIPalette.h" #include "gui/general/HZoomable.h" #include "gui/general/RosegardenCanvasView.h" -#include <qpainter.h> -#include <qrect.h> -#include <qsize.h> -#include <qwidget.h> -#include <qtooltip.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqtooltip.h> #include <klocale.h> #include <kaction.h> -#include <qpainter.h> -#include <qpointarray.h> +#include <tqpainter.h> +#include <tqpointarray.h> #include "document/RosegardenGUIDoc.h" @@ -51,9 +51,9 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, int height, double xorigin, bool invert, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_doc(doc), m_height(height), m_xorigin(xorigin), @@ -67,7 +67,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, m_grid(&m_defaultGrid), m_loopingMode(false), m_startLoop(0), m_endLoop(0), - m_quickMarkerPen(QPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4)) + m_quickMarkerPen(TQPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4)) { /* * I need to understand if this ruler is being built for the main @@ -85,7 +85,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, m_defaultGrid.setSnapTime(SnapGrid::NoSnap); m_loopGrid.setSnapTime(SnapGrid::SnapToBeat); - QToolTip::add + TQToolTip::add (this, i18n("Click and drag to move the playback pointer.\nShift-click and drag to set a range for looping or editing.\nShift-click to clear the loop or range.\nDouble-click to start playback.")); } @@ -125,30 +125,30 @@ void LoopRuler::scrollHoriz(int x) } } -QSize LoopRuler::sizeHint() const +TQSize LoopRuler::sizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } -QSize LoopRuler::minimumSizeHint() const +TQSize LoopRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } -void LoopRuler::paintEvent(QPaintEvent* e) +void LoopRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); if (getHScaleFactor() != 1.0) paint.scale(getHScaleFactor(), 1.0); @@ -178,9 +178,9 @@ void LoopRuler::paintEvent(QPaintEvent* e) } } -void LoopRuler::drawBarSections(QPainter* paint) +void LoopRuler::drawBarSections(TQPainter* paint) { - QRect clipRect = paint->clipRegion().boundingRect(); + TQRect clipRect = paint->clipRegion().boundingRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -229,7 +229,7 @@ void LoopRuler::drawBarSections(QPainter* paint) } void -LoopRuler::drawLoopMarker(QPainter* paint) +LoopRuler::drawLoopMarker(TQPainter* paint) { double x1 = (int)m_rulerScale->getXForTime(m_startLoop); double x2 = (int)m_rulerScale->getXForTime(m_endLoop); @@ -251,7 +251,7 @@ LoopRuler::drawLoopMarker(QPainter* paint) } void -LoopRuler::mousePressEvent(QMouseEvent *mE) +LoopRuler::mousePressEvent(TQMouseEvent *mE) { RG_DEBUG << "LoopRuler::mousePressEvent: x = " << mE->x() << endl; @@ -278,7 +278,7 @@ LoopRuler::mousePressEvent(QMouseEvent *mE) } void -LoopRuler::mouseReleaseEvent(QMouseEvent *mE) +LoopRuler::mouseReleaseEvent(TQMouseEvent *mE) { if (mE->button() == LeftButton) { if (m_loopingMode) { @@ -313,7 +313,7 @@ LoopRuler::mouseReleaseEvent(QMouseEvent *mE) } void -LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE) +LoopRuler::mouseDoubleClickEvent(TQMouseEvent *mE) { double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin; if (x < 0) @@ -326,7 +326,7 @@ LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE) } void -LoopRuler::mouseMoveEvent(QMouseEvent *mE) +LoopRuler::mouseMoveEvent(TQMouseEvent *mE) { double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin; if (x < 0) @@ -351,7 +351,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop, m_startLoop = startLoop; m_endLoop = endLoop; - QPainter paint(this); + TQPainter paint(this); paint.setBrush(colorGroup().foreground()); drawBarSections(&paint); drawLoopMarker(&paint); diff --git a/src/gui/rulers/LoopRuler.h b/src/gui/rulers/LoopRuler.h index 7c30cc8..dfe88ae 100644 --- a/src/gui/rulers/LoopRuler.h +++ b/src/gui/rulers/LoopRuler.h @@ -28,15 +28,15 @@ #include "base/SnapGrid.h" #include "gui/general/HZoomable.h" -#include <qsize.h> -#include <qwidget.h> -#include <qpen.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqpen.h> #include "base/Event.h" -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -51,7 +51,7 @@ class RosegardenGUIDoc; * ruler-like scale, and reacts to mouse clicks by sending relevant * signals to modify position pointer and playback/looping states. */ -class LoopRuler : public QWidget, public HZoomable +class LoopRuler : public TQWidget, public HZoomable { Q_OBJECT @@ -61,15 +61,15 @@ public: int height = 0, double xorigin = 0.0, bool invert = false, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~LoopRuler(); void setSnapGrid(SnapGrid *grid); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void scrollHoriz(int x); @@ -87,16 +87,16 @@ public slots: protected: // ActiveItem interface - virtual void mousePressEvent (QMouseEvent*); - virtual void mouseReleaseEvent (QMouseEvent*); - virtual void mouseDoubleClickEvent (QMouseEvent*); - virtual void mouseMoveEvent (QMouseEvent*); + virtual void mousePressEvent (TQMouseEvent*); + virtual void mouseReleaseEvent (TQMouseEvent*); + virtual void mouseDoubleClickEvent (TQMouseEvent*); + virtual void mouseMoveEvent (TQMouseEvent*); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); void setLoopingMode(bool value) { m_loopingMode = value; } - void drawBarSections(QPainter*); - void drawLoopMarker(QPainter*); // between loop positions + void drawBarSections(TQPainter*); + void drawLoopMarker(TQPainter*); // between loop positions signals: // The three main functions that this class performs @@ -136,7 +136,7 @@ protected: SnapGrid m_defaultGrid; SnapGrid m_loopGrid; SnapGrid *m_grid; - QPen m_quickMarkerPen; + TQPen m_quickMarkerPen; bool m_loopingMode; timeT m_startLoop; timeT m_endLoop; diff --git a/src/gui/rulers/MarkerRuler.cpp b/src/gui/rulers/MarkerRuler.cpp index 7dcb67a..5d328a8 100644 --- a/src/gui/rulers/MarkerRuler.cpp +++ b/src/gui/rulers/MarkerRuler.cpp @@ -36,22 +36,22 @@ #include "commands/edit/ModifyMarkerCommand.h" #include "document/MultiViewCommandHistory.h" #include <kxmlguifactory.h> -#include <qbrush.h> -#include <qcursor.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcursor.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <klocale.h> #include <kaction.h> #include <kstddirs.h> -#include <qtooltip.h> +#include <tqtooltip.h> namespace Rosegarden @@ -61,10 +61,10 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, RulerScale *rulerScale, int barHeight, double xorigin, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f) - : QWidget(parent, name, f), + : TQWidget(parent, name, f), m_barHeight(barHeight), m_xorigin(xorigin), m_currentXOffset(0), @@ -80,42 +80,42 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, // Otherwise we'll end up adding all actions to the same // (document-level) action collection regardless of which window // we're in. - QObject *probe = parent; + TQObject *probe = parent; while (probe && !dynamic_cast<KMainWindow *>(probe)) probe = probe->parent(); if (probe) m_parentMainWindow = dynamic_cast<KMainWindow *>(probe); - // m_barFont = new QFont("helvetica", 12); + // m_barFont = new TQFont("helvetica", 12); // m_barFont->setPixelSize(12); - m_barFont = new QFont(); + m_barFont = new TQFont(); m_barFont->setPointSize(10); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon; // Use the event insert, delete, edit icons because they are // actually generic enough to serve for anything. Let's hope they // don't become more event-specific in future... - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-insert.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); new KAction(i18n("Insert Marker"), icon, 0, this, - SLOT(slotInsertMarkerHere()), actionCollection(), + TQT_SLOT(slotInsertMarkerHere()), actionCollection(), "insert_marker_here"); new KAction(i18n("Insert Marker at Playback Position"), 0, this, - SLOT(slotInsertMarkerAtPointer()), actionCollection(), + TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), "insert_marker_at_pointer"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-delete.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); new KAction(i18n("Delete Marker"), icon, 0, this, - SLOT(slotDeleteMarker()), actionCollection(), + TQT_SLOT(slotDeleteMarker()), actionCollection(), "delete_marker"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-edit.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); new KAction(i18n("Edit Marker..."), icon, 0, this, - SLOT(slotEditMarker()), actionCollection(), + TQT_SLOT(slotEditMarker()), actionCollection(), "edit_marker"); - QToolTip::add + TQToolTip::add (this, i18n("Click on a marker to move the playback pointer.\nShift-click to set a range between markers.\nDouble-click to open the marker editor.")); } @@ -137,14 +137,14 @@ MarkerRuler::createMenu() KXMLGUIFactory* factory = m_parentMainWindow->factory(); factory->addClient(this); - QWidget* tmp = factory->container("marker_ruler_menu", this); + TQWidget* tmp = factory->container("marker_ruler_menu", this); // if (!tmp) { // RG_DEBUG << "MarkerRuler::createMenu() menu not found\n" // << domDocument().toString(4) << endl; // } - m_menu = dynamic_cast<QPopupMenu*>(tmp); + m_menu = dynamic_cast<TQPopupMenu*>(tmp); if (!m_menu) { RG_DEBUG << "MarkerRuler::createMenu() failed\n"; @@ -159,7 +159,7 @@ MarkerRuler::scrollHoriz(int x) repaint(); } -QSize +TQSize MarkerRuler::sizeHint() const { int lastBar = @@ -168,15 +168,15 @@ MarkerRuler::sizeHint() const m_rulerScale->getBarPosition(lastBar) + m_rulerScale->getBarWidth(lastBar) + m_xorigin; - return QSize(std::max(int(width), m_width), m_barHeight); + return TQSize(std::max(int(width), m_width), m_barHeight); } -QSize +TQSize MarkerRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - return QSize(static_cast<int>(firstBarWidth), m_barHeight); + return TQSize(static_cast<int>(firstBarWidth), m_barHeight); } void @@ -220,7 +220,7 @@ MarkerRuler::slotEditMarker() // it, be my guest. MarkerModifyDialog dialog(this, &m_doc->getComposition(), marker); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ModifyMarkerCommand *command = new ModifyMarkerCommand(&m_doc->getComposition(), marker->getID(), @@ -244,7 +244,7 @@ MarkerRuler::getClickPosition() Rosegarden::Marker* MarkerRuler::getMarkerAtClickPosition() { - QRect clipRect = visibleRect(); + TQRect clipRect = visibleRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -261,16 +261,16 @@ MarkerRuler::getMarkerAtClickPosition() timeT end = comp.getBarEnd(lastBar); // need these to calculate the visible extents of a marker tag - QPainter painter(this); + TQPainter painter(this); painter.setFont(*m_barFont); - QFontMetrics metrics = painter.fontMetrics(); + TQFontMetrics metrics = painter.fontMetrics(); for (Composition::markerconstiterator i = markers.begin(); i != markers.end(); ++i) { if ((*i)->getTime() >= start && (*i)->getTime() < end) { - QString name(strtoqstr((*i)->getName())); + TQString name(strtoqstr((*i)->getName())); int x = m_rulerScale->getXForTime((*i)->getTime()) + m_xorigin + m_currentXOffset; @@ -299,15 +299,15 @@ MarkerRuler::getMarkerAtClickPosition() } void -MarkerRuler::paintEvent(QPaintEvent*) +MarkerRuler::paintEvent(TQPaintEvent*) { - QPainter painter(this); + TQPainter painter(this); painter.setFont(*m_barFont); if (getHScaleFactor() != 1.0) painter.scale(getHScaleFactor(), 1.0); - QRect clipRect = visibleRect(); + TQRect clipRect = visibleRect(); int firstBar = m_rulerScale->getBarForX(clipRect.x() - m_currentXOffset - @@ -360,19 +360,19 @@ MarkerRuler::paintEvent(QPaintEvent*) painter.drawLine(static_cast<int>(x), 0, static_cast<int>(x), m_barHeight); // disable worldXForm for text - QPoint textDrawPoint = painter.xForm(QPoint(static_cast<int>(x + 4), 12)); + TQPoint textDrawPoint = painter.xForm(TQPoint(static_cast<int>(x + 4), 12)); bool enableXForm = painter.hasWorldXForm(); painter.setWorldXForm(false); if (i >= 0) - painter.drawText(textDrawPoint, QString("%1").arg(i + 1)); + painter.drawText(textDrawPoint, TQString("%1").arg(i + 1)); painter.setWorldXForm(enableXForm); } else { - const QPen normalPen = painter.pen(); + const TQPen normalPen = painter.pen(); ; - QPen endPen(black, 2); + TQPen endPen(black, 2); painter.setPen(endPen); painter.drawLine(static_cast<int>(x), 0, static_cast<int>(x), m_barHeight); painter.setPen(normalPen); @@ -387,11 +387,11 @@ MarkerRuler::paintEvent(QPaintEvent*) timeT start = comp.getBarStart(firstBar); timeT end = comp.getBarEnd(lastBar); - QFontMetrics metrics = painter.fontMetrics(); + TQFontMetrics metrics = painter.fontMetrics(); for (it = markers.begin(); it != markers.end(); ++it) { if ((*it)->getTime() >= start && (*it)->getTime() < end) { - QString name(strtoqstr((*it)->getName())); + TQString name(strtoqstr((*it)->getName())); double x = m_rulerScale->getXForTime((*it)->getTime()) + m_xorigin + m_currentXOffset; @@ -399,13 +399,13 @@ MarkerRuler::paintEvent(QPaintEvent*) painter.fillRect(static_cast<int>(x), 1, static_cast<int>(metrics.width(name) + 5), m_barHeight - 2, - QBrush(GUIPalette::getColour(GUIPalette::MarkerBackground))); + TQBrush(GUIPalette::getColour(GUIPalette::MarkerBackground))); painter.drawLine(int(x), 1, int(x), m_barHeight - 2); painter.drawLine(int(x) + 1, 1, int(x) + 1, m_barHeight - 2); - QPoint textDrawPoint = painter.xForm - (QPoint(static_cast<int>(x + 3), m_barHeight - 4)); + TQPoint textDrawPoint = painter.xForm + (TQPoint(static_cast<int>(x + 3), m_barHeight - 4)); // disable worldXForm for text bool enableXForm = painter.hasWorldXForm(); @@ -420,7 +420,7 @@ MarkerRuler::paintEvent(QPaintEvent*) } void -MarkerRuler::mousePressEvent(QMouseEvent *e) +MarkerRuler::mousePressEvent(TQMouseEvent *e) { RG_DEBUG << "MarkerRuler::mousePressEvent: x = " << e->x() << endl; @@ -438,7 +438,7 @@ MarkerRuler::mousePressEvent(QMouseEvent *e) if (m_menu) { actionCollection()->action("delete_marker")->setEnabled(clickedMarker != 0); actionCollection()->action("edit_marker")->setEnabled(clickedMarker != 0); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } return; } @@ -479,7 +479,7 @@ MarkerRuler::mousePressEvent(QMouseEvent *e) } void -MarkerRuler::mouseDoubleClickEvent(QMouseEvent *) +MarkerRuler::mouseDoubleClickEvent(TQMouseEvent *) { RG_DEBUG << "MarkerRuler::mouseDoubleClickEvent" << endl; diff --git a/src/gui/rulers/MarkerRuler.h b/src/gui/rulers/MarkerRuler.h index c77e6a9..29c90d0 100644 --- a/src/gui/rulers/MarkerRuler.h +++ b/src/gui/rulers/MarkerRuler.h @@ -27,16 +27,16 @@ #define _RG_MARKERRULER_H_ #include "gui/general/HZoomable.h" -#include <qsize.h> -#include <qwidget.h> +#include <tqsize.h> +#include <tqwidget.h> #include <kxmlguiclient.h> #include "base/Event.h" -class QPaintEvent; -class QMouseEvent; -class QFont; -class QPopupMenu; +class TQPaintEvent; +class TQMouseEvent; +class TQFont; +class TQPopupMenu; class KMainWindow; namespace Rosegarden @@ -47,7 +47,7 @@ class RulerScale; class RosegardenGUIDoc; -class MarkerRuler : public QWidget, public HZoomable, public KXMLGUIClient +class MarkerRuler : public TQWidget, public HZoomable, public KXMLGUIClient { Q_OBJECT @@ -56,14 +56,14 @@ public: RulerScale *rulerScale, int buttonHeight, double xorigin = 0.0, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); virtual ~MarkerRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void scrollHoriz(int x); @@ -79,7 +79,7 @@ signals: /// add a marker void addMarker(timeT); - void deleteMarker(int, timeT, QString name, QString description); + void deleteMarker(int, timeT, TQString name, TQString description); /// Set a loop range void setLoop(timeT, timeT); @@ -91,9 +91,9 @@ protected slots: void slotEditMarker(); protected: - virtual void paintEvent(QPaintEvent*); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void paintEvent(TQPaintEvent*); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); void createMenu(); timeT getClickPosition(); @@ -106,8 +106,8 @@ protected: int m_width; int m_clickX; - QFont *m_barFont; - QPopupMenu *m_menu; + TQFont *m_barFont; + TQPopupMenu *m_menu; RosegardenGUIDoc *m_doc; RulerScale *m_rulerScale; diff --git a/src/gui/rulers/PercussionPitchRuler.cpp b/src/gui/rulers/PercussionPitchRuler.cpp index a89ae89..48fc640 100644 --- a/src/gui/rulers/PercussionPitchRuler.cpp +++ b/src/gui/rulers/PercussionPitchRuler.cpp @@ -32,19 +32,19 @@ #include "gui/editors/matrix/MatrixView.h" #include "gui/general/MidiPitchLabel.h" #include "PitchRuler.h" -#include <qcolor.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, +PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent, const MidiKeyMapping *mapping, int lineSpacing) : PitchRuler(parent), @@ -53,30 +53,30 @@ PercussionPitchRuler::PercussionPitchRuler(QWidget *parent, m_mouseDown(false), m_lastHoverHighlight( -1) { - m_font = new QFont(); + m_font = new TQFont(); m_font->setPixelSize(9); - m_fontMetrics = new QFontMetrics(*m_font); + m_fontMetrics = new TQFontMetrics(*m_font); m_width = m_fontMetrics->width(" A#2 Acoustic Bass Drum "); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); setMouseTracking(true); } -QSize PercussionPitchRuler::sizeHint() const +TQSize PercussionPitchRuler::sizeHint() const { - return QSize(m_width, + return TQSize(m_width, (m_lineSpacing + 1) * m_mapping->getPitchExtent()); } -QSize PercussionPitchRuler::minimumSizeHint() const +TQSize PercussionPitchRuler::minimumSizeHint() const { - return QSize(m_width, m_lineSpacing + 1); + return TQSize(m_width, m_lineSpacing + 1); } -void PercussionPitchRuler::paintEvent(QPaintEvent*) +void PercussionPitchRuler::paintEvent(TQPaintEvent*) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); @@ -109,17 +109,17 @@ void PercussionPitchRuler::paintEvent(QPaintEvent*) } } -void PercussionPitchRuler::enterEvent(QEvent *) +void PercussionPitchRuler::enterEvent(TQEvent *) {} -void PercussionPitchRuler::leaveEvent(QEvent*) +void PercussionPitchRuler::leaveEvent(TQEvent*) { // m_hoverHighlight->hide(); } void PercussionPitchRuler::drawHoverNote(int evPitch) { - QPainter paint(this); + TQPainter paint(this); paint.setFont(*m_font); if (m_lastHoverHighlight != evPitch) { @@ -132,8 +132,8 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) if (m_lastHoverHighlight >= 0) { int y = (extent - (m_lastHoverHighlight - minPitch) - 1) * (m_lineSpacing + 1); - paint.setBrush(QColor(238, 238, 224)); - paint.setPen(QColor(238, 238, 224)); + paint.setBrush(TQColor(238, 238, 224)); + paint.setPen(TQColor(238, 238, 224)); paint.drawRect(lw + 7, y + 1, m_width - lw, m_lineSpacing); std::string key = m_mapping->getMapForKeyName(m_lastHoverHighlight); paint.setPen(Qt::black); @@ -146,7 +146,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) m_lastHoverHighlight = evPitch; paint.setBrush(paint.pen().color()); paint.drawRect(lw + 7, y, m_width - lw, m_lineSpacing + 1); - paint.setPen(QColor(238, 238, 224)); + paint.setPen(TQColor(238, 238, 224)); std::string key = m_mapping->getMapForKeyName(evPitch); paint.drawText @@ -155,7 +155,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) } } -void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) +void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e) { // ugh @@ -176,7 +176,7 @@ void PercussionPitchRuler::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) +void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -192,7 +192,7 @@ void PercussionPitchRuler::mousePressEvent(QMouseEvent *e) } } -void PercussionPitchRuler::mouseReleaseEvent(QMouseEvent *e) +void PercussionPitchRuler::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; diff --git a/src/gui/rulers/PercussionPitchRuler.h b/src/gui/rulers/PercussionPitchRuler.h index cae61ec..44fcd86 100644 --- a/src/gui/rulers/PercussionPitchRuler.h +++ b/src/gui/rulers/PercussionPitchRuler.h @@ -27,15 +27,15 @@ #define _RG_PERCUSSIONPITCHRULER_H_ #include "PitchRuler.h" -#include <qsize.h> +#include <tqsize.h> -class QWidget; -class QPaintEvent; -class QMouseEvent; -class QFontMetrics; -class QFont; -class QEvent; +class TQWidget; +class TQPaintEvent; +class TQMouseEvent; +class TQFontMetrics; +class TQFont; +class TQEvent; namespace Rosegarden @@ -48,12 +48,12 @@ class PercussionPitchRuler : public PitchRuler { Q_OBJECT public: - PercussionPitchRuler(QWidget *parent, + PercussionPitchRuler(TQWidget *parent, const MidiKeyMapping *mapping, int lineSpacing); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void drawHoverNote(int evPitch); @@ -63,12 +63,12 @@ signals: void hoveredOverKeyChanged(unsigned int y); protected: - virtual void paintEvent(QPaintEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void paintEvent(TQPaintEvent*); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); const MidiKeyMapping *m_mapping; @@ -80,8 +80,8 @@ protected: int m_lastHoverHighlight; - QFont *m_font; - QFontMetrics *m_fontMetrics; + TQFont *m_font; + TQFontMetrics *m_fontMetrics; }; diff --git a/src/gui/rulers/PitchRuler.cpp b/src/gui/rulers/PitchRuler.cpp index 55f4b00..baa06cd 100644 --- a/src/gui/rulers/PitchRuler.cpp +++ b/src/gui/rulers/PitchRuler.cpp @@ -25,16 +25,16 @@ #include "PitchRuler.h" -#include <qsize.h> -#include <qwidget.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { PitchRuler:: -PitchRuler(QWidget *parent) : - QWidget(parent) +PitchRuler(TQWidget *parent) : + TQWidget(parent) { // nothing else } @@ -42,13 +42,13 @@ PitchRuler(QWidget *parent) : QSize PitchRuler::sizeHint() const { - return QWidget::sizeHint(); + return TQWidget::sizeHint(); } QSize PitchRuler::minimumSizeHint() const { - return QWidget::minimumSizeHint(); + return TQWidget::minimumSizeHint(); } } diff --git a/src/gui/rulers/PitchRuler.h b/src/gui/rulers/PitchRuler.h index 3c47709..2562096 100644 --- a/src/gui/rulers/PitchRuler.h +++ b/src/gui/rulers/PitchRuler.h @@ -26,8 +26,8 @@ #ifndef _RG_PITCHRULER_H_ #define _RG_PITCHRULER_H_ -#include <qsize.h> -#include <qwidget.h> +#include <tqsize.h> +#include <tqwidget.h> @@ -41,10 +41,10 @@ class PitchRuler : public QWidget { Q_OBJECT public: - PitchRuler(QWidget *parent); + PitchRuler(TQWidget *parent); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; virtual void drawHoverNote(int evPitch) = 0; diff --git a/src/gui/rulers/PropertyBox.cpp b/src/gui/rulers/PropertyBox.cpp index 38d67ef..7037b64 100644 --- a/src/gui/rulers/PropertyBox.cpp +++ b/src/gui/rulers/PropertyBox.cpp @@ -26,21 +26,21 @@ #include "PropertyBox.h" #include "gui/general/GUIPalette.h" -#include <qpainter.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -PropertyBox::PropertyBox(QString label, +PropertyBox::PropertyBox(TQString label, int width, int height, - QWidget *parent, + TQWidget *parent, const char *name): - QWidget(parent, name), + TQWidget(parent, name), m_label(label), m_width(width), m_height(height) @@ -49,19 +49,19 @@ PropertyBox::PropertyBox(QString label, QSize PropertyBox::sizeHint() const { - return QSize(m_width, m_height); + return TQSize(m_width, m_height); } QSize PropertyBox::minimumSizeHint() const { - return QSize(m_width, m_height); + return TQSize(m_width, m_height); } void -PropertyBox::paintEvent(QPaintEvent *e) +PropertyBox::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::MatrixElementBorder)); //paint.setBrush(GUIPalette::getColour(GUIPalette::MatrixElementBlock)); diff --git a/src/gui/rulers/PropertyBox.h b/src/gui/rulers/PropertyBox.h index 1b36f0b..73e17b7 100644 --- a/src/gui/rulers/PropertyBox.h +++ b/src/gui/rulers/PropertyBox.h @@ -26,12 +26,12 @@ #ifndef _RG_PROPERTYBOX_H_ #define _RG_PROPERTYBOX_H_ -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -49,21 +49,21 @@ class PropertyBox : public QWidget Q_OBJECT public: - PropertyBox(QString label, + PropertyBox(TQString label, int width, int height, - QWidget *parent=0, + TQWidget *parent=0, const char *name = 0); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); //--------------- Data members --------------------------------- - QString m_label; + TQString m_label; int m_width; int m_height; }; diff --git a/src/gui/rulers/PropertyControlRuler.cpp b/src/gui/rulers/PropertyControlRuler.cpp index 7dc1258..a597820 100644 --- a/src/gui/rulers/PropertyControlRuler.cpp +++ b/src/gui/rulers/PropertyControlRuler.cpp @@ -41,11 +41,11 @@ #include "gui/general/EditViewBase.h" #include "gui/widgets/TextFloat.h" #include "gui/general/LinedStaff.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -55,13 +55,13 @@ PropertyControlRuler::PropertyControlRuler(PropertyName propertyName, Staff* staff, RulerScale* rulerScale, EditViewBase* parentView, - QCanvas* c, QWidget* parent, + TQCanvas* c, TQWidget* parent, const char* name, WFlags f) : ControlRuler(&(staff->getSegment()), rulerScale, parentView, c, parent, name, f), m_propertyName(propertyName), m_staff(staff), - m_propertyLine(new QCanvasLine(canvas())), + m_propertyLine(new TQCanvasLine(canvas())), m_propertyLineShowing(false), m_propertyLineX(0), m_propertyLineY(0) @@ -97,36 +97,36 @@ PropertyControlRuler::drawBackground() { // Draw some minimum and maximum controller value guide lines // - QCanvasLine *topLine = new QCanvasLine(canvas()); - QCanvasLine *topQLine = new QCanvasLine(canvas()); - QCanvasLine *midLine = new QCanvasLine(canvas()); - QCanvasLine *botQLine = new QCanvasLine(canvas()); - QCanvasLine *bottomLine = new QCanvasLine(canvas()); + TQCanvasLine *topLine = new TQCanvasLine(canvas()); + TQCanvasLine *topQLine = new TQCanvasLine(canvas()); + TQCanvasLine *midLine = new TQCanvasLine(canvas()); + TQCanvasLine *botQLine = new TQCanvasLine(canvas()); + TQCanvasLine *bottomLine = new TQCanvasLine(canvas()); //m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY); int cHeight = canvas()->height(); int cWidth = canvas()->width(); - topLine->setPen(QColor(127, 127, 127)); + topLine->setPen(TQColor(127, 127, 127)); topLine->setPoints(0, 0, cWidth, 0); topLine->setZ( -10); topLine->show(); - topQLine->setPen(QColor(192, 192, 192)); + topQLine->setPen(TQColor(192, 192, 192)); topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); topQLine->setZ( -10); topQLine->show(); - midLine->setPen(QColor(127, 127, 127)); + midLine->setPen(TQColor(127, 127, 127)); midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2); midLine->setZ( -10); midLine->show(); - botQLine->setPen(QColor(192, 192, 192)); + botQLine->setPen(TQColor(192, 192, 192)); botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); botQLine->setZ( -10); botQLine->show(); - bottomLine->setPen(QColor(127, 127, 127)); + bottomLine->setPen(TQColor(127, 127, 127)); bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1); bottomLine->setZ( -10); bottomLine->show(); @@ -139,7 +139,7 @@ PropertyControlRuler::~PropertyControlRuler() } } -QString PropertyControlRuler::getName() +TQString PropertyControlRuler::getName() { return getPropertyName().c_str(); } @@ -187,9 +187,9 @@ void PropertyControlRuler::elementRemoved(const Staff *, ViewElement *el) clearSelectedItems(); - QCanvasItemList allItems = canvas()->allItems(); + TQCanvasItemList allItems = canvas()->allItems(); - for (QCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { + for (TQCanvasItemList::Iterator it = allItems.begin(); it != allItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { ViewElementAdapter * adapter = dynamic_cast<ViewElementAdapter*>(item->getElementAdapter()); if (adapter->getViewElement() == el) { @@ -233,7 +233,7 @@ void PropertyControlRuler::startPropertyLine() } void -PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) +PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMousePressEvent\n"; @@ -256,7 +256,7 @@ PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) } if (e->button() == LeftButton) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_propertyLine->show(); m_propertyLineX = p.x(); @@ -267,7 +267,7 @@ PropertyControlRuler::contentsMousePressEvent(QMouseEvent *e) } void -PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) +PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMouseReleaseEvent\n"; @@ -289,7 +289,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) ControlRuler::contentsMouseReleaseEvent(e); // send super return ; } else { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); timeT startTime = m_rulerScale->getTimeForX(m_propertyLineX); timeT endTime = m_rulerScale->getTimeForX(p.x()); @@ -314,7 +314,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(QMouseEvent *e) } void -PropertyControlRuler::contentsMouseMoveEvent(QMouseEvent *e) +PropertyControlRuler::contentsMouseMoveEvent(TQMouseEvent *e) { RG_DEBUG << "PropertyControlRuler::contentsMouseMoveEvent\n"; @@ -330,21 +330,21 @@ PropertyControlRuler::contentsMouseMoveEvent(QMouseEvent *e) return ; } - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); m_propertyLine->setPoints(m_propertyLineX, m_propertyLineY, p.x(), p.y()); canvas()->update(); } -void PropertyControlRuler::contentsContextMenuEvent(QContextMenuEvent* e) +void PropertyControlRuler::contentsContextMenuEvent(TQContextMenuEvent* e) { RG_DEBUG << "PropertyControlRuler::contentsContextMenuEvent\n"; // check if we actually have some control items - QCanvasItemList list = canvas()->allItems(); + TQCanvasItemList list = canvas()->allItems(); bool haveItems = false; - QCanvasItemList::Iterator it = list.begin(); + TQCanvasItemList::Iterator it = list.begin(); for (; it != list.end(); ++it) { if (dynamic_cast<ControlItem*>(*it)) { haveItems = true; @@ -413,8 +413,8 @@ PropertyControlRuler::selectAllProperties() clearSelectedItems(); - QCanvasItemList l = canvas()->allItems(); - for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { + TQCanvasItemList l = canvas()->allItems(); + for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { m_selectedItems << item; (*it)->setSelected(true); @@ -425,7 +425,7 @@ PropertyControlRuler::selectAllProperties() /* m_eventSelection->addFromSelection(&selection); - for (QCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { + for (TQCanvasItemList::Iterator it=m_selectedItems.begin(); it!=m_selectedItems.end(); ++it) { if (ControlItem *item = dynamic_cast<ControlItem*>(*it)) { ElementAdapter* adapter = item->getElementAdapter(); diff --git a/src/gui/rulers/PropertyControlRuler.h b/src/gui/rulers/PropertyControlRuler.h index f94f3e1..db1d698 100644 --- a/src/gui/rulers/PropertyControlRuler.h +++ b/src/gui/rulers/PropertyControlRuler.h @@ -29,15 +29,15 @@ #include "base/PropertyName.h" #include "base/Staff.h" #include "ControlRuler.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QWidget; -class QMouseEvent; -class QContextMenuEvent; -class QCanvasLine; -class QCanvas; +class TQWidget; +class TQMouseEvent; +class TQContextMenuEvent; +class TQCanvasLine; +class TQCanvas; namespace Rosegarden @@ -61,12 +61,12 @@ public: Staff*, RulerScale*, EditViewBase* parentView, - QCanvas*, - QWidget* parent=0, const char* name=0, WFlags f=0); + TQCanvas*, + TQWidget* parent=0, const char* name=0, WFlags f=0); virtual ~PropertyControlRuler(); - virtual QString getName(); + virtual TQString getName(); const PropertyName& getPropertyName() { return m_propertyName; } @@ -87,10 +87,10 @@ public: protected: - virtual void contentsMousePressEvent(QMouseEvent*); - virtual void contentsMouseReleaseEvent(QMouseEvent*); - virtual void contentsMouseMoveEvent(QMouseEvent*); - virtual void contentsContextMenuEvent(QContextMenuEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); + virtual void contentsContextMenuEvent(TQContextMenuEvent*); void drawPropertyLine(timeT startTime, timeT endTime, @@ -106,7 +106,7 @@ protected: PropertyName m_propertyName; Staff* m_staff; - QCanvasLine *m_propertyLine; + TQCanvasLine *m_propertyLine; bool m_propertyLineShowing; int m_propertyLineX; diff --git a/src/gui/rulers/PropertyViewRuler.cpp b/src/gui/rulers/PropertyViewRuler.cpp index cf5d89d..0365ae8 100644 --- a/src/gui/rulers/PropertyViewRuler.cpp +++ b/src/gui/rulers/PropertyViewRuler.cpp @@ -34,14 +34,14 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" #include "gui/general/HZoomable.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqwidget.h> namespace Rosegarden @@ -52,9 +52,9 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, const PropertyName &property, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_propertyName(property), m_xorigin(xorigin), m_height(height), @@ -65,12 +65,12 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, m_fontMetrics(m_boldFont) { m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); setBackgroundColor(GUIPalette::getColour(GUIPalette::SegmentCanvas)); - QString tip = i18n("%1 controller").arg(strtoqstr(property)); - QToolTip::add + TQString tip = i18n("%1 controller").arg(strtoqstr(property)); + TQToolTip::add (this, tip); } @@ -109,7 +109,7 @@ PropertyViewRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -118,21 +118,21 @@ QSize PropertyViewRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } void -PropertyViewRuler::paintEvent(QPaintEvent* e) +PropertyViewRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); if (getHScaleFactor() != 1.0) paint.scale(getHScaleFactor(), 1.0); paint.setPen(GUIPalette::getColour(GUIPalette::MatrixElementBorder)); - QRect clipRect = e->rect().normalize(); + TQRect clipRect = e->rect().normalize(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - m_xorigin); diff --git a/src/gui/rulers/PropertyViewRuler.h b/src/gui/rulers/PropertyViewRuler.h index b7d479c..19ac410 100644 --- a/src/gui/rulers/PropertyViewRuler.h +++ b/src/gui/rulers/PropertyViewRuler.h @@ -28,13 +28,13 @@ #include "base/PropertyName.h" #include "gui/general/HZoomable.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqsize.h> +#include <tqwidget.h> -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -48,7 +48,7 @@ class RulerScale; * PropertyViewRuler is a widget that shows a range of Property * (velocity, typically) values for a set of Rosegarden Events. */ -class PropertyViewRuler : public QWidget, public HZoomable +class PropertyViewRuler : public TQWidget, public HZoomable { Q_OBJECT @@ -58,13 +58,13 @@ public: const PropertyName &property, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~PropertyViewRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -77,7 +77,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); //--------------- Data members --------------------------------- @@ -91,9 +91,9 @@ protected: Segment *m_segment; RulerScale *m_rulerScale; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; }; diff --git a/src/gui/rulers/RawNoteRuler.cpp b/src/gui/rulers/RawNoteRuler.cpp index cc7d6e4..adfca44 100644 --- a/src/gui/rulers/RawNoteRuler.cpp +++ b/src/gui/rulers/RawNoteRuler.cpp @@ -35,12 +35,12 @@ #include "DefaultVelocityColour.h" #include "gui/general/GUIPalette.h" #include <klocale.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qrect.h> -#include <qsize.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqtooltip.h> +#include <tqwidget.h> namespace Rosegarden @@ -50,9 +50,9 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale, Segment *segment, double xorigin, int height, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -61,12 +61,12 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale, m_rulerScale(rulerScale) { setBackgroundColor(GUIPalette::getColour(GUIPalette::RawNoteRulerBackground)); - QToolTip::add(this,""); + TQToolTip::add(this,""); } RawNoteRuler::~RawNoteRuler() { - QToolTip::remove(this); + TQToolTip::remove(this); // nothing else } @@ -101,7 +101,7 @@ RawNoteRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -110,7 +110,7 @@ QSize RawNoteRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -329,7 +329,7 @@ RawNoteRuler::EventTreeNode::getChildrenAboveOrBelow(bool below, int p) } void -RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, +RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc, EventTreeNode *node, double height, double yorigin) { int depth = node->getDepth(); @@ -359,7 +359,7 @@ RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, long velocity = 100; (*node->node)->get <Int>(BaseProperties::VELOCITY, velocity); - QColor colour = vc.getColour(velocity); + TQColor colour = vc.getColour(velocity); timeT start = (*node->node)->getAbsoluteTime(); timeT end = (*node->node)->getDuration() + start; @@ -435,14 +435,14 @@ RawNoteRuler::drawNode(QPainter &paint, DefaultVelocityColour &vc, } void -RawNoteRuler::paintEvent(QPaintEvent* e) +RawNoteRuler::paintEvent(TQPaintEvent* e) { if (!m_segment || !m_segment->getComposition()) return ; // Tooltips { - QToolTip::remove(this); + TQToolTip::remove(this); TrackId trackId = m_segment->getTrack(); Track *track = m_segment->getComposition()->getTrackById(trackId); @@ -450,7 +450,7 @@ RawNoteRuler::paintEvent(QPaintEvent* e) if (track) trackPosition = track->getPosition(); - QToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)") + TQToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)") .arg(trackPosition + 1) .arg(m_segment->getLabel()) .arg(m_segment->getRuntimeId())); @@ -458,11 +458,11 @@ RawNoteRuler::paintEvent(QPaintEvent* e) // START_TIMING; - QPainter paint(this); + TQPainter paint(this); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - 100 - m_xorigin); @@ -475,7 +475,7 @@ RawNoteRuler::paintEvent(QPaintEvent* e) // draw the extent of the segment using its color - QColor brushColor = GUIPalette::convertColour(m_segment->getComposition()-> + TQColor brushColor = GUIPalette::convertColour(m_segment->getComposition()-> getSegmentColourMap().getColourByIndex(m_segment->getColourIndex())); paint.setPen(brushColor); paint.setBrush(brushColor); @@ -516,8 +516,8 @@ RawNoteRuler::paintEvent(QPaintEvent* e) for (int depth = 0; depth < 3; ++depth) { int grey = depth * 60 + 60; - paint.setPen(QColor(grey, grey, grey)); - paint.setBrush(QColor(grey, grey, grey)); + paint.setPen(TQColor(grey, grey, grey)); + paint.setBrush(TQColor(grey, grey, grey)); base /= divisions[depth]; timeT t(barStart + base); diff --git a/src/gui/rulers/RawNoteRuler.h b/src/gui/rulers/RawNoteRuler.h index f194062..8ced771 100644 --- a/src/gui/rulers/RawNoteRuler.h +++ b/src/gui/rulers/RawNoteRuler.h @@ -27,15 +27,15 @@ #define _RG_RAWNOTERULER_H_ #include "base/Segment.h" -#include <qsize.h> -#include <qwidget.h> +#include <tqsize.h> +#include <tqwidget.h> #include <utility> #include <vector> #include "base/Event.h" -class QPaintEvent; -class QPainter; +class TQPaintEvent; +class TQPainter; namespace Rosegarden @@ -61,7 +61,7 @@ public: Segment *segment, double xorigin = 0.0, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~RawNoteRuler(); @@ -70,8 +70,8 @@ public: m_segment = segment; } - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -79,7 +79,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); private: double m_xorigin; @@ -115,7 +115,7 @@ private: void dumpForest(std::vector<EventTreeNode *> *); void buildForest(Segment *, Segment::iterator, Segment::iterator); - void drawNode(QPainter &, DefaultVelocityColour &, EventTreeNode *, + void drawNode(TQPainter &, DefaultVelocityColour &, EventTreeNode *, double height, double yorigin); // needs to be class with dtor &c and containing above methods diff --git a/src/gui/rulers/StandardRuler.cpp b/src/gui/rulers/StandardRuler.cpp index 611c991..4869d84 100644 --- a/src/gui/rulers/StandardRuler.cpp +++ b/src/gui/rulers/StandardRuler.cpp @@ -35,10 +35,10 @@ #include "gui/general/GUIPalette.h" #include "gui/rulers/LoopRuler.h" #include "document/RosegardenGUIDoc.h" -#include <qobject.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -49,10 +49,10 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc, double xorigin, int barHeight, bool invert, - QWidget* parent, + TQWidget* parent, const char* name, WFlags f): - QVBox(parent, name, f), + TQVBox(parent, name, f), m_invert(invert), m_loopRulerHeight(10), m_currentXOffset(0), @@ -75,9 +75,9 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc, (m_doc, m_rulerScale, barHeight - m_loopRulerHeight, xorigin, this); } - QObject::connect - (doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect + (doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); } @@ -95,50 +95,50 @@ void StandardRuler::connectRulerToDocPointer(RosegardenGUIDoc *doc) // pointer and loop drag signals are specific to the current view, // so they are re-emitted from the loop ruler by this widget // - QObject::connect - (m_loopRuler, SIGNAL(setPointerPosition(timeT)), - doc, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setPointerPosition(timeT)), + doc, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(setPointerPosition(timeT)), - doc, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(setPointerPosition(timeT)), + doc, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(editMarkers()), - RosegardenGUIApp::self(), SLOT(slotEditMarkers())); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(editMarkers()), + RosegardenGUIApp::self(), TQT_SLOT(slotEditMarkers())); - QObject::connect - (m_hButtonBar, SIGNAL(addMarker(timeT)), - RosegardenGUIApp::self(), SLOT(slotAddMarker(timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(addMarker(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotAddMarker(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(deleteMarker(int, timeT, QString, QString)), - RosegardenGUIApp::self(), SLOT(slotDeleteMarker(int, timeT, QString, QString))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(deleteMarker(int, timeT, TQString, TQString)), + RosegardenGUIApp::self(), TQT_SLOT(slotDeleteMarker(int, timeT, TQString, TQString))); - QObject::connect - (m_loopRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SIGNAL(dragPointerToPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SIGNAL(dragPointerToPosition(timeT))); - QObject::connect - (m_loopRuler, SIGNAL(dragLoopToPosition(timeT)), - this, SIGNAL(dragLoopToPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(dragLoopToPosition(timeT)), + this, TQT_SIGNAL(dragLoopToPosition(timeT))); - QObject::connect - (m_loopRuler, SIGNAL(setPlayPosition(timeT)), - RosegardenGUIApp::self(), SLOT(slotSetPlayPosition(timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setPlayPosition(timeT)), + RosegardenGUIApp::self(), TQT_SLOT(slotSetPlayPosition(timeT))); - QObject::connect - (m_hButtonBar, SIGNAL(setLoop(timeT, timeT)), - doc, SLOT(slotSetLoop(timeT, timeT))); + TQObject::connect + (m_hButtonBar, TQT_SIGNAL(setLoop(timeT, timeT)), + doc, TQT_SLOT(slotSetLoop(timeT, timeT))); - QObject::connect - (m_loopRuler, SIGNAL(setLoop(timeT, timeT)), - doc, SLOT(slotSetLoop(timeT, timeT))); + TQObject::connect + (m_loopRuler, TQT_SIGNAL(setLoop(timeT, timeT)), + doc, TQT_SLOT(slotSetLoop(timeT, timeT))); - QObject::connect - (doc, SIGNAL(loopChanged(timeT, timeT)), + TQObject::connect + (doc, TQT_SIGNAL(loopChanged(timeT, timeT)), m_loopRuler, - SLOT(slotSetLoopMarker(timeT, timeT))); + TQT_SLOT(slotSetLoopMarker(timeT, timeT))); m_loopRuler->setBackgroundColor(GUIPalette::getColour(GUIPalette::PointerRuler)); } @@ -161,11 +161,11 @@ void StandardRuler::setHScaleFactor(double dy) m_loopRuler->setHScaleFactor(dy); } -void StandardRuler::paintEvent(QPaintEvent *e) +void StandardRuler::paintEvent(TQPaintEvent *e) { m_hButtonBar->update(); m_loopRuler->update(); - QWidget::paintEvent(e); + TQWidget::paintEvent(e); } } diff --git a/src/gui/rulers/StandardRuler.h b/src/gui/rulers/StandardRuler.h index de9804d..67eb2f3 100644 --- a/src/gui/rulers/StandardRuler.h +++ b/src/gui/rulers/StandardRuler.h @@ -26,12 +26,12 @@ #ifndef _RG_STANDARDRULER_H_ #define _RG_STANDARDRULER_H_ -#include <qvbox.h> +#include <tqvbox.h> #include "base/Event.h" -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: double xorigin, int buttonHeight, bool invert = false, // draw upside-down - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, WFlags f=0); @@ -86,7 +86,7 @@ signals: protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: //--------------- Data members --------------------------------- diff --git a/src/gui/rulers/TempoColour.cpp b/src/gui/rulers/TempoColour.cpp index 5ab396a..5d5a448 100644 --- a/src/gui/rulers/TempoColour.cpp +++ b/src/gui/rulers/TempoColour.cpp @@ -26,7 +26,7 @@ #include "TempoColour.h" #include "gui/general/GUIPalette.h" -#include <qcolor.h> +#include <tqcolor.h> namespace Rosegarden @@ -36,7 +36,7 @@ QColor TempoColour::getColour(double tempo) { int h, s, v; - QColor c = GUIPalette::getColour(GUIPalette::TempoBase); + TQColor c = GUIPalette::getColour(GUIPalette::TempoBase); c.hsv(&h, &s, &v); v += 20; if (v > 255) @@ -49,7 +49,7 @@ TempoColour::getColour(double tempo) while (h >= 360) h -= 360; - return QColor(h, s, v, QColor::Hsv); + return TQColor(h, s, v, TQColor::Hsv); } } diff --git a/src/gui/rulers/TempoColour.h b/src/gui/rulers/TempoColour.h index be5e3fa..6e51b16 100644 --- a/src/gui/rulers/TempoColour.h +++ b/src/gui/rulers/TempoColour.h @@ -26,7 +26,7 @@ #ifndef _RG_TEMPOCOLOUR_H_ #define _RG_TEMPOCOLOUR_H_ -#include <qcolor.h> +#include <tqcolor.h> @@ -45,8 +45,8 @@ public: // Get the colour for a tempo // - QColor getColour() { return getColour(m_tempo); } - static QColor getColour(double tempo); + TQColor getColour() { return getColour(m_tempo); } + static TQColor getColour(double tempo); private: diff --git a/src/gui/rulers/TempoRuler.cpp b/src/gui/rulers/TempoRuler.cpp index 270b224..554d4b2 100644 --- a/src/gui/rulers/TempoRuler.cpp +++ b/src/gui/rulers/TempoRuler.cpp @@ -44,21 +44,21 @@ #include <kglobal.h> #include <kxmlguiclient.h> #include <kxmlguifactory.h> -#include <qcolor.h> -#include <qcursor.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qiconset.h> -#include <qobject.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqiconset.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -70,9 +70,9 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, double xorigin, int height, bool small, - QWidget *parent, + TQWidget *parent, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -108,7 +108,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, m_font.setPixelSize(m_height / 3); m_boldFont.setPixelSize(m_height * 2 / 5); m_boldFont.setBold(true); - m_fontMetrics = QFontMetrics(m_boldFont); + m_fontMetrics = TQFontMetrics(m_boldFont); m_textFloat = new TextFloat(this); m_textFloat->hide(); @@ -116,46 +116,46 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, // setBackgroundColor(GUIPalette::getColour(GUIPalette::TextRulerBackground)); setBackgroundMode(Qt::NoBackground); - QObject::connect - (doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + TQObject::connect + (doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon; - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); new KAction(i18n("Insert Tempo Change"), icon, 0, this, - SLOT(slotInsertTempoHere()), actionCollection(), + TQT_SLOT(slotInsertTempoHere()), actionCollection(), "insert_tempo_here"); new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, this, - SLOT(slotInsertTempoAtPointer()), actionCollection(), + TQT_SLOT(slotInsertTempoAtPointer()), actionCollection(), "insert_tempo_at_pointer"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-delete.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); new KAction(i18n("Delete Tempo Change"), icon, 0, this, - SLOT(slotDeleteTempoChange()), actionCollection(), + TQT_SLOT(slotDeleteTempoChange()), actionCollection(), "delete_tempo"); new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, this, - SLOT(slotRampToNext()), actionCollection(), + TQT_SLOT(slotRampToNext()), actionCollection(), "ramp_to_next"); new KAction(i18n("Un-Ramp Tempo"), 0, 0, this, - SLOT(slotUnramp()), actionCollection(), + TQT_SLOT(slotUnramp()), actionCollection(), "unramp"); - icon = QIconSet(QPixmap(pixmapDir + "/toolbar/event-edit.png")); + icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); new KAction(i18n("Edit Tempo..."), icon, 0, this, - SLOT(slotEditTempo()), actionCollection(), + TQT_SLOT(slotEditTempo()), actionCollection(), "edit_tempo"); new KAction(i18n("Edit Time Signature..."), 0, 0, this, - SLOT(slotEditTimeSignature()), actionCollection(), + TQT_SLOT(slotEditTimeSignature()), actionCollection(), "edit_time_signature"); new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, this, - SLOT(slotEditTempos()), actionCollection(), + TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); setMouseTracking(false); @@ -174,47 +174,47 @@ void TempoRuler::connectSignals() { connect(this, - SIGNAL(doubleClicked(timeT)), + TQT_SIGNAL(doubleClicked(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempos(timeT))); + TQT_SLOT(slotEditTempos(timeT))); connect(this, - SIGNAL(changeTempo(timeT, + TQT_SIGNAL(changeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction)), RosegardenGUIApp::self(), - SLOT(slotChangeTempo(timeT, + TQT_SLOT(slotChangeTempo(timeT, tempoT, tempoT, TempoDialog::TempoDialogAction))); connect(this, - SIGNAL(moveTempo(timeT, + TQT_SIGNAL(moveTempo(timeT, timeT)), RosegardenGUIApp::self(), - SLOT(slotMoveTempo(timeT, + TQT_SLOT(slotMoveTempo(timeT, timeT))); connect(this, - SIGNAL(deleteTempo(timeT)), + TQT_SIGNAL(deleteTempo(timeT)), RosegardenGUIApp::self(), - SLOT(slotDeleteTempo(timeT))); + TQT_SLOT(slotDeleteTempo(timeT))); connect(this, - SIGNAL(editTempo(timeT)), + TQT_SIGNAL(editTempo(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempo(timeT))); + TQT_SLOT(slotEditTempo(timeT))); connect(this, - SIGNAL(editTimeSignature(timeT)), + TQT_SIGNAL(editTimeSignature(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTimeSignature(timeT))); + TQT_SLOT(slotEditTimeSignature(timeT))); connect(this, - SIGNAL(editTempos(timeT)), + TQT_SIGNAL(editTempos(timeT)), RosegardenGUIApp::self(), - SLOT(slotEditTempos(timeT))); + TQT_SLOT(slotEditTempos(timeT))); } void @@ -239,11 +239,11 @@ TempoRuler::slotScrollHoriz(int x) } void -TempoRuler::mousePressEvent(QMouseEvent *e) +TempoRuler::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { timeT t = m_rulerScale->getTimeForX (e->x() - m_currentXOffset - m_xorigin); emit doubleClicked(t); @@ -301,14 +301,14 @@ TempoRuler::mousePressEvent(QMouseEvent *e) if (m_menu) { // enable 'delete' action only if cursor is actually over a tempo change actionCollection()->action("delete_tempo")->setEnabled(m_illuminatePoint); - m_menu->exec(QCursor::pos()); + m_menu->exec(TQCursor::pos()); } } } void -TempoRuler::mouseReleaseEvent(QMouseEvent *e) +TempoRuler::mouseReleaseEvent(TQMouseEvent *e) { if (m_dragVert) { @@ -369,7 +369,7 @@ TempoRuler::mouseReleaseEvent(QMouseEvent *e) } void -TempoRuler::mouseMoveEvent(QMouseEvent *e) +TempoRuler::mouseMoveEvent(TQMouseEvent *e) { bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0); @@ -510,17 +510,17 @@ TempoRuler::mouseMoveEvent(QMouseEvent *e) } void -TempoRuler::wheelEvent(QWheelEvent *e) +TempoRuler::wheelEvent(TQWheelEvent *e) {} void -TempoRuler::enterEvent(QEvent *) +TempoRuler::enterEvent(TQEvent *) { setMouseTracking(true); } void -TempoRuler::leaveEvent(QEvent *) +TempoRuler::leaveEvent(TQEvent *) { if (!m_dragVert && !m_dragHoriz) { setMouseTracking(false); @@ -543,7 +543,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, bool haveSet = false; - QString tempoText, timeText; + TQString tempoText, timeText; if (time >= 0) { @@ -554,7 +554,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, RealTime rt = m_composition->getElapsedRealTime(time); // blargh -- duplicated with TempoView::makeTimeString - timeText = QString("%1%2%3-%4%5-%6%7-%8%9") + timeText = TQString("%1%2%3-%4%5-%6%7-%8%9") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -565,7 +565,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, .arg(remainder / 10) .arg(remainder % 10); - timeText = QString("%1\n%2") + timeText = TQString("%1\n%2") .arg(timeText) // .arg(rt.toString().c_str()); .arg(rt.toText(true).c_str()); @@ -605,16 +605,16 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, } if (showTime && time >= 0) { - m_textFloat->setText(QString("%1\n%2").arg(timeText).arg(tempoText)); + m_textFloat->setText(TQString("%1\n%2").arg(timeText).arg(tempoText)); } else { m_textFloat->setText(tempoText); } - QPoint cp = mapFromGlobal(QPoint(QCursor::pos())); + TQPoint cp = mapFromGlobal(TQPoint(TQCursor::pos())); // std::cerr << "cp = " << cp.x() << "," << cp.y() << ", tempo = " << qpm << std::endl; - QPoint mp = cp + pos(); + TQPoint mp = cp + pos(); - QWidget *parent = parentWidget(); + TQWidget *parent = parentWidget(); while (parent->parentWidget() && !parent->isTopLevel() && !parent->isDialog()) { @@ -623,7 +623,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, } int yoff = cp.y() + m_textFloat->height() + 3; - mp = QPoint(mp.x() + 10, mp.y() > yoff ? mp.y() - yoff : 0); + mp = TQPoint(mp.x() + 10, mp.y() > yoff ? mp.y() - yoff : 0); m_textFloat->move(mp); m_textFloat->show(); @@ -637,7 +637,7 @@ TempoRuler::sizeHint() const m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) + m_xorigin; - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -646,7 +646,7 @@ QSize TempoRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } @@ -687,18 +687,18 @@ TempoRuler::getTempoForY(int y) } void -TempoRuler::paintEvent(QPaintEvent* e) +TempoRuler::paintEvent(TQPaintEvent* e) { - QRect clipRect = e->rect(); + TQRect clipRect = e->rect(); if (m_buffer.width() < width() || m_buffer.height() < height()) { - m_buffer = QPixmap(width(), height()); + m_buffer = TQPixmap(width(), height()); } m_buffer.fill(GUIPalette::getColour (GUIPalette::TextRulerBackground)); - QPainter paint(&m_buffer); + TQPainter paint(&m_buffer); paint.setPen(GUIPalette::getColour (GUIPalette::TextRulerForeground)); @@ -714,7 +714,7 @@ TempoRuler::paintEvent(QPaintEvent* e) timeT to = m_rulerScale->getTimeForX (clipRect.x() + clipRect.width() - m_currentXOffset + 100 - m_xorigin); - QRect boundsForHeight = m_fontMetrics.boundingRect("019"); + TQRect boundsForHeight = m_fontMetrics.boundingRect("019"); int fontHeight = boundsForHeight.height(); int textY = fontHeight + 2; @@ -800,7 +800,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paletteBackgroundColor()); } */ - QColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); + TQColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); paint.setPen(colour); paint.setBrush(colour); @@ -887,7 +887,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paint.drawLine(lastx + 1, lasty, width(), lasty); } else if (!m_refreshLinesOnly) { tempoT tempo = m_composition->getTempoAtTime(from); - QColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); + TQColor colour = TempoColour::getColour(m_composition->getTempoQpm(tempo)); paint.setPen(colour); paint.setBrush(colour); paint.drawRect(e->rect()); @@ -916,7 +916,7 @@ TempoRuler::paintEvent(QPaintEvent* e) TimeSignature sig = m_composition->getTimeSignatureAt(time); - QString str = QString("%1/%2") + TQString str = TQString("%1/%2") .arg(sig.getNumerator()) .arg(sig.getDenominator()); @@ -930,7 +930,7 @@ TempoRuler::paintEvent(QPaintEvent* e) long bpm = long(tempo); // long frac = long(tempo * 100 + 0.001) - 100 * bpm; - QString tempoString = QString("%1").arg(bpm); + TQString tempoString = TQString("%1").arg(bpm); if (tempo == prevTempo) { if (m_small) @@ -949,7 +949,7 @@ TempoRuler::paintEvent(QPaintEvent* e) prevTempo = tempo; prevBpm = bpm; - QRect bounds = m_fontMetrics.boundingRect(tempoString); + TQRect bounds = m_fontMetrics.boundingRect(tempoString); paint.setFont(m_font); if (time > 0) @@ -964,7 +964,7 @@ TempoRuler::paintEvent(QPaintEvent* e) paint.end(); - QPainter dbpaint(this); + TQPainter dbpaint(this); // dbpaint.drawPixmap(0, 0, m_buffer); dbpaint.drawPixmap(clipRect.x(), clipRect.y(), m_buffer, @@ -1077,9 +1077,9 @@ TempoRuler::createMenu() KXMLGUIFactory* factory = m_parentMainWindow->factory(); factory->addClient(this); - QWidget* tmp = factory->container("tempo_ruler_menu", this); + TQWidget* tmp = factory->container("tempo_ruler_menu", this); - m_menu = dynamic_cast<QPopupMenu*>(tmp); + m_menu = dynamic_cast<TQPopupMenu*>(tmp); if (!m_menu) { RG_DEBUG << "MarkerRuler::createMenu() failed\n"; diff --git a/src/gui/rulers/TempoRuler.h b/src/gui/rulers/TempoRuler.h index 1d54e9d..7bf073e 100644 --- a/src/gui/rulers/TempoRuler.h +++ b/src/gui/rulers/TempoRuler.h @@ -28,19 +28,19 @@ #include "gui/dialogs/TempoDialog.h" #include <kxmlguiclient.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpixmap.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpixmap.h> +#include <tqsize.h> +#include <tqwidget.h> #include "base/Event.h" -class QWheelEvent; -class QPopupMenu; -class QPaintEvent; -class QMouseEvent; -class QEvent; +class TQWheelEvent; +class TQPopupMenu; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; class KMainWindow; @@ -58,7 +58,7 @@ class Composition; * x-coordinates corresponding to tempo changes in a Composition. */ -class TempoRuler : public QWidget, public KXMLGUIClient +class TempoRuler : public TQWidget, public KXMLGUIClient { Q_OBJECT @@ -76,13 +76,13 @@ public: double xorigin = 0.0, int height = 0, bool small = false, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~TempoRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -119,13 +119,13 @@ protected slots: void slotEditTempos(); protected: - virtual void paintEvent(QPaintEvent *); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void wheelEvent(TQWheelEvent *); void createMenu(); @@ -165,13 +165,13 @@ private: Composition *m_composition; RulerScale *m_rulerScale; TextFloat *m_textFloat; - QPopupMenu *m_menu; + TQPopupMenu *m_menu; KMainWindow *m_parentMainWindow; - QFont m_font; - QFont m_boldFont; - QFontMetrics m_fontMetrics; - QPixmap m_buffer; + TQFont m_font; + TQFont m_boldFont; + TQFontMetrics m_fontMetrics; + TQPixmap m_buffer; }; diff --git a/src/gui/rulers/TextRuler.cpp b/src/gui/rulers/TextRuler.cpp index 0acb3ea..4ef0569 100644 --- a/src/gui/rulers/TextRuler.cpp +++ b/src/gui/rulers/TextRuler.cpp @@ -32,12 +32,12 @@ #include "base/RulerScale.h" #include "base/Segment.h" #include "gui/general/GUIPalette.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qrect.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden @@ -46,9 +46,9 @@ namespace Rosegarden TextRuler::TextRuler(RulerScale *rulerScale, Segment *segment, int height, - QWidget *parent, + TQWidget *parent, const char *name) - : QWidget(parent, name), + : TQWidget(parent, name), m_height(height), m_currentXOffset(0), m_width( -1), @@ -98,7 +98,7 @@ TextRuler::sizeHint() const m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()); - QSize res(std::max(int(width), m_width), m_height); + TQSize res(std::max(int(width), m_width), m_height); return res; } @@ -107,20 +107,20 @@ QSize TextRuler::minimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); - QSize res = QSize(int(firstBarWidth), m_height); + TQSize res = TQSize(int(firstBarWidth), m_height); return res; } void -TextRuler::paintEvent(QPaintEvent* e) +TextRuler::paintEvent(TQPaintEvent* e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(GUIPalette::getColour(GUIPalette::TextRulerForeground)); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - QRect clipRect = paint.clipRegion().boundingRect(); + TQRect clipRect = paint.clipRegion().boundingRect(); timeT from = m_rulerScale->getTimeForX (clipRect.x() - m_currentXOffset - 100); @@ -142,7 +142,7 @@ TextRuler::paintEvent(QPaintEvent* e) continue; } - QRect bounds = m_fontMetrics.boundingRect(strtoqstr(text)); + TQRect bounds = m_fontMetrics.boundingRect(strtoqstr(text)); double x = m_rulerScale->getXForTime((*i)->getAbsoluteTime()) + m_currentXOffset - bounds.width() / 2; diff --git a/src/gui/rulers/TextRuler.h b/src/gui/rulers/TextRuler.h index 7d554cb..1e303d3 100644 --- a/src/gui/rulers/TextRuler.h +++ b/src/gui/rulers/TextRuler.h @@ -26,13 +26,13 @@ #ifndef _RG_TEXTRULER_H_ #define _RG_TEXTRULER_H_ -#include <qfont.h> -#include <qfontmetrics.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqsize.h> +#include <tqwidget.h> -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -76,13 +76,13 @@ public: TextRuler(RulerScale *rulerScale, Segment *segment, int height = 0, - QWidget* parent = 0, + TQWidget* parent = 0, const char *name = 0); ~TextRuler(); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -90,7 +90,7 @@ public slots: void slotScrollHoriz(int x); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: int m_height; @@ -102,8 +102,8 @@ private: Segment *m_segment; RulerScale *m_rulerScale; - QFont m_font; - QFontMetrics m_fontMetrics; + TQFont m_font; + TQFontMetrics m_fontMetrics; }; diff --git a/src/gui/rulers/VelocityColour.cpp b/src/gui/rulers/VelocityColour.cpp index 02a2f90..e0e67b1 100644 --- a/src/gui/rulers/VelocityColour.cpp +++ b/src/gui/rulers/VelocityColour.cpp @@ -25,7 +25,7 @@ #include "VelocityColour.h" -#include <qcolor.h> +#include <tqcolor.h> // #include <cassert> @@ -33,9 +33,9 @@ namespace Rosegarden { -VelocityColour::VelocityColour(const QColor &loud, - const QColor &medium, - const QColor &quiet, +VelocityColour::VelocityColour(const TQColor &loud, + const TQColor &medium, + const TQColor &quiet, int maxValue, int loudKnee, int mediumKnee, @@ -47,7 +47,7 @@ VelocityColour::VelocityColour(const QColor &loud, m_mediumKnee(mediumKnee), m_quietKnee(quietKnee), m_maxValue(maxValue), - m_mixedColour(QColor(0, 0, 0)), // black as default + m_mixedColour(TQColor(0, 0, 0)), // black as default m_multiplyFactor(1000) { @@ -88,7 +88,7 @@ VelocityColour::VelocityColour(const QColor &loud, VelocityColour::~VelocityColour() {} -const QColor& +const TQColor& VelocityColour::getColour(int value) { if (value > m_maxValue) diff --git a/src/gui/rulers/VelocityColour.h b/src/gui/rulers/VelocityColour.h index 0e555e1..e43dd22 100644 --- a/src/gui/rulers/VelocityColour.h +++ b/src/gui/rulers/VelocityColour.h @@ -26,7 +26,7 @@ #ifndef _RG_VELOCITYCOLOUR_H_ #define _RG_VELOCITYCOLOUR_H_ -#include <qcolor.h> +#include <tqcolor.h> @@ -45,39 +45,39 @@ class VelocityColour { public: - VelocityColour(const QColor &loud, - const QColor &medium, - const QColor &quiet, + VelocityColour(const TQColor &loud, + const TQColor &medium, + const TQColor &quiet, int maxValue, int loudKnee, int mediumKnee, int quietKnee); ~VelocityColour(); - const QColor& getColour(int value); + const TQColor& getColour(int value); int getLoudKnee() const { return m_loudKnee; } int getMediumKnee() const { return m_mediumKnee; } int getQuietKnee() const { return m_quietKnee; } - QColor getLoudColour() const { return m_loudColour; } - QColor getMediumColour() const { return m_mediumColour; } - QColor getQuietColour() const { return m_quietColour; } + TQColor getLoudColour() const { return m_loudColour; } + TQColor getMediumColour() const { return m_mediumColour; } + TQColor getQuietColour() const { return m_quietColour; } int getMaxValue() const { return m_maxValue; } private: - QColor m_loudColour; - QColor m_mediumColour; - QColor m_quietColour; + TQColor m_loudColour; + TQColor m_mediumColour; + TQColor m_quietColour; int m_loudKnee; int m_mediumKnee; int m_quietKnee; int m_maxValue; // the mixed colour that we can return - QColor m_mixedColour; + TQColor m_mixedColour; int m_loStartRed; diff --git a/src/gui/seqmanager/AudioSegmentMmapper.cpp b/src/gui/seqmanager/AudioSegmentMmapper.cpp index 8933b39..4e8feef 100644 --- a/src/gui/seqmanager/AudioSegmentMmapper.cpp +++ b/src/gui/seqmanager/AudioSegmentMmapper.cpp @@ -33,14 +33,14 @@ #include "document/RosegardenGUIDoc.h" #include "SegmentMmapper.h" #include "sound/MappedEvent.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { AudioSegmentMmapper::AudioSegmentMmapper(RosegardenGUIDoc* doc, Segment* s, - const QString& fileName) + const TQString& fileName) : SegmentMmapper(doc, s, fileName) {} diff --git a/src/gui/seqmanager/AudioSegmentMmapper.h b/src/gui/seqmanager/AudioSegmentMmapper.h index bc4d798..5a8e6c7 100644 --- a/src/gui/seqmanager/AudioSegmentMmapper.h +++ b/src/gui/seqmanager/AudioSegmentMmapper.h @@ -29,7 +29,7 @@ #include "SegmentMmapper.h" -class QString; +class TQString; namespace Rosegarden @@ -45,7 +45,7 @@ class AudioSegmentMmapper : public SegmentMmapper protected: AudioSegmentMmapper(RosegardenGUIDoc*, Segment*, - const QString& fileName); + const TQString& fileName); virtual size_t computeMmappedSize(); diff --git a/src/gui/seqmanager/CompositionMmapper.cpp b/src/gui/seqmanager/CompositionMmapper.cpp index 094f562..30983fe 100644 --- a/src/gui/seqmanager/CompositionMmapper.cpp +++ b/src/gui/seqmanager/CompositionMmapper.cpp @@ -34,10 +34,10 @@ #include "SegmentMmapperFactory.h" #include "SegmentMmapper.h" #include <kglobal.h> -#include <qdir.h> -#include <qfile.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <stdint.h> @@ -87,13 +87,13 @@ void CompositionMmapper::cleanup() // Erase all 'segment_*' files // - QString tmpPath = KGlobal::dirs()->resourceDirs("tmp").last(); + TQString tmpPath = KGlobal::dirs()->resourceDirs("tmp").last(); - QDir segmentsDir(tmpPath, "segment_*"); + TQDir segmentsDir(tmpPath, "segment_*"); for (unsigned int i = 0; i < segmentsDir.count(); ++i) { - QString segmentName = tmpPath + '/' + segmentsDir[i]; + TQString segmentName = tmpPath + '/' + segmentsDir[i]; SEQMAN_DEBUG << "CompositionMmapper : cleaning up " << segmentName << endl; - QFile::remove + TQFile::remove (segmentName); } @@ -142,23 +142,23 @@ void CompositionMmapper::mmapSegment(Segment* segment) m_segmentMmappers[segment] = mmapper; } -QString CompositionMmapper::makeFileName(Segment* segment) +TQString CompositionMmapper::makeFileName(Segment* segment) { - QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); + TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); - return QString("%1/segment_%2") + return TQString("%1/segment_%2") .arg(tmpDirs.last()) .arg((uintptr_t)segment, 0, 16); } -QString CompositionMmapper::getSegmentFileName(Segment* s) +TQString CompositionMmapper::getSegmentFileName(Segment* s) { SegmentMmapper* mmapper = m_segmentMmappers[s]; if (mmapper) return mmapper->getFileName(); else - return QString::null; + return TQString::null; } size_t CompositionMmapper::getSegmentFileSize(Segment* s) diff --git a/src/gui/seqmanager/CompositionMmapper.h b/src/gui/seqmanager/CompositionMmapper.h index 8bf997d..b6817f2 100644 --- a/src/gui/seqmanager/CompositionMmapper.h +++ b/src/gui/seqmanager/CompositionMmapper.h @@ -27,7 +27,7 @@ #define _RG_COMPOSITIONMMAPPER_H_ #include <map> -#include <qstring.h> +#include <tqstring.h> @@ -48,7 +48,7 @@ public: CompositionMmapper(RosegardenGUIDoc *doc); ~CompositionMmapper(); - QString getSegmentFileName(Segment*); + TQString getSegmentFileName(Segment*); size_t getSegmentFileSize(Segment*); void cleanup(); @@ -59,7 +59,7 @@ protected: void segmentDeleted(Segment*); void mmapSegment(Segment*); - QString makeFileName(Segment*); + TQString makeFileName(Segment*); //--------------- Data members --------------------------------- diff --git a/src/gui/seqmanager/ControlBlockMmapper.cpp b/src/gui/seqmanager/ControlBlockMmapper.cpp index 90ab6c2..3b49bcc 100644 --- a/src/gui/seqmanager/ControlBlockMmapper.cpp +++ b/src/gui/seqmanager/ControlBlockMmapper.cpp @@ -35,8 +35,8 @@ #include "document/RosegardenGUIDoc.h" #include "sound/ControlBlock.h" #include <kglobal.h> -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -55,7 +55,7 @@ ControlBlockMmapper::ControlBlockMmapper(RosegardenGUIDoc* doc) m_controlBlock(0) { // just in case - QFile::remove + TQFile::remove (m_fileName); m_fd = ::open(m_fileName.latin1(), O_RDWR | O_CREAT | O_TRUNC, @@ -76,7 +76,7 @@ ControlBlockMmapper::ControlBlockMmapper(RosegardenGUIDoc* doc) MAP_SHARED, m_fd, 0); if (m_mmappedBuffer == (void*) - 1) { - SEQMAN_DEBUG << QString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SEQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); throw Exception("mmap failed"); } @@ -91,11 +91,11 @@ ControlBlockMmapper::~ControlBlockMmapper() { ::munmap(m_mmappedBuffer, m_mmappedSize); ::close(m_fd); - QFile::remove + TQFile::remove (m_fileName); } -QString ControlBlockMmapper::createFileName() +TQString ControlBlockMmapper::createFileName() { return KGlobal::dirs()->resourceDirs("tmp").last() + "/rosegarden_control_block"; } diff --git a/src/gui/seqmanager/ControlBlockMmapper.h b/src/gui/seqmanager/ControlBlockMmapper.h index a96e742..4740bfb 100644 --- a/src/gui/seqmanager/ControlBlockMmapper.h +++ b/src/gui/seqmanager/ControlBlockMmapper.h @@ -28,7 +28,7 @@ #include "base/MidiProgram.h" #include "base/Track.h" -#include <qstring.h> +#include <tqstring.h> @@ -47,7 +47,7 @@ public: ControlBlockMmapper(RosegardenGUIDoc*); ~ControlBlockMmapper(); - QString getFileName() { return m_fileName; } + TQString getFileName() { return m_fileName; } void updateTrackData(Track*); void setTrackDeleted(TrackId); void updateMetronomeData(InstrumentId instId); @@ -62,11 +62,11 @@ public: protected: void initControlBlock(); void setFileSize(size_t); - QString createFileName(); + TQString createFileName(); //--------------- Data members --------------------------------- RosegardenGUIDoc* m_doc; - QString m_fileName; + TQString m_fileName; int m_fd; void* m_mmappedBuffer; size_t m_mmappedSize; diff --git a/src/gui/seqmanager/MetronomeMmapper.cpp b/src/gui/seqmanager/MetronomeMmapper.cpp index 9ca9af7..64964f0 100644 --- a/src/gui/seqmanager/MetronomeMmapper.cpp +++ b/src/gui/seqmanager/MetronomeMmapper.cpp @@ -42,7 +42,7 @@ #include "sound/MappedEvent.h" #include <kconfig.h> #include <kglobal.h> -#include <qstring.h> +#include <tqstring.h> #include <algorithm> @@ -153,7 +153,7 @@ InstrumentId MetronomeMmapper::getMetronomeInstrument() return m_metronome->getInstrument(); } -QString MetronomeMmapper::createFileName() +TQString MetronomeMmapper::createFileName() { return KGlobal::dirs()->resourceDirs("tmp").last() + "/rosegarden_metronome"; } diff --git a/src/gui/seqmanager/MetronomeMmapper.h b/src/gui/seqmanager/MetronomeMmapper.h index 1e18171..ed6978d 100644 --- a/src/gui/seqmanager/MetronomeMmapper.h +++ b/src/gui/seqmanager/MetronomeMmapper.h @@ -29,7 +29,7 @@ #include "base/MidiProgram.h" #include "base/RealTime.h" #include "SegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> #include <utility> #include <vector> #include "base/Event.h" @@ -63,7 +63,7 @@ protected: virtual size_t computeMmappedSize(); void sortTicks(); - QString createFileName(); + TQString createFileName(); // override from SegmentMmapper virtual void dump(); diff --git a/src/gui/seqmanager/MidiFilterDialog.cpp b/src/gui/seqmanager/MidiFilterDialog.cpp index 69d687a..0227eff 100644 --- a/src/gui/seqmanager/MidiFilterDialog.cpp +++ b/src/gui/seqmanager/MidiFilterDialog.cpp @@ -32,16 +32,16 @@ #include "gui/seqmanager/SequenceManager.h" #include "sound/MappedEvent.h" #include <kdialogbase.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqwidget.h> namespace Rosegarden { -MidiFilterDialog::MidiFilterDialog(QWidget *parent, +MidiFilterDialog::MidiFilterDialog(TQWidget *parent, RosegardenGUIDoc *doc): KDialogBase(parent, 0, true, i18n("Modify MIDI filters..."), Ok | Apply | Close | Help), @@ -50,20 +50,20 @@ MidiFilterDialog::MidiFilterDialog(QWidget *parent, { setHelp("studio-midi-filters"); - QHBox *hBox = makeHBoxMainWidget(); + TQHBox *hBox = makeHBoxMainWidget(); m_thruBox = - new QButtonGroup(1, + new TQButtonGroup(1, Qt::Horizontal, i18n("THRU events to ignore"), hBox); - QCheckBox *noteThru = new QCheckBox(i18n("Note"), m_thruBox); - QCheckBox *progThru = new QCheckBox(i18n("Program Change"), m_thruBox); - QCheckBox *keyThru = new QCheckBox(i18n("Key Pressure"), m_thruBox); - QCheckBox *chanThru = new QCheckBox(i18n("Channel Pressure"), m_thruBox); - QCheckBox *pitchThru = new QCheckBox(i18n("Pitch Bend"), m_thruBox); - QCheckBox *contThru = new QCheckBox(i18n("Controller"), m_thruBox); - QCheckBox *sysThru = new QCheckBox(i18n("System Exclusive"), m_thruBox); + TQCheckBox *noteThru = new TQCheckBox(i18n("Note"), m_thruBox); + TQCheckBox *progThru = new TQCheckBox(i18n("Program Change"), m_thruBox); + TQCheckBox *keyThru = new TQCheckBox(i18n("Key Pressure"), m_thruBox); + TQCheckBox *chanThru = new TQCheckBox(i18n("Channel Pressure"), m_thruBox); + TQCheckBox *pitchThru = new TQCheckBox(i18n("Pitch Bend"), m_thruBox); + TQCheckBox *contThru = new TQCheckBox(i18n("Controller"), m_thruBox); + TQCheckBox *sysThru = new TQCheckBox(i18n("System Exclusive"), m_thruBox); MidiFilter thruFilter = m_doc->getStudio().getMIDIThruFilter(); @@ -89,17 +89,17 @@ MidiFilterDialog::MidiFilterDialog(QWidget *parent, sysThru->setChecked(true); m_recordBox = - new QButtonGroup(1, + new TQButtonGroup(1, Qt::Horizontal, i18n("RECORD events to ignore"), hBox); - QCheckBox *noteRecord = new QCheckBox(i18n("Note"), m_recordBox); - QCheckBox *progRecord = new QCheckBox(i18n("Program Change"), m_recordBox); - QCheckBox *keyRecord = new QCheckBox(i18n("Key Pressure"), m_recordBox); - QCheckBox *chanRecord = new QCheckBox(i18n("Channel Pressure"), m_recordBox); - QCheckBox *pitchRecord = new QCheckBox(i18n("Pitch Bend"), m_recordBox); - QCheckBox *contRecord = new QCheckBox(i18n("Controller"), m_recordBox); - QCheckBox *sysRecord = new QCheckBox(i18n("System Exclusive"), m_recordBox); + TQCheckBox *noteRecord = new TQCheckBox(i18n("Note"), m_recordBox); + TQCheckBox *progRecord = new TQCheckBox(i18n("Program Change"), m_recordBox); + TQCheckBox *keyRecord = new TQCheckBox(i18n("Key Pressure"), m_recordBox); + TQCheckBox *chanRecord = new TQCheckBox(i18n("Channel Pressure"), m_recordBox); + TQCheckBox *pitchRecord = new TQCheckBox(i18n("Pitch Bend"), m_recordBox); + TQCheckBox *contRecord = new TQCheckBox(i18n("Controller"), m_recordBox); + TQCheckBox *sysRecord = new TQCheckBox(i18n("System Exclusive"), m_recordBox); MidiFilter recordFilter = m_doc->getStudio().getMIDIRecordFilter(); @@ -126,11 +126,11 @@ MidiFilterDialog::MidiFilterDialog(QWidget *parent, sysRecord->setChecked(true); - connect(m_thruBox, SIGNAL(released(int)), - this, SLOT(slotSetModified())); + connect(m_thruBox, TQT_SIGNAL(released(int)), + this, TQT_SLOT(slotSetModified())); - connect(m_recordBox, SIGNAL(released(int)), - this, SLOT(slotSetModified())); + connect(m_recordBox, TQT_SIGNAL(released(int)), + this, TQT_SLOT(slotSetModified())); setModified(false); } @@ -141,46 +141,46 @@ MidiFilterDialog::slotApply() MidiFilter thruFilter = 0, recordFilter = 0; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(0))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(0))->isChecked()) thruFilter |= MappedEvent::MidiNote; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(1))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(1))->isChecked()) thruFilter |= MappedEvent::MidiProgramChange; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(2))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(2))->isChecked()) thruFilter |= MappedEvent::MidiKeyPressure; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(3))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(3))->isChecked()) thruFilter |= MappedEvent::MidiChannelPressure; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(4))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(4))->isChecked()) thruFilter |= MappedEvent::MidiPitchBend; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(5))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(5))->isChecked()) thruFilter |= MappedEvent::MidiController; - if (dynamic_cast<QCheckBox*>(m_thruBox->find(6))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->find(6))->isChecked()) thruFilter |= MappedEvent::MidiSystemMessage; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(0))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(0))->isChecked()) recordFilter |= MappedEvent::MidiNote; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(1))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(1))->isChecked()) recordFilter |= MappedEvent::MidiProgramChange; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(2))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(2))->isChecked()) recordFilter |= MappedEvent::MidiKeyPressure; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(3))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(3))->isChecked()) recordFilter |= MappedEvent::MidiChannelPressure; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(4))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(4))->isChecked()) recordFilter |= MappedEvent::MidiPitchBend; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(5))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(5))->isChecked()) recordFilter |= MappedEvent::MidiController; - if (dynamic_cast<QCheckBox*>(m_recordBox->find(6))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->find(6))->isChecked()) recordFilter |= MappedEvent::MidiSystemMessage; diff --git a/src/gui/seqmanager/MidiFilterDialog.h b/src/gui/seqmanager/MidiFilterDialog.h index 06099ac..aaeda9c 100644 --- a/src/gui/seqmanager/MidiFilterDialog.h +++ b/src/gui/seqmanager/MidiFilterDialog.h @@ -29,8 +29,8 @@ #include <kdialogbase.h> -class QWidget; -class QButtonGroup; +class TQWidget; +class TQButtonGroup; namespace Rosegarden @@ -43,7 +43,7 @@ class MidiFilterDialog : public KDialogBase { Q_OBJECT public: - MidiFilterDialog(QWidget *parent, + MidiFilterDialog(TQWidget *parent, RosegardenGUIDoc *doc); void setModified(bool value); @@ -58,8 +58,8 @@ protected: RosegardenGUIDoc *m_doc; - QButtonGroup *m_thruBox; - QButtonGroup *m_recordBox; + TQButtonGroup *m_thruBox; + TQButtonGroup *m_recordBox; bool m_modified; diff --git a/src/gui/seqmanager/SegmentMmapper.cpp b/src/gui/seqmanager/SegmentMmapper.cpp index 5cf117d..37575b2 100644 --- a/src/gui/seqmanager/SegmentMmapper.cpp +++ b/src/gui/seqmanager/SegmentMmapper.cpp @@ -38,8 +38,8 @@ #include "base/TriggerSegment.h" #include "document/RosegardenGUIDoc.h" #include "sound/MappedEvent.h" -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -51,7 +51,7 @@ namespace Rosegarden { SegmentMmapper::SegmentMmapper(RosegardenGUIDoc* doc, - Segment* segment, const QString& fileName) + Segment* segment, const TQString& fileName) : m_doc(doc), m_segment(segment), m_fileName(fileName), @@ -108,7 +108,7 @@ SegmentMmapper::~SegmentMmapper() ::close(m_fd); SEQMAN_DEBUG << "~SegmentMmapper : removing " << m_fileName << endl; - QFile::remove + TQFile::remove (m_fileName); } @@ -234,7 +234,7 @@ void SegmentMmapper::remap(size_t newsize) #endif if (m_mmappedRegion == (void*) - 1) { - SEQMAN_DEBUG << QString("mremap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SEQMAN_DEBUG << TQString("mremap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); throw Exception("mremap failed"); } @@ -253,7 +253,7 @@ void SegmentMmapper::doMmap() m_mmappedEventBuffer = (MappedEvent *)((size_t *)m_mmappedRegion + 1); if (m_mmappedRegion == (void*) - 1) { - SEQMAN_DEBUG << QString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SEQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); throw Exception("mmap failed"); } diff --git a/src/gui/seqmanager/SegmentMmapper.h b/src/gui/seqmanager/SegmentMmapper.h index ab25aab..e223b8c 100644 --- a/src/gui/seqmanager/SegmentMmapper.h +++ b/src/gui/seqmanager/SegmentMmapper.h @@ -26,7 +26,7 @@ #ifndef _RG_SEGMENTMMAPPER_H_ #define _RG_SEGMENTMMAPPER_H_ -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -55,14 +55,14 @@ public: */ bool refresh(); - QString getFileName() { return m_fileName; } + TQString getFileName() { return m_fileName; } size_t getFileSize() const { return m_mmappedSize; } virtual unsigned int getSegmentRepeatCount(); protected: SegmentMmapper(RosegardenGUIDoc*, Segment*, - const QString& fileName); + const TQString& fileName); virtual size_t computeMmappedSize(); @@ -91,7 +91,7 @@ protected: //--------------- Data members --------------------------------- RosegardenGUIDoc* m_doc; Segment* m_segment; - QString m_fileName; + TQString m_fileName; int m_fd; size_t m_mmappedSize; diff --git a/src/gui/seqmanager/SegmentMmapperFactory.cpp b/src/gui/seqmanager/SegmentMmapperFactory.cpp index 085d842..4f40cd6 100644 --- a/src/gui/seqmanager/SegmentMmapperFactory.cpp +++ b/src/gui/seqmanager/SegmentMmapperFactory.cpp @@ -33,7 +33,7 @@ #include "AudioSegmentMmapper.h" #include "TempoSegmentMmapper.h" #include "TimeSigSegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -41,7 +41,7 @@ namespace Rosegarden SegmentMmapper* SegmentMmapperFactory::makeMmapperForSegment(RosegardenGUIDoc* doc, Rosegarden::Segment* segment, - const QString& fileName) + const TQString& fileName) { SegmentMmapper* mmapper = 0; diff --git a/src/gui/seqmanager/SegmentMmapperFactory.h b/src/gui/seqmanager/SegmentMmapperFactory.h index 2970024..e10eee2 100644 --- a/src/gui/seqmanager/SegmentMmapperFactory.h +++ b/src/gui/seqmanager/SegmentMmapperFactory.h @@ -28,7 +28,7 @@ -class QString; +class TQString; namespace Rosegarden @@ -47,7 +47,7 @@ class SegmentMmapperFactory public: static SegmentMmapper* makeMmapperForSegment(RosegardenGUIDoc*, Segment*, - const QString& fileName); + const TQString& fileName); static MetronomeMmapper* makeMetronome(RosegardenGUIDoc*); static TimeSigSegmentMmapper* makeTimeSig(RosegardenGUIDoc*); diff --git a/src/gui/seqmanager/SequenceManager.cpp b/src/gui/seqmanager/SequenceManager.cpp index 12334f6..4ebe945 100644 --- a/src/gui/seqmanager/SequenceManager.cpp +++ b/src/gui/seqmanager/SequenceManager.cpp @@ -66,16 +66,16 @@ #include <kconfig.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qapplication.h> -#include <qcstring.h> -#include <qcursor.h> -#include <qdatastream.h> -#include <qevent.h> -#include <qobject.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqcstring.h> +#include <tqcursor.h> +#include <tqdatastream.h> +#include <tqevent.h> +#include <tqobject.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtimer.h> #include <algorithm> @@ -95,14 +95,14 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc, m_transport(transport), m_lastRewoundAt(clock()), m_countdownDialog(0), - m_countdownTimer(new QTimer(m_doc)), + m_countdownTimer(new TQTimer(m_doc)), m_shownOverrunWarning(false), - m_recordTime(new QTime()), + m_recordTime(new TQTime()), m_compositionRefreshStatusId(m_doc->getComposition().getNewRefreshStatusId()), m_updateRequested(true), - m_compositionMmapperResetTimer(new QTimer(m_doc)), + m_compositionMmapperResetTimer(new TQTimer(m_doc)), m_sequencerMapper(0), - m_reportTimer(new QTimer(m_doc)), + m_reportTimer(new TQTimer(m_doc)), m_canReport(true), m_lastLowLatencySwitchSent(false), m_lastTransportStartPosition(0), @@ -113,22 +113,22 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc, // in the autoload (that have only just been mapped by the ctor!) // m_compositionMmapper->cleanup(); - m_countdownDialog = new CountdownDialog(dynamic_cast<QWidget*> + m_countdownDialog = new CountdownDialog(dynamic_cast<TQWidget*> (m_doc->parent())->parentWidget()); // Connect these for use later // - connect(m_countdownTimer, SIGNAL(timeout()), - this, SLOT(slotCountdownTimerTimeout())); + connect(m_countdownTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotCountdownTimerTimeout())); - connect(m_reportTimer, SIGNAL(timeout()), - this, SLOT(slotAllowReport())); + connect(m_reportTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotAllowReport())); - connect(m_compositionMmapperResetTimer, SIGNAL(timeout()), - this, SLOT(slotScheduledCompositionMmapperReset())); + connect(m_compositionMmapperResetTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotScheduledCompositionMmapperReset())); - connect(doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); m_doc->getComposition().addObserver(this); @@ -164,7 +164,7 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) DataBlockRepository::clear(); m_doc->getComposition().removeObserver(this); - disconnect(m_doc->getCommandHistory(), SIGNAL(commandExecuted())); + disconnect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted())); m_segments.clear(); m_triggerSegments.clear(); @@ -179,25 +179,25 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) delete m_countdownTimer; delete m_compositionMmapperResetTimer; - m_countdownDialog = new CountdownDialog(dynamic_cast<QWidget*> + m_countdownDialog = new CountdownDialog(dynamic_cast<TQWidget*> (m_doc->parent())->parentWidget()); // Bug 933041: no longer connect the CountdownDialog from // SequenceManager; instead let the RosegardenGUIApp connect it to // its own slotStop to ensure the right housekeeping is done - m_countdownTimer = new QTimer(m_doc); + m_countdownTimer = new TQTimer(m_doc); // Connect this for use later // - connect(m_countdownTimer, SIGNAL(timeout()), - this, SLOT(slotCountdownTimerTimeout())); + connect(m_countdownTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotCountdownTimerTimeout())); m_compositionRefreshStatusId = comp.getNewRefreshStatusId(); comp.addObserver(this); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(update())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(update())); for (Composition::iterator i = comp.begin(); i != comp.end(); ++i) { @@ -216,9 +216,9 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) } - m_compositionMmapperResetTimer = new QTimer(m_doc); - connect(m_compositionMmapperResetTimer, SIGNAL(timeout()), - this, SLOT(slotScheduledCompositionMmapperReset())); + m_compositionMmapperResetTimer = new TQTimer(m_doc); + connect(m_compositionMmapperResetTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotScheduledCompositionMmapperReset())); resetCompositionMmapper(); @@ -320,18 +320,18 @@ SequenceManager::play() if (lowLat != m_lastLowLatencySwitchSent) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << lowLat; rgapp->sequencerSend("setLowLatencyMode(bool)", data); m_lastLowLatencySwitchSent = lowLat; } - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); // playback start position streamOut << (long)startPos.sec; @@ -374,7 +374,7 @@ SequenceManager::play() } // ensure the return type is ok - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; @@ -464,10 +464,10 @@ SequenceManager::stop() // wait cursor // - QApplication::setOverrideCursor(QCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; bool failed = false; if (!rgapp->sequencerCall("stop()", replyType, replyData)) { @@ -475,7 +475,7 @@ SequenceManager::stop() } // restore - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); TransportStatus status = m_transportStatus; @@ -573,8 +573,8 @@ SequenceManager::notifySequencerStatus(TransportStatus status) void SequenceManager::sendSequencerJump(const RealTime &time) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (long)time.sec; streamOut << (long)time.nsec; @@ -648,9 +648,9 @@ SequenceManager::record(bool toggled) if (m_transportStatus == RECORDING) { SEQMAN_DEBUG << "SequenceManager::record - stop recording and keep playing\n"; - QByteArray data; - QCString replyType; - QByteArray replyData; + TQByteArray data; + TQCString replyType; + TQByteArray replyData; // Send Record to the Sequencer to signal it to drop out of record mode if (!rgapp->sequencerCall("punchOut()", replyType, replyData, data)) { @@ -798,18 +798,18 @@ punchin: if (lowLat != m_lastLowLatencySwitchSent) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << lowLat; rgapp->sequencerSend("setLowLatencyMode(bool)", data); m_lastLowLatencySwitchSent = lowLat; } - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); // playback start position streamOut << (long)startPos.sec; @@ -858,7 +858,7 @@ punchin: } // ensure the return type is ok - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); int result; streamIn >> result; @@ -985,7 +985,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, /*KConfig* config = kapp->config(); config->setGroup(SequencerOptionsConfigGroup); - QString recordDeviceStr = config->readEntry("midirecorddevice"); + TQString recordDeviceStr = config->readEntry("midirecorddevice"); sendMIDIRecordingDevice(recordDeviceStr);*/ restoreRecordSubscriptions(); } @@ -1010,13 +1010,13 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, } else if ((*i)->getData1() == MappedEvent::FailureJackRestartFailed) { KMessageBox::error( - dynamic_cast<QWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), i18n("The JACK Audio subsystem has failed or it has stopped Rosegarden from processing audio.\nPlease restart Rosegarden to continue working with audio.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureJackRestart) { KMessageBox::error( - dynamic_cast<QWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), i18n("The JACK Audio subsystem has stopped Rosegarden from processing audio, probably because of a processing overload.\nAn attempt to restart the audio service has been made, but some problems may remain.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureCPUOverload) { @@ -1027,7 +1027,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, stopping(); KMessageBox::error( - dynamic_cast<QWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), i18n("Run out of processor power for real-time audio processing. Cannot continue.")); #endif @@ -1054,7 +1054,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if (tv.tv_sec - warningShownAt >= 5 && !boolShowingALSAWarning) { - QString message = i18n("A serious error has occurred in the ALSA MIDI subsystem. It may not be possible to continue sequencing. Please check console output for more information."); + TQString message = i18n("A serious error has occurred in the ALSA MIDI subsystem. It may not be possible to continue sequencing. Please check console output for more information."); boolShowingALSAWarning = true; KMessageBox::information(0, message); @@ -1075,7 +1075,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if (tv.tv_sec - warningShownAt >= 5 && !boolShowingWarning) { - QString message = i18n("JACK Audio subsystem is losing sample frames."); + TQString message = i18n("JACK Audio subsystem is losing sample frames."); boolShowingWarning = true; KMessageBox::information(0, message); @@ -1088,7 +1088,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, } else if (!m_shownOverrunWarning) { - QString message; + TQString message; switch ((*i)->getData1()) { @@ -1146,13 +1146,13 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if ((*i)->getData1() == MappedEvent::FailureJackRestartFailed) { KMessageBox::error( - dynamic_cast<QWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->parent()), i18n("The JACK Audio subsystem has failed or it has stopped Rosegarden from processing audio.\nPlease restart Rosegarden to continue working with audio.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureJackRestart) { KMessageBox::error( - dynamic_cast<QWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->parent()), i18n("The JACK Audio subsystem has stopped Rosegarden from processing audio, probably because of a processing overload.\nAn attempt to restart the audio service has been made, but some problems may remain.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::WarningImpreciseTimer && @@ -1166,7 +1166,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::information( - dynamic_cast<QWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->parent()), i18n("<h3>System timer resolution is too low</h3><p>Rosegarden was unable to find a high-resolution timing source for MIDI performance.</p><p>This may mean you are using a Linux system with the kernel timer resolution set too low. Please contact your Linux distributor for more information.</p><p>Some Linux distributors already provide low latency kernels, see <a href=\"http://rosegarden.wiki.sourceforge.net/Low+latency+kernels\">http://rosegarden.wiki.sourceforge.net/Low+latency+kernels</a> for instructions.</p>"), NULL, NULL, KMessageBox::Notify + KMessageBox::AllowLink); @@ -1184,7 +1184,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::information( - dynamic_cast<QWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->parent()), i18n("<h3>System timer resolution is too low</h3><p>Rosegarden was unable to find a high-resolution timing source for MIDI performance.</p><p>You may be able to solve this problem by loading the RTC timer kernel module. To do this, try running <b>sudo modprobe snd-rtctimer</b> in a terminal window and then restarting Rosegarden.</p><p>Alternatively, check whether your Linux distributor provides a multimedia-optimized kernel. See <a href=\"http://rosegarden.wiki.sourceforge.net/Low+latency+kernels\">http://rosegarden.wiki.sourceforge.net/Low+latency+kernels</a> for notes about this.</p>"), NULL, NULL, KMessageBox::Notify + KMessageBox::AllowLink); @@ -1252,8 +1252,8 @@ SequenceManager::setLoop(const timeT &lhs, const timeT &rhs) // Let the sequencer know about the loop markers // - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); RealTime loopStart = m_doc->getComposition().getElapsedRealTime(lhs); @@ -1271,21 +1271,21 @@ SequenceManager::setLoop(const timeT &lhs, const timeT &rhs) void SequenceManager::checkSoundDriverStatus(bool warnUser) { - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); - streamOut << QString(VERSION); + streamOut << TQString(VERSION); - if (! rgapp->sequencerCall("getSoundDriverStatus(QString)", + if (! rgapp->sequencerCall("getSoundDriverStatus(TQString)", replyType, replyData, data)) { m_soundDriverStatus = NO_DRIVER; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; m_soundDriverStatus = result; @@ -1306,7 +1306,7 @@ SequenceManager::checkSoundDriverStatus(bool warnUser) KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); - QString text = ""; + TQString text = ""; if (m_soundDriverStatus == NO_DRIVER) { text = i18n("<p>Both MIDI and Audio subsystems have failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"alsaconf\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>"); @@ -1479,7 +1479,7 @@ SequenceManager::resetMidiNetwork() } void -SequenceManager::sendMIDIRecordingDevice(const QString recordDeviceStr) +SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr) { if (recordDeviceStr) { @@ -1503,10 +1503,10 @@ SequenceManager::restoreRecordSubscriptions() { KConfig* config = kapp->config(); config->setGroup(SequencerOptionsConfigGroup); - //QString recordDeviceStr = config->readEntry("midirecorddevice"); - QStringList devList = config->readListEntry("midirecorddevice"); + //TQString recordDeviceStr = config->readEntry("midirecorddevice"); + TQStringList devList = config->readListEntry("midirecorddevice"); - for ( QStringList::ConstIterator it = devList.begin(); + for ( TQStringList::ConstIterator it = devList.begin(); it != devList.end(); ++it) { sendMIDIRecordingDevice(*it); } @@ -1518,7 +1518,7 @@ SequenceManager::reinitialiseSequencerStudio() { KConfig* config = kapp->config(); config->setGroup(SequencerOptionsConfigGroup); - //QString recordDeviceStr = config->readEntry("midirecorddevice"); + //TQString recordDeviceStr = config->readEntry("midirecorddevice"); //sendMIDIRecordingDevice(recordDeviceStr); restoreRecordSubscriptions(); @@ -1669,9 +1669,9 @@ void SequenceManager::resetControlBlockMmapper() m_controlBlockMmapper->setDocument(m_doc); } -bool SequenceManager::event(QEvent *e) +bool SequenceManager::event(TQEvent *e) { - if (e->type() == QEvent::User) { + if (e->type() == TQEvent::User) { SEQMAN_DEBUG << "SequenceManager::event() with user event\n"; if (m_updateRequested) { SEQMAN_DEBUG << "SequenceManager::event(): update requested\n"; @@ -1680,7 +1680,7 @@ bool SequenceManager::event(QEvent *e) } return true; } else { - return QObject::event(e); + return TQObject::event(e); } } @@ -1688,9 +1688,9 @@ void SequenceManager::update() { SEQMAN_DEBUG << "SequenceManager::update()\n"; // schedule a refresh-status check for the next event loop - QEvent *e = new QEvent(QEvent::User); + TQEvent *e = new TQEvent(TQEvent::User); m_updateRequested = true; - QApplication::postEvent(this, e); + TQApplication::postEvent(this, e); } void SequenceManager::checkRefreshStatus() @@ -1771,16 +1771,16 @@ void SequenceManager::segmentModified(Segment* s) << sizeChanged << endl; if ((m_transportStatus == PLAYING) && sizeChanged) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); - streamOut << (QString)m_compositionMmapper->getSegmentFileName(s); + streamOut << (TQString)m_compositionMmapper->getSegmentFileName(s); streamOut << (size_t)m_compositionMmapper->getSegmentFileSize(s); SEQMAN_DEBUG << "SequenceManager::segmentModified() : DCOP-call sequencer remapSegment" << m_compositionMmapper->getSegmentFileName(s) << endl; - rgapp->sequencerSend("remapSegment(QString, size_t)", data); + rgapp->sequencerSend("remapSegment(TQString, size_t)", data); } } @@ -1816,7 +1816,7 @@ void SequenceManager::segmentEventsTimingChanged(const Composition*, Segment * s SEQMAN_DEBUG << "SequenceManager::segmentEventsTimingChanged(" << s << ", " << t << ")\n"; segmentModified(s); if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) { - QByteArray data; + TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } } @@ -1832,7 +1832,7 @@ void SequenceManager::segmentTrackChanged(const Composition*, Segment *s, TrackI SEQMAN_DEBUG << "SequenceManager::segmentTrackChanged(" << s << ", " << id << ")\n"; segmentModified(s); if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) { - QByteArray data; + TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } } @@ -1851,12 +1851,12 @@ void SequenceManager::processAddedSegment(Segment* s) if (m_transportStatus == PLAYING) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << m_compositionMmapper->getSegmentFileName(s); - if (!rgapp->sequencerSend("addSegment(QString)", data)) { + if (!rgapp->sequencerSend("addSegment(TQString)", data)) { m_transportStatus = STOPPED; } } @@ -1871,17 +1871,17 @@ void SequenceManager::processRemovedSegment(Segment* s) { SEQMAN_DEBUG << "SequenceManager::processRemovedSegment(" << s << ")\n"; - QString filename = m_compositionMmapper->getSegmentFileName(s); + TQString filename = m_compositionMmapper->getSegmentFileName(s); m_compositionMmapper->segmentDeleted(s); if (m_transportStatus == PLAYING) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << filename; - if (!rgapp->sequencerSend("deleteSegment(QString)", data)) { + if (!rgapp->sequencerSend("deleteSegment(TQString)", data)) { // failed m_transportStatus = STOPPED; } @@ -1908,7 +1908,7 @@ void SequenceManager::trackChanged(const Composition *, Track* t) m_controlBlockMmapper->updateTrackData(t); if (m_transportStatus == PLAYING) { - QByteArray data; + TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } } @@ -1974,7 +1974,7 @@ void SequenceManager::soloChanged(const Composition *, bool solo, TrackId select { if (m_controlBlockMmapper->updateSoloData(solo, selectedTrack)) { if (m_transportStatus == PLAYING) { - QByteArray data; + TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } } @@ -2097,7 +2097,7 @@ SequenceManager::slotCountdownTimerTimeout() } void -SequenceManager::slotFoundMountPoint(const QString&, +SequenceManager::slotFoundMountPoint(const TQString&, unsigned long kBSize, unsigned long /*kBUsed*/, unsigned long kBAvail) @@ -2117,10 +2117,10 @@ SequenceManager::getSampleRate() { if (m_sampleRate != 0) return m_sampleRate; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> m_sampleRate; } @@ -2132,7 +2132,7 @@ bool SequenceManager::shouldWarnForImpreciseTimer() { kapp->config()->setGroup(SequencerOptionsConfigGroup); - QString timer = kapp->config()->readEntry("timer"); + TQString timer = kapp->config()->readEntry("timer"); if (timer == "(auto)" || timer == "") return true; else return false; // if the user has chosen the timer, leave them alone } diff --git a/src/gui/seqmanager/SequenceManager.h b/src/gui/seqmanager/SequenceManager.h index 792ec01..4713aab 100644 --- a/src/gui/seqmanager/SequenceManager.h +++ b/src/gui/seqmanager/SequenceManager.h @@ -34,15 +34,15 @@ #include "gui/application/RosegardenDCOP.h" #include "sound/MappedComposition.h" #include "sound/MappedEvent.h" -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <vector> #include <map> -class QTimer; -class QTime; -class QEvent; +class TQTimer; +class TQTime; +class TQEvent; namespace Rosegarden @@ -63,7 +63,7 @@ class Composition; class AudioManagerDialog; -class SequenceManager : public QObject, public CompositionObserver +class SequenceManager : public TQObject, public CompositionObserver { Q_OBJECT public: @@ -190,7 +190,7 @@ public: void processRemovedSegment(Segment*); void segmentModified(Segment*); - virtual bool event(QEvent *e); + virtual bool event(TQEvent *e); /// for the gui to call to indicate that the metronome needs to be remapped void metronomeChanged(InstrumentId id, bool regenerateTicks); @@ -232,7 +232,7 @@ protected slots: // void slotAllowReport() { m_canReport = true; } - void slotFoundMountPoint(const QString&, + void slotFoundMountPoint(const TQString&, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); @@ -247,7 +247,7 @@ protected: void resetTempoSegmentMmapper(); void resetTimeSigSegmentMmapper(); void checkRefreshStatus(); - void sendMIDIRecordingDevice(const QString recordDeviceStr); + void sendMIDIRecordingDevice(const TQString recordDeviceStr); void restoreRecordSubscriptions(); bool shouldWarnForImpreciseTimer(); @@ -275,13 +275,13 @@ protected: clock_t m_lastRewoundAt; CountdownDialog *m_countdownDialog; - QTimer *m_countdownTimer; + TQTimer *m_countdownTimer; bool m_shownOverrunWarning; // Keep a track of elapsed record time with this object // - QTime *m_recordTime; + TQTime *m_recordTime; typedef std::map<Segment *, int> SegmentRefreshMap; SegmentRefreshMap m_segments; // map to refresh status id @@ -292,7 +292,7 @@ protected: // used to schedule a composition mmapper reset when the composition end time marker changes // this can be caused by a window resize, and since the reset is potentially expensive we want to collapse // several following requests into one. - QTimer *m_compositionMmapperResetTimer; + TQTimer *m_compositionMmapperResetTimer; // Information that the sequencer is providing to us - for the moment // it's only the position pointer. @@ -301,7 +301,7 @@ protected: // Just to make sure we don't bother the user too often // - QTimer *m_reportTimer; + TQTimer *m_reportTimer; bool m_canReport; bool m_gotDiskSpaceResult; diff --git a/src/gui/seqmanager/SequencerMapper.cpp b/src/gui/seqmanager/SequencerMapper.cpp index 5d8acf3..af4ca09 100644 --- a/src/gui/seqmanager/SequencerMapper.cpp +++ b/src/gui/seqmanager/SequencerMapper.cpp @@ -33,8 +33,8 @@ #include "sound/MappedComposition.h" #include "sound/MappedEvent.h" #include "sound/SequencerDataBlock.h" -#include <qfileinfo.h> -#include <qstring.h> +#include <tqfileinfo.h> +#include <tqstring.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -45,7 +45,7 @@ namespace Rosegarden { -SequencerMapper::SequencerMapper(const QString filename) +SequencerMapper::SequencerMapper(const TQString filename) : m_fd( -1), m_mmappedSize(0), m_mmappedBuffer((void *)0), @@ -63,7 +63,7 @@ SequencerMapper::~SequencerMapper() void SequencerMapper::map() { - QFileInfo fInfo(m_filename); + TQFileInfo fInfo(m_filename); if (!fInfo.exists()) { RG_DEBUG << "SequencerMapper::map() : file " << m_filename << " doesn't exist\n"; throw Exception("file not found"); @@ -82,7 +82,7 @@ SequencerMapper::map() if (m_mmappedBuffer == (void*) - 1) { - RG_DEBUG << QString("mmap failed : (%1) %2\n"). + RG_DEBUG << TQString("mmap failed : (%1) %2\n"). arg(errno).arg(strerror(errno)); throw Exception("mmap failed"); diff --git a/src/gui/seqmanager/SequencerMapper.h b/src/gui/seqmanager/SequencerMapper.h index 59d217f..9eddc13 100644 --- a/src/gui/seqmanager/SequencerMapper.h +++ b/src/gui/seqmanager/SequencerMapper.h @@ -30,7 +30,7 @@ #include "base/RealTime.h" #include "base/Track.h" #include "sound/SequencerDataBlock.h" -#include <qstring.h> +#include <tqstring.h> class LevelInfo; @@ -46,7 +46,7 @@ class MappedComposition; class SequencerMapper { public: - SequencerMapper(const QString filename); + SequencerMapper(const TQString filename); ~SequencerMapper(); RealTime getPositionPointer() const { @@ -102,7 +102,7 @@ protected: int m_fd; size_t m_mmappedSize; void* m_mmappedBuffer; - QString m_filename; + TQString m_filename; SequencerDataBlock *m_sequencerDataBlock; }; diff --git a/src/gui/seqmanager/SpecialSegmentMmapper.cpp b/src/gui/seqmanager/SpecialSegmentMmapper.cpp index 5926f11..ecd1e11 100644 --- a/src/gui/seqmanager/SpecialSegmentMmapper.cpp +++ b/src/gui/seqmanager/SpecialSegmentMmapper.cpp @@ -32,18 +32,18 @@ #include "document/RosegardenGUIDoc.h" #include "SegmentMmapper.h" #include <kglobal.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { SpecialSegmentMmapper::SpecialSegmentMmapper(RosegardenGUIDoc* doc, - QString baseFileName) + TQString baseFileName) : SegmentMmapper(doc, 0, createFileName(baseFileName)) {} -QString SpecialSegmentMmapper::createFileName(QString baseFileName) +TQString SpecialSegmentMmapper::createFileName(TQString baseFileName) { return KGlobal::dirs()->resourceDirs("tmp").last() + "/" + baseFileName; } diff --git a/src/gui/seqmanager/SpecialSegmentMmapper.h b/src/gui/seqmanager/SpecialSegmentMmapper.h index e16c7b5..fefdd96 100644 --- a/src/gui/seqmanager/SpecialSegmentMmapper.h +++ b/src/gui/seqmanager/SpecialSegmentMmapper.h @@ -27,7 +27,7 @@ #define _RG_SPECIALSEGMENTMMAPPER_H_ #include "SegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> @@ -46,9 +46,9 @@ public: protected: SpecialSegmentMmapper(RosegardenGUIDoc* doc, - QString baseFileName); + TQString baseFileName); - QString createFileName(QString baseFileName); + TQString createFileName(TQString baseFileName); }; //---------------------------------------- diff --git a/src/gui/seqmanager/TempoSegmentMmapper.cpp b/src/gui/seqmanager/TempoSegmentMmapper.cpp index 1c53922..9c92f13 100644 --- a/src/gui/seqmanager/TempoSegmentMmapper.cpp +++ b/src/gui/seqmanager/TempoSegmentMmapper.cpp @@ -33,7 +33,7 @@ #include "SegmentMmapper.h" #include "sound/MappedEvent.h" #include "SpecialSegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden diff --git a/src/gui/seqmanager/TempoSegmentMmapper.h b/src/gui/seqmanager/TempoSegmentMmapper.h index 08c8ebf..a31a1e7 100644 --- a/src/gui/seqmanager/TempoSegmentMmapper.h +++ b/src/gui/seqmanager/TempoSegmentMmapper.h @@ -27,7 +27,7 @@ #define _RG_TEMPOSEGMENTMMAPPER_H_ #include "SpecialSegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -42,7 +42,7 @@ class TempoSegmentMmapper : public SpecialSegmentMmapper protected: TempoSegmentMmapper(RosegardenGUIDoc* doc, - QString baseFileName) + TQString baseFileName) : SpecialSegmentMmapper(doc, baseFileName) {} // overrides from SegmentMmapper diff --git a/src/gui/seqmanager/TimeSigSegmentMmapper.cpp b/src/gui/seqmanager/TimeSigSegmentMmapper.cpp index 98beab3..3404021 100644 --- a/src/gui/seqmanager/TimeSigSegmentMmapper.cpp +++ b/src/gui/seqmanager/TimeSigSegmentMmapper.cpp @@ -33,7 +33,7 @@ #include "SegmentMmapper.h" #include "sound/MappedEvent.h" #include "SpecialSegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden diff --git a/src/gui/seqmanager/TimeSigSegmentMmapper.h b/src/gui/seqmanager/TimeSigSegmentMmapper.h index 20e0474..2412128 100644 --- a/src/gui/seqmanager/TimeSigSegmentMmapper.h +++ b/src/gui/seqmanager/TimeSigSegmentMmapper.h @@ -27,7 +27,7 @@ #define _RG_TIMESIGSEGMENTMMAPPER_H_ #include "SpecialSegmentMmapper.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -44,7 +44,7 @@ public: protected: TimeSigSegmentMmapper(RosegardenGUIDoc* doc, - QString baseFileName) + TQString baseFileName) : SpecialSegmentMmapper(doc, baseFileName) {} // overrides from SegmentMmapper diff --git a/src/gui/studio/AudioMixerWindow.cpp b/src/gui/studio/AudioMixerWindow.cpp index e8d09b3..2b7ad0e 100644 --- a/src/gui/studio/AudioMixerWindow.cpp +++ b/src/gui/studio/AudioMixerWindow.cpp @@ -24,7 +24,7 @@ #include "AudioMixerWindow.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "AudioPlugin.h" @@ -60,21 +60,21 @@ #include <kglobal.h> #include <kmainwindow.h> #include <kstdaction.h> -#include <qaccel.h> -#include <qcolor.h> -#include <qfont.h> -#include <qframe.h> -#include <qhbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpalette.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpalette.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -89,7 +89,7 @@ static const unsigned int MIXER_SHOW_UNASSIGNED_FADERS = 1 << 3; static const unsigned int MIXER_OMIT_SYNTH_FADERS = 1 << 4; -AudioMixerWindow::AudioMixerWindow(QWidget *parent, +AudioMixerWindow::AudioMixerWindow(TQWidget *parent, RosegardenGUIDoc *document): MixerWindow(parent, document), m_mainBox (0) @@ -97,83 +97,83 @@ AudioMixerWindow::AudioMixerWindow(QWidget *parent, populate(); KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-record"))); new KAction(i18n("&Record"), icon, 0, this, - SIGNAL(record()), actionCollection(), + TQT_SIGNAL(record()), actionCollection(), "record"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), + TQT_SIGNAL(panic()), actionCollection(), "panic"); unsigned int mixerOptions = m_studio->getMixerDisplayOptions(); (new KToggleAction(i18n("Show Audio &Faders"), 0, this, - SLOT(slotToggleFaders()), actionCollection(), + TQT_SLOT(slotToggleFaders()), actionCollection(), "show_audio_faders"))->setChecked (!(mixerOptions & MIXER_OMIT_FADERS)); (new KToggleAction(i18n("Show Synth &Faders"), 0, this, - SLOT(slotToggleSynthFaders()), actionCollection(), + TQT_SLOT(slotToggleSynthFaders()), actionCollection(), "show_synth_faders"))->setChecked (!(mixerOptions & MIXER_OMIT_SYNTH_FADERS)); (new KToggleAction(i18n("Show &Submasters"), 0, this, - SLOT(slotToggleSubmasters()), actionCollection(), + TQT_SLOT(slotToggleSubmasters()), actionCollection(), "show_audio_submasters"))->setChecked (!(mixerOptions & MIXER_OMIT_SUBMASTERS)); (new KToggleAction(i18n("Show &Plugin Buttons"), 0, this, - SLOT(slotTogglePluginButtons()), actionCollection(), + TQT_SLOT(slotTogglePluginButtons()), actionCollection(), "show_plugin_buttons"))->setChecked (!(mixerOptions & MIXER_OMIT_PLUGINS)); (new KToggleAction(i18n("Show &Unassigned Faders"), 0, this, - SLOT(slotToggleUnassignedFaders()), actionCollection(), + TQT_SLOT(slotToggleUnassignedFaders()), actionCollection(), "show_unassigned_faders"))->setChecked (mixerOptions & MIXER_SHOW_UNASSIGNED_FADERS); @@ -183,8 +183,8 @@ AudioMixerWindow::AudioMixerWindow(QWidget *parent, action = new KRadioAction(i18n("1 Input", "%n Inputs", i), 0, this, - SLOT(slotSetInputCountFromAction()), actionCollection(), - QString("inputs_%1").arg(i)); + TQT_SLOT(slotSetInputCountFromAction()), actionCollection(), + TQString("inputs_%1").arg(i)); action->setExclusiveGroup("inputs"); if (i == int(m_studio->getRecordIns().size())) action->setChecked(true); @@ -193,8 +193,8 @@ AudioMixerWindow::AudioMixerWindow(QWidget *parent, action = new KRadioAction (i18n("No Submasters"), 0, this, - SLOT(slotSetSubmasterCountFromAction()), actionCollection(), - QString("submasters_0")); + TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), + TQString("submasters_0")); action->setExclusiveGroup("submasters"); action->setChecked(true); @@ -202,8 +202,8 @@ AudioMixerWindow::AudioMixerWindow(QWidget *parent, action = new KRadioAction (i18n("1 Submaster", "%n Submasters", i), 0, this, - SLOT(slotSetSubmasterCountFromAction()), actionCollection(), - QString("submasters_%1").arg(i)); + TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), + TQString("submasters_%1").arg(i)); action->setExclusiveGroup("submasters"); if (i == int(m_studio->getBusses().size()) - 1) action->setChecked(true); @@ -250,30 +250,30 @@ AudioMixerWindow::populate() } else { - m_surroundBox = new QHBox(this); + m_surroundBox = new TQHBox(this); setCentralWidget(m_surroundBox); } - QFont font; + TQFont font; font.setPointSize(font.pointSize() * 8 / 10); font.setBold(false); setFont(font); - QFont boldFont(font); + TQFont boldFont(font); boldFont.setBold(true); - m_mainBox = new QFrame(m_surroundBox); + m_mainBox = new TQFrame(m_surroundBox); InstrumentList instruments = m_studio->getPresentationInstruments(); BussList busses = m_studio->getBusses(); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - m_monoPixmap.load(QString("%1/misc/mono.xpm").arg(pixmapDir)); - m_stereoPixmap.load(QString("%1/misc/stereo.xpm").arg(pixmapDir)); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + m_monoPixmap.load(TQString("%1/misc/mono.xpm").arg(pixmapDir)); + m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").arg(pixmapDir)); // Total cols: is 2 for each fader, submaster or master, plus 1 // for each spacer. - QGridLayout *mainLayout = new QGridLayout + TQGridLayout *mainLayout = new QGridLayout (m_mainBox, (instruments.size() + busses.size()) * 3, 7); setCaption(i18n("Audio Mixer")); @@ -307,7 +307,7 @@ AudioMixerWindow::populate() AudioRouteMenu::In, AudioRouteMenu::Compact, m_studio, *i); - QToolTip::add + TQToolTip::add (rec.m_input->getWidget(), i18n("Record input source")); rec.m_input->getWidget()->setMaximumWidth(45); } else { @@ -318,7 +318,7 @@ AudioMixerWindow::populate() AudioRouteMenu::Out, AudioRouteMenu::Compact, m_studio, *i); - QToolTip::add + TQToolTip::add (rec.m_output->getWidget(), i18n("Output destination")); rec.m_output->getWidget()->setMaximumWidth(45); @@ -332,7 +332,7 @@ AudioMixerWindow::populate() rec.m_pan->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPastelYellow)); } - QToolTip::add + TQToolTip::add (rec.m_pan, i18n("Pan")); rec.m_fader = new Fader @@ -341,69 +341,69 @@ AudioMixerWindow::populate() (m_mainBox, VUMeter::AudioPeakHoldIECLong, true, rec.m_input != 0, 20, 240); - QToolTip::add + TQToolTip::add (rec.m_fader, i18n("Audio level")); - QToolTip::add + TQToolTip::add (rec.m_meter, i18n("Audio level")); - rec.m_stereoButton = new QPushButton(m_mainBox); + rec.m_stereoButton = new TQPushButton(m_mainBox); rec.m_stereoButton->setPixmap(m_monoPixmap); rec.m_stereoButton->setFixedSize(20, 20); rec.m_stereoButton->setFlat(true); rec.m_stereoness = false; - QToolTip::add + TQToolTip::add (rec.m_stereoButton, i18n("Mono or stereo")); - rec.m_muteButton = new QPushButton(m_mainBox); + rec.m_muteButton = new TQPushButton(m_mainBox); rec.m_muteButton->setText("M"); rec.m_muteButton->setToggleButton(true); rec.m_muteButton->setFixedWidth(rec.m_stereoButton->width()); rec.m_muteButton->setFixedHeight(rec.m_stereoButton->height()); rec.m_muteButton->setFlat(true); - QToolTip::add + TQToolTip::add (rec.m_muteButton, i18n("Mute")); - rec.m_soloButton = new QPushButton(m_mainBox); + rec.m_soloButton = new TQPushButton(m_mainBox); rec.m_soloButton->setText("S"); rec.m_soloButton->setToggleButton(true); rec.m_soloButton->setFixedWidth(rec.m_stereoButton->width()); rec.m_soloButton->setFixedHeight(rec.m_stereoButton->height()); rec.m_soloButton->setFlat(true); - QToolTip::add + TQToolTip::add (rec.m_soloButton, i18n("Solo")); - rec.m_recordButton = new QPushButton(m_mainBox); + rec.m_recordButton = new TQPushButton(m_mainBox); rec.m_recordButton->setText("R"); rec.m_recordButton->setToggleButton(true); rec.m_recordButton->setFixedWidth(rec.m_stereoButton->width()); rec.m_recordButton->setFixedHeight(rec.m_stereoButton->height()); rec.m_recordButton->setFlat(true); - QToolTip::add + TQToolTip::add (rec.m_recordButton, i18n("Arm recording")); - rec.m_pluginBox = new QVBox(m_mainBox); + rec.m_pluginBox = new TQVBox(m_mainBox); for (int p = 0; p < 5; ++p) { - QPushButton *plugin = new QPushButton(rec.m_pluginBox, "pluginButton"); + TQPushButton *plugin = new TQPushButton(rec.m_pluginBox, "pluginButton"); plugin->setText(i18n("<none>")); plugin->setMaximumWidth(45); - QToolTip::add + TQToolTip::add (plugin, i18n("Audio plugin button")); rec.m_plugins.push_back(plugin); - connect(plugin, SIGNAL(clicked()), - this, SLOT(slotSelectPlugin())); + connect(plugin, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSelectPlugin())); } - QLabel *idLabel; - QString idString; + TQLabel *idLabel; + TQString idString; if ((*i)->getType() == Instrument::Audio) { idString = i18n("Audio %1").arg((*i)->getId() - AudioInstrumentBase + 1); - idLabel = new QLabel(idString, m_mainBox, "audioIdLabel"); + idLabel = new TQLabel(idString, m_mainBox, "audioIdLabel"); } else { idString = i18n("Synth %1").arg((*i)->getId() - SoftSynthInstrumentBase + 1); - idLabel = new QLabel(idString, m_mainBox, "synthIdLabel"); + idLabel = new TQLabel(idString, m_mainBox, "synthIdLabel"); } idLabel->setFont(boldFont); @@ -443,34 +443,34 @@ AudioMixerWindow::populate() updatePluginButtons((*i)->getId()); if (rec.m_input) { - connect(rec.m_input, SIGNAL(changed()), - this, SLOT(slotInputChanged())); + connect(rec.m_input, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotInputChanged())); } - connect(rec.m_output, SIGNAL(changed()), - this, SLOT(slotOutputChanged())); + connect(rec.m_output, TQT_SIGNAL(changed()), + this, TQT_SLOT(slotOutputChanged())); - connect(rec.m_fader, SIGNAL(faderChanged(float)), - this, SLOT(slotFaderLevelChanged(float))); + connect(rec.m_fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotFaderLevelChanged(float))); - connect(rec.m_pan, SIGNAL(valueChanged(float)), - this, SLOT(slotPanChanged(float))); + connect(rec.m_pan, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotPanChanged(float))); - connect(rec.m_soloButton, SIGNAL(clicked()), - this, SLOT(slotSoloChanged())); + connect(rec.m_soloButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSoloChanged())); - connect(rec.m_muteButton, SIGNAL(clicked()), - this, SLOT(slotMuteChanged())); + connect(rec.m_muteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMuteChanged())); - connect(rec.m_stereoButton, SIGNAL(clicked()), - this, SLOT(slotChannelsChanged())); + connect(rec.m_stereoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChannelsChanged())); - connect(rec.m_recordButton, SIGNAL(clicked()), - this, SLOT(slotRecordChanged())); + connect(rec.m_recordButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRecordChanged())); ++count; - mainLayout->addMultiCell(new QSpacerItem(2, 0), 0, 6, col + 2, col + 2); + mainLayout->addMultiCell(new TQSpacerItem(2, 0), 0, 6, col + 2, col + 2); col += 3; } @@ -491,7 +491,7 @@ AudioMixerWindow::populate() Rotary::NoTicks, false, true); rec.m_pan->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPastelBlue)); - QToolTip::add + TQToolTip::add (rec.m_pan, i18n("Pan")); rec.m_fader = new Fader @@ -499,33 +499,33 @@ AudioMixerWindow::populate() rec.m_meter = new AudioVUMeter (m_mainBox, VUMeter::AudioPeakHoldIECLong, true, false, 20, 240); - QToolTip::add + TQToolTip::add (rec.m_fader, i18n("Audio level")); - QToolTip::add + TQToolTip::add (rec.m_meter, i18n("Audio level")); - rec.m_muteButton = new QPushButton(m_mainBox); + rec.m_muteButton = new TQPushButton(m_mainBox); rec.m_muteButton->setText("M"); rec.m_muteButton->setToggleButton(true); rec.m_muteButton->setFlat(true); - QToolTip::add + TQToolTip::add (rec.m_muteButton, i18n("Mute")); - rec.m_pluginBox = new QVBox(m_mainBox); + rec.m_pluginBox = new TQVBox(m_mainBox); for (int p = 0; p < 5; ++p) { - QPushButton *plugin = new QPushButton(rec.m_pluginBox, "pluginButton"); + TQPushButton *plugin = new TQPushButton(rec.m_pluginBox, "pluginButton"); plugin->setText(i18n("<none>")); plugin->setMaximumWidth(45); - QToolTip::add + TQToolTip::add (plugin, i18n("Audio plugin button")); rec.m_plugins.push_back(plugin); - connect(plugin, SIGNAL(clicked()), - this, SLOT(slotSelectPlugin())); + connect(plugin, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSelectPlugin())); } - QLabel *idLabel = new QLabel(i18n("Sub %1").arg(count), m_mainBox, "subMaster"); + TQLabel *idLabel = new TQLabel(i18n("Sub %1").arg(count), m_mainBox, "subMaster"); idLabel->setFont(boldFont); // mainLayout->addWidget(idLabel, 2, col, Qt::AlignCenter); @@ -548,18 +548,18 @@ AudioMixerWindow::populate() updateFader(count); updatePluginButtons(count); - connect(rec.m_fader, SIGNAL(faderChanged(float)), - this, SLOT(slotFaderLevelChanged(float))); + connect(rec.m_fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotFaderLevelChanged(float))); - connect(rec.m_pan, SIGNAL(valueChanged(float)), - this, SLOT(slotPanChanged(float))); + connect(rec.m_pan, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotPanChanged(float))); - connect(rec.m_muteButton, SIGNAL(clicked()), - this, SLOT(slotMuteChanged())); + connect(rec.m_muteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMuteChanged())); ++count; - mainLayout->addMultiCell(new QSpacerItem(2, 0), 0, 6, col + 2, col + 2); + mainLayout->addMultiCell(new TQSpacerItem(2, 0), 0, 6, col + 2, col + 2); col += 3; } @@ -574,17 +574,17 @@ AudioMixerWindow::populate() rec.m_meter = new AudioVUMeter (m_mainBox, VUMeter::AudioPeakHoldIEC, true, false, 20, 240); - QToolTip::add + TQToolTip::add (rec.m_fader, i18n("Audio master output level")); - QToolTip::add + TQToolTip::add (rec.m_meter, i18n("Audio master output level")); - rec.m_muteButton = new QPushButton(m_mainBox); + rec.m_muteButton = new TQPushButton(m_mainBox); rec.m_muteButton->setText("M"); rec.m_muteButton->setToggleButton(true); rec.m_muteButton->setFlat(true); - QLabel *idLabel = new QLabel(i18n("Master"), m_mainBox); + TQLabel *idLabel = new TQLabel(i18n("Master"), m_mainBox); idLabel->setFont(boldFont); mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, Qt::AlignCenter); @@ -594,16 +594,16 @@ AudioMixerWindow::populate() // mainLayout->addMultiCellWidget(rec.m_muteButton, 4, 4, col, col+1); rec.m_muteButton->hide(); - mainLayout->addMultiCell(new QSpacerItem(2, 0), 0, 6, col + 2, col + 2); + mainLayout->addMultiCell(new TQSpacerItem(2, 0), 0, 6, col + 2, col + 2); m_master = rec; updateFader(0); - connect(rec.m_fader, SIGNAL(faderChanged(float)), - this, SLOT(slotFaderLevelChanged(float))); + connect(rec.m_fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotFaderLevelChanged(float))); - connect(rec.m_muteButton, SIGNAL(clicked()), - this, SLOT(slotMuteChanged())); + connect(rec.m_muteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotMuteChanged())); } m_mainBox->show(); @@ -681,25 +681,25 @@ AudioMixerWindow::slotPluginSelected(InstrumentId id, if (plugin == -1) { rec.m_plugins[index]->setText(i18n("<none>")); - QToolTip::add + TQToolTip::add (rec.m_plugins[index], i18n("<no plugin>")); rec.m_plugins[index]->setPaletteBackgroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); } else { AudioPlugin *pluginClass = m_document->getPluginManager()->getPlugin(plugin); - QColor pluginBgColour = - kapp->palette().color(QPalette::Active, QColorGroup::Light); + TQColor pluginBgColour = + kapp->palette().color(TQPalette::Active, TQColorGroup::Light); if (pluginClass) { rec.m_plugins[index]-> setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (rec.m_plugins[index], pluginClass->getLabel()); pluginBgColour = pluginClass->getColour(); @@ -720,25 +720,25 @@ AudioMixerWindow::slotPluginSelected(InstrumentId id, if (plugin == -1) { rec.m_plugins[index]->setText(i18n("<none>")); - QToolTip::add + TQToolTip::add (rec.m_plugins[index], i18n("<no plugin>")); rec.m_plugins[index]->setPaletteBackgroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); } else { AudioPlugin *pluginClass = m_document->getPluginManager()->getPlugin(plugin); - QColor pluginBgColour = - kapp->palette().color(QPalette::Active, QColorGroup::Light); + TQColor pluginBgColour = + kapp->palette().color(TQPalette::Active, TQColorGroup::Light); if (pluginClass) { rec.m_plugins[index]-> setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (rec.m_plugins[index], pluginClass->getLabel()); pluginBgColour = pluginClass->getColour(); @@ -874,8 +874,8 @@ AudioMixerWindow::updatePluginButtons(int id) bool used = false; bool bypass = false; - QColor pluginBgColour = - kapp->palette().color(QPalette::Active, QColorGroup::Light); + TQColor pluginBgColour = + kapp->palette().color(TQPalette::Active, TQColorGroup::Light); rec->m_plugins[i]->show(); @@ -890,7 +890,7 @@ AudioMixerWindow::updatePluginButtons(int id) if (pluginClass) { rec->m_plugins[i]->setText(pluginClass->getLabel()); - QToolTip::add + TQToolTip::add (rec->m_plugins[i], pluginClass->getLabel()); pluginBgColour = pluginClass->getColour(); @@ -902,7 +902,7 @@ AudioMixerWindow::updatePluginButtons(int id) } else { rec->m_plugins[i]->setText(i18n("<none>")); - QToolTip::add + TQToolTip::add (rec->m_plugins[i], i18n("<no plugin>")); if (inst) @@ -913,11 +913,11 @@ AudioMixerWindow::updatePluginButtons(int id) rec->m_plugins[i]->setPaletteForegroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); rec->m_plugins[i]->setPaletteBackgroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); } else if (used) { @@ -929,11 +929,11 @@ AudioMixerWindow::updatePluginButtons(int id) rec->m_plugins[i]->setPaletteForegroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::ButtonText)); + color(TQPalette::Active, TQColorGroup::ButtonText)); rec->m_plugins[i]->setPaletteBackgroundColor (kapp->palette(). - color(QPalette::Active, QColorGroup::Button)); + color(TQPalette::Active, TQColorGroup::Button)); } } } @@ -942,7 +942,7 @@ AudioMixerWindow::updatePluginButtons(int id) void AudioMixerWindow::slotSelectPlugin() { - const QObject *s = sender(); + const TQObject *s = sender(); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -951,7 +951,7 @@ AudioMixerWindow::slotSelectPlugin() if (!i->second.m_populated || !i->second.m_pluginBox) continue; - for (std::vector<QPushButton *>::iterator pli = i->second.m_plugins.begin(); + for (std::vector<TQPushButton *>::iterator pli = i->second.m_plugins.begin(); pli != i->second.m_plugins.end(); ++pli) { if (*pli == s) { @@ -974,7 +974,7 @@ AudioMixerWindow::slotSelectPlugin() if (!i->m_populated || !i->m_pluginBox) continue; - for (std::vector<QPushButton *>::iterator pli = i->m_plugins.begin(); + for (std::vector<TQPushButton *>::iterator pli = i->m_plugins.begin(); pli != i->m_plugins.end(); ++pli) { if (*pli == s) { @@ -993,7 +993,7 @@ AudioMixerWindow::slotSelectPlugin() void AudioMixerWindow::slotInputChanged() { - const QObject *s = sender(); + const TQObject *s = sender(); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -1006,7 +1006,7 @@ AudioMixerWindow::slotInputChanged() void AudioMixerWindow::slotOutputChanged() { - const QObject *s = sender(); + const TQObject *s = sender(); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -1060,7 +1060,7 @@ AudioMixerWindow::sendControllerRefresh() void AudioMixerWindow::slotFaderLevelChanged(float dB) { - const QObject *s = sender(); + const TQObject *s = sender(); BussList busses = m_studio->getBusses(); @@ -1140,7 +1140,7 @@ AudioMixerWindow::slotFaderLevelChanged(float dB) void AudioMixerWindow::slotPanChanged(float pan) { - const QObject *s = sender(); + const TQObject *s = sender(); BussList busses = m_studio->getBusses(); @@ -1208,7 +1208,7 @@ AudioMixerWindow::slotPanChanged(float pan) void AudioMixerWindow::slotChannelsChanged() { - const QObject *s = sender(); + const TQObject *s = sender(); // channels are only switchable on instruments @@ -1444,8 +1444,8 @@ AudioMixerWindow::slotControllerDeviceEventReceived(MappedEvent *e, void AudioMixerWindow::slotSetInputCountFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(7) == "inputs_") { @@ -1475,8 +1475,8 @@ AudioMixerWindow::slotSetInputCountFromAction() void AudioMixerWindow::slotSetSubmasterCountFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(11) == "submasters_") { @@ -1714,10 +1714,10 @@ AudioMixerWindow::slotToggleUnassignedFaders() void AudioMixerWindow::toggleNamedWidgets(bool show, const char* const name) { - QLayoutIterator it = m_mainBox->layout()->iterator(); - QLayoutItem *child; + TQLayoutIterator it = m_mainBox->layout()->iterator(); + TQLayoutItem *child; while ( (child = it.current()) != 0 ) { - QWidget * widget = child->widget(); + TQWidget * widget = child->widget(); if (widget && widget->name() && !strcmp(widget->name(), name)) { if (show) widget->show(); diff --git a/src/gui/studio/AudioMixerWindow.h b/src/gui/studio/AudioMixerWindow.h index 99829de..cc3cd77 100644 --- a/src/gui/studio/AudioMixerWindow.h +++ b/src/gui/studio/AudioMixerWindow.h @@ -29,15 +29,15 @@ #include "base/MidiProgram.h" #include <map> #include "MixerWindow.h" -#include <qpixmap.h> +#include <tqpixmap.h> #include <vector> -class QWidget; -class QVBox; -class QPushButton; -class QHBox; -class QFrame; +class TQWidget; +class TQVBox; +class TQPushButton; +class TQHBox; +class TQFrame; namespace Rosegarden @@ -57,7 +57,7 @@ class AudioMixerWindow : public MixerWindow Q_OBJECT public: - AudioMixerWindow(QWidget *parent, RosegardenGUIDoc *document); + AudioMixerWindow(TQWidget *parent, RosegardenGUIDoc *document); ~AudioMixerWindow(); void updateMeters(SequencerMapper *mapper); @@ -68,7 +68,7 @@ public slots: const void *); signals: - void selectPlugin(QWidget *, InstrumentId id, int index); + void selectPlugin(TQWidget *, InstrumentId id, int index); void play(); void stop(); @@ -148,18 +148,18 @@ private: Fader *m_fader; AudioVUMeter *m_meter; - QPushButton *m_muteButton; - QPushButton *m_soloButton; - QPushButton *m_recordButton; - QPushButton *m_stereoButton; + TQPushButton *m_muteButton; + TQPushButton *m_soloButton; + TQPushButton *m_recordButton; + TQPushButton *m_stereoButton; bool m_stereoness; - QVBox *m_pluginBox; - std::vector<QPushButton *> m_plugins; + TQVBox *m_pluginBox; + std::vector<TQPushButton *> m_plugins; }; - QHBox *m_surroundBox; - QFrame *m_mainBox; + TQHBox *m_surroundBox; + TQFrame *m_mainBox; typedef std::map<InstrumentId, FaderRec> FaderMap; FaderMap m_faders; @@ -180,8 +180,8 @@ private: void updatePluginButtons(int id); void updateMiscButtons(int id); - QPixmap m_monoPixmap; - QPixmap m_stereoPixmap; + TQPixmap m_monoPixmap; + TQPixmap m_stereoPixmap; }; diff --git a/src/gui/studio/AudioPlugin.cpp b/src/gui/studio/AudioPlugin.cpp index 2cf3db2..dd30472 100644 --- a/src/gui/studio/AudioPlugin.cpp +++ b/src/gui/studio/AudioPlugin.cpp @@ -27,22 +27,22 @@ #include "misc/Strings.h" #include "base/AudioPluginInstance.h" -#include <qcolor.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqstring.h> namespace Rosegarden { -AudioPlugin::AudioPlugin(const QString &identifier, - const QString &name, +AudioPlugin::AudioPlugin(const TQString &identifier, + const TQString &name, unsigned long uniqueId, - const QString &label, - const QString &author, - const QString ©right, + const TQString &label, + const TQString &author, + const TQString ©right, bool isSynth, bool isGrouped, - const QString &category): + const TQString &category): m_identifier(identifier), m_name(name), m_uniqueId(uniqueId), @@ -57,7 +57,7 @@ AudioPlugin::AudioPlugin(const QString &identifier, void AudioPlugin::addPort(int number, - const QString &name, + const TQString &name, PluginPort::PortType type, PluginPort::PortDisplayHint hint, PortData lowerBound, diff --git a/src/gui/studio/AudioPlugin.h b/src/gui/studio/AudioPlugin.h index 591a43b..ac8a7ad 100644 --- a/src/gui/studio/AudioPlugin.h +++ b/src/gui/studio/AudioPlugin.h @@ -27,8 +27,8 @@ #define _RG_AUDIOPLUGIN_H_ #include "base/AudioPluginInstance.h" -#include <qcolor.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqstring.h> #include <vector> @@ -42,23 +42,23 @@ namespace Rosegarden class AudioPlugin { public: - AudioPlugin(const QString &identifier, - const QString &name, + AudioPlugin(const TQString &identifier, + const TQString &name, unsigned long uniqueId, - const QString &label, - const QString &author, - const QString ©right, + const TQString &label, + const TQString &author, + const TQString ©right, bool isSynth, bool isGrouped, - const QString &category); + const TQString &category); - QString getIdentifier() const { return m_identifier; } + TQString getIdentifier() const { return m_identifier; } - QString getName() const { return m_name; } + TQString getName() const { return m_name; } unsigned long getUniqueId() const { return m_uniqueId; } - QString getLabel() const { return m_label; } - QString getAuthor() const { return m_author; } - QString getCopyright() const { return m_copyright; } + TQString getLabel() const { return m_label; } + TQString getAuthor() const { return m_author; } + TQString getCopyright() const { return m_copyright; } bool isSynth() const { return m_isSynth; } bool isEffect() const { // true if >0 audio inputs for (unsigned int i = 0; i < m_ports.size(); ++i) { @@ -70,10 +70,10 @@ public: return false; } bool isGrouped() const { return m_isGrouped; } - QString getCategory() const { return m_category; } + TQString getCategory() const { return m_category; } void addPort(int number, - const QString &name, + const TQString &name, PluginPort::PortType type, PluginPort::PortDisplayHint hint, PortData lowerBound, @@ -85,28 +85,28 @@ public: PortIterator begin() { return m_ports.begin(); } PortIterator end() { return m_ports.end(); } - QColor getColour() const { return m_colour; } - void setColour(const QColor &colour) { m_colour = colour; } + TQColor getColour() const { return m_colour; } + void setColour(const TQColor &colour) { m_colour = colour; } protected: - QString m_identifier; + TQString m_identifier; - QString m_name; + TQString m_name; unsigned long m_uniqueId; - QString m_label; - QString m_author; - QString m_copyright; + TQString m_label; + TQString m_author; + TQString m_copyright; bool m_isSynth; bool m_isGrouped; - QString m_category; + TQString m_category; // our ports and associated hints std::vector<PluginPort*> m_ports; // Colour of this activated plugin // - QColor m_colour; + TQColor m_colour; }; typedef std::vector<AudioPlugin*>::iterator PluginIterator; diff --git a/src/gui/studio/AudioPluginManager.cpp b/src/gui/studio/AudioPluginManager.cpp index 6b64085..24b49f2 100644 --- a/src/gui/studio/AudioPluginManager.cpp +++ b/src/gui/studio/AudioPluginManager.cpp @@ -32,11 +32,11 @@ #include "gui/application/RosegardenApplication.h" #include "sound/PluginFactory.h" #include "sound/PluginIdentifier.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qmutex.h> -#include <qstring.h> -#include <qthread.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqmutex.h> +#include <tqstring.h> +#include <tqthread.h> namespace Rosegarden @@ -71,7 +71,7 @@ AudioPluginManager::Enumerator::Enumerator(AudioPluginManager *manager) : void AudioPluginManager::Enumerator::run() { - QMutexLocker locker(&(m_manager->m_mutex)); + TQMutexLocker locker(&(m_manager->m_mutex)); MappedObjectPropertyList rawPlugins; RG_DEBUG << "\n\nAudioPluginManager::Enumerator::run()\n\n" << endl; @@ -86,15 +86,15 @@ AudioPluginManager::Enumerator::run() while (i < rawPlugins.size()) { - QString identifier = rawPlugins[i++]; - QString name = rawPlugins[i++]; + TQString identifier = rawPlugins[i++]; + TQString name = rawPlugins[i++]; unsigned long uniqueId = rawPlugins[i++].toLong(); - QString label = rawPlugins[i++]; - QString author = rawPlugins[i++]; - QString copyright = rawPlugins[i++]; + TQString label = rawPlugins[i++]; + TQString author = rawPlugins[i++]; + TQString copyright = rawPlugins[i++]; bool isSynth = ((rawPlugins[i++]).lower() == "true"); bool isGrouped = ((rawPlugins[i++]).lower() == "true"); - QString category = rawPlugins[i++]; + TQString category = rawPlugins[i++]; unsigned int portCount = rawPlugins[i++].toInt(); // std::cerr << "PLUGIN: " << i << ": " << (identifier ? identifier : "(null)") << " unique id " << uniqueId << " / CATEGORY: \"" << (category ? category : "(null)") << "\"" << std::endl; @@ -137,15 +137,15 @@ AudioPluginManager::Enumerator::run() } AudioPlugin* -AudioPluginManager::addPlugin(const QString &identifier, - const QString &name, +AudioPluginManager::addPlugin(const TQString &identifier, + const TQString &name, unsigned long uniqueId, - const QString &label, - const QString &author, - const QString ©right, + const TQString &label, + const TQString &author, + const TQString ©right, bool isSynth, bool isGrouped, - const QString &category) + const TQString &category) { AudioPlugin *newPlugin = new AudioPlugin(identifier, name, @@ -162,7 +162,7 @@ AudioPluginManager::addPlugin(const QString &identifier, } bool -AudioPluginManager::removePlugin(const QString &identifier) +AudioPluginManager::removePlugin(const TQString &identifier) { std::vector<AudioPlugin*>::iterator it = m_plugins.begin(); @@ -177,12 +177,12 @@ AudioPluginManager::removePlugin(const QString &identifier) return false; } -std::vector<QString> +std::vector<TQString> AudioPluginManager::getPluginNames() { awaitEnumeration(); - std::vector<QString> names; + std::vector<TQString> names; PluginIterator it = m_plugins.begin(); @@ -204,7 +204,7 @@ AudioPluginManager::getPlugin(int number) } int -AudioPluginManager::getPositionByIdentifier(QString identifier) +AudioPluginManager::getPositionByIdentifier(TQString identifier) { awaitEnumeration(); @@ -231,7 +231,7 @@ AudioPluginManager::getPositionByIdentifier(QString identifier) } AudioPlugin* -AudioPluginManager::getPluginByIdentifier(QString identifier) +AudioPluginManager::getPluginByIdentifier(TQString identifier) { awaitEnumeration(); @@ -292,12 +292,12 @@ AudioPluginManager::awaitEnumeration() void AudioPluginManager::fetchSampleRate() { - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; if (rgapp->sequencerCall("getSampleRate()", replyType, replyData)) { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; m_sampleRate = result; diff --git a/src/gui/studio/AudioPluginManager.h b/src/gui/studio/AudioPluginManager.h index f8574f8..9150f69 100644 --- a/src/gui/studio/AudioPluginManager.h +++ b/src/gui/studio/AudioPluginManager.h @@ -27,9 +27,9 @@ #define _RG_AUDIOPLUGINMANAGER_H_ #include "AudioPluginClipboard.h" -#include <qmutex.h> -#include <qstring.h> -#include <qthread.h> +#include <tqmutex.h> +#include <tqstring.h> +#include <tqthread.h> #include <vector> #include "AudioPlugin.h" @@ -49,14 +49,14 @@ public: // Get a straight list of names // - std::vector<QString> getPluginNames(); + std::vector<TQString> getPluginNames(); // Some useful members // AudioPlugin* getPlugin(int number); - AudioPlugin* getPluginByIdentifier(QString identifier); - int getPositionByIdentifier(QString identifier); + AudioPlugin* getPluginByIdentifier(TQString identifier); + int getPositionByIdentifier(TQString identifier); // Deprecated -- the GUI shouldn't be using unique ID because it's // bound to a particular plugin type (and not necessarily unique @@ -77,17 +77,17 @@ public: AudioPluginClipboard* getPluginClipboard() { return &m_pluginClipboard; } protected: - AudioPlugin* addPlugin(const QString &identifier, - const QString &name, + AudioPlugin* addPlugin(const TQString &identifier, + const TQString &name, unsigned long uniqueId, - const QString &label, - const QString &author, - const QString ©right, + const TQString &label, + const TQString &author, + const TQString ©right, bool isSynth, bool isGrouped, - const QString &category); + const TQString &category); - bool removePlugin(const QString &identifier); + bool removePlugin(const TQString &identifier); class Enumerator : public QThread { @@ -108,7 +108,7 @@ protected: unsigned int m_sampleRate; AudioPluginClipboard m_pluginClipboard; Enumerator m_enumerator; - QMutex m_mutex; + TQMutex m_mutex; }; diff --git a/src/gui/studio/AudioPluginOSCGUI.cpp b/src/gui/studio/AudioPluginOSCGUI.cpp index 106cbbe..d443acd 100644 --- a/src/gui/studio/AudioPluginOSCGUI.cpp +++ b/src/gui/studio/AudioPluginOSCGUI.cpp @@ -32,9 +32,9 @@ #include "base/Exception.h" #include "sound/PluginIdentifier.h" #include <kprocess.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qstring.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqstring.h> #include <algorithm> @@ -42,22 +42,22 @@ namespace Rosegarden { AudioPluginOSCGUI::AudioPluginOSCGUI(AudioPluginInstance *instance, - QString serverURL, QString friendlyName) : + TQString serverURL, TQString friendlyName) : m_gui(0), m_address(0), m_basePath(""), m_serverUrl(serverURL) { - QString identifier = strtoqstr(instance->getIdentifier()); + TQString identifier = strtoqstr(instance->getIdentifier()); - QString filePath = getGUIFilePath(identifier); + TQString filePath = getGUIFilePath(identifier); if (!filePath) { throw Exception("No GUI found"); } - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier(identifier, type, soName, label); - QFileInfo soInfo(soName); + TQFileInfo soInfo(soName); // arguments: osc url, dll name, label, instance tag @@ -87,29 +87,29 @@ AudioPluginOSCGUI::~AudioPluginOSCGUI() } QString -AudioPluginOSCGUI::getGUIFilePath(QString identifier) +AudioPluginOSCGUI::getGUIFilePath(TQString identifier) { - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier(identifier, type, soName, label); RG_DEBUG << "AudioPluginOSCGUI::getGUIFilePath(" << identifier << ")" << endl; - QFileInfo soInfo(soName); + TQFileInfo soInfo(soName); if (soInfo.isRelative()) { //!!! RG_DEBUG << "AudioPluginOSCGUI::AudioPluginOSCGUI: Unable to deal with relative .so path \"" << soName << "\" in identifier \"" << identifier << "\" yet" << endl; throw Exception("Can't deal with relative .soname"); } - QDir dir(soInfo.dir()); - QString fileBase(soInfo.baseName(TRUE)); + TQDir dir(soInfo.dir()); + TQString fileBase(soInfo.baseName(TRUE)); if (!dir.cd(fileBase)) { RG_DEBUG << "AudioPluginOSCGUI::AudioPluginOSCGUI: No GUI subdir for plugin .so " << soName << endl; throw Exception("No GUI subdir available"); } - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); // in order of preference: const char *suffixes[] = { "_rg", "_kde", "_qt", "_gtk2", "_gtk", "_x11", "_gui" @@ -120,8 +120,8 @@ AudioPluginOSCGUI::getGUIFilePath(QString identifier) for (int fuzzy = 0; fuzzy <= 1; ++fuzzy) { - QFileInfoListIterator i(*list); - QFileInfo *info; + TQFileInfoListIterator i(*list); + TQFileInfo *info; while ((info = i.current()) != 0) { @@ -155,11 +155,11 @@ AudioPluginOSCGUI::getGUIFilePath(QString identifier) } } - return QString(); + return TQString(); } void -AudioPluginOSCGUI::setGUIUrl(QString url) +AudioPluginOSCGUI::setGUIUrl(TQString url) { if (m_address) lo_address_free(m_address); @@ -180,7 +180,7 @@ AudioPluginOSCGUI::show() if (!m_address) return ; - QString path = m_basePath + "/show"; + TQString path = m_basePath + "/show"; lo_send(m_address, path, ""); } @@ -189,7 +189,7 @@ AudioPluginOSCGUI::hide() { if (!m_address) return ; - QString path = m_basePath + "/hide"; + TQString path = m_basePath + "/hide"; lo_send(m_address, path, ""); } @@ -198,7 +198,7 @@ AudioPluginOSCGUI::quit() { if (!m_address) return ; - QString path = m_basePath + "/quit"; + TQString path = m_basePath + "/quit"; lo_send(m_address, path, ""); } @@ -207,7 +207,7 @@ AudioPluginOSCGUI::sendProgram(int bank, int program) { if (!m_address) return ; - QString path = m_basePath + "/program"; + TQString path = m_basePath + "/program"; lo_send(m_address, path, "ii", bank, program); } @@ -216,16 +216,16 @@ AudioPluginOSCGUI::sendPortValue(int port, float value) { if (!m_address) return ; - QString path = m_basePath + "/control"; + TQString path = m_basePath + "/control"; lo_send(m_address, path, "if", port, value); } void -AudioPluginOSCGUI::sendConfiguration(QString key, QString value) +AudioPluginOSCGUI::sendConfiguration(TQString key, TQString value) { if (!m_address) return ; - QString path = m_basePath + "/configure"; + TQString path = m_basePath + "/configure"; lo_send(m_address, path, "ss", key.data(), value.data()); } diff --git a/src/gui/studio/AudioPluginOSCGUI.h b/src/gui/studio/AudioPluginOSCGUI.h index d1982f4..950feb1 100644 --- a/src/gui/studio/AudioPluginOSCGUI.h +++ b/src/gui/studio/AudioPluginOSCGUI.h @@ -30,7 +30,7 @@ #include <lo/lo.h> -#include <qstring.h> +#include <tqstring.h> class KProcess; @@ -46,25 +46,25 @@ class AudioPluginOSCGUI { public: AudioPluginOSCGUI(AudioPluginInstance *instance, - QString serverURL, QString friendlyName); + TQString serverURL, TQString friendlyName); virtual ~AudioPluginOSCGUI(); - void setGUIUrl(QString url); + void setGUIUrl(TQString url); void show(); void hide(); void quit(); void sendProgram(int bank, int program); void sendPortValue(int port, float value); - void sendConfiguration(QString key, QString value); + void sendConfiguration(TQString key, TQString value); - static QString getGUIFilePath(QString identifier); + static TQString getGUIFilePath(TQString identifier); protected: KProcess *m_gui; lo_address m_address; - QString m_basePath; - QString m_serverUrl; + TQString m_basePath; + TQString m_serverUrl; }; diff --git a/src/gui/studio/AudioPluginOSCGUIManager.cpp b/src/gui/studio/AudioPluginOSCGUIManager.cpp index 54c23d7..e3d61d7 100644 --- a/src/gui/studio/AudioPluginOSCGUIManager.cpp +++ b/src/gui/studio/AudioPluginOSCGUIManager.cpp @@ -45,7 +45,7 @@ #include "sound/PluginIdentifier.h" #include "StudioControl.h" #include "TimerCallbackAssistant.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -64,7 +64,7 @@ static int osc_message_handler(const char *path, const char *types, lo_arg **arg InstrumentId instrument; int position; - QString method; + TQString method; if (!manager->parseOSCPath(path, instrument, position, method)) { return 1; @@ -144,7 +144,7 @@ AudioPluginOSCGUIManager::hasGUI(InstrumentId instrument, int position) if (!pluginInstance) return false; try { - QString filePath = AudioPluginOSCGUI::getGUIFilePath + TQString filePath = AudioPluginOSCGUI::getGUIFilePath (strtoqstr(pluginInstance->getIdentifier())); return (filePath && filePath != ""); } catch (Exception e) { // that's OK @@ -306,7 +306,7 @@ AudioPluginOSCGUIManager::updatePort(InstrumentId instrument, int position, void AudioPluginOSCGUIManager::updateConfiguration(InstrumentId instrument, int position, - QString key) + TQString key) { RG_DEBUG << "AudioPluginOSCGUIManager::updateConfiguration(" << instrument << "," << position << "," << key << ")" << endl; @@ -321,7 +321,7 @@ AudioPluginOSCGUIManager::updateConfiguration(InstrumentId instrument, int posit AudioPluginInstance *pluginInstance = container->getPlugin(position); if (!pluginInstance) return; - QString value = strtoqstr(pluginInstance->getConfigurationValue(qstrtostr(key))); + TQString value = strtoqstr(pluginInstance->getConfigurationValue(qstrtostr(key))); RG_DEBUG << "AudioPluginOSCGUIManager::updatePort(" << instrument << "," << position << "," << key << "): value " << value << endl; @@ -331,20 +331,20 @@ AudioPluginOSCGUIManager::updateConfiguration(InstrumentId instrument, int posit QString AudioPluginOSCGUIManager::getOSCUrl(InstrumentId instrument, int position, - QString identifier) + TQString identifier) { // OSC URL will be of the form // osc.udp://localhost:54343/plugin/dssi/<instrument>/<position>/<label> // where <position> will be "synth" for synth plugins - QString type, soName, label; + TQString type, soName, label; PluginIdentifier::parseIdentifier(identifier, type, soName, label); - QString baseUrl = lo_server_thread_get_url(m_serverThread); + TQString baseUrl = lo_server_thread_get_url(m_serverThread); if (!baseUrl.endsWith("/")) baseUrl += '/'; - QString url = QString("%1%2/%3/%4/%5/%6") + TQString url = TQString("%1%2/%3/%4/%5/%6") .arg(baseUrl) .arg("plugin") .arg(type) @@ -362,14 +362,14 @@ AudioPluginOSCGUIManager::getOSCUrl(InstrumentId instrument, int position, } bool -AudioPluginOSCGUIManager::parseOSCPath(QString path, InstrumentId &instrument, - int &position, QString &method) +AudioPluginOSCGUIManager::parseOSCPath(TQString path, InstrumentId &instrument, + int &position, TQString &method) { RG_DEBUG << "AudioPluginOSCGUIManager::parseOSCPath(" << path << ")" << endl; if (!m_studio) return false; - QString pluginStr("/plugin/"); + TQString pluginStr("/plugin/"); if (path.startsWith("//")) { path = path.right(path.length() - 1); @@ -383,10 +383,10 @@ AudioPluginOSCGUIManager::parseOSCPath(QString path, InstrumentId &instrument, path = path.right(path.length() - pluginStr.length()); - QString type = path.section('/', 0, 0); - QString instrumentStr = path.section('/', 1, 1); - QString positionStr = path.section('/', 2, 2); - QString label = path.section('/', 3, -2); + TQString type = path.section('/', 0, 0); + TQString instrumentStr = path.section('/', 1, 1); + TQString positionStr = path.section('/', 2, 2); + TQString label = path.section('/', 3, -2); method = path.section('/', -1, -1); if (!instrumentStr || !positionStr) { @@ -418,8 +418,8 @@ AudioPluginOSCGUIManager::parseOSCPath(QString path, InstrumentId &instrument, return false; } - QString identifier = strtoqstr(pluginInstance->getIdentifier()); - QString iType, iSoName, iLabel; + TQString identifier = strtoqstr(pluginInstance->getIdentifier()); + TQString iType, iSoName, iLabel; PluginIdentifier::parseIdentifier(identifier, iType, iSoName, iLabel); if (iLabel != label) { RG_DEBUG << "AudioPluginOSCGUIManager::parseOSCPath: wrong label for plugin" @@ -437,7 +437,7 @@ AudioPluginOSCGUIManager::parseOSCPath(QString path, InstrumentId &instrument, QString AudioPluginOSCGUIManager::getFriendlyName(InstrumentId instrument, int position, - QString) + TQString) { PluginContainer *container = m_studio->getContainerById(instrument); if (!container) @@ -498,7 +498,7 @@ AudioPluginOSCGUIManager::dispatch() // These generally call back on the RosegardenGUIApp. We'd // like to emit signals, but making AudioPluginOSCGUIManager a - // QObject is problematic if it's only conditionally compiled. + // TQObject is problematic if it's only conditionally compiled. if (method == "control") { @@ -547,7 +547,7 @@ AudioPluginOSCGUIManager::dispatch() } int program = arg->i; - QString programName = StudioControl::getPluginProgram + TQString programName = StudioControl::getPluginProgram (pluginInstance->getMappedId(), bank, program); m_app->slotChangePluginProgram(instrument, position, programName); @@ -565,7 +565,7 @@ AudioPluginOSCGUIManager::dispatch() << endl; goto done; } - QString url = &arg->s; + TQString url = &arg->s; if (!gui) { RG_DEBUG << "AudioPluginOSCGUIManager: no GUI for update method" @@ -579,8 +579,8 @@ AudioPluginOSCGUIManager::dispatch() pluginInstance->getConfiguration().begin(); i != pluginInstance->getConfiguration().end(); ++i) { - QString key = strtoqstr(i->first); - QString value = strtoqstr(i->second); + TQString key = strtoqstr(i->first); + TQString value = strtoqstr(i->second); #ifdef DSSI_PROJECT_DIRECTORY_KEY @@ -627,14 +627,14 @@ AudioPluginOSCGUIManager::dispatch() << endl; goto done; } - QString key = &arg->s; + TQString key = &arg->s; if (!(arg = message->getArg(1, type)) || type != 's') { RG_DEBUG << "AudioPluginOSCGUIManager: failed to get configure value" << endl; goto done; } - QString value = &arg->s; + TQString value = &arg->s; #ifdef DSSI_RESERVED_CONFIGURE_PREFIX diff --git a/src/gui/studio/AudioPluginOSCGUIManager.h b/src/gui/studio/AudioPluginOSCGUIManager.h index 0bef2a2..8dd3cbf 100644 --- a/src/gui/studio/AudioPluginOSCGUIManager.h +++ b/src/gui/studio/AudioPluginOSCGUIManager.h @@ -32,7 +32,7 @@ #include "base/MidiProgram.h" #include <map> #include "sound/RingBuffer.h" -#include <qstring.h> +#include <tqstring.h> @@ -66,14 +66,14 @@ public: void updateProgram(InstrumentId id, int position); void updatePort(InstrumentId id, int position, int port); void updateConfiguration(InstrumentId id, int position, - QString key); - - QString getOSCUrl(InstrumentId instrument, int position, - QString identifier); - QString getFriendlyName(InstrumentId instrument, int position, - QString identifier); - bool parseOSCPath(QString path, InstrumentId &instrument, int &position, - QString &method); + TQString key); + + TQString getOSCUrl(InstrumentId instrument, int position, + TQString identifier); + TQString getFriendlyName(InstrumentId instrument, int position, + TQString identifier); + bool parseOSCPath(TQString path, InstrumentId &instrument, int &position, + TQString &method); static void timerCallback(void *data); static void guiExitedCallback(void *data); diff --git a/src/gui/studio/BankEditorDialog.cpp b/src/gui/studio/BankEditorDialog.cpp index 20aaf2d..5c5c3d2 100644 --- a/src/gui/studio/BankEditorDialog.cpp +++ b/src/gui/studio/BankEditorDialog.cpp @@ -24,7 +24,7 @@ #include "BankEditorDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -58,27 +58,27 @@ #include <kstdaccel.h> #include <kstdaction.h> #include <kxmlguiclient.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qsplitter.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqsplitter.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> namespace Rosegarden { -BankEditorDialog::BankEditorDialog(QWidget *parent, +BankEditorDialog::BankEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId defaultDevice): KMainWindow(parent, "bankeditordialog"), @@ -91,22 +91,22 @@ BankEditorDialog::BankEditorDialog(QWidget *parent, m_lastDevice(Device::NO_DEVICE), m_updateDeviceList(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage MIDI Banks and Programs")); - QSplitter* splitter = new QSplitter(mainFrame); + TQSplitter* splitter = new TQSplitter(mainFrame); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + btnBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_closeButton = new QPushButton(btnBox); - m_applyButton = new QPushButton(i18n("Apply"), btnBox); - m_resetButton = new QPushButton(i18n("Reset"), btnBox); + m_closeButton = new TQPushButton(btnBox); + m_applyButton = new TQPushButton(i18n("Apply"), btnBox); + m_resetButton = new TQPushButton(i18n("Reset"), btnBox); layout->addStretch(10); layout->addWidget(m_applyButton); @@ -115,15 +115,15 @@ BankEditorDialog::BankEditorDialog(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_applyButton, SIGNAL(clicked()), - this, SLOT(slotApply())); - connect(m_resetButton, SIGNAL(clicked()), - this, SLOT(slotReset())); + connect(m_applyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotApply())); + connect(m_resetButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotReset())); // // Left-side list view // - QVBox* leftPart = new QVBox(splitter); + TQVBox* leftPart = new TQVBox(splitter); m_listView = new KListView(leftPart); m_listView->addColumn(i18n("MIDI Device")); m_listView->addColumn(i18n("Type")); @@ -134,13 +134,13 @@ BankEditorDialog::BankEditorDialog(QWidget *parent, m_listView->setItemsRenameable(true); m_listView->restoreLayout(kapp->config(), BankEditorConfigGroup); - QFrame *bankBox = new QFrame(leftPart); - QGridLayout *gridLayout = new QGridLayout(bankBox, 4, 2, 6, 6); + TQFrame *bankBox = new TQFrame(leftPart); + TQGridLayout *gridLayout = new TQGridLayout(bankBox, 4, 2, 6, 6); - m_addBank = new QPushButton(i18n("Add Bank"), bankBox); - m_addKeyMapping = new QPushButton(i18n("Add Key Mapping"), bankBox); - m_delete = new QPushButton(i18n("Delete"), bankBox); - m_deleteAll = new QPushButton(i18n("Delete All"), bankBox); + m_addBank = new TQPushButton(i18n("Add Bank"), bankBox); + m_addKeyMapping = new TQPushButton(i18n("Add Key Mapping"), bankBox); + m_delete = new TQPushButton(i18n("Delete"), bankBox); + m_deleteAll = new TQPushButton(i18n("Delete All"), bankBox); gridLayout->addWidget(m_addBank, 0, 0); gridLayout->addWidget(m_addKeyMapping, 0, 1); gridLayout->addWidget(m_delete, 1, 0); @@ -148,56 +148,56 @@ BankEditorDialog::BankEditorDialog(QWidget *parent, // Tips // - QToolTip::add + TQToolTip::add (m_addBank, i18n("Add a Bank to the current device")); - QToolTip::add + TQToolTip::add (m_addKeyMapping, i18n("Add a Percussion Key Mapping to the current device")); - QToolTip::add + TQToolTip::add (m_delete, i18n("Delete the current Bank or Key Mapping")); - QToolTip::add + TQToolTip::add (m_deleteAll, i18n("Delete all Banks and Key Mappings from the current Device")); - m_importBanks = new QPushButton(i18n("Import..."), bankBox); - m_exportBanks = new QPushButton(i18n("Export..."), bankBox); + m_importBanks = new TQPushButton(i18n("Import..."), bankBox); + m_exportBanks = new TQPushButton(i18n("Export..."), bankBox); gridLayout->addWidget(m_importBanks, 2, 0); gridLayout->addWidget(m_exportBanks, 2, 1); // Tips // - QToolTip::add + TQToolTip::add (m_importBanks, i18n("Import Bank and Program data from a Rosegarden file to the current Device")); - QToolTip::add + TQToolTip::add (m_exportBanks, i18n("Export all Device and Bank information to a Rosegarden format interchange file")); - m_copyPrograms = new QPushButton(i18n("Copy"), bankBox); - m_pastePrograms = new QPushButton(i18n("Paste"), bankBox); + m_copyPrograms = new TQPushButton(i18n("Copy"), bankBox); + m_pastePrograms = new TQPushButton(i18n("Paste"), bankBox); gridLayout->addWidget(m_copyPrograms, 3, 0); gridLayout->addWidget(m_pastePrograms, 3, 1); // Tips // - QToolTip::add + TQToolTip::add (m_copyPrograms, i18n("Copy all Program names from current Bank to clipboard")); - QToolTip::add + TQToolTip::add (m_pastePrograms, i18n("Paste Program names from clipboard to current Bank")); - connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), - this, SLOT(slotPopulateDevice(QListViewItem*))); + connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), + this, TQT_SLOT(slotPopulateDevice(TQListViewItem*))); - QFrame *vbox = new QFrame(splitter); - QVBoxLayout *vboxLayout = new QVBoxLayout(vbox, 8, 6); + TQFrame *vbox = new TQFrame(splitter); + TQVBoxLayout *vboxLayout = new TQVBoxLayout(vbox, 8, 6); m_programEditor = new MidiProgramsEditor(this, vbox); vboxLayout->addWidget(m_programEditor); @@ -206,57 +206,57 @@ BankEditorDialog::BankEditorDialog(QWidget *parent, vboxLayout->addWidget(m_keyMappingEditor); m_keyMappingEditor->hide(); - m_programEditor->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred)); - m_keyMappingEditor->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred)); + m_programEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); + m_keyMappingEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); - m_optionBox = new QVGroupBox(i18n("Options"), vbox); + m_optionBox = new TQVGroupBox(i18n("Options"), vbox); vboxLayout->addWidget(m_optionBox); - QHBox *variationBox = new QHBox(m_optionBox); - m_variationToggle = new QCheckBox(i18n("Show Variation list based on "), variationBox); + TQHBox *variationBox = new TQHBox(m_optionBox); + m_variationToggle = new TQCheckBox(i18n("Show Variation list based on "), variationBox); m_variationCombo = new KComboBox(variationBox); m_variationCombo->insertItem(i18n("LSB")); m_variationCombo->insertItem(i18n("MSB")); // device/bank modification - connect(m_listView, SIGNAL(itemRenamed (QListViewItem*, const QString&, int)), - this, SLOT(slotModifyDeviceOrBankName(QListViewItem*, const QString&, int))); + connect(m_listView, TQT_SIGNAL(itemRenamed (TQListViewItem*, const TQString&, int)), + this, TQT_SLOT(slotModifyDeviceOrBankName(TQListViewItem*, const TQString&, int))); - connect(m_addBank, SIGNAL(clicked()), - this, SLOT(slotAddBank())); + connect(m_addBank, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddBank())); - connect(m_addKeyMapping, SIGNAL(clicked()), - this, SLOT(slotAddKeyMapping())); + connect(m_addKeyMapping, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddKeyMapping())); - connect(m_delete, SIGNAL(clicked()), - this, SLOT(slotDelete())); + connect(m_delete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelete())); - connect(m_deleteAll, SIGNAL(clicked()), - this, SLOT(slotDeleteAll())); + connect(m_deleteAll, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteAll())); - connect(m_importBanks, SIGNAL(clicked()), - this, SLOT(slotImport())); + connect(m_importBanks, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotImport())); - connect(m_exportBanks, SIGNAL(clicked()), - this, SLOT(slotExport())); + connect(m_exportBanks, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotExport())); - connect(m_copyPrograms, SIGNAL(clicked()), - this, SLOT(slotEditCopy())); + connect(m_copyPrograms, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditCopy())); - connect(m_pastePrograms, SIGNAL(clicked()), - this, SLOT(slotEditPaste())); + connect(m_pastePrograms, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditPaste())); - connect(m_variationToggle, SIGNAL(clicked()), - this, SLOT(slotVariationToggled())); + connect(m_variationToggle, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotVariationToggled())); - connect(m_variationCombo, SIGNAL(activated(int)), - this, SLOT(slotVariationChanged(int))); + connect(m_variationCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotVariationChanged(int))); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); // Initialise the dialog // @@ -303,14 +303,14 @@ BankEditorDialog::~BankEditorDialog() void BankEditorDialog::setupActions() { - KAction* close = KStdAction::close (this, SLOT(slotFileClose()), actionCollection()); + KAction* close = KStdAction::close (this, TQT_SLOT(slotFileClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(clicked()), - this, SLOT(slotFileClose())); + connect(m_closeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotFileClose())); - KStdAction::copy (this, SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, SLOT(slotEditPaste()), actionCollection()); + KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); // some adjustments @@ -355,12 +355,12 @@ BankEditorDialog::initDialog() continue; m_deviceNameMap[midiDevice->getId()] = midiDevice->getName(); - QString itemName = strtoqstr(midiDevice->getName()); + TQString itemName = strtoqstr(midiDevice->getName()); RG_DEBUG << "BankEditorDialog::initDialog - adding " << itemName << endl; - QListViewItem* deviceItem = new MidiDeviceListViewItem + TQListViewItem* deviceItem = new MidiDeviceListViewItem (midiDevice->getId(), m_listView, itemName); deviceItem->setOpen(true); @@ -401,7 +401,7 @@ BankEditorDialog::updateDialog() if (m_deviceNameMap.find(midiDevice->getId()) != m_deviceNameMap.end()) { // Device already displayed but make sure the label is up to date // - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (currentItem) { MidiDeviceListViewItem* deviceItem = @@ -425,7 +425,7 @@ BankEditorDialog::updateDialog() deviceLabelUpdate = true; } - QListViewItem *child = deviceItem->firstChild(); + TQListViewItem *child = deviceItem->firstChild(); while (child) { @@ -454,12 +454,12 @@ BankEditorDialog::updateDialog() } m_deviceNameMap[midiDevice->getId()] = midiDevice->getName(); - QString itemName = strtoqstr(midiDevice->getName()); + TQString itemName = strtoqstr(midiDevice->getName()); RG_DEBUG << "BankEditorDialog::updateDialog - adding " << itemName << endl; - QListViewItem* deviceItem = new MidiDeviceListViewItem + TQListViewItem* deviceItem = new MidiDeviceListViewItem (midiDevice->getId(), m_listView, itemName); deviceItem->setOpen(true); @@ -496,7 +496,7 @@ BankEditorDialog::updateDialog() void BankEditorDialog::setCurrentDevice(DeviceId device) { - for (QListViewItem *item = m_listView->firstChild(); item; + for (TQListViewItem *item = m_listView->firstChild(); item; item = item->nextSibling()) { MidiDeviceListViewItem * deviceItem = dynamic_cast<MidiDeviceListViewItem *>(item); @@ -508,11 +508,11 @@ BankEditorDialog::setCurrentDevice(DeviceId device) } void -BankEditorDialog::populateDeviceItem(QListViewItem* deviceItem, MidiDevice* midiDevice) +BankEditorDialog::populateDeviceItem(TQListViewItem* deviceItem, MidiDevice* midiDevice) { clearItemChildren(deviceItem); - QString itemName = strtoqstr(midiDevice->getName()); + TQString itemName = strtoqstr(midiDevice->getName()); BankList banks = midiDevice->getBanks(); // add banks for this device @@ -545,7 +545,7 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) return ; } - QString itemName = strtoqstr(midiDevice->getName()); + TQString itemName = strtoqstr(midiDevice->getName()); BankList banks = midiDevice->getBanks(); KeyMappingList keymaps = midiDevice->getKeyMappings(); @@ -567,7 +567,7 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) for (unsigned int i = 0; i < keymaps.size(); ++i) { - QListViewItem *child = deviceItem->firstChild(); + TQListViewItem *child = deviceItem->firstChild(); bool have = false; while (child) { @@ -593,9 +593,9 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) // delete banks which are no longer present // - std::vector<QListViewItem*> childrenToDelete; + std::vector<TQListViewItem*> childrenToDelete; - QListViewItem* child = deviceItem->firstChild(); + TQListViewItem* child = deviceItem->firstChild(); while (child) { @@ -629,7 +629,7 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) bool BankEditorDialog::deviceItemHasBank(MidiDeviceListViewItem* deviceItem, int bankNb) { - QListViewItem *child = deviceItem->firstChild(); + TQListViewItem *child = deviceItem->firstChild(); while (child) { MidiBankListViewItem *bankItem = @@ -645,9 +645,9 @@ BankEditorDialog::deviceItemHasBank(MidiDeviceListViewItem* deviceItem, int bank } void -BankEditorDialog::clearItemChildren(QListViewItem* item) +BankEditorDialog::clearItemChildren(TQListViewItem* item) { - QListViewItem* child = 0; + TQListViewItem* child = 0; while ((child = item->firstChild())) delete child; @@ -719,7 +719,7 @@ BankEditorDialog::checkModified() } void -BankEditorDialog::slotPopulateDevice(QListViewItem* item) +BankEditorDialog::slotPopulateDevice(TQListViewItem* item) { RG_DEBUG << "BankEditorDialog::slotPopulateDevice" << endl; @@ -732,7 +732,7 @@ BankEditorDialog::slotPopulateDevice(QListViewItem* item) } void -BankEditorDialog::populateDevice(QListViewItem* item) +BankEditorDialog::populateDevice(TQListViewItem* item) { RG_DEBUG << "BankEditorDialog::populateDevice\n"; @@ -962,7 +962,7 @@ BankEditorDialog::slotUpdate() } MidiDeviceListViewItem* -BankEditorDialog::getParentDeviceItem(QListViewItem* item) +BankEditorDialog::getParentDeviceItem(TQListViewItem* item) { if (!item) return 0; @@ -989,7 +989,7 @@ BankEditorDialog::slotAddBank() if (!m_listView->currentItem()) return ; - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); MidiDeviceListViewItem* deviceItem = getParentDeviceItem(currentItem); MidiDevice *device = getMidiDevice(currentItem); @@ -1010,7 +1010,7 @@ BankEditorDialog::slotAddBank() qstrtostr(i18n("<new bank>"))); m_bankList.push_back(newBank); - QListViewItem* newBankItem = + TQListViewItem* newBankItem = new MidiBankListViewItem(deviceItem->getDeviceId(), m_bankList.size() - 1, deviceItem, @@ -1031,14 +1031,14 @@ BankEditorDialog::slotAddKeyMapping() if (!m_listView->currentItem()) return ; - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); MidiDeviceListViewItem* deviceItem = getParentDeviceItem(currentItem); MidiDevice *device = getMidiDevice(currentItem); if (device) { - QString name = ""; + TQString name = ""; int n = 0; while (name == "" || device->getKeyMappingByName(qstrtostr(name)) != 0) { ++n; @@ -1076,7 +1076,7 @@ BankEditorDialog::slotDelete() if (!m_listView->currentItem()) return ; - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); MidiBankListViewItem* bankItem = dynamic_cast<MidiBankListViewItem*>(currentItem); @@ -1180,19 +1180,19 @@ BankEditorDialog::slotDeleteAll() if (!m_listView->currentItem()) return ; - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); MidiDeviceListViewItem* deviceItem = getParentDeviceItem(currentItem); MidiDevice *device = getMidiDevice(deviceItem); - QString question = i18n("Really delete all banks for ") + - strtoqstr(device->getName()) + QString(" ?"); + TQString question = i18n("Really delete all banks for ") + + strtoqstr(device->getName()) + TQString(" ?"); int reply = KMessageBox::warningYesNo(this, question); if (reply == KMessageBox::Yes) { // erase all bank items - QListViewItem* child = 0; + TQListViewItem* child = 0; while ((child = deviceItem->firstChild())) delete child; @@ -1244,7 +1244,7 @@ BankEditorDialog::getMidiDevice(DeviceId id) } MidiDevice* -BankEditorDialog::getMidiDevice(QListViewItem* item) +BankEditorDialog::getMidiDevice(TQListViewItem* item) { MidiDeviceListViewItem* deviceItem = dynamic_cast<MidiDeviceListViewItem*>(item); @@ -1255,7 +1255,7 @@ BankEditorDialog::getMidiDevice(QListViewItem* item) } std::pair<int, int> -BankEditorDialog::getFirstFreeBank(QListViewItem* item) +BankEditorDialog::getFirstFreeBank(TQListViewItem* item) { //!!! percussion? this is actually only called in the expectation // that percussion==false at the moment @@ -1277,7 +1277,7 @@ BankEditorDialog::getFirstFreeBank(QListViewItem* item) } void -BankEditorDialog::slotModifyDeviceOrBankName(QListViewItem* item, const QString &label, int) +BankEditorDialog::slotModifyDeviceOrBankName(TQListViewItem* item, const TQString &label, int) { RG_DEBUG << "BankEditorDialog::slotModifyDeviceOrBankName" << endl; @@ -1305,9 +1305,9 @@ BankEditorDialog::slotModifyDeviceOrBankName(QListViewItem* item, const QString RG_DEBUG << "BankEditorDialog::slotModifyDeviceOrBankName - " << "modify key mapping name to " << label << endl; - QString oldName = keyItem->getName(); + TQString oldName = keyItem->getName(); - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); MidiDevice *device = getMidiDevice(currentItem); if (device) { @@ -1358,7 +1358,7 @@ BankEditorDialog::slotModifyDeviceOrBankName(QListViewItem* item, const QString void BankEditorDialog::selectDeviceItem(MidiDevice *device) { - QListViewItem *child = m_listView->firstChild(); + TQListViewItem *child = m_listView->firstChild(); MidiDeviceListViewItem *midiDeviceItem; MidiDevice *midiDevice; @@ -1381,8 +1381,8 @@ void BankEditorDialog::selectDeviceBankItem(DeviceId deviceId, int bank) { - QListViewItem *deviceChild = m_listView->firstChild(); - QListViewItem *bankChild; + TQListViewItem *deviceChild = m_listView->firstChild(); + TQListViewItem *bankChild; int deviceCount = 0, bankCount = 0; do { @@ -1462,8 +1462,8 @@ BankEditorDialog::getCommandHistory() void BankEditorDialog::slotImport() { - QString deviceDir = KGlobal::dirs()->findResource("appdata", "library/"); - QDir dir(deviceDir); + TQString deviceDir = KGlobal::dirs()->findResource("appdata", "library/"); + TQDir dir(deviceDir); if (!dir.exists()) { deviceDir = ":ROSEGARDENDEVICE"; } else { @@ -1479,7 +1479,7 @@ BankEditorDialog::slotImport() return ; ImportDeviceDialog *dialog = new ImportDeviceDialog(this, url); - if (dialog->doImport() && dialog->exec() == QDialog::Accepted) { + if (dialog->doImport() && dialog->exec() == TQDialog::Accepted) { MidiDeviceListViewItem* deviceItem = dynamic_cast<MidiDeviceListViewItem*> @@ -1614,11 +1614,11 @@ BankEditorDialog::slotEditPaste() void BankEditorDialog::slotExport() { - QString extension = "rgd"; + TQString extension = "rgd"; - QString name = + TQString name = KFileDialog::getSaveFileName(":ROSEGARDEN", - (extension.isEmpty() ? QString("*") : ("*." + extension)), + (extension.isEmpty() ? TQString("*") : ("*." + extension)), this, i18n("Export Device as...")); @@ -1634,7 +1634,7 @@ BankEditorDialog::slotExport() } } - QFileInfo info(name); + TQFileInfo info(name); if (info.isDir()) { KMessageBox::sorry(this, i18n("You have specified a directory")); @@ -1660,7 +1660,7 @@ BankEditorDialog::slotExport() if (md) { ExportDeviceDialog *ed = new ExportDeviceDialog (this, strtoqstr(md->getName())); - if (ed->exec() != QDialog::Accepted) + if (ed->exec() != TQDialog::Accepted) return ; if (ed->getExportType() == ExportDeviceDialog::ExportOne) { devices.push_back(md->getId()); @@ -1686,7 +1686,7 @@ BankEditorDialog::slotFileClose() } void -BankEditorDialog::closeEvent(QCloseEvent *e) +BankEditorDialog::closeEvent(TQCloseEvent *e) { if (m_modified) { diff --git a/src/gui/studio/BankEditorDialog.h b/src/gui/studio/BankEditorDialog.h index 0e49430..6e36bef 100644 --- a/src/gui/studio/BankEditorDialog.h +++ b/src/gui/studio/BankEditorDialog.h @@ -34,13 +34,13 @@ #include <utility> -class QWidget; -class QString; -class QPushButton; -class QListViewItem; -class QGroupBox; -class QCloseEvent; -class QCheckBox; +class TQWidget; +class TQString; +class TQPushButton; +class TQListViewItem; +class TQGroupBox; +class TQCloseEvent; +class TQCheckBox; class KListView; class KCommand; class KComboBox; @@ -63,7 +63,7 @@ class BankEditorDialog : public KMainWindow Q_OBJECT public: - BankEditorDialog(QWidget *parent, + BankEditorDialog(TQWidget *parent, RosegardenGUIDoc *doc, DeviceId defaultDevice = Device::NO_DEVICE); @@ -74,7 +74,7 @@ public: // void initDialog(); - std::pair<int, int> getFirstFreeBank(QListViewItem*); + std::pair<int, int> getFirstFreeBank(TQListViewItem*); void addCommandToHistory(KCommand *command); MultiViewCommandHistory* getCommandHistory(); @@ -84,7 +84,7 @@ public: // Get a MidiDevice from an index number // MidiDevice* getMidiDevice(DeviceId); - MidiDevice* getMidiDevice(QListViewItem*); + MidiDevice* getMidiDevice(TQListViewItem*); MidiDevice* getCurrentMidiDevice(); BankList& getBankList() { return m_bankList; } ProgramList&getProgramList() { return m_programList; } @@ -105,7 +105,7 @@ public: void selectDeviceBankItem(DeviceId device, int bank); public slots: - void slotPopulateDevice(QListViewItem*); + void slotPopulateDevice(TQListViewItem*); void slotApply(); void slotReset(); @@ -120,7 +120,7 @@ public slots: void slotImport(); void slotExport(); - void slotModifyDeviceOrBankName(QListViewItem*, const QString&,int); + void slotModifyDeviceOrBankName(TQListViewItem*, const TQString&,int); void slotFileClose(); @@ -135,26 +135,26 @@ signals: void deviceNamesChanged(); protected: - virtual void closeEvent(QCloseEvent*); + virtual void closeEvent(TQCloseEvent*); void resetProgramList(); void setProgramList(MidiDevice *device); void updateDialog(); - void populateDeviceItem(QListViewItem* deviceItem, + void populateDeviceItem(TQListViewItem* deviceItem, MidiDevice* midiDevice); void updateDeviceItem(MidiDeviceListViewItem* deviceItem); bool deviceItemHasBank(MidiDeviceListViewItem* deviceItem, int bankNb); - void clearItemChildren(QListViewItem* deviceItem); + void clearItemChildren(TQListViewItem* deviceItem); - MidiDeviceListViewItem* getParentDeviceItem(QListViewItem*); + MidiDeviceListViewItem* getParentDeviceItem(TQListViewItem*); void keepBankListForNextPopulate() { m_keepBankList = true; } - void populateDevice(QListViewItem*); + void populateDevice(TQListViewItem*); void setupActions(); @@ -166,24 +166,24 @@ protected: MidiKeyMappingEditor *m_keyMappingEditor; KListView *m_listView; - QGroupBox *m_optionBox; - QCheckBox *m_variationToggle; + TQGroupBox *m_optionBox; + TQCheckBox *m_variationToggle; KComboBox *m_variationCombo; - QPushButton *m_closeButton; - QPushButton *m_resetButton; - QPushButton *m_applyButton; + TQPushButton *m_closeButton; + TQPushButton *m_resetButton; + TQPushButton *m_applyButton; - QPushButton *m_addBank; - QPushButton *m_addKeyMapping; - QPushButton *m_delete; - QPushButton *m_deleteAll; + TQPushButton *m_addBank; + TQPushButton *m_addKeyMapping; + TQPushButton *m_delete; + TQPushButton *m_deleteAll; - QPushButton *m_importBanks; - QPushButton *m_exportBanks; + TQPushButton *m_importBanks; + TQPushButton *m_exportBanks; - QPushButton *m_copyPrograms; - QPushButton *m_pastePrograms; + TQPushButton *m_copyPrograms; + TQPushButton *m_pastePrograms; std::pair<DeviceId, int> m_copyBank; std::map<DeviceId, std::string> m_deviceNameMap; diff --git a/src/gui/studio/ChangeRecordDeviceCommand.cpp b/src/gui/studio/ChangeRecordDeviceCommand.cpp index a5a3947..5f46eff 100644 --- a/src/gui/studio/ChangeRecordDeviceCommand.cpp +++ b/src/gui/studio/ChangeRecordDeviceCommand.cpp @@ -38,8 +38,8 @@ ChangeRecordDeviceCommand::swap() KConfig *config = kapp->config(); config->setGroup(Rosegarden::SequencerOptionsConfigGroup); - QStringList devList = config->readListEntry("midirecorddevice"); - QString sdevice = QString::number(m_deviceId); + TQStringList devList = config->readListEntry("midirecorddevice"); + TQString sdevice = TQString::number(m_deviceId); if (m_action) { if(!devList.contains(sdevice)) diff --git a/src/gui/studio/DeviceEditorDialog.cpp b/src/gui/studio/DeviceEditorDialog.cpp index 29c9dd4..9f45c31 100644 --- a/src/gui/studio/DeviceEditorDialog.cpp +++ b/src/gui/studio/DeviceEditorDialog.cpp @@ -39,23 +39,23 @@ #include "gui/application/RosegardenApplication.h" #include <kdialogbase.h> #include <kmessagebox.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qhbox.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtable.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqhbox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtable.h> +#include <tqvbox.h> +#include <tqwidget.h> #include <algorithm> namespace Rosegarden { -DeviceEditorDialog::DeviceEditorDialog(QWidget *parent, +DeviceEditorDialog::DeviceEditorDialog(TQWidget *parent, RosegardenGUIDoc *document) : KDialogBase(parent, "deviceeditordialog", true, i18n("Manage MIDI Devices"), Ok | Apply | Close, Ok, true), @@ -63,9 +63,9 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent, m_studio(&document->getStudio()), m_modified(false) { - QVBox *mainBox = makeVBoxMainWidget(); + TQVBox *mainBox = makeVBoxMainWidget(); - m_table = new QTable(0, 4, mainBox); + m_table = new TQTable(0, 4, mainBox); m_table->setSorting(false); m_table->setRowMovingEnabled(false); m_table->setColumnMovingEnabled(false); @@ -77,7 +77,7 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent, m_table->horizontalHeader()->show(); m_table->verticalHeader()->hide(); m_table->setLeftMargin(0); - m_table->setSelectionMode(QTable::SingleRow); + m_table->setSelectionMode(TQTable::SingleRow); m_table->setColumnReadOnly(0, true); m_table->setColumnReadOnly(2, true); @@ -88,15 +88,15 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent, populate(); - QHBox *hbox = new QHBox(mainBox); - QPushButton *addButton = new QPushButton(i18n("Add Play Device"), hbox); - QPushButton *addRButton = new QPushButton(i18n("Add Record Device"), hbox); - QPushButton *deleteButton = new QPushButton(i18n("Delete Device"), hbox); - connect(addButton, SIGNAL(clicked()), this, SLOT(slotAddPlayDevice())); - connect(addRButton, SIGNAL(clicked()), this, SLOT(slotAddRecordDevice())); - connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteDevice())); - connect(m_table, SIGNAL(valueChanged(int, int)), - this, SLOT(slotValueChanged (int, int))); + TQHBox *hbox = new TQHBox(mainBox); + TQPushButton *addButton = new TQPushButton(i18n("Add Play Device"), hbox); + TQPushButton *addRButton = new TQPushButton(i18n("Add Record Device"), hbox); + TQPushButton *deleteButton = new TQPushButton(i18n("Delete Device"), hbox); + connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddPlayDevice())); + connect(addRButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddRecordDevice())); + connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteDevice())); + connect(m_table, TQT_SIGNAL(valueChanged(int, int)), + this, TQT_SLOT(slotValueChanged (int, int))); setMinimumHeight(250); @@ -145,9 +145,9 @@ DeviceEditorDialog::populate() MidiDevice *md = static_cast<MidiDevice *>(*it); // if you change this string ("Device %1"), change test in slotApply - QString deviceName = i18n("Device %1").arg(md->getId() + 1); - QString deviceLabel = strtoqstr(md->getName()); - QString connectionName = strtoqstr(md->getConnection()); + TQString deviceName = i18n("Device %1").arg(md->getId() + 1); + TQString deviceLabel = strtoqstr(md->getName()); + TQString connectionName = strtoqstr(md->getConnection()); m_table->setText(deviceCount, NAME_COL, deviceName); m_table->setText(deviceCount, LABEL_COL, deviceLabel); @@ -155,7 +155,7 @@ DeviceEditorDialog::populate() (md->getDirection() == MidiDevice::Play ? i18n("Play") : i18n("Record"))); - QStringList &list(md->getDirection() == MidiDevice::Play ? + TQStringList &list(md->getDirection() == MidiDevice::Play ? m_playConnections : m_recordConnections); int currentConnectionIndex = list.size() - 1; for (unsigned int i = 0; i < list.size(); ++i) { @@ -163,7 +163,7 @@ DeviceEditorDialog::populate() currentConnectionIndex = i; } - QComboTableItem *item = new QComboTableItem(m_table, list, false); + TQComboTableItem *item = new TQComboTableItem(m_table, list, false); item->setCurrentItem(currentConnectionIndex); m_table->setItem(deviceCount, CONNECTION_COL, item); @@ -181,12 +181,12 @@ DeviceEditorDialog::populate() void DeviceEditorDialog::makeConnectionList(unsigned int direction, - QStringList &list) + TQStringList &list) { - QByteArray data; - QByteArray replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQByteArray replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)Device::Midi; arg << direction; @@ -196,17 +196,17 @@ DeviceEditorDialog::makeConnectionList(unsigned int direction, return ; } - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); unsigned int connections = 0; if (replyType == "unsigned int") reply >> connections; for (unsigned int i = 0; i < connections; ++i) { - QByteArray data; - QByteArray replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQByteArray replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)Device::Midi; arg << direction; arg << i; @@ -219,9 +219,9 @@ DeviceEditorDialog::makeConnectionList(unsigned int direction, return ; } - QDataStream reply(replyData, IO_ReadOnly); - QString connection; - if (replyType == "QString") { + TQDataStream reply(replyData, IO_ReadOnly); + TQString connection; + if (replyType == "TQString") { reply >> connection; list.append(connection); } @@ -335,12 +335,12 @@ DeviceEditorDialog::slotApply() int DeviceEditorDialog::getDeviceIdAt(int row) // -1 for new device w/o an id yet { - QString t(m_table->text(row, 0)); + TQString t(m_table->text(row, 0)); - QRegExp re("^.*(\\d+).*$"); + TQRegExp re("^.*(\\d+).*$"); re.search(t); - QString number = re.cap(1); + TQString number = re.cap(1); int id = -1; if (number && number != "") @@ -360,8 +360,8 @@ DeviceEditorDialog::slotAddPlayDevice() m_table->setText(n, 1, i18n("New Device")); m_table->setText(n, 2, i18n("Play")); - QComboTableItem *item = - new QComboTableItem(m_table, m_playConnections, false); + TQComboTableItem *item = + new TQComboTableItem(m_table, m_playConnections, false); item->setCurrentItem(m_playConnections.size() - 1); m_table->setItem(n, 3, item); m_table->adjustRow(n); @@ -378,8 +378,8 @@ DeviceEditorDialog::slotAddRecordDevice() m_table->setText(n, 1, i18n("New Device")); m_table->setText(n, 2, i18n("Record")); - QComboTableItem *item = - new QComboTableItem(m_table, m_recordConnections, false); + TQComboTableItem *item = + new TQComboTableItem(m_table, m_recordConnections, false); item->setCurrentItem(m_recordConnections.size() - 1); m_table->setItem(n, 3, item); m_table->adjustRow(n); diff --git a/src/gui/studio/DeviceEditorDialog.h b/src/gui/studio/DeviceEditorDialog.h index 2bde025..44247b3 100644 --- a/src/gui/studio/DeviceEditorDialog.h +++ b/src/gui/studio/DeviceEditorDialog.h @@ -28,12 +28,12 @@ #include <base/Studio.h> #include <kdialogbase.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <set> -class QWidget; -class QTable; +class TQWidget; +class TQTable; namespace Rosegarden @@ -47,7 +47,7 @@ class DeviceEditorDialog : public KDialogBase { Q_OBJECT public: - DeviceEditorDialog(QWidget *parent, RosegardenGUIDoc *document); + DeviceEditorDialog(TQWidget *parent, RosegardenGUIDoc *document); ~DeviceEditorDialog(); void setModified(bool value); @@ -66,11 +66,11 @@ private: RosegardenGUIDoc *m_document; Studio *m_studio; - QStringList m_playConnections; - QStringList m_recordConnections; - void makeConnectionList(unsigned int direction, QStringList &list); + TQStringList m_playConnections; + TQStringList m_recordConnections; + void makeConnectionList(unsigned int direction, TQStringList &list); - QTable *m_table; + TQTable *m_table; DeviceList m_devices; std::set<DeviceId> m_deletedDevices; diff --git a/src/gui/studio/DeviceManagerDialog.cpp b/src/gui/studio/DeviceManagerDialog.cpp index 8f2fa6b..eb40c77 100644 --- a/src/gui/studio/DeviceManagerDialog.cpp +++ b/src/gui/studio/DeviceManagerDialog.cpp @@ -54,22 +54,22 @@ #include <kmessagebox.h> #include <kstdaccel.h> #include <kstdaction.h> -#include <qcstring.h> -#include <qdatastream.h> -#include <qdialog.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qframe.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtable.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqdialog.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqframe.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtable.h> +#include <tqtooltip.h> +#include <tqwidget.h> namespace Rosegarden @@ -83,21 +83,21 @@ static const int RECORD_CURRENT_COL = 1; static const int RECORD_CONNECTION_COL = 2; -DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, +DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, RosegardenGUIDoc *document) : KMainWindow(parent, "deviceeditordialog"), m_document(document), m_studio(&document->getStudio()) { - QFrame * mainBox = new QFrame(this); + TQFrame * mainBox = new TQFrame(this); setCentralWidget(mainBox); - QVBoxLayout *mainLayout = new QVBoxLayout(mainBox, 10, 10); + TQVBoxLayout *mainLayout = new TQVBoxLayout(mainBox, 10, 10); setCaption(i18n("Manage MIDI Devices")); - QGroupBox *groupBox = new QGroupBox(2, Horizontal, i18n("Play devices"), mainBox); + TQGroupBox *groupBox = new TQGroupBox(2, Horizontal, i18n("Play devices"), mainBox); - m_playTable = new QTable(0, 2, groupBox); + m_playTable = new TQTable(0, 2, groupBox); m_playTable->setSorting(false); m_playTable->setRowMovingEnabled(false); m_playTable->setColumnMovingEnabled(false); @@ -107,55 +107,55 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, m_playTable->horizontalHeader()->show(); m_playTable->verticalHeader()->hide(); m_playTable->setLeftMargin(0); - m_playTable->setSelectionMode(QTable::SingleRow); - - QFrame *frame = new QFrame(groupBox); - QVBoxLayout *vlayout = new QVBoxLayout(frame); - QGrid *buttons = new QGrid(2, Horizontal, frame); - QPushButton *addButton = new QPushButton(i18n("New"), buttons); - m_deletePlayButton = new QPushButton(i18n("Delete"), buttons); - m_importButton = new QPushButton(i18n("Import..."), buttons); - m_exportButton = new QPushButton(i18n("Export..."), buttons); - m_banksButton = new QPushButton(i18n("Banks..."), buttons); - m_controllersButton = new QPushButton(i18n("Control Events..."), buttons); + m_playTable->setSelectionMode(TQTable::SingleRow); + + TQFrame *frame = new TQFrame(groupBox); + TQVBoxLayout *vlayout = new TQVBoxLayout(frame); + TQGrid *buttons = new TQGrid(2, Horizontal, frame); + TQPushButton *addButton = new TQPushButton(i18n("New"), buttons); + m_deletePlayButton = new TQPushButton(i18n("Delete"), buttons); + m_importButton = new TQPushButton(i18n("Import..."), buttons); + m_exportButton = new TQPushButton(i18n("Export..."), buttons); + m_banksButton = new TQPushButton(i18n("Banks..."), buttons); + m_controllersButton = new TQPushButton(i18n("Control Events..."), buttons); vlayout->addWidget(buttons); vlayout->addStretch(10); - QToolTip::add + TQToolTip::add (addButton, i18n("Create a new Play device")); - QToolTip::add + TQToolTip::add (m_deletePlayButton, i18n("Delete the selected device")); - QToolTip::add + TQToolTip::add (m_importButton, i18n("Import Bank, Program and Controller data from a Rosegarden file to the selected device")); - QToolTip::add + TQToolTip::add (m_exportButton, i18n("Export Bank and Controller data to a Rosegarden interchange file")); - QToolTip::add + TQToolTip::add (m_banksButton, i18n("View and edit Banks and Programs for the selected device")); - QToolTip::add + TQToolTip::add (m_controllersButton, i18n("View and edit Control Events for the selected device - these are special Event types that you can define against your device and control through Control Rulers or the Instrument Parameter Box ")); - connect(addButton, SIGNAL(clicked()), this, SLOT(slotAddPlayDevice())); - connect(m_deletePlayButton, SIGNAL(clicked()), this, SLOT(slotDeletePlayDevice())); - connect(m_importButton, SIGNAL(clicked()), this, SLOT(slotImport())); - connect(m_exportButton, SIGNAL(clicked()), this, SLOT(slotExport())); - connect(m_banksButton, SIGNAL(clicked()), this, SLOT(slotSetBanks())); - connect(m_controllersButton, SIGNAL(clicked()), this, SLOT(slotSetControllers())); + connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddPlayDevice())); + connect(m_deletePlayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeletePlayDevice())); + connect(m_importButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotImport())); + connect(m_exportButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExport())); + connect(m_banksButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetBanks())); + connect(m_controllersButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetControllers())); - connect(m_playTable, SIGNAL(valueChanged(int, int)), - this, SLOT(slotPlayValueChanged (int, int))); - connect(m_playTable, SIGNAL(currentChanged(int, int)), - this, SLOT(slotPlayDeviceSelected (int, int))); + connect(m_playTable, TQT_SIGNAL(valueChanged(int, int)), + this, TQT_SLOT(slotPlayValueChanged (int, int))); + connect(m_playTable, TQT_SIGNAL(currentChanged(int, int)), + this, TQT_SLOT(slotPlayDeviceSelected (int, int))); mainLayout->addWidget(groupBox); - groupBox = new QGroupBox(2, Horizontal, i18n("Record devices"), mainBox); + groupBox = new TQGroupBox(2, Horizontal, i18n("Record devices"), mainBox); - m_recordTable = new QTable(0, 3, groupBox); + m_recordTable = new TQTable(0, 3, groupBox); m_recordTable->setSorting(false); m_recordTable->setRowMovingEnabled(false); m_recordTable->setColumnMovingEnabled(false); @@ -166,32 +166,32 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, m_recordTable->horizontalHeader()->show(); m_recordTable->verticalHeader()->hide(); m_recordTable->setLeftMargin(0); - m_recordTable->setSelectionMode(QTable::SingleRow); + m_recordTable->setSelectionMode(TQTable::SingleRow); - frame = new QFrame(groupBox); - vlayout = new QVBoxLayout(frame); - buttons = new QGrid(2, Horizontal, frame); - addButton = new QPushButton(i18n("New"), buttons); - m_deleteRecordButton = new QPushButton(i18n("Delete"), buttons); + frame = new TQFrame(groupBox); + vlayout = new TQVBoxLayout(frame); + buttons = new TQGrid(2, Horizontal, frame); + addButton = new TQPushButton(i18n("New"), buttons); + m_deleteRecordButton = new TQPushButton(i18n("Delete"), buttons); vlayout->addWidget(buttons); vlayout->addStretch(10); - QToolTip::add + TQToolTip::add (addButton, i18n("Create a new Record device")); - QToolTip::add + TQToolTip::add (m_deleteRecordButton, i18n("Delete the selected device")); - connect(addButton, SIGNAL(clicked()), this, SLOT(slotAddRecordDevice())); - connect(m_deleteRecordButton, SIGNAL(clicked()), this, SLOT(slotDeleteRecordDevice())); + connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddRecordDevice())); + connect(m_deleteRecordButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteRecordDevice())); - connect(m_recordTable, SIGNAL(currentChanged(int, int)), - this, SLOT(slotRecordDeviceSelected (int, int))); - connect(m_recordTable, SIGNAL(valueChanged(int, int)), - this, SLOT(slotRecordValueChanged (int, int))); + connect(m_recordTable, TQT_SIGNAL(currentChanged(int, int)), + this, TQT_SLOT(slotRecordDeviceSelected (int, int))); + connect(m_recordTable, TQT_SIGNAL(valueChanged(int, int)), + this, TQT_SLOT(slotRecordValueChanged (int, int))); - connect(document, SIGNAL(devicesResyncd()), this, SLOT(slotDevicesResyncd())); + connect(document, TQT_SIGNAL(devicesResyncd()), this, TQT_SLOT(slotDevicesResyncd())); m_noConnectionString = i18n("No connection"); @@ -202,24 +202,24 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, mainLayout->addWidget(groupBox); - QFrame* btnBox = new QFrame(mainBox); + TQFrame* btnBox = new TQFrame(mainBox); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QPushButton *closeButton = new QPushButton(i18n("Close"), btnBox); + TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 0, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 0, 10); layout->addStretch(10); layout->addWidget(closeButton); layout->addSpacing(5); KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); closeButton->setText(close->text()); - connect(closeButton, SIGNAL(clicked()), this, SLOT(slotClose())); + connect(closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose())); mainLayout->addWidget(btnBox); @@ -239,8 +239,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, createGUI("devicemanager.rc"); m_document->getCommandHistory()->attachView(actionCollection()); - connect(m_document->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(populate())); + connect(m_document->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(populate())); m_playTable->setCurrentCell( -1, 0); m_recordTable->setCurrentCell( -1, 0); @@ -326,8 +326,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, m_playTable->insertRows(deviceCount, 1); - QString deviceName = i18n("%1").arg(deviceCount + 1); - QString connectionName = strtoqstr((*it)->getConnection()); + TQString deviceName = i18n("%1").arg(deviceCount + 1); + TQString connectionName = strtoqstr((*it)->getConnection()); m_playTable->setText(deviceCount, PLAY_NAME_COL, strtoqstr((*it)->getName())); @@ -338,7 +338,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, currentConnectionIndex = i; } - QComboTableItem *item = new QComboTableItem(m_playTable, m_playConnections, false); + TQComboTableItem *item = new TQComboTableItem(m_playTable, m_playConnections, false); item->setCurrentItem(currentConnectionIndex); m_playTable->setItem(deviceCount, PLAY_CONNECTION_COL, item); @@ -360,8 +360,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, m_recordTable->insertRows(deviceCount, 1); - QString deviceName = i18n("%1").arg(deviceCount + 1); - QString connectionName = strtoqstr((*it)->getConnection()); + TQString deviceName = i18n("%1").arg(deviceCount + 1); + TQString connectionName = strtoqstr((*it)->getConnection()); m_recordTable->setText(deviceCount, RECORD_NAME_COL, strtoqstr((*it)->getName())); @@ -372,11 +372,11 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, currentConnectionIndex = i; } - QComboTableItem *item = new QComboTableItem(m_recordTable, m_recordConnections, false); + TQComboTableItem *item = new TQComboTableItem(m_recordTable, m_recordConnections, false); item->setCurrentItem(currentConnectionIndex); m_recordTable->setItem(deviceCount, RECORD_CONNECTION_COL, item); - QCheckTableItem *check = new QCheckTableItem(m_recordTable, QString()); + TQCheckTableItem *check = new TQCheckTableItem(m_recordTable, TQString()); //check->setChecked((*it)->getId() == recordDevice); //check->setText(((*it)->getId() == recordDevice) ? // i18n("Yes") : i18n("No")); @@ -401,14 +401,14 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, void DeviceManagerDialog::makeConnectionList(unsigned int direction, - QStringList &list) + TQStringList &list) { list.clear(); - QByteArray data; - QByteArray replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQByteArray replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)Device::Midi; arg << direction; @@ -418,17 +418,17 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, return ; } - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); unsigned int connections = 0; if (replyType == "unsigned int") reply >> connections; for (unsigned int i = 0; i < connections; ++i) { - QByteArray data; - QByteArray replyData; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQByteArray replyData; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); arg << (int)Device::Midi; arg << direction; arg << i; @@ -441,9 +441,9 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, return ; } - QDataStream reply(replyData, IO_ReadOnly); - QString connection; - if (replyType == "QString") { + TQDataStream reply(replyData, IO_ReadOnly); + TQString connection; + if (replyType == "TQString") { reply >> connection; list.append(connection); } @@ -453,7 +453,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, } void - DeviceManagerDialog::closeEvent(QCloseEvent *e) + DeviceManagerDialog::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -478,7 +478,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, void DeviceManagerDialog::slotAddPlayDevice() { - QString connection = ""; + TQString connection = ""; if (m_playConnections.size() > 0) connection = m_playConnections[m_playConnections.size() - 1]; CreateOrDeleteDeviceCommand *command = new CreateOrDeleteDeviceCommand @@ -493,7 +493,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, void DeviceManagerDialog::slotAddRecordDevice() { - QString connection = ""; + TQString connection = ""; if (m_recordConnections.size() > 0) connection = m_recordConnections[m_recordConnections.size() - 1]; CreateOrDeleteDeviceCommand *command = new CreateOrDeleteDeviceCommand @@ -516,8 +516,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, (m_studio, id); m_document->getCommandHistory()->addCommand(command); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (unsigned int)id; rgapp->sequencerSend("removeDevice(unsigned int)", data); } @@ -560,13 +560,13 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, (new RenameDeviceCommand(m_studio, id, name)); emit deviceNamesChanged(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (unsigned int)id; arg << m_playTable->text(row, col); - rgapp->sequencerSend("renameDevice(unsigned int, QString)", data); + rgapp->sequencerSend("renameDevice(unsigned int, TQString)", data); } } break; @@ -611,13 +611,13 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, (new RenameDeviceCommand(m_studio, id, name)); emit deviceNamesChanged(); - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (unsigned int)id; arg << m_recordTable->text(row, col); - rgapp->sequencerSend("renameDevice(unsigned int, QString)", data); + rgapp->sequencerSend("renameDevice(unsigned int, TQString)", data); } } break; @@ -634,8 +634,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, case RECORD_CURRENT_COL: { m_recordTable->blockSignals(true); - QCheckTableItem *check = - dynamic_cast<QCheckTableItem *>(m_recordTable->item(row, col)); + TQCheckTableItem *check = + dynamic_cast<TQCheckTableItem *>(m_recordTable->item(row, col)); if (!check) return ; @@ -689,8 +689,8 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, if (id == Device::NO_DEVICE) return ; - QString deviceDir = KGlobal::dirs()->findResource("appdata", "library/"); - QDir dir(deviceDir); + TQString deviceDir = KGlobal::dirs()->findResource("appdata", "library/"); + TQDir dir(deviceDir); if (!dir.exists()) { deviceDir = ":ROSEGARDENDEVICE"; } else { @@ -706,7 +706,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, return ; ImportDeviceDialog *dialog = new ImportDeviceDialog(this, url); - if (dialog->doImport() && dialog->exec() == QDialog::Accepted) { + if (dialog->doImport() && dialog->exec() == TQDialog::Accepted) { ModifyDeviceCommand *command = 0; @@ -761,11 +761,11 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, void DeviceManagerDialog::slotExport() { - QString extension = "rgd"; + TQString extension = "rgd"; - QString name = + TQString name = KFileDialog::getSaveFileName(":ROSEGARDEN", - (extension.isEmpty() ? QString("*") : ("*." + extension)), + (extension.isEmpty() ? TQString("*") : ("*." + extension)), this, i18n("Export Device as...")); @@ -781,7 +781,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, } } - QFileInfo info(name); + TQFileInfo info(name); if (info.isDir()) { KMessageBox::sorry(this, i18n("You have specified a directory")); @@ -805,7 +805,7 @@ DeviceManagerDialog::DeviceManagerDialog(QWidget *parent, } if (md) { ExportDeviceDialog ed(this, strtoqstr(md->getName())); - if (ed.exec() != QDialog::Accepted) + if (ed.exec() != TQDialog::Accepted) return ; if (ed.getExportType() == ExportDeviceDialog::ExportOne) { devices.push_back(id); diff --git a/src/gui/studio/DeviceManagerDialog.h b/src/gui/studio/DeviceManagerDialog.h index aebc54e..84dceab 100644 --- a/src/gui/studio/DeviceManagerDialog.h +++ b/src/gui/studio/DeviceManagerDialog.h @@ -28,15 +28,15 @@ #include "base/Device.h" #include <kmainwindow.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <vector> -class QWidget; -class QTable; -class QPushButton; -class QCloseEvent; +class TQWidget; +class TQTable; +class TQPushButton; +class TQCloseEvent; namespace Rosegarden @@ -51,7 +51,7 @@ class DeviceManagerDialog : public KMainWindow { Q_OBJECT public: - DeviceManagerDialog(QWidget *parent, RosegardenGUIDoc *document); + DeviceManagerDialog(TQWidget *parent, RosegardenGUIDoc *document); ~DeviceManagerDialog(); void setModified(bool value); @@ -85,25 +85,25 @@ protected slots: void populate(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); private: RosegardenGUIDoc *m_document; Studio *m_studio; - QPushButton *m_deletePlayButton; - QPushButton *m_deleteRecordButton; - QPushButton *m_importButton; - QPushButton *m_exportButton; - QPushButton *m_banksButton; - QPushButton *m_controllersButton; + TQPushButton *m_deletePlayButton; + TQPushButton *m_deleteRecordButton; + TQPushButton *m_importButton; + TQPushButton *m_exportButton; + TQPushButton *m_banksButton; + TQPushButton *m_controllersButton; - QStringList m_playConnections; - QStringList m_recordConnections; - void makeConnectionList(unsigned int direction, QStringList &list); + TQStringList m_playConnections; + TQStringList m_recordConnections; + void makeConnectionList(unsigned int direction, TQStringList &list); - QTable *m_playTable; - QTable *m_recordTable; + TQTable *m_playTable; + TQTable *m_recordTable; typedef std::vector<MidiDevice *> MidiDeviceList; MidiDeviceList m_playDevices; @@ -112,7 +112,7 @@ private: DeviceId getPlayDeviceIdAt(int row); // NO_DEVICE = not found DeviceId getRecordDeviceIdAt(int row); // NO_DEVICE = not found - QString m_noConnectionString; + TQString m_noConnectionString; }; diff --git a/src/gui/studio/MidiBankListViewItem.cpp b/src/gui/studio/MidiBankListViewItem.cpp index 2563ccb..d3c9fb5 100644 --- a/src/gui/studio/MidiBankListViewItem.cpp +++ b/src/gui/studio/MidiBankListViewItem.cpp @@ -29,7 +29,7 @@ #include "base/Device.h" #include "MidiDeviceListViewItem.h" #include "MidiKeyMapListViewItem.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -37,8 +37,8 @@ namespace Rosegarden MidiBankListViewItem::MidiBankListViewItem(DeviceId deviceId, int bankNb, - QListViewItem* parent, - QString name, + TQListViewItem* parent, + TQString name, bool percussion, int msb, int lsb) : MidiDeviceListViewItem(deviceId, parent, name, percussion, msb, lsb), m_percussion(percussion), @@ -48,20 +48,20 @@ MidiBankListViewItem::MidiBankListViewItem(DeviceId deviceId, void MidiBankListViewItem::setPercussion(bool percussion) { m_percussion = percussion; - setText(1, QString(percussion ? i18n("Percussion Bank") : i18n("Bank"))); + setText(1, TQString(percussion ? i18n("Percussion Bank") : i18n("Bank"))); } void MidiBankListViewItem::setMSB(int msb) { - setText(2, QString().setNum(msb)); + setText(2, TQString().setNum(msb)); } void MidiBankListViewItem::setLSB(int lsb) { - setText(3, QString().setNum(lsb)); + setText(3, TQString().setNum(lsb)); } -int MidiBankListViewItem::compare(QListViewItem *i, int col, bool ascending) const +int MidiBankListViewItem::compare(TQListViewItem *i, int col, bool ascending) const { MidiBankListViewItem* bankItem = dynamic_cast<MidiBankListViewItem*>(i); diff --git a/src/gui/studio/MidiBankListViewItem.h b/src/gui/studio/MidiBankListViewItem.h index 87f4b02..5d42160 100644 --- a/src/gui/studio/MidiBankListViewItem.h +++ b/src/gui/studio/MidiBankListViewItem.h @@ -28,10 +28,10 @@ #include "base/Device.h" #include "MidiDeviceListViewItem.h" -#include <qstring.h> +#include <tqstring.h> -class QListViewItem; +class TQListViewItem; namespace Rosegarden @@ -44,7 +44,7 @@ class MidiBankListViewItem : public MidiDeviceListViewItem public: MidiBankListViewItem(DeviceId deviceId, int bankNb, - QListViewItem* parent, QString name, + TQListViewItem* parent, TQString name, bool percussion, int msb, int lsb); @@ -55,7 +55,7 @@ public: void setMSB(int msb); void setLSB(int msb); - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: diff --git a/src/gui/studio/MidiDeviceListViewItem.cpp b/src/gui/studio/MidiDeviceListViewItem.cpp index 30a339e..21a8cda 100644 --- a/src/gui/studio/MidiDeviceListViewItem.cpp +++ b/src/gui/studio/MidiDeviceListViewItem.cpp @@ -27,40 +27,40 @@ #include <klocale.h> #include "base/Device.h" -#include <qlistview.h> -#include <qstring.h> +#include <tqlistview.h> +#include <tqstring.h> namespace Rosegarden { MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - QListView* parent, QString name) + TQListView* parent, TQString name) : KListViewItem(parent, name), m_deviceId(deviceId) {} MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - QListViewItem* parent, QString name, + TQListViewItem* parent, TQString name, bool percussion, int msb, int lsb) : KListViewItem(parent, name, - QString(percussion ? i18n("Percussion Bank") : i18n("Bank")), - QString().setNum(msb), QString().setNum(lsb)), + TQString(percussion ? i18n("Percussion Bank") : i18n("Bank")), + TQString().setNum(msb), TQString().setNum(lsb)), m_deviceId(deviceId) {} MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - QListViewItem* parent, QString name) + TQListViewItem* parent, TQString name) : KListViewItem(parent, name, i18n("Key Mapping"), "", ""), m_deviceId(deviceId) {} -int MidiDeviceListViewItem::compare(QListViewItem *i, int col, bool ascending) const +int MidiDeviceListViewItem::compare(TQListViewItem *i, int col, bool ascending) const { MidiDeviceListViewItem* item = dynamic_cast<MidiDeviceListViewItem*>(i); if (!item) - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); if (col == 0) return getDeviceId() > item->getDeviceId() ? 1 : diff --git a/src/gui/studio/MidiDeviceListViewItem.h b/src/gui/studio/MidiDeviceListViewItem.h index 53652c6..a17a46c 100644 --- a/src/gui/studio/MidiDeviceListViewItem.h +++ b/src/gui/studio/MidiDeviceListViewItem.h @@ -28,7 +28,7 @@ #include "base/Device.h" #include <klistview.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden @@ -41,21 +41,21 @@ class MidiDeviceListViewItem : public KListViewItem public: // Device MidiDeviceListViewItem(DeviceId id, - QListView* parent, QString name); + TQListView* parent, TQString name); // Bank MidiDeviceListViewItem(DeviceId id, - QListViewItem* parent, QString name, + TQListViewItem* parent, TQString name, bool percussion, int msb, int lsb); // Key Mapping MidiDeviceListViewItem(DeviceId id, - QListViewItem* parent, QString name); + TQListViewItem* parent, TQString name); DeviceId getDeviceId() const { return m_deviceId; } - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: diff --git a/src/gui/studio/MidiKeyMapListViewItem.cpp b/src/gui/studio/MidiKeyMapListViewItem.cpp index c070e04..dd77055 100644 --- a/src/gui/studio/MidiKeyMapListViewItem.cpp +++ b/src/gui/studio/MidiKeyMapListViewItem.cpp @@ -29,22 +29,22 @@ #include "MidiBankListViewItem.h" #include "base/Device.h" #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { MidiKeyMapListViewItem::MidiKeyMapListViewItem(DeviceId deviceId, - QListViewItem* parent, - QString name) + TQListViewItem* parent, + TQString name) : MidiDeviceListViewItem(deviceId, parent, name), m_name(name) { setText(1, i18n("Key Mapping")); } -int MidiKeyMapListViewItem::compare(QListViewItem *i, int col, bool ascending) const +int MidiKeyMapListViewItem::compare(TQListViewItem *i, int col, bool ascending) const { if (dynamic_cast<MidiBankListViewItem *>(i)) { return 1; // banks before key maps diff --git a/src/gui/studio/MidiKeyMapListViewItem.h b/src/gui/studio/MidiKeyMapListViewItem.h index df53de3..d29b0a6 100644 --- a/src/gui/studio/MidiKeyMapListViewItem.h +++ b/src/gui/studio/MidiKeyMapListViewItem.h @@ -28,10 +28,10 @@ #include "base/Device.h" #include "MidiDeviceListViewItem.h" -#include <qstring.h> +#include <tqstring.h> -class QListViewItem; +class TQListViewItem; namespace Rosegarden @@ -43,14 +43,14 @@ class MidiKeyMapListViewItem : public MidiDeviceListViewItem { public: MidiKeyMapListViewItem(DeviceId deviceId, - QListViewItem* parent, QString name); + TQListViewItem* parent, TQString name); - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; - QString getName() const { return m_name; } + TQString getName() const { return m_name; } protected: - QString m_name; + TQString m_name; }; diff --git a/src/gui/studio/MidiKeyMappingEditor.cpp b/src/gui/studio/MidiKeyMappingEditor.cpp index f31d0dc..a9e347c 100644 --- a/src/gui/studio/MidiKeyMappingEditor.cpp +++ b/src/gui/studio/MidiKeyMappingEditor.cpp @@ -36,36 +36,36 @@ #include "NameSetEditor.h" #include <kcompletion.h> #include <klineedit.h> -#include <qframe.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qobject.h> -#include <qobjectlist.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qvgroupbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> namespace Rosegarden { MidiKeyMappingEditor::MidiKeyMappingEditor(BankEditorDialog* bankEditor, - QWidget* parent, + TQWidget* parent, const char* name) : NameSetEditor(bankEditor, i18n("Key Mapping details"), parent, name, i18n("Pitches"), false), m_device(0) { - QWidget *additionalWidget = makeAdditionalWidget(m_mainFrame); + TQWidget *additionalWidget = makeAdditionalWidget(m_mainFrame); if (additionalWidget) { m_mainLayout->addMultiCellWidget(additionalWidget, 0, 2, 0, 2); } } -QWidget * -MidiKeyMappingEditor::makeAdditionalWidget(QWidget *parent) +TQWidget * +MidiKeyMappingEditor::makeAdditionalWidget(TQWidget *parent) { return 0; } @@ -86,7 +86,7 @@ MidiKeyMappingEditor::clearAll() } void -MidiKeyMappingEditor::populate(QListViewItem* item) +MidiKeyMappingEditor::populate(TQListViewItem* item) { RG_DEBUG << "MidiKeyMappingEditor::populate\n"; @@ -144,7 +144,7 @@ MidiKeyMappingEditor::reset() continue; } - QString name = strtoqstr(it->second); + TQString name = strtoqstr(it->second); m_completion.addItem(name); m_names[i]->setText(name); m_names[i]->setCursorPosition(0); @@ -154,7 +154,7 @@ MidiKeyMappingEditor::reset() } void -MidiKeyMappingEditor::slotNameChanged(const QString& name) +MidiKeyMappingEditor::slotNameChanged(const TQString& name) { const KLineEdit* lineEdit = dynamic_cast<const KLineEdit*>(sender()); if (!lineEdit) { @@ -162,7 +162,7 @@ MidiKeyMappingEditor::slotNameChanged(const QString& name) return ; } - QString senderName = sender()->name(); + TQString senderName = sender()->name(); // Adjust value back to zero rated // @@ -183,9 +183,9 @@ MidiKeyMappingEditor::slotEntryButtonPressed() void MidiKeyMappingEditor::blockAllSignals(bool block) { - const QObjectList* allChildren = queryList("KLineEdit", "[0-9]+"); - QObjectListIt it(*allChildren); - QObject *obj; + const TQObjectList* allChildren = queryList("KLineEdit", "[0-9]+"); + TQObjectListIt it(*allChildren); + TQObject *obj; while ( (obj = it.current()) != 0 ) { obj->blockSignals(block); diff --git a/src/gui/studio/MidiKeyMappingEditor.h b/src/gui/studio/MidiKeyMappingEditor.h index 86959b8..563501e 100644 --- a/src/gui/studio/MidiKeyMappingEditor.h +++ b/src/gui/studio/MidiKeyMappingEditor.h @@ -31,9 +31,9 @@ #include <string> -class QWidget; -class QString; -class QListViewItem; +class TQWidget; +class TQString; +class TQListViewItem; namespace Rosegarden @@ -49,20 +49,20 @@ class MidiKeyMappingEditor : public NameSetEditor public: MidiKeyMappingEditor(BankEditorDialog *bankEditor, - QWidget *parent, + TQWidget *parent, const char *name = 0); void clearAll(); - void populate(QListViewItem *); + void populate(TQListViewItem *); MidiKeyMapping &getMapping() { return m_mapping; } void reset(); public slots: - virtual void slotNameChanged(const QString &); + virtual void slotNameChanged(const TQString &); virtual void slotEntryButtonPressed(); protected: - virtual QWidget *makeAdditionalWidget(QWidget *parent); + virtual TQWidget *makeAdditionalWidget(TQWidget *parent); void blockAllSignals(bool block); //--------------- Data members --------------------------------- diff --git a/src/gui/studio/MidiMixerVUMeter.cpp b/src/gui/studio/MidiMixerVUMeter.cpp index 2dd86cc..b882dec 100644 --- a/src/gui/studio/MidiMixerVUMeter.cpp +++ b/src/gui/studio/MidiMixerVUMeter.cpp @@ -26,13 +26,13 @@ #include "MidiMixerVUMeter.h" #include "gui/widgets/VUMeter.h" -#include <qwidget.h> +#include <tqwidget.h> namespace Rosegarden { -MidiMixerVUMeter::MidiMixerVUMeter(QWidget *parent, +MidiMixerVUMeter::MidiMixerVUMeter(TQWidget *parent, VUMeterType type, int width, int height, diff --git a/src/gui/studio/MidiMixerVUMeter.h b/src/gui/studio/MidiMixerVUMeter.h index f67d922..70622b2 100644 --- a/src/gui/studio/MidiMixerVUMeter.h +++ b/src/gui/studio/MidiMixerVUMeter.h @@ -29,7 +29,7 @@ #include "gui/widgets/VUMeter.h" -class QWidget; +class TQWidget; namespace Rosegarden @@ -40,7 +40,7 @@ namespace Rosegarden class MidiMixerVUMeter : public VUMeter { public: - MidiMixerVUMeter(QWidget *parent = 0, + MidiMixerVUMeter(TQWidget *parent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/studio/MidiMixerWindow.cpp b/src/gui/studio/MidiMixerWindow.cpp index 127db7f..047ba39 100644 --- a/src/gui/studio/MidiMixerWindow.cpp +++ b/src/gui/studio/MidiMixerWindow.cpp @@ -24,7 +24,7 @@ #include "MidiMixerWindow.h" -#include <qlayout.h> +#include <tqlayout.h> #include "sound/Midi.h" #include <klocale.h> @@ -49,21 +49,21 @@ #include <kaction.h> #include <kmainwindow.h> #include <kstdaction.h> -#include <qaccel.h> -#include <qcolor.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqcolor.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqwidget.h> namespace Rosegarden { -MidiMixerWindow::MidiMixerWindow(QWidget *parent, +MidiMixerWindow::MidiMixerWindow(TQWidget *parent, RosegardenGUIDoc *document): MixerWindow(parent, document), m_tabFrame(0) @@ -73,57 +73,57 @@ MidiMixerWindow::MidiMixerWindow(QWidget *parent, setupTabs(); KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-record"))); new KAction(i18n("&Record"), icon, 0, this, - SIGNAL(record()), actionCollection(), + TQT_SIGNAL(record()), actionCollection(), "record"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), + TQT_SIGNAL(panic()), actionCollection(), "panic"); createGUI("midimixer.rc"); @@ -144,11 +144,11 @@ MidiMixerWindow::setupTabs() // Setup m_tabFrame // - m_tabWidget = new QTabWidget(this); + m_tabWidget = new TQTabWidget(this); setCentralWidget(m_tabWidget); - connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), - this, SLOT(slotCurrentTabChanged(QWidget *))); - m_tabWidget->setTabPosition(QTabWidget::Bottom); + connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget *)), + this, TQT_SLOT(slotCurrentTabChanged(TQWidget *))); + m_tabWidget->setTabPosition(TQTabWidget::Bottom); setCaption(i18n("MIDI Mixer")); for (it = m_studio->begin(); it != m_studio->end(); ++it) { @@ -167,41 +167,41 @@ MidiMixerWindow::setupTabs() if (!instruments.size()) continue; - m_tabFrame = new QFrame(m_tabWidget); - m_tabFrame->setFrameStyle(QFrame::TabWidgetPanel); + m_tabFrame = new TQFrame(m_tabWidget); + m_tabFrame->setFrameStyle(TQFrame::TabWidgetPanel); m_tabFrame->setMargin(10); - QGridLayout *mainLayout = new QGridLayout + TQGridLayout *mainLayout = new QGridLayout (m_tabFrame, instruments.size() + 4, controls.size() + 4, 5); // MIDI Mixer label // - //QLabel *label = new QLabel(QString("%1 %2"). + //TQLabel *label = new TQLabel(TQString("%1 %2"). //arg(strtoqstr(dev->getName())) //.arg(i18n("MIDI Mixer")), m_tabFrame); - QLabel *label = new QLabel("", m_tabFrame); + TQLabel *label = new TQLabel("", m_tabFrame); mainLayout->addMultiCellWidget(label, 0, 0, 0, 16, Qt::AlignCenter); // control labels for (unsigned int i = 0; i < controls.size(); ++i) { - label = new QLabel(strtoqstr(controls[i].getName()), m_tabFrame); + label = new TQLabel(strtoqstr(controls[i].getName()), m_tabFrame); mainLayout->addWidget(label, i + 1, 0, Qt::AlignCenter); } // meter label // - //label = new QLabel(i18n("Meter"), m_tabFrame); + //label = new TQLabel(i18n("Meter"), m_tabFrame); //mainLayout->addWidget(label, //controls.size() + 1, 0, Qt::AlignCenter); // volume label - label = new QLabel(i18n("Volume"), m_tabFrame); + label = new TQLabel(i18n("Volume"), m_tabFrame); mainLayout->addWidget(label, controls.size() + 2, 0, Qt::AlignCenter); // instrument label - label = new QLabel(i18n("Instrument"), m_tabFrame); + label = new TQLabel(i18n("Instrument"), m_tabFrame); mainLayout->addWidget(label, controls.size() + 3, 0, Qt::AlignCenter); @@ -223,14 +223,14 @@ MidiMixerWindow::setupTabs() // Add the controls // for (unsigned int i = 0; i < controls.size(); ++i) { - QColor knobColour = Qt::white; + TQColor knobColour = Qt::white; if (controls[i].getColourIndex() > 0) { Colour c = m_document->getComposition().getGeneralColourMap(). getColourByIndex(controls[i].getColourIndex()); - knobColour = QColor(c.getRed(), + knobColour = TQColor(c.getRed(), c.getGreen(), c.getBlue()); } @@ -248,8 +248,8 @@ MidiMixerWindow::setupTabs() controller->setKnobColour(knobColour); - connect(controller, SIGNAL(valueChanged(float)), - this, SLOT(slotControllerChanged(float))); + connect(controller, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotControllerChanged(float))); mainLayout->addWidget(controller, i + 1, posCount, Qt::AlignCenter); @@ -281,7 +281,7 @@ MidiMixerWindow::setupTabs() // Label // - QLabel *idLabel = new QLabel(QString("%1"). + TQLabel *idLabel = new TQLabel(TQString("%1"). arg((*iIt)->getId() - firstInstrument + 1), m_tabFrame, "idLabel"); @@ -293,8 +293,8 @@ MidiMixerWindow::setupTabs() // Connect them up // - connect(fader, SIGNAL(faderChanged(float)), - this, SLOT(slotFaderLevelChanged(float))); + connect(fader, TQT_SIGNAL(faderChanged(float)), + this, TQT_SLOT(slotFaderLevelChanged(float))); // Update all the faders and controllers // @@ -306,7 +306,7 @@ MidiMixerWindow::setupTabs() faderCount++; } - QString name = QString("%1 (%2)").arg(strtoqstr(dev->getName())) + TQString name = TQString("%1 (%2)").arg(strtoqstr(dev->getName())) .arg(deviceCount++); addTab(m_tabFrame, name); @@ -315,7 +315,7 @@ MidiMixerWindow::setupTabs() } void -MidiMixerWindow::addTab(QWidget *tab, const QString &title) +MidiMixerWindow::addTab(TQWidget *tab, const TQString &title) { m_tabWidget->addTab(tab, title); } @@ -323,7 +323,7 @@ MidiMixerWindow::addTab(QWidget *tab, const QString &title) void MidiMixerWindow::slotFaderLevelChanged(float value) { - const QObject *s = sender(); + const TQObject *s = sender(); for (FaderVector::const_iterator it = m_faders.begin(); it != m_faders.end(); ++it) { @@ -376,7 +376,7 @@ MidiMixerWindow::slotFaderLevelChanged(float value) void MidiMixerWindow::slotControllerChanged(float value) { - const QObject *s = sender(); + const TQObject *s = sender(); unsigned int i = 0, j = 0; for (i = 0; i < m_faders.size(); ++i) { @@ -648,7 +648,7 @@ MidiMixerWindow::slotControllerDeviceEventReceived(MappedEvent *e, } void -MidiMixerWindow::slotCurrentTabChanged(QWidget *) +MidiMixerWindow::slotCurrentTabChanged(TQWidget *) { sendControllerRefresh(); } diff --git a/src/gui/studio/MidiMixerWindow.h b/src/gui/studio/MidiMixerWindow.h index d90dc55..28ab9e3 100644 --- a/src/gui/studio/MidiMixerWindow.h +++ b/src/gui/studio/MidiMixerWindow.h @@ -31,10 +31,10 @@ #include <vector> -class QWidget; -class QTabWidget; -class QString; -class QFrame; +class TQWidget; +class TQTabWidget; +class TQString; +class TQFrame; namespace Rosegarden @@ -53,7 +53,7 @@ class MidiMixerWindow : public MixerWindow Q_OBJECT public: - MidiMixerWindow(QWidget *parent, RosegardenGUIDoc *document); + MidiMixerWindow(TQWidget *parent, RosegardenGUIDoc *document); /** * Setup the tabs on the Mixer according to the Studio @@ -72,7 +72,7 @@ public slots: void slotControllerDeviceEventReceived(MappedEvent *, const void *); - void slotCurrentTabChanged(QWidget *); + void slotCurrentTabChanged(TQWidget *); signals: void play(); @@ -95,11 +95,11 @@ protected slots: void slotControllerChanged(float); protected: - void addTab(QWidget *tab, const QString &title); + void addTab(TQWidget *tab, const TQString &title); virtual void sendControllerRefresh(); - QTabWidget *m_tabWidget; + TQTabWidget *m_tabWidget; struct FaderStruct { @@ -115,7 +115,7 @@ protected: typedef std::vector<FaderStruct*> FaderVector; FaderVector m_faders; - QFrame *m_tabFrame; + TQFrame *m_tabFrame; }; diff --git a/src/gui/studio/MidiProgramsEditor.cpp b/src/gui/studio/MidiProgramsEditor.cpp index 8f81a04..e69b1a9 100644 --- a/src/gui/studio/MidiProgramsEditor.cpp +++ b/src/gui/studio/MidiProgramsEditor.cpp @@ -38,29 +38,29 @@ #include <klineedit.h> #include <klocale.h> #include <kstddirs.h> -#include <qcheckbox.h> -#include <qcursor.h> -#include <qfile.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvgroupbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqcursor.h> +#include <tqfile.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> #include <algorithm> namespace Rosegarden { MidiProgramsEditor::MidiProgramsEditor(BankEditorDialog* bankEditor, - QWidget* parent, + TQWidget* parent, const char* name) : NameSetEditor(bankEditor, i18n("Bank and Program details"), @@ -70,57 +70,57 @@ MidiProgramsEditor::MidiProgramsEditor(BankEditorDialog* bankEditor, m_programList(bankEditor->getProgramList()), m_oldBank(false, 0, 0) { - QWidget *additionalWidget = makeAdditionalWidget(m_mainFrame); + TQWidget *additionalWidget = makeAdditionalWidget(m_mainFrame); if (additionalWidget) { m_mainLayout->addMultiCellWidget(additionalWidget, 0, 2, 0, 2); } } -QWidget * -MidiProgramsEditor::makeAdditionalWidget(QWidget *parent) +TQWidget * +MidiProgramsEditor::makeAdditionalWidget(TQWidget *parent) { - QFrame *frame = new QFrame(parent); + TQFrame *frame = new TQFrame(parent); - m_percussion = new QCheckBox(frame); - m_msb = new QSpinBox(frame); - m_lsb = new QSpinBox(frame); + m_percussion = new TQCheckBox(frame); + m_msb = new TQSpinBox(frame); + m_lsb = new TQSpinBox(frame); - QGridLayout *gridLayout = new QGridLayout(frame, + TQGridLayout *gridLayout = new TQGridLayout(frame, 3, // rows 2, // cols 2); // margin - gridLayout->addWidget(new QLabel(i18n("Percussion"), frame), + gridLayout->addWidget(new TQLabel(i18n("Percussion"), frame), 0, 0, AlignLeft); gridLayout->addWidget(m_percussion, 0, 1, AlignLeft); - connect(m_percussion, SIGNAL(clicked()), - this, SLOT(slotNewPercussion())); + connect(m_percussion, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewPercussion())); - gridLayout->addWidget(new QLabel(i18n("MSB Value"), frame), + gridLayout->addWidget(new TQLabel(i18n("MSB Value"), frame), 1, 0, AlignLeft); m_msb->setMinValue(0); m_msb->setMaxValue(127); gridLayout->addWidget(m_msb, 1, 1, AlignLeft); - QToolTip::add + TQToolTip::add (m_msb, i18n("Selects a MSB controller Bank number (MSB/LSB pairs are always unique for any Device)")); - QToolTip::add + TQToolTip::add (m_lsb, i18n("Selects a LSB controller Bank number (MSB/LSB pairs are always unique for any Device)")); - connect(m_msb, SIGNAL(valueChanged(int)), - this, SLOT(slotNewMSB(int))); + connect(m_msb, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotNewMSB(int))); - gridLayout->addWidget(new QLabel(i18n("LSB Value"), frame), + gridLayout->addWidget(new TQLabel(i18n("LSB Value"), frame), 2, 0, AlignLeft); m_lsb->setMinValue(0); m_lsb->setMaxValue(127); gridLayout->addWidget(m_lsb, 2, 1, AlignLeft); - connect(m_lsb, SIGNAL(valueChanged(int)), - this, SLOT(slotNewLSB(int))); + connect(m_lsb, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotNewLSB(int))); return frame; } @@ -180,7 +180,7 @@ MidiProgramsEditor::clearAll() } void -MidiProgramsEditor::populate(QListViewItem* item) +MidiProgramsEditor::populate(TQListViewItem* item) { RG_DEBUG << "MidiProgramsEditor::populate\n"; @@ -221,14 +221,14 @@ MidiProgramsEditor::populate(QListViewItem* item) ProgramList programSubset = getBankSubset(*m_currentBank); ProgramList::iterator it; - QPixmap noKeyPixmap, keyPixmap; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString file = pixmapDir + "/toolbar/key-white.png"; - if (QFile(file).exists()) - noKeyPixmap = QPixmap(file); + TQPixmap noKeyPixmap, keyPixmap; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString file = pixmapDir + "/toolbar/key-white.png"; + if (TQFile(file).exists()) + noKeyPixmap = TQPixmap(file); file = pixmapDir + "/toolbar/key-green.png"; - if (QFile(file).exists()) - keyPixmap = QPixmap(file); + if (TQFile(file).exists()) + keyPixmap = TQPixmap(file); bool haveKeyMappings = m_currentBank->isPercussion() && (m_device->getKeyMappings().size() > 0); @@ -237,19 +237,19 @@ MidiProgramsEditor::populate(QListViewItem* item) m_names[i]->clear(); getEntryButton(i)->setEnabled(haveKeyMappings); getEntryButton(i)->setPixmap(noKeyPixmap); - QToolTip::remove + TQToolTip::remove ( getEntryButton(i) ); for (it = programSubset.begin(); it != programSubset.end(); it++) { if (it->getProgram() == i) { - QString programName = strtoqstr(it->getName()); + TQString programName = strtoqstr(it->getName()); m_completion.addItem(programName); m_names[i]->setText(programName); if (m_device->getKeyMappingForProgram(*it)) { getEntryButton(i)->setPixmap(keyPixmap); - QToolTip::add + TQToolTip::add (getEntryButton(i), i18n("Key Mapping: %1").arg( strtoqstr(m_device->getKeyMappingForProgram(*it)->getName()))); @@ -383,7 +383,7 @@ struct ProgramCmp }; void -MidiProgramsEditor::slotNameChanged(const QString& programName) +MidiProgramsEditor::slotNameChanged(const TQString& programName) { const KLineEdit* lineEdit = dynamic_cast<const KLineEdit*>(sender()); if (!lineEdit) { @@ -391,7 +391,7 @@ MidiProgramsEditor::slotNameChanged(const QString& programName) return ; } - QString senderName = sender()->name(); + TQString senderName = sender()->name(); // Adjust value back to zero rated // @@ -444,13 +444,13 @@ MidiProgramsEditor::slotNameChanged(const QString& programName) void MidiProgramsEditor::slotEntryButtonPressed() { - QPushButton* button = dynamic_cast<QPushButton*>(const_cast<QObject *>(sender())); + TQPushButton* button = dynamic_cast<TQPushButton*>(const_cast<TQObject *>(sender())); if (!button) { RG_DEBUG << "MidiProgramsEditor::slotEntryButtonPressed() : %%% ERROR - signal sender is not a QPushButton\n"; return ; } - QString senderName = button->name(); + TQString senderName = button->name(); if (!m_device) return ; @@ -474,12 +474,12 @@ MidiProgramsEditor::slotEntryButtonPressed() int currentEntry = 0; menu->insertItem(i18n("<no key mapping>"), this, - SLOT(slotEntryMenuItemSelected(int)), 0, 0); + TQT_SLOT(slotEntryMenuItemSelected(int)), 0, 0); menu->setItemParameter(0, 0); for (int i = 0; i < kml.size(); ++i) { menu->insertItem(strtoqstr(kml[i].getName()), - this, SLOT(slotEntryMenuItemSelected(int)), + this, TQT_SLOT(slotEntryMenuItemSelected(int)), 0, i + 1); menu->setItemParameter(i + 1, i + 1); if (currentMapping && (kml[i] == *currentMapping)) @@ -487,7 +487,7 @@ MidiProgramsEditor::slotEntryButtonPressed() } int itemHeight = menu->itemHeight(0) + 2; - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); pos.rx() -= 10; pos.ry() -= (itemHeight / 2 + currentEntry * itemHeight); @@ -521,23 +521,23 @@ MidiProgramsEditor::slotEntryMenuItemSelected(int i) } m_device->setKeyMappingForProgram(*program, newMapping); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); bool haveKeyMappings = (m_device->getKeyMappings().size() > 0); - QPushButton *btn = getEntryButton(m_currentMenuProgram); + TQPushButton *btn = getEntryButton(m_currentMenuProgram); if (newMapping.empty()) { - QString file = pixmapDir + "/toolbar/key-white.png"; - if (QFile(file).exists()) { - btn->setPixmap(QPixmap(file)); + TQString file = pixmapDir + "/toolbar/key-white.png"; + if (TQFile(file).exists()) { + btn->setPixmap(TQPixmap(file)); } - QToolTip::remove + TQToolTip::remove (btn); } else { - QString file = pixmapDir + "/toolbar/key-green.png"; - if (QFile(file).exists()) { - btn->setPixmap(QPixmap(file)); + TQString file = pixmapDir + "/toolbar/key-green.png"; + if (TQFile(file).exists()) { + btn->setPixmap(TQPixmap(file)); } - QToolTip::add + TQToolTip::add (btn, i18n("Key Mapping: %1").arg(strtoqstr(newMapping))); } btn->setEnabled(haveKeyMappings); @@ -607,16 +607,16 @@ MidiProgramsEditor::getProgram(const MidiBank &bank, int programNo) } void -MidiProgramsEditor::setBankName(const QString& s) +MidiProgramsEditor::setBankName(const TQString& s) { setTitle(s); } void MidiProgramsEditor::blockAllSignals(bool block) { - const QObjectList* allChildren = queryList("KLineEdit", "[0-9]+"); - QObjectListIt it(*allChildren); - QObject *obj; + const TQObjectList* allChildren = queryList("KLineEdit", "[0-9]+"); + TQObjectListIt it(*allChildren); + TQObject *obj; while ( (obj = it.current()) != 0 ) { obj->blockSignals(block); diff --git a/src/gui/studio/MidiProgramsEditor.h b/src/gui/studio/MidiProgramsEditor.h index d0ef565..64375cb 100644 --- a/src/gui/studio/MidiProgramsEditor.h +++ b/src/gui/studio/MidiProgramsEditor.h @@ -30,11 +30,11 @@ #include "NameSetEditor.h" -class QWidget; -class QString; -class QSpinBox; -class QListViewItem; -class QCheckBox; +class TQWidget; +class TQString; +class TQSpinBox; +class TQListViewItem; +class TQCheckBox; class BankList; @@ -51,11 +51,11 @@ class MidiProgramsEditor : public NameSetEditor Q_OBJECT public: MidiProgramsEditor(BankEditorDialog *bankEditor, - QWidget *parent, + TQWidget *parent, const char *name = 0); void clearAll(); - void populate(QListViewItem*); + void populate(TQListViewItem*); void reset(); public slots: @@ -66,7 +66,7 @@ public slots: void slotNewLSB(int value); void slotNewPercussion(); // gets value from checkbox - virtual void slotNameChanged(const QString &); + virtual void slotNameChanged(const TQString &); virtual void slotEntryButtonPressed(); void slotEntryMenuItemSelected(int); @@ -91,16 +91,16 @@ protected: // MidiProgram* getProgram(const MidiBank &bank, int program); - void setBankName(const QString& s); + void setBankName(const TQString& s); - virtual QWidget *makeAdditionalWidget(QWidget *parent); + virtual TQWidget *makeAdditionalWidget(TQWidget *parent); void blockAllSignals(bool block); //--------------- Data members --------------------------------- - QCheckBox *m_percussion; - QSpinBox *m_msb; - QSpinBox *m_lsb; + TQCheckBox *m_percussion; + TQSpinBox *m_msb; + TQSpinBox *m_lsb; MidiDevice *m_device; diff --git a/src/gui/studio/MixerWindow.cpp b/src/gui/studio/MixerWindow.cpp index 2a65024..d0c233a 100644 --- a/src/gui/studio/MixerWindow.cpp +++ b/src/gui/studio/MixerWindow.cpp @@ -30,25 +30,25 @@ #include "base/Studio.h" #include "document/RosegardenGUIDoc.h" #include <kmainwindow.h> -#include <qaccel.h> -#include <qwidget.h> +#include <tqaccel.h> +#include <tqwidget.h> namespace Rosegarden { -MixerWindow::MixerWindow(QWidget *parent, +MixerWindow::MixerWindow(TQWidget *parent, RosegardenGUIDoc *document) : KMainWindow(parent, "mixerwindow"), m_document(document), m_studio(&document->getStudio()), m_currentId(0) { - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } void -MixerWindow::closeEvent(QCloseEvent *e) +MixerWindow::closeEvent(TQCloseEvent *e) { RG_DEBUG << "MixerWindow::closeEvent()\n"; emit closing(); diff --git a/src/gui/studio/MixerWindow.h b/src/gui/studio/MixerWindow.h index 9e5f9cf..94d8bee 100644 --- a/src/gui/studio/MixerWindow.h +++ b/src/gui/studio/MixerWindow.h @@ -30,9 +30,9 @@ #include <kmainwindow.h> -class QWidget; -class QCloseEvent; -class QAccel; +class TQWidget; +class TQCloseEvent; +class TQAccel; namespace Rosegarden @@ -47,8 +47,8 @@ class MixerWindow: public KMainWindow Q_OBJECT public: - MixerWindow(QWidget *parent, RosegardenGUIDoc *document); - QAccel* getAccelerators() { return m_accelerators; } + MixerWindow(TQWidget *parent, RosegardenGUIDoc *document); + TQAccel* getAccelerators() { return m_accelerators; } signals: void closing(); @@ -58,7 +58,7 @@ protected slots: void slotClose(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); virtual void windowActivationChange(bool); virtual void sendControllerRefresh() = 0; @@ -67,7 +67,7 @@ protected: Studio *m_studio; InstrumentId m_currentId; - QAccel *m_accelerators; + TQAccel *m_accelerators; }; diff --git a/src/gui/studio/NameSetEditor.cpp b/src/gui/studio/NameSetEditor.cpp index 8dadd0c..6fa9bbe 100644 --- a/src/gui/studio/NameSetEditor.cpp +++ b/src/gui/studio/NameSetEditor.cpp @@ -29,87 +29,87 @@ #include <kglobalsettings.h> #include <klineedit.h> #include <klocale.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqwidget.h> #include <iostream> namespace Rosegarden { NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, - QString title, - QWidget* parent, + TQString title, + TQWidget* parent, const char* name, - QString headingPrefix, + TQString headingPrefix, bool showEntryButtons) - : QVGroupBox(title, parent, name), + : TQVGroupBox(title, parent, name), m_bankEditor(bankEditor), - m_mainFrame(new QFrame(this)) + m_mainFrame(new TQFrame(this)) { - m_mainLayout = new QGridLayout(m_mainFrame, + m_mainLayout = new TQGridLayout(m_mainFrame, 4, // rows 6, // cols 2); // margin // Librarian // - QGroupBox *groupBox = new QGroupBox(2, + TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal, i18n("Librarian"), m_mainFrame); m_mainLayout->addMultiCellWidget(groupBox, 0, 2, 3, 5); - new QLabel(i18n("Name"), groupBox); - m_librarian = new QLabel(groupBox); + new TQLabel(i18n("Name"), groupBox); + m_librarian = new TQLabel(groupBox); - new QLabel(i18n("Email"), groupBox); - m_librarianEmail = new QLabel(groupBox); + new TQLabel(i18n("Email"), groupBox); + m_librarianEmail = new TQLabel(groupBox); - QToolTip::add + TQToolTip::add (groupBox, i18n("The librarian maintains the Rosegarden device data for this device.\nIf you've made modifications to suit your own device, it might be worth\nliaising with the librarian in order to publish your information for the benefit\nof others.")); - QTabWidget* tabw = new QTabWidget(this); + TQTabWidget* tabw = new TQTabWidget(this); tabw->setMargin(10); - QHBox *h; - QVBox *v; - QHBox *numBox; + TQHBox *h; + TQVBox *v; + TQHBox *numBox; unsigned int tabs = 4; unsigned int cols = 2; unsigned int labelId = 0; for (unsigned int tab = 0; tab < tabs; ++tab) { - h = new QHBox(tabw); + h = new TQHBox(tabw); for (unsigned int col = 0; col < cols; ++col) { - v = new QVBox(h); + v = new TQVBox(h); for (unsigned int row = 0; row < 128 / (tabs*cols); ++row) { - numBox = new QHBox(v); - QString numberText = QString("%1").arg(labelId + 1); + numBox = new TQHBox(v); + TQString numberText = TQString("%1").arg(labelId + 1); if (tab == 0 && col == 0 && row == 0) { // Initial label; button to adjust whether labels start at 0 or 1 - m_initialLabel = new QPushButton(numberText, numBox); + m_initialLabel = new TQPushButton(numberText, numBox); connect(m_initialLabel, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(slotToggleInitialLabel())); + TQT_SLOT(slotToggleInitialLabel())); } else { - QLabel *label = new QLabel(numberText, numBox); + TQLabel *label = new TQLabel(numberText, numBox); label->setFixedWidth(40); label->setAlignment(AlignCenter); m_labels.push_back(label); @@ -118,12 +118,12 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, if (showEntryButtons) { - QPushButton *button = new QPushButton("", numBox, numberText); + TQPushButton *button = new TQPushButton("", numBox, numberText); button->setMaximumWidth(40); button->setMaximumHeight(20); button->setFlat(true); - connect(button, SIGNAL(clicked()), - this, SLOT(slotEntryButtonPressed())); + connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEntryButtonPressed())); m_entryButtons.push_back(button); } @@ -134,17 +134,17 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, m_names.push_back(lineEdit); connect(m_names[labelId], - SIGNAL(textChanged(const QString&)), + TQT_SIGNAL(textChanged(const TQString&)), this, - SLOT(slotNameChanged(const QString&))); + TQT_SLOT(slotNameChanged(const TQString&))); ++labelId; } } tabw->addTab(h, - (tab == 0 ? headingPrefix + QString(" %1 - %2") : - QString("%1 - %2")). + (tab == 0 ? headingPrefix + TQString(" %1 - %2") : + TQString("%1 - %2")). arg(tab * (128 / tabs) + 1). arg((tab + 1) * (128 / tabs))); } @@ -155,7 +155,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, void NameSetEditor::slotToggleInitialLabel() { - QString initial = m_initialLabel->text(); + TQString initial = m_initialLabel->text(); // strip some unrequested nice-ification.. urg! if (initial.startsWith("&")) { @@ -178,11 +178,11 @@ NameSetEditor::slotToggleInitialLabel() else index = 0; - m_initialLabel->setText(QString("%1").arg(index++)); - for (std::vector<QLabel*>::iterator it( m_labels.begin() ); + m_initialLabel->setText(TQString("%1").arg(index++)); + for (std::vector<TQLabel*>::iterator it( m_labels.begin() ); it != m_labels.end(); ++it) { - (*it)->setText(QString("%1").arg(index++)); + (*it)->setText(TQString("%1").arg(index++)); } } diff --git a/src/gui/studio/NameSetEditor.h b/src/gui/studio/NameSetEditor.h index e1e1476..8fd33ef 100644 --- a/src/gui/studio/NameSetEditor.h +++ b/src/gui/studio/NameSetEditor.h @@ -27,17 +27,17 @@ #define _RG_NAMESETEDITOR_H_ #include <kcompletion.h> -#include <qstring.h> -#include <qvgroupbox.h> +#include <tqstring.h> +#include <tqvgroupbox.h> #include <vector> -class QWidget; -class QPushButton; -class QListViewItem; -class QLabel; -class QGridLayout; -class QFrame; +class TQWidget; +class TQPushButton; +class TQListViewItem; +class TQLabel; +class TQGridLayout; +class TQFrame; class KLineEdit; @@ -53,35 +53,35 @@ class NameSetEditor : public QVGroupBox public: virtual void clearAll() = 0; - virtual void populate(QListViewItem *) = 0; + virtual void populate(TQListViewItem *) = 0; virtual void reset() = 0; public slots: - virtual void slotNameChanged(const QString&) = 0; + virtual void slotNameChanged(const TQString&) = 0; virtual void slotEntryButtonPressed() = 0; void slotToggleInitialLabel(); protected: NameSetEditor(BankEditorDialog *bankEditor, - QString title, - QWidget *parent, + TQString title, + TQWidget *parent, const char *name, - QString headingPrefix = "", + TQString headingPrefix = "", bool showEntryButtons = false); - QPushButton *getEntryButton(int n) { return m_entryButtons[n]; } - const QPushButton *getEntryButton(int n) const { return m_entryButtons[n]; } + TQPushButton *getEntryButton(int n) { return m_entryButtons[n]; } + const TQPushButton *getEntryButton(int n) const { return m_entryButtons[n]; } - QGridLayout *m_mainLayout; + TQGridLayout *m_mainLayout; BankEditorDialog* m_bankEditor; KCompletion m_completion; - QPushButton *m_initialLabel; - std::vector<QLabel*> m_labels; + TQPushButton *m_initialLabel; + std::vector<TQLabel*> m_labels; std::vector<KLineEdit*> m_names; - QFrame *m_mainFrame; - QLabel *m_librarian; - QLabel *m_librarianEmail; - std::vector<QPushButton *> m_entryButtons; + TQFrame *m_mainFrame; + TQLabel *m_librarian; + TQLabel *m_librarianEmail; + std::vector<TQPushButton *> m_entryButtons; }; diff --git a/src/gui/studio/RemapInstrumentDialog.cpp b/src/gui/studio/RemapInstrumentDialog.cpp index dae43da..a957650 100644 --- a/src/gui/studio/RemapInstrumentDialog.cpp +++ b/src/gui/studio/RemapInstrumentDialog.cpp @@ -39,43 +39,43 @@ #include <kcommand.h> #include <kdialogbase.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden { -RemapInstrumentDialog::RemapInstrumentDialog(QWidget *parent, +RemapInstrumentDialog::RemapInstrumentDialog(TQWidget *parent, RosegardenGUIDoc *doc): KDialogBase(parent, "", true, i18n("Remap Instrument assigments..."), Ok | Apply | Cancel), m_doc(doc) { - QVBox *vBox = makeVBoxMainWidget(); + TQVBox *vBox = makeVBoxMainWidget(); - m_buttonGroup = new QButtonGroup(1, Qt::Horizontal, + m_buttonGroup = new TQButtonGroup(1, Qt::Horizontal, i18n("Device or Instrument"), vBox); - new QLabel(i18n("Remap Tracks by all Instruments on a Device or by single Instrument"), m_buttonGroup); - m_deviceButton = new QRadioButton(i18n("Device"), m_buttonGroup); - m_instrumentButton = new QRadioButton(i18n("Instrument"), m_buttonGroup); + new TQLabel(i18n("Remap Tracks by all Instruments on a Device or by single Instrument"), m_buttonGroup); + m_deviceButton = new TQRadioButton(i18n("Device"), m_buttonGroup); + m_instrumentButton = new TQRadioButton(i18n("Instrument"), m_buttonGroup); - connect(m_buttonGroup, SIGNAL(released(int)), - this, SLOT(slotRemapReleased(int))); + connect(m_buttonGroup, TQT_SIGNAL(released(int)), + this, TQT_SLOT(slotRemapReleased(int))); - QGroupBox *groupBox = new QGroupBox(2, Qt::Horizontal, + TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal, i18n("Choose Source and Destination"), vBox); - new QLabel(i18n("From"), groupBox); - new QLabel(i18n("To"), groupBox); + new TQLabel(i18n("From"), groupBox); + new TQLabel(i18n("To"), groupBox); m_fromCombo = new KComboBox(groupBox); m_toCombo = new KComboBox(groupBox); diff --git a/src/gui/studio/RemapInstrumentDialog.h b/src/gui/studio/RemapInstrumentDialog.h index 669020e..c0cae3a 100644 --- a/src/gui/studio/RemapInstrumentDialog.h +++ b/src/gui/studio/RemapInstrumentDialog.h @@ -30,9 +30,9 @@ #include <kdialogbase.h> -class QWidget; -class QRadioButton; -class QButtonGroup; +class TQWidget; +class TQRadioButton; +class TQButtonGroup; class KCommand; class KComboBox; @@ -49,7 +49,7 @@ class RemapInstrumentDialog : public KDialogBase { Q_OBJECT public: - RemapInstrumentDialog(QWidget *parent, + RemapInstrumentDialog(TQWidget *parent, RosegardenGUIDoc *doc); void populateCombo(int id); @@ -67,10 +67,10 @@ protected: RosegardenGUIDoc *m_doc; - QRadioButton *m_deviceButton; - QRadioButton *m_instrumentButton; + TQRadioButton *m_deviceButton; + TQRadioButton *m_instrumentButton; - QButtonGroup *m_buttonGroup; + TQButtonGroup *m_buttonGroup; KComboBox *m_fromCombo; KComboBox *m_toCombo; diff --git a/src/gui/studio/StudioControl.cpp b/src/gui/studio/StudioControl.cpp index e94016a..6a4d643 100644 --- a/src/gui/studio/StudioControl.cpp +++ b/src/gui/studio/StudioControl.cpp @@ -36,9 +36,9 @@ #include "sound/MappedEvent.h" #include "sound/MappedInstrument.h" #include "sound/MappedStudio.h" -#include <qcstring.h> -#include <qdatastream.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqdatastream.h> +#include <tqstring.h> namespace Rosegarden @@ -50,10 +50,10 @@ StudioControl::createStudioObject(MappedObject::MappedObjectType type) Profiler profiler("StudioControl::createStudioObject", true); int value = -1; -QByteArray data; -QCString replyType; -QByteArray replyData; -QDataStream streamOut(data, IO_WriteOnly); +TQByteArray data; +TQCString replyType; +TQByteArray replyData; +TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)type; @@ -65,7 +65,7 @@ if (!rgapp->sequencerCall("createMappedObject(int)", << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> value; } @@ -78,10 +78,10 @@ StudioControl::destroyStudioObject(MappedObjectId id) Profiler profiler("StudioControl::destroyStudioObject", true); int value = 0; - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << int(id); @@ -91,7 +91,7 @@ StudioControl::destroyStudioObject(MappedObjectId id) << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> value; } @@ -109,21 +109,21 @@ StudioControl::getStudioObjectProperty(MappedObjectId id, MappedObjectPropertyList list; - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; - streamOut << QString(property); + streamOut << TQString(property); - if (!rgapp->sequencerCall("getPropertyList(int, QString)", + if (!rgapp->sequencerCall("getPropertyList(int, TQString)", replyType, replyData, data)) { SEQMAN_DEBUG << "getStudioObjectProperty - " << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> list; } @@ -137,14 +137,14 @@ StudioControl::setStudioObjectProperty(MappedObjectId id, { Profiler profiler("StudioControl::setStudioObjectProperty(float)", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; - streamOut << (QString)property; + streamOut << (TQString)property; streamOut << (float)value; - rgapp->sequencerSend("setMappedProperty(int, QString, float)", data); + rgapp->sequencerSend("setMappedProperty(int, TQString, float)", data); return true; } @@ -156,8 +156,8 @@ StudioControl::setStudioObjectProperties(const MappedObjectIdList &ids, { Profiler profiler("StudioControl::setStudioObjectProperties(floats)", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << ids; streamOut << properties; @@ -171,18 +171,18 @@ StudioControl::setStudioObjectProperties(const MappedObjectIdList &ids, bool StudioControl::setStudioObjectProperty(MappedObjectId id, const MappedObjectProperty &property, - const QString &value) + const TQString &value) { Profiler profiler("StudioControl::setStudioObjectProperty(string)", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; - streamOut << (QString)property; - streamOut << (QString)value; + streamOut << (TQString)property; + streamOut << (TQString)value; - rgapp->sequencerSend("setMappedProperty(int, QString, QString)", data); + rgapp->sequencerSend("setMappedProperty(int, TQString, TQString)", data); return true; } @@ -194,16 +194,16 @@ StudioControl::setStudioObjectPropertyList(MappedObjectId id, { Profiler profiler("StudioControl::setStudioObjectPropertyList", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; - streamOut << (QString)property; + streamOut << (TQString)property; streamOut << values; RG_DEBUG << "StudioControl::setStudioObjectPropertyList: " << values.size() << " values for property " << property << endl; - rgapp->sequencerSend("setMappedPropertyList(int, QString, MappedObjectPropertyList)", + rgapp->sequencerSend("setMappedPropertyList(int, TQString, MappedObjectPropertyList)", data); return true; @@ -215,10 +215,10 @@ StudioControl::getStudioObjectByType(MappedObject::MappedObjectType type) Profiler profiler("StudioControl::getStudioObjectByType", true); int value = -1; - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)type; @@ -228,7 +228,7 @@ StudioControl::getStudioObjectByType(MappedObject::MappedObjectType type) << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> value; } @@ -242,8 +242,8 @@ StudioControl::setStudioPluginPort(MappedObjectId pluginId, { Profiler profiler("StudioControl::setStudioPluginPort", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); // Use new MappedEvent interface // @@ -261,10 +261,10 @@ StudioControl::getStudioPluginPort(MappedObjectId pluginId, Profiler profiler("StudioControl::getStudioPluginPort", true); float value = 0.0; - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)pluginId; streamOut << (unsigned long)portId; @@ -275,7 +275,7 @@ StudioControl::getStudioPluginPort(MappedObjectId pluginId, << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> value; } @@ -287,9 +287,9 @@ StudioControl::getPluginInformation() { MappedObjectPropertyList list; - QByteArray data; - QCString replyType; - QByteArray replyData; + TQByteArray data; + TQCString replyType; + TQByteArray replyData; if (!rgapp->sequencerCall("getPluginInformation()", replyType, replyData, data)) { @@ -297,7 +297,7 @@ StudioControl::getPluginInformation() << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> list; } @@ -307,16 +307,16 @@ StudioControl::getPluginInformation() QString StudioControl::getPluginProgram(MappedObjectId id, int bank, int program) { - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; streamOut << (int)bank; streamOut << (int)program; - QString programName; + TQString programName; if (!rgapp->sequencerCall("getPluginProgram(int, int, int)", replyType, replyData, data)) { @@ -324,7 +324,7 @@ StudioControl::getPluginProgram(MappedObjectId id, int bank, int program) << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> programName; } @@ -332,25 +332,25 @@ StudioControl::getPluginProgram(MappedObjectId id, int bank, int program) } unsigned long -StudioControl::getPluginProgram(MappedObjectId id, QString name) +StudioControl::getPluginProgram(MappedObjectId id, TQString name) { - QByteArray data; - QCString replyType; - QByteArray replyData; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQCString replyType; + TQByteArray replyData; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; streamOut << name; unsigned long rv; - if (!rgapp->sequencerCall("getPluginProgram(int, QString)", + if (!rgapp->sequencerCall("getPluginProgram(int, TQString)", replyType, replyData, data)) { SEQMAN_DEBUG << "getPluginProgram - " << "failed to contact Rosegarden sequencer" << endl; } else { - QDataStream streamIn(replyData, IO_ReadOnly); + TQDataStream streamIn(replyData, IO_ReadOnly); streamIn >> rv; } @@ -363,8 +363,8 @@ StudioControl::connectStudioObjects(MappedObjectId id1, { Profiler profiler("StudioControl::connectStudioObjects", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id1; streamOut << (int)id2; @@ -384,8 +384,8 @@ StudioControl::disconnectStudioObjects(MappedObjectId id1, { Profiler profiler("StudioControl::disconnectStudioObjects", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id1; streamOut << (int)id2; @@ -404,8 +404,8 @@ StudioControl::disconnectStudioObject(MappedObjectId id) { Profiler profiler("StudioControl::disconnectStudioObject", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)id; @@ -443,14 +443,14 @@ StudioControl::sendMappedComposition(const MappedComposition &mC) if (mC.size() == 0) return ; - QCString replyType; - QByteArray replyData; + TQCString replyType; + TQByteArray replyData; MappedComposition::const_iterator it = mC.begin(); for (; it != mC.end(); it++) { - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (*it); rgapp->sequencerSend("processMappedEvent(MappedEvent)", data); @@ -462,8 +462,8 @@ StudioControl::sendMappedInstrument(const MappedInstrument &mI) { Profiler profiler("StudioControl::sendMappedInstrument", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (int)mI.getType(); streamOut << (unsigned char)mI.getChannel(); @@ -477,8 +477,8 @@ StudioControl::sendQuarterNoteLength(const RealTime &length) { Profiler profiler("StudioControl::sendQuarterNoteLength", true); - QByteArray data; - QDataStream streamOut(data, IO_WriteOnly); + TQByteArray data; + TQDataStream streamOut(data, IO_WriteOnly); streamOut << (long)length.sec; streamOut << (long)length.nsec; diff --git a/src/gui/studio/StudioControl.h b/src/gui/studio/StudioControl.h index cf05d44..c251cde 100644 --- a/src/gui/studio/StudioControl.h +++ b/src/gui/studio/StudioControl.h @@ -29,7 +29,7 @@ #include "base/MidiProgram.h" #include "sound/MappedCommon.h" #include "sound/MappedStudio.h" -#include <qstring.h> +#include <tqstring.h> class MappedObjectValueList; @@ -80,7 +80,7 @@ public: // static bool setStudioObjectProperty(MappedObjectId id, const MappedObjectProperty &property, - const QString &value); + const TQString &value); // Set a value to a string list // @@ -101,12 +101,12 @@ public: // Get program name for a given program // - static QString getPluginProgram(MappedObjectId, int bank, int program); + static TQString getPluginProgram(MappedObjectId, int bank, int program); // Get program numbers for a given name (rv is bank << 16 + program) // This is one of the nastiest hacks in the whole application // - static unsigned long getPluginProgram(MappedObjectId, QString name); + static unsigned long getPluginProgram(MappedObjectId, TQString name); // Connection // diff --git a/src/gui/studio/SynthPluginManagerDialog.cpp b/src/gui/studio/SynthPluginManagerDialog.cpp index f9a54ea..037fa3a 100644 --- a/src/gui/studio/SynthPluginManagerDialog.cpp +++ b/src/gui/studio/SynthPluginManagerDialog.cpp @@ -24,7 +24,7 @@ #include "SynthPluginManagerDialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -41,20 +41,20 @@ #include <kcombobox.h> #include <kmainwindow.h> #include <kstdaction.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, +SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, RosegardenGUIDoc *doc #ifdef HAVE_LIBLO , AudioPluginOSCGUIManager *guiManager @@ -70,16 +70,16 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, { setCaption(i18n("Manage Synth Plugins")); - QFrame *mainBox = new QFrame(this); + TQFrame *mainBox = new TQFrame(this); setCentralWidget(mainBox); - QVBoxLayout *mainLayout = new QVBoxLayout(mainBox, 10, 10); + TQVBoxLayout *mainLayout = new TQVBoxLayout(mainBox, 10, 10); - QGroupBox *groupBox = new QGroupBox(1, Horizontal, i18n("Synth plugins"), mainBox); + TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Synth plugins"), mainBox); mainLayout->addWidget(groupBox); - QFrame *pluginFrame = new QFrame(groupBox); - QGridLayout *pluginLayout = new QGridLayout(pluginFrame, 1, 4, 3, 3); + TQFrame *pluginFrame = new TQFrame(groupBox); + TQGridLayout *pluginLayout = new TQGridLayout(pluginFrame, 1, 4, 3, 3); m_synthPlugins.clear(); m_synthPlugins.push_back( -1); @@ -103,9 +103,9 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, if (!instrument) continue; - // pluginLayout->addWidget(new QLabel(instrument->getPresentationName().c_str(), + // pluginLayout->addWidget(new TQLabel(instrument->getPresentationName().c_str(), // pluginFrame), i, 0); - pluginLayout->addWidget(new QLabel(QString("%1").arg(i + 1), + pluginLayout->addWidget(new TQLabel(TQString("%1").arg(i + 1), pluginFrame), i, 0); AudioPluginInstance *plugin = instrument->getPlugin @@ -135,48 +135,48 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, } } - connect(pluginCombo, SIGNAL(activated(int)), - this, SLOT(slotPluginChanged(int))); + connect(pluginCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPluginChanged(int))); pluginLayout->addWidget(pluginCombo, i, 1); m_synthCombos.push_back(pluginCombo); - QPushButton *controlsButton = new QPushButton(i18n("Controls"), pluginFrame); + TQPushButton *controlsButton = new TQPushButton(i18n("Controls"), pluginFrame); pluginLayout->addWidget(controlsButton, i, 2); - connect(controlsButton, SIGNAL(clicked()), this, SLOT(slotControlsButtonClicked())); + connect(controlsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotControlsButtonClicked())); m_controlsButtons.push_back(controlsButton); #ifdef HAVE_LIBLO - QPushButton *guiButton = new QPushButton(i18n("Editor >>"), pluginFrame); + TQPushButton *guiButton = new TQPushButton(i18n("Editor >>"), pluginFrame); pluginLayout->addWidget(guiButton, i, 3); guiButton->setEnabled(m_guiManager->hasGUI (id, Instrument::SYNTH_PLUGIN_POSITION)); - connect(guiButton, SIGNAL(clicked()), this, SLOT(slotGUIButtonClicked())); + connect(guiButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGUIButtonClicked())); m_guiButtons.push_back(guiButton); #endif } - QFrame* btnBox = new QFrame(mainBox); + TQFrame* btnBox = new TQFrame(mainBox); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QPushButton *closeButton = new QPushButton(i18n("Close"), btnBox); + TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 0, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 0, 10); layout->addStretch(10); layout->addWidget(closeButton); layout->addSpacing(5); KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); closeButton->setText(close->text()); - connect(closeButton, SIGNAL(clicked()), this, SLOT(slotClose())); + connect(closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose())); mainLayout->addWidget(btnBox); @@ -224,7 +224,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, } void - SynthPluginManagerDialog::closeEvent(QCloseEvent *e) + SynthPluginManagerDialog::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -233,7 +233,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, void SynthPluginManagerDialog::slotGUIButtonClicked() { - const QObject *s = sender(); + const TQObject *s = sender(); int instrumentNo = -1; @@ -255,7 +255,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, void SynthPluginManagerDialog::slotControlsButtonClicked() { - const QObject *s = sender(); + const TQObject *s = sender(); int instrumentNo = -1; @@ -277,7 +277,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(QWidget *parent, void SynthPluginManagerDialog::slotPluginChanged(int index) { - const QObject *s = sender(); + const TQObject *s = sender(); RG_DEBUG << "SynthPluginManagerDialog::slotPluginChanged(" << index << ")" << endl; diff --git a/src/gui/studio/SynthPluginManagerDialog.h b/src/gui/studio/SynthPluginManagerDialog.h index b66a338..f58c07c 100644 --- a/src/gui/studio/SynthPluginManagerDialog.h +++ b/src/gui/studio/SynthPluginManagerDialog.h @@ -31,9 +31,9 @@ #include <vector> -class QWidget; -class QPushButton; -class QCloseEvent; +class TQWidget; +class TQPushButton; +class TQCloseEvent; class KComboBox; @@ -51,7 +51,7 @@ class SynthPluginManagerDialog : public KMainWindow Q_OBJECT public: - SynthPluginManagerDialog(QWidget *parent, + SynthPluginManagerDialog(TQWidget *parent, RosegardenGUIDoc *doc #ifdef HAVE_LIBLO , AudioPluginOSCGUIManager *guiManager @@ -65,7 +65,7 @@ public: signals: void closing(); void pluginSelected(InstrumentId, int pluginIndex, int plugin); - void showPluginDialog(QWidget *, InstrumentId, int pluginIndex); + void showPluginDialog(TQWidget *, InstrumentId, int pluginIndex); void showPluginGUI(InstrumentId, int pluginIndex); protected slots: @@ -75,7 +75,7 @@ protected slots: void slotGUIButtonClicked(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); protected: RosegardenGUIDoc *m_document; @@ -83,8 +83,8 @@ protected: AudioPluginManager *m_pluginManager; std::vector<int> m_synthPlugins; std::vector<KComboBox *> m_synthCombos; - std::vector<QPushButton *> m_controlsButtons; - std::vector<QPushButton *> m_guiButtons; + std::vector<TQPushButton *> m_controlsButtons; + std::vector<TQPushButton *> m_guiButtons; #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *m_guiManager; diff --git a/src/gui/studio/TimerCallbackAssistant.cpp b/src/gui/studio/TimerCallbackAssistant.cpp index ec8518c..7b2bc76 100644 --- a/src/gui/studio/TimerCallbackAssistant.cpp +++ b/src/gui/studio/TimerCallbackAssistant.cpp @@ -25,8 +25,8 @@ #include "TimerCallbackAssistant.h" -#include <qobject.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqtimer.h> namespace Rosegarden @@ -37,14 +37,14 @@ TimerCallbackAssistant::TimerCallbackAssistant(int ms, void (*callback)(void *da m_callback(callback), m_data(data) { - QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(slotCallback())); + TQTimer *timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCallback())); timer->start(ms, FALSE); } TimerCallbackAssistant::~TimerCallbackAssistant() { - // nothing -- the QTimer is deleted automatically by its parent QObject (me) + // nothing -- the TQTimer is deleted automatically by its parent TQObject (me) } void diff --git a/src/gui/studio/TimerCallbackAssistant.h b/src/gui/studio/TimerCallbackAssistant.h index 2a8e353..836db90 100644 --- a/src/gui/studio/TimerCallbackAssistant.h +++ b/src/gui/studio/TimerCallbackAssistant.h @@ -26,7 +26,7 @@ #ifndef _RG_TIMERCALLBACKASSISTANT_H_ #define _RG_TIMERCALLBACKASSISTANT_H_ -#include <qobject.h> +#include <tqobject.h> @@ -36,7 +36,7 @@ namespace Rosegarden /* This assistant class is here simply to work around the fact that - AudioPluginOSCGUI cannot be a QObject because it's only + AudioPluginOSCGUI cannot be a TQObject because it's only conditionally compiled. */ class TimerCallbackAssistant : public QObject diff --git a/src/gui/widgets/AudioFaderBox.cpp b/src/gui/widgets/AudioFaderBox.cpp index 05789ff..27980e7 100644 --- a/src/gui/widgets/AudioFaderBox.cpp +++ b/src/gui/widgets/AudioFaderBox.cpp @@ -24,7 +24,7 @@ #include "AudioFaderBox.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kstddirs.h> @@ -40,61 +40,61 @@ #include "gui/studio/AudioPluginOSCGUIManager.h" #include "Rotary.h" #include <kglobal.h> -#include <qframe.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> #include "VUMeter.h" namespace Rosegarden { -AudioFaderBox::AudioFaderBox(QWidget *parent, - QString id, +AudioFaderBox::AudioFaderBox(TQWidget *parent, + TQString id, bool haveInOut, const char *name): - QFrame(parent, name), - m_signalMapper(new QSignalMapper(this)), + TQFrame(parent, name), + m_signalMapper(new TQSignalMapper(this)), m_id(id), m_isStereo(false) { // Plugin box // - QPushButton *plugin; - QVBox *pluginVbox = 0; + TQPushButton *plugin; + TQVBox *pluginVbox = 0; - pluginVbox = new QVBox(this); + pluginVbox = new TQVBox(this); pluginVbox->setSpacing(2); for (int i = 0; i < 5; i++) { - plugin = new QPushButton(pluginVbox); + plugin = new TQPushButton(pluginVbox); plugin->setText(i18n("<no plugin>")); - QToolTip::add + TQToolTip::add (plugin, i18n("Audio plugin button")); m_plugins.push_back(plugin); m_signalMapper->setMapping(plugin, i); - connect(plugin, SIGNAL(clicked()), - m_signalMapper, SLOT(map())); + connect(plugin, TQT_SIGNAL(clicked()), + m_signalMapper, TQT_SLOT(map())); } - m_synthButton = new QPushButton(this); + m_synthButton = new TQPushButton(this); m_synthButton->setText(i18n("<no synth>")); - QToolTip::add + TQToolTip::add (m_synthButton, i18n("Synth plugin button")); // VU meter and fader // - QHBox *faderHbox = new QHBox(this); + TQHBox *faderHbox = new TQHBox(this); m_vuMeter = new AudioVUMeter(faderHbox, VUMeter::AudioPeakHoldShort, true, true); @@ -115,9 +115,9 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, m_fader->setOutlineColour(GUIPalette::getColour(GUIPalette::PlaybackFaderOutline)); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - m_monoPixmap.load(QString("%1/misc/mono.xpm").arg(pixmapDir)); - m_stereoPixmap.load(QString("%1/misc/stereo.xpm").arg(pixmapDir)); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + m_monoPixmap.load(TQString("%1/misc/mono.xpm").arg(pixmapDir)); + m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").arg(pixmapDir)); m_pan = new Rotary(this, -100.0, 100.0, 1.0, 5.0, 0.0, 22, Rotary::NoTicks, false, true); @@ -125,14 +125,14 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, // same as the knob colour on the MIDI pan m_pan->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPastelGreen)); - m_stereoButton = new QPushButton(this); + m_stereoButton = new TQPushButton(this); m_stereoButton->setPixmap(m_monoPixmap); // default is mono m_stereoButton->setFixedSize(24, 24); - connect(m_stereoButton, SIGNAL(clicked()), - this, SLOT(slotChannelStateChanged())); + connect(m_stereoButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChannelStateChanged())); - m_synthGUIButton = new QPushButton(this); + m_synthGUIButton = new TQPushButton(this); m_synthGUIButton->setText(i18n("Editor")); if (haveInOut) { @@ -149,28 +149,28 @@ AudioFaderBox::AudioFaderBox(QWidget *parent, m_audioOutput = 0; } - QToolTip::add + TQToolTip::add (m_pan, i18n("Set the audio pan position in the stereo field")); - QToolTip::add + TQToolTip::add (m_synthGUIButton, i18n("Open synth plugin's native editor")); - QToolTip::add + TQToolTip::add (m_stereoButton, i18n("Mono or Stereo Instrument")); - QToolTip::add + TQToolTip::add (m_recordFader, i18n("Record level")); - QToolTip::add + TQToolTip::add (m_fader, i18n("Playback level")); - QToolTip::add + TQToolTip::add (m_vuMeter, i18n("Audio level")); - QGridLayout *grid = new QGridLayout(this, 3, 6, 4, 4); + TQGridLayout *grid = new TQGridLayout(this, 3, 6, 4, 4); grid->addMultiCellWidget(m_synthButton, 0, 0, 0, 2); if (haveInOut) { - m_inputLabel = new QLabel(i18n("In:"), this); + m_inputLabel = new TQLabel(i18n("In:"), this); grid->addWidget(m_inputLabel, 0, 0, AlignRight); grid->addMultiCellWidget(m_audioInput->getWidget(), 0, 0, 1, 2); - m_outputLabel = new QLabel(i18n("Out:"), this); + m_outputLabel = new TQLabel(i18n("Out:"), this); grid->addWidget(m_outputLabel, 0, 3, AlignRight); grid->addMultiCellWidget(m_audioOutput->getWidget(), 0, 0, 4, 5); } @@ -241,7 +241,7 @@ AudioFaderBox::slotSetInstrument(Studio *studio, } bool -AudioFaderBox::owns(const QObject *object) +AudioFaderBox::owns(const TQObject *object) { return (object && ((object->parent() == this) || diff --git a/src/gui/widgets/AudioFaderBox.h b/src/gui/widgets/AudioFaderBox.h index 060fc9c..0c96b86 100644 --- a/src/gui/widgets/AudioFaderBox.h +++ b/src/gui/widgets/AudioFaderBox.h @@ -26,17 +26,17 @@ #ifndef _RG_AUDIOFADERBOX_H_ #define _RG_AUDIOFADERBOX_H_ -#include <qframe.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqstring.h> #include <vector> -class QWidget; -class QSignalMapper; -class QPushButton; -class QObject; -class QLabel; +class TQWidget; +class TQSignalMapper; +class TQPushButton; +class TQObject; +class TQLabel; namespace Rosegarden @@ -55,8 +55,8 @@ class AudioFaderBox : public QFrame Q_OBJECT public: - AudioFaderBox(QWidget *parent, - QString id = "", + AudioFaderBox(TQWidget *parent, + TQString id = "", bool haveInOut = true, const char *name = 0); @@ -64,10 +64,10 @@ public: void setIsSynth(bool); - bool owns(const QObject *object); + bool owns(const TQObject *object); - QPushButton *m_synthButton; - std::vector<QPushButton*> m_plugins; + TQPushButton *m_synthButton; + std::vector<TQPushButton*> m_plugins; AudioVUMeter *m_vuMeter; @@ -75,20 +75,20 @@ public: Fader *m_recordFader; Rotary *m_pan; - QPixmap m_monoPixmap; - QPixmap m_stereoPixmap; + TQPixmap m_monoPixmap; + TQPixmap m_stereoPixmap; - QSignalMapper *m_signalMapper; + TQSignalMapper *m_signalMapper; - QLabel *m_inputLabel; - QLabel *m_outputLabel; + TQLabel *m_inputLabel; + TQLabel *m_outputLabel; AudioRouteMenu *m_audioInput; AudioRouteMenu *m_audioOutput; - QPushButton *m_synthGUIButton; + TQPushButton *m_synthGUIButton; - QString m_id; + TQString m_id; bool isStereo() const { return m_isStereo; } @@ -103,7 +103,7 @@ protected slots: void slotChannelStateChanged(); protected: - QPushButton *m_stereoButton; + TQPushButton *m_stereoButton; bool m_isStereo; }; diff --git a/src/gui/widgets/AudioListItem.h b/src/gui/widgets/AudioListItem.h index bbd8fc2..410c374 100644 --- a/src/gui/widgets/AudioListItem.h +++ b/src/gui/widgets/AudioListItem.h @@ -47,7 +47,7 @@ public: m_segment(0) {;} AudioListItem(KListView *parent, - QString label, + TQString label, AudioFileId id): KListViewItem(parent, label, @@ -56,7 +56,7 @@ public: m_segment(0) {;} AudioListItem(KListViewItem *parent, - QString label, + TQString label, AudioFileId id): KListViewItem(parent, label, diff --git a/src/gui/widgets/AudioListView.cpp b/src/gui/widgets/AudioListView.cpp index 45193a6..3c75526 100644 --- a/src/gui/widgets/AudioListView.cpp +++ b/src/gui/widgets/AudioListView.cpp @@ -27,11 +27,11 @@ #include "misc/Debug.h" #include "gui/widgets/AudioListItem.h" -#include "qdragobject.h" +#include "tqdragobject.h" namespace Rosegarden { -AudioListView::AudioListView(QWidget *parent, const char *name) +AudioListView::AudioListView(TQWidget *parent, const char *name) : KListView(parent, name) { setDragEnabled(true); @@ -39,17 +39,17 @@ AudioListView::AudioListView(QWidget *parent, const char *name) setDropVisualizer(false); } -bool AudioListView::acceptDrag(QDropEvent* e) const +bool AudioListView::acceptDrag(TQDropEvent* e) const { - return QUriDrag::canDecode(e) || KListView::acceptDrag(e); + return TQUriDrag::canDecode(e) || KListView::acceptDrag(e); } -QDragObject* AudioListView::dragObject() +TQDragObject* AudioListView::dragObject() { AudioListItem* item = dynamic_cast<AudioListItem*>(currentItem()); - QString audioData; - QTextOStream ts(&audioData); + TQString audioData; + TQTextOStream ts(&audioData); ts << "AudioFileManager\n" << item->getId() << '\n' << item->getStartTime().sec << '\n' @@ -61,7 +61,7 @@ QDragObject* AudioListView::dragObject() << "file id = " << item->getId() << ", start time = " << item->getStartTime() << endl; - return new QTextDrag(audioData, this); + return new TQTextDrag(audioData, this); } } diff --git a/src/gui/widgets/AudioListView.h b/src/gui/widgets/AudioListView.h index 477054a..04c293e 100644 --- a/src/gui/widgets/AudioListView.h +++ b/src/gui/widgets/AudioListView.h @@ -32,11 +32,11 @@ namespace Rosegarden { class AudioListView : public KListView { public: - AudioListView(QWidget *parent = 0, const char *name = 0); + AudioListView(TQWidget *parent = 0, const char *name = 0); protected: - bool acceptDrag(QDropEvent* e) const; - virtual QDragObject* dragObject(); + bool acceptDrag(TQDropEvent* e) const; + virtual TQDragObject* dragObject(); }; } diff --git a/src/gui/widgets/AudioRouteMenu.cpp b/src/gui/widgets/AudioRouteMenu.cpp index 6f4c93f..0cdc889 100644 --- a/src/gui/widgets/AudioRouteMenu.cpp +++ b/src/gui/widgets/AudioRouteMenu.cpp @@ -34,22 +34,22 @@ #include "sound/MappedStudio.h" #include <kcombobox.h> #include <klocale.h> -#include <qcursor.h> -#include <qobject.h> -#include <qpoint.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqobject.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -AudioRouteMenu::AudioRouteMenu(QWidget *par, +AudioRouteMenu::AudioRouteMenu(TQWidget *par, Direction direction, Format format, Studio *studio, Instrument *instrument) : - QObject(par), + TQObject(par), m_studio(studio), m_instrument(instrument), m_direction(direction), @@ -60,15 +60,15 @@ AudioRouteMenu::AudioRouteMenu(QWidget *par, case Compact: { m_combo = 0; m_button = new WheelyButton(par); - connect(m_button, SIGNAL(wheel(bool)), this, SLOT(slotWheel(bool))); - connect(m_button, SIGNAL(clicked()), this, SLOT(slotShowMenu())); + connect(m_button, TQT_SIGNAL(wheel(bool)), this, TQT_SLOT(slotWheel(bool))); + connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowMenu())); break; } case Regular: { m_button = 0; m_combo = new KComboBox(par); - connect(m_combo, SIGNAL(activated(int)), this, SLOT(slotEntrySelected(int))); + connect(m_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEntrySelected(int))); break; } @@ -77,7 +77,7 @@ AudioRouteMenu::AudioRouteMenu(QWidget *par, slotRepopulate(); } -QWidget * +TQWidget * AudioRouteMenu::getWidget() { if (m_button) @@ -133,17 +133,17 @@ AudioRouteMenu::slotShowMenu() if (getNumEntries() == 0) return ; - RosegardenPopupMenu *menu = new RosegardenPopupMenu((QWidget *)parent()); + RosegardenPopupMenu *menu = new RosegardenPopupMenu((TQWidget *)parent()); for (int i = 0; i < getNumEntries(); ++i) { - menu->insertItem(getEntryText(i), this, SLOT(slotEntrySelected(int)), + menu->insertItem(getEntryText(i), this, TQT_SLOT(slotEntrySelected(int)), 0, i); menu->setItemParameter(i, i); } int itemHeight = menu->itemHeight(0) + 2; - QPoint pos = QCursor::pos(); + TQPoint pos = TQCursor::pos(); pos.rx() -= 10; pos.ry() -= (itemHeight / 2 + getCurrentEntry() * itemHeight); @@ -261,7 +261,7 @@ AudioRouteMenu::getEntryText(int entry) return i18n("Sub %1").arg(entry); } - return QString(); + return TQString(); } void diff --git a/src/gui/widgets/AudioRouteMenu.h b/src/gui/widgets/AudioRouteMenu.h index 259da68..659a57b 100644 --- a/src/gui/widgets/AudioRouteMenu.h +++ b/src/gui/widgets/AudioRouteMenu.h @@ -26,11 +26,11 @@ #ifndef _RG_AUDIOROUTEMENU_H_ #define _RG_AUDIOROUTEMENU_H_ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> -class QWidget; +class TQWidget; class KComboBox; @@ -50,13 +50,13 @@ public: enum Direction { In, Out }; enum Format { Compact, Regular }; - AudioRouteMenu(QWidget *parent, + AudioRouteMenu(TQWidget *parent, Direction direction, Format format, Studio *studio = 0, Instrument *instrument = 0); - QWidget *getWidget(); + TQWidget *getWidget(); public slots: void slotRepopulate(); @@ -83,7 +83,7 @@ private: int getNumEntries(); int getCurrentEntry(); // for instrument - QString getEntryText(int n); + TQString getEntryText(int n); }; diff --git a/src/gui/widgets/AudioVUMeter.cpp b/src/gui/widgets/AudioVUMeter.cpp index 4c15a07..d881818 100644 --- a/src/gui/widgets/AudioVUMeter.cpp +++ b/src/gui/widgets/AudioVUMeter.cpp @@ -26,25 +26,25 @@ #include "AudioVUMeter.h" #include "gui/rulers/VelocityColour.h" -#include <qcolor.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwidget.h> #include "VUMeter.h" namespace Rosegarden { -AudioVUMeter::AudioVUMeter(QWidget *parent, +AudioVUMeter::AudioVUMeter(TQWidget *parent, VUMeter::VUMeterType type, bool stereo, bool hasRecord, int width, int height, const char *name) : - QWidget(parent, name), + TQWidget(parent, name), m_stereo(stereo) { setBackgroundMode(Qt::NoBackground); @@ -73,9 +73,9 @@ AudioVUMeter::AudioVUMeter(QWidget *parent, } void -AudioVUMeter::paintEvent(QPaintEvent *e) +AudioVUMeter::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setPen(colorGroup().mid()); paint.drawRect(0, 0, width(), height()); @@ -90,7 +90,7 @@ AudioVUMeter::paintEvent(QPaintEvent *e) m_meter->paintEvent(e); } -AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(QWidget *parent, +AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, diff --git a/src/gui/widgets/AudioVUMeter.h b/src/gui/widgets/AudioVUMeter.h index cff7c27..e59014d 100644 --- a/src/gui/widgets/AudioVUMeter.h +++ b/src/gui/widgets/AudioVUMeter.h @@ -26,11 +26,11 @@ #ifndef _RG_AUDIOVUMETER_H_ #define _RG_AUDIOVUMETER_H_ -#include <qwidget.h> +#include <tqwidget.h> #include "VUMeter.h" -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -41,7 +41,7 @@ namespace Rosegarden class AudioVUMeter : public QWidget { public: - AudioVUMeter(QWidget *parent = 0, + AudioVUMeter(TQWidget *parent = 0, VUMeter::VUMeterType type = VUMeter::AudioPeakHoldShort, bool stereo = true, bool hasRecord = false, @@ -63,13 +63,13 @@ public: m_meter->setRecordLevel(dBleft, dBright); } - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); protected: class AudioVUMeterImpl : public VUMeter { public: - AudioVUMeterImpl(QWidget *parent, + AudioVUMeterImpl(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, diff --git a/src/gui/widgets/BigArrowButton.h b/src/gui/widgets/BigArrowButton.h index 505e374..7adfb9b 100644 --- a/src/gui/widgets/BigArrowButton.h +++ b/src/gui/widgets/BigArrowButton.h @@ -32,13 +32,13 @@ namespace Rosegarden { class BigArrowButton : public KArrowButton { public: - BigArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, + BigArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0) : KArrowButton(parent, arrow, name) { } virtual ~BigArrowButton() { } - virtual QSize sizeHint() const { - return QSize(20, 20); + virtual TQSize sizeHint() const { + return TQSize(20, 20); } }; diff --git a/src/gui/widgets/CollapsingFrame.cpp b/src/gui/widgets/CollapsingFrame.cpp index 1f71ebf..fdc351b 100644 --- a/src/gui/widgets/CollapsingFrame.cpp +++ b/src/gui/widgets/CollapsingFrame.cpp @@ -28,43 +28,43 @@ #include <kstddirs.h> #include <kconfig.h> #include <kglobal.h> -#include <qfont.h> -#include <qframe.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqwidget.h> #include <cassert> namespace Rosegarden { -CollapsingFrame::CollapsingFrame(QString label, QWidget *parent, const char *n) : - QFrame(parent, n), +CollapsingFrame::CollapsingFrame(TQString label, TQWidget *parent, const char *n) : + TQFrame(parent, n), m_widget(0), m_fill(false), m_collapsed(false) { - m_layout = new QGridLayout(this, 3, 3, 0, 0); + m_layout = new TQGridLayout(this, 3, 3, 0, 0); - m_toggleButton = new QToolButton(this); + m_toggleButton = new TQToolButton(this); m_toggleButton->setTextLabel(label); m_toggleButton->setUsesTextLabel(true); m_toggleButton->setUsesBigPixmap(false); - m_toggleButton->setTextPosition(QToolButton::BesideIcon); + m_toggleButton->setTextPosition(TQToolButton::BesideIcon); m_toggleButton->setAutoRaise(true); - QFont font(m_toggleButton->font()); + TQFont font(m_toggleButton->font()); font.setBold(true); m_toggleButton->setFont(font); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QPixmap pixmap(pixmapDir + "/misc/arrow-expanded.png"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQPixmap pixmap(pixmapDir + "/misc/arrow-expanded.png"); m_toggleButton->setIconSet(pixmap); - connect(m_toggleButton, SIGNAL(clicked()), this, SLOT(toggle())); + connect(m_toggleButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggle())); m_layout->addMultiCellWidget(m_toggleButton, 0, 0, 0, 2); } @@ -85,13 +85,13 @@ CollapsingFrame::font() const } void -CollapsingFrame::setFont(QFont font) +CollapsingFrame::setFont(TQFont font) { m_toggleButton->setFont(font); } void -CollapsingFrame::setWidget(QWidget *widget) +CollapsingFrame::setWidget(TQWidget *widget) { assert(!m_widget); m_widget = widget; @@ -104,7 +104,7 @@ CollapsingFrame::setWidget(QWidget *widget) bool expanded = true; if (name(0)) { KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); expanded = config->readBoolEntry(name(), true); config->setGroup(groupTemp); @@ -122,18 +122,18 @@ CollapsingFrame::toggle() m_widget->setShown(!m_collapsed); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QPixmap pixmap; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQPixmap pixmap; if (m_collapsed) { - pixmap = QPixmap(pixmapDir + "/misc/arrow-contracted.png"); + pixmap = TQPixmap(pixmapDir + "/misc/arrow-contracted.png"); } else { - pixmap = QPixmap(pixmapDir + "/misc/arrow-expanded.png"); + pixmap = TQPixmap(pixmapDir + "/misc/arrow-expanded.png"); } if (name(0)) { KConfig *config = kapp->config(); - QString groupTemp = config->group(); + TQString groupTemp = config->group(); config->setGroup("CollapsingFrame"); config->writeEntry(name(), !m_collapsed); config->setGroup(groupTemp); diff --git a/src/gui/widgets/CollapsingFrame.h b/src/gui/widgets/CollapsingFrame.h index 780a8b1..bdce001 100644 --- a/src/gui/widgets/CollapsingFrame.h +++ b/src/gui/widgets/CollapsingFrame.h @@ -26,13 +26,13 @@ #ifndef _RG_COLLAPSINGFRAME_H_ #define _RG_COLLAPSINGFRAME_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> -class QWidget; -class QToolButton; -class QGridLayout; +class TQWidget; +class TQToolButton; +class TQGridLayout; namespace Rosegarden @@ -45,25 +45,25 @@ class CollapsingFrame : public QFrame Q_OBJECT public: - CollapsingFrame(QString label, QWidget *parent = 0, const char *name = 0); + CollapsingFrame(TQString label, TQWidget *parent = 0, const char *name = 0); virtual ~CollapsingFrame(); - QFont font() const; - void setFont(QFont font); + TQFont font() const; + void setFont(TQFont font); /// If true, the widget fills the available space. Call before setWidget void setWidgetFill(bool fill); /// This frame contains a single other widget. Set it here. - void setWidget(QWidget *w); + void setWidget(TQWidget *w); public slots: void toggle(); protected: - QGridLayout *m_layout; - QToolButton *m_toggleButton; - QWidget *m_widget; + TQGridLayout *m_layout; + TQToolButton *m_toggleButton; + TQWidget *m_widget; bool m_fill; bool m_collapsed; }; diff --git a/src/gui/widgets/ColourTable.cpp b/src/gui/widgets/ColourTable.cpp index c5fcfc6..2cceca4 100644 --- a/src/gui/widgets/ColourTable.cpp +++ b/src/gui/widgets/ColourTable.cpp @@ -32,27 +32,27 @@ #include "gui/general/GUIPalette.h" #include <kcolordialog.h> #include <klineeditdlg.h> -#include <qcolor.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtable.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtable.h> +#include <tqwidget.h> namespace Rosegarden { ColourTable::ColourTable -(QWidget *parent, ColourMap &input, ColourList &list) - : QTable(1, 2, parent, "RColourTable") +(TQWidget *parent, ColourMap &input, ColourList &list) + : TQTable(1, 2, parent, "RColourTable") { setSorting(FALSE); - setSelectionMode(QTable::SingleRow); + setSelectionMode(TQTable::SingleRow); horizontalHeader()->setLabel(0, i18n("Name")); horizontalHeader()->setLabel(1, i18n("Color")); populate_table(input, list); - connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)), - SLOT(slotEditEntry(int, int))); + connect(this, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint&)), + TQT_SLOT(slotEditEntry(int, int))); } @@ -65,7 +65,7 @@ ColourTable::slotEditEntry(int row, int col) if (row == 0) return ; bool ok = false; - QString newName = KLineEditDlg::getText(i18n("Modify Color Name"), i18n("Enter new name"), + TQString newName = KLineEditDlg::getText(i18n("Modify Color Name"), i18n("Enter new name"), item(row, col)->text(), &ok); if ((ok == true) && (!newName.isEmpty())) { @@ -75,7 +75,7 @@ ColourTable::slotEditEntry(int row, int col) } break; case 1: { - QColor temp = m_colours[row]; + TQColor temp = m_colours[row]; KColorDialog box(this, "", true); int result = box.getColor(temp); @@ -98,7 +98,7 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) m_colours.reserve(input.size()); setNumRows(input.size()); - QString name; + TQString name; unsigned int i = 0; @@ -108,9 +108,9 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) else name = strtoqstr(it->second.second); - QTableItem *text = new QTableItem( - dynamic_cast<QTable*>(this), - QTableItem::Never, name); + TQTableItem *text = new TQTableItem( + dynamic_cast<TQTable*>(this), + TQTableItem::Never, name); setItem(i, 0, text); @@ -120,7 +120,7 @@ ColourTable::populate_table(ColourMap &input, ColourList &list) ColourTableItem *temp = new ColourTableItem(this, m_colours[i]); setItem(i, 1, temp); - verticalHeader()->setLabel(i, QString::number(it->first)); + verticalHeader()->setLabel(i, TQString::number(it->first)); ++i; } diff --git a/src/gui/widgets/ColourTable.h b/src/gui/widgets/ColourTable.h index 48e2309..b1e470a 100644 --- a/src/gui/widgets/ColourTable.h +++ b/src/gui/widgets/ColourTable.h @@ -30,11 +30,11 @@ #define _RG_ROSEGARDENCOLOURTABLE_H_ #include <map> -#include <qtable.h> +#include <tqtable.h> #include <vector> -class QWidget; +class TQWidget; class ColourList; @@ -50,19 +50,19 @@ class ColourTable : public QTable public: typedef std::map<unsigned int, unsigned int, std::less<unsigned int> > ColourList; - ColourTable(QWidget *parent, ColourMap &input, ColourList &list); + ColourTable(TQWidget *parent, ColourMap &input, ColourList &list); void populate_table(ColourMap &input, ColourList &list); signals: - void entryTextChanged(unsigned int, QString); - void entryColourChanged(unsigned int, QColor); + void entryTextChanged(unsigned int, TQString); + void entryColourChanged(unsigned int, TQColor); public slots: void slotEditEntry (int, int); protected: - std::vector<QColor> m_colours; + std::vector<TQColor> m_colours; }; diff --git a/src/gui/widgets/ColourTableItem.cpp b/src/gui/widgets/ColourTableItem.cpp index 3dfbd87..370ff36 100644 --- a/src/gui/widgets/ColourTableItem.cpp +++ b/src/gui/widgets/ColourTableItem.cpp @@ -25,28 +25,28 @@ #include "ColourTableItem.h" -#include <qcolor.h> -#include <qpainter.h> -#include <qrect.h> -#include <qtable.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqtable.h> namespace Rosegarden { void -ColourTableItem::setColor(QColor &input) +ColourTableItem::setColor(TQColor &input) { currentColour = input; } void -ColourTableItem::paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected) +ColourTableItem::paint(TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected) { - QColorGroup g(cg); - g.setColor(QColorGroup::Base, currentColour); + TQColorGroup g(cg); + g.setColor(TQColorGroup::Base, currentColour); selected = false; - QTableItem::paint(p, g, cr, selected); + TQTableItem::paint(p, g, cr, selected); } } diff --git a/src/gui/widgets/ColourTableItem.h b/src/gui/widgets/ColourTableItem.h index a8c906e..fb5b417 100644 --- a/src/gui/widgets/ColourTableItem.h +++ b/src/gui/widgets/ColourTableItem.h @@ -26,13 +26,13 @@ #ifndef _RG_ROSEGARDENCOLOURTABLEITEM_H_ #define _RG_ROSEGARDENCOLOURTABLEITEM_H_ -#include <qcolor.h> -#include <qtable.h> +#include <tqcolor.h> +#include <tqtable.h> -class QTable; -class QRect; -class QPainter; -class QColorGroup; +class TQTable; +class TQRect; +class TQPainter; +class TQColorGroup; namespace Rosegarden @@ -43,14 +43,14 @@ namespace Rosegarden class ColourTableItem : public QTableItem { public: - ColourTableItem(QTable *t, const QColor &input) - : QTableItem(t, QTableItem::Never, ""), + ColourTableItem(TQTable *t, const TQColor &input) + : TQTableItem(t, TQTableItem::Never, ""), currentColour(input) {} - void setColor(QColor &input); - void paint(QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected); + void setColor(TQColor &input); + void paint(TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected); protected: - QColor currentColour; + TQColor currentColour; }; diff --git a/src/gui/widgets/CurrentProgressDialog.cpp b/src/gui/widgets/CurrentProgressDialog.cpp index 2e3735f..fe5b5df 100644 --- a/src/gui/widgets/CurrentProgressDialog.cpp +++ b/src/gui/widgets/CurrentProgressDialog.cpp @@ -26,7 +26,7 @@ #include "CurrentProgressDialog.h" #include "ProgressDialog.h" -#include <qobject.h> +#include <tqobject.h> namespace Rosegarden @@ -56,8 +56,8 @@ CurrentProgressDialog::set(ProgressDialog* d) m_currentProgressDialog = d; // this lets the progress dialog deregister itself when it's deleted - connect(d, SIGNAL(destroyed()), - getInstance(), SLOT(slotCurrentProgressDialogDestroyed())); + connect(d, TQT_SIGNAL(destroyed()), + getInstance(), TQT_SLOT(slotCurrentProgressDialogDestroyed())); } void CurrentProgressDialog::freeze() diff --git a/src/gui/widgets/CurrentProgressDialog.h b/src/gui/widgets/CurrentProgressDialog.h index d0eea2e..2ca0838 100644 --- a/src/gui/widgets/CurrentProgressDialog.h +++ b/src/gui/widgets/CurrentProgressDialog.h @@ -26,7 +26,7 @@ #ifndef _RG_CURRENTPROGRESSDIALOG_H_ #define _RG_CURRENTPROGRESSDIALOG_H_ -#include <qobject.h> +#include <tqobject.h> @@ -64,8 +64,8 @@ public slots: void slotCurrentProgressDialogDestroyed(); protected: - CurrentProgressDialog(QObject* parent, const char* name = 0) - : QObject(parent, name) {} + CurrentProgressDialog(TQObject* parent, const char* name = 0) + : TQObject(parent, name) {} //--------------- Data members --------------------------------- static CurrentProgressDialog* m_instance; diff --git a/src/gui/widgets/DiatonicPitchChooser.cpp b/src/gui/widgets/DiatonicPitchChooser.cpp index 95b8b3a..6a1b8ab 100644 --- a/src/gui/widgets/DiatonicPitchChooser.cpp +++ b/src/gui/widgets/DiatonicPitchChooser.cpp @@ -32,27 +32,27 @@ #include "gui/general/MidiPitchLabel.h" #include "PitchDragLabel.h" #include <kcombobox.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -DiatonicPitchChooser::DiatonicPitchChooser(QString title, - QWidget *parent, +DiatonicPitchChooser::DiatonicPitchChooser(TQString title, + TQWidget *parent, int defaultNote, int defaultPitch, int defaultOctave) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); hbox->setSpacing(6); m_step = new KComboBox( hbox ); @@ -87,45 +87,45 @@ DiatonicPitchChooser::DiatonicPitchChooser(QString title, m_accidental->insertItem(i18n("double sharp")); m_accidental->setCurrentItem(2); // default: natural - m_pitchLabel = new QLabel(QString("%1").arg(getPitch()), hbox); + m_pitchLabel = new TQLabel(TQString("%1").arg(getPitch()), hbox); m_pitchLabel->setMinimumWidth(40); - connect(m_accidental, SIGNAL(activated(int)), - this, SLOT(slotSetAccidental(int))); + connect(m_accidental, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetAccidental(int))); - connect(m_octave, SIGNAL(activated(int)), - this, SLOT(slotSetOctave(int))); + connect(m_octave, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetOctave(int))); - connect(m_step, SIGNAL(activated(int)), - this, SLOT(slotSetStep(int))); + connect(m_step, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetStep(int))); - //connect(m_pitch, SIGNAL(valueChanged(int)), - // this, SIGNAL(pitchChanged(int))); + //connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + // this, TQT_SIGNAL(pitchChanged(int))); - //connect(m_pitch, SIGNAL(valueChanged(int)), - // this, SIGNAL(preview(int))); + //connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + // this, TQT_SIGNAL(preview(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int,int,int)), - this, SLOT(slotSetNote(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int,int,int)), + this, TQT_SLOT(slotSetNote(int,int,int))); - //connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - // this, SLOT(slotSetPitch(int))); + //connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + // this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int,int,int)), - this, SLOT(slotSetNote(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int,int,int)), + this, TQT_SLOT(slotSetNote(int,int,int))); - //connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - // this, SIGNAL(pitchChanged(int))); + //connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + // this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int,int,int)), - this, SIGNAL(noteChanged(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int,int,int)), + this, TQT_SIGNAL(noteChanged(int,int,int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int,int,int)), - this, SIGNAL(noteChanged(int,int,int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int,int,int)), + this, TQT_SIGNAL(noteChanged(int,int,int))); - connect(m_pitchDragLabel, SIGNAL(preview(int)), - this, SIGNAL(preview(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(preview(int)), + this, TQT_SIGNAL(preview(int))); } @@ -157,7 +157,7 @@ DiatonicPitchChooser::slotSetPitch(int pitch) m_accidental->setCurrentItem(pitchChange + 2); - m_pitchLabel->setText(QString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").arg(pitch)); update(); } @@ -199,7 +199,7 @@ DiatonicPitchChooser::setLabelsIfNeeded() //{ m_pitchDragLabel->slotSetPitch(getPitch(), m_octave->currentItem(), m_step->currentItem()); //} - m_pitchLabel->setText(QString("%1").arg(getPitch())); + m_pitchLabel->setText(TQString("%1").arg(getPitch())); } void @@ -217,7 +217,7 @@ DiatonicPitchChooser::slotSetNote(int pitch, int octave, int step) m_accidental->setCurrentItem(pitchOffset + 2); //MidiPitchLabel pl(p); - m_pitchLabel->setText(QString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").arg(pitch)); update(); } diff --git a/src/gui/widgets/DiatonicPitchChooser.h b/src/gui/widgets/DiatonicPitchChooser.h index 8e5b20d..bf20539 100644 --- a/src/gui/widgets/DiatonicPitchChooser.h +++ b/src/gui/widgets/DiatonicPitchChooser.h @@ -26,14 +26,14 @@ #ifndef _RG_ROSEGARDENDIATONICPITCHCHOOSER_H_ #define _RG_ROSEGARDENDIATONICPITCHCHOOSER_H_ -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> -class QWidget; -class QSpinBox; -class QComboBox; -class QLabel; +class TQWidget; +class TQSpinBox; +class TQComboBox; +class TQLabel; namespace Rosegarden @@ -46,8 +46,8 @@ class DiatonicPitchChooser : public QGroupBox { Q_OBJECT public: - DiatonicPitchChooser(QString title, - QWidget *parent, + DiatonicPitchChooser(TQString title, + TQWidget *parent, int defaultNote = 0, int defaultPitch = 60, int defaultOctave = 5); @@ -86,11 +86,11 @@ protected: PitchDragLabel *m_pitchDragLabel; - QComboBox *m_step; - QComboBox *m_accidental; - QComboBox *m_octave; + TQComboBox *m_step; + TQComboBox *m_accidental; + TQComboBox *m_octave; - QLabel *m_pitchLabel; + TQLabel *m_pitchLabel; private: void setLabelsIfNeeded(); diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index 2413323..fc77f8e 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -28,14 +28,14 @@ #include "misc/Debug.h" #include "base/AudioLevel.h" -#include <qcolor.h> -#include <qevent.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> #include <cmath> namespace Rosegarden @@ -45,8 +45,8 @@ Fader::PixmapCache Fader::m_pixmapCache; Fader::Fader(AudioLevel::FaderType type, - int w, int h, QWidget *parent) : - QWidget(parent), + int w, int h, TQWidget *parent) : + TQWidget(parent), m_integral(false), m_vertical(h > w), m_min(0), @@ -54,7 +54,7 @@ Fader::Fader(AudioLevel::FaderType type, m_type(type), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); setFixedSize(w, h); // provisional @@ -78,20 +78,20 @@ Fader::Fader(AudioLevel::FaderType type, calculateGroovePixmap(); setFader(0.0); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } Fader::Fader(int min, int max, int deflt, - int w, int h, QWidget *parent) : - QWidget(parent), + int w, int h, TQWidget *parent) : + TQWidget(parent), m_integral(true), m_vertical(h > w), m_min(min), m_max(max), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); setFixedSize(w, h); // provisional @@ -115,20 +115,20 @@ Fader::Fader(int min, int max, int deflt, calculateGroovePixmap(); setFader(deflt); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } Fader::Fader(int min, int max, int deflt, - bool vertical, QWidget *parent) : - QWidget(parent), + bool vertical, TQWidget *parent) : + TQWidget(parent), m_integral(true), m_vertical(vertical), m_min(min), m_max(max), m_clickMousePos( -1), m_float(new TextFloat(this)), - m_floatTimer(new QTimer()) + m_floatTimer(new TQTimer()) { setBackgroundMode(Qt::NoBackground); calculateButtonPixmap(); @@ -146,7 +146,7 @@ Fader::Fader(int min, int max, int deflt, calculateGroovePixmap(); setFader(deflt); - connect(m_floatTimer, SIGNAL(timeout()), this, SLOT(slotFloatTimeout())); + connect(m_floatTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFloatTimeout())); m_float->hide(); } @@ -154,13 +154,13 @@ Fader::~Fader() {} void -Fader::setOutlineColour(QColor c) +Fader::setOutlineColour(TQColor c) { m_outlineColour = c; calculateGroovePixmap(); } -QPixmap * +TQPixmap * Fader::groovePixmap() { PixmapCache::iterator i = m_pixmapCache.find(SizeRec(width(), height())); @@ -173,7 +173,7 @@ Fader::groovePixmap() return 0; } -QPixmap * +TQPixmap * Fader::buttonPixmap() { PixmapCache::iterator i = m_pixmapCache.find(SizeRec(width(), height())); @@ -248,9 +248,9 @@ Fader::value_to_position(float value) } void -Fader::paintEvent(QPaintEvent *) +Fader::paintEvent(TQPaintEvent *) { - QPainter paint(this); + TQPainter paint(this); int position = value_to_position(m_value); if (m_vertical) { @@ -316,13 +316,13 @@ Fader::paintEvent(QPaintEvent *) } void -Fader::mousePressEvent(QMouseEvent *e) +Fader::mousePressEvent(TQMouseEvent *e) { m_clickMousePos = -1; if (e->button() == LeftButton) { - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { setFader(0); return ; } @@ -342,14 +342,14 @@ Fader::mousePressEvent(QMouseEvent *e) } void -Fader::mouseReleaseEvent(QMouseEvent *e) +Fader::mouseReleaseEvent(TQMouseEvent *e) { mouseMoveEvent(e); m_clickMousePos = -1; } void -Fader::mouseMoveEvent(QMouseEvent *e) +Fader::mouseMoveEvent(TQMouseEvent *e) { if (m_clickMousePos >= 0) { if (m_vertical) { @@ -368,7 +368,7 @@ Fader::mouseMoveEvent(QMouseEvent *e) } void -Fader::wheelEvent(QWheelEvent *e) +Fader::wheelEvent(TQWheelEvent *e) { int buttonPosition = value_to_position(m_value); if (e->state() & ShiftButton) { @@ -394,15 +394,15 @@ Fader::showFloatText() { // draw on the float text - QString text; + TQString text; if (m_integral) { - text = QString("%1").arg(int(m_value)); + text = TQString("%1").arg(int(m_value)); } else if (m_value == AudioLevel::DB_FLOOR) { text = "Off"; } else { float v = fabs(m_value); - text = QString("%1%2.%3%4%5 dB") + text = TQString("%1%2.%3%4%5 dB") .arg(m_value < 0 ? '-' : '+') .arg(int(v)) .arg(int(v * 10) % 10) @@ -415,8 +415,8 @@ Fader::showFloatText() // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). // - QWidget *par = parentWidget(); - QPoint totalPos = this->pos(); + TQWidget *par = parentWidget(); + TQPoint totalPos = this->pos(); while (par->parentWidget() && !par->isTopLevel() && !par->isDialog()) { totalPos += par->pos(); @@ -425,7 +425,7 @@ Fader::showFloatText() // Move just top/right // - m_float->move(totalPos + QPoint(width() + 2, 0)); + m_float->move(totalPos + TQPoint(width() + 2, 0)); // Show m_float->show(); @@ -443,12 +443,12 @@ Fader::slotFloatTimeout() void Fader::calculateGroovePixmap() { - QPixmap *& map = m_pixmapCache[SizeRec(width(), height())].first[m_outlineColour.pixel()]; + TQPixmap *& map = m_pixmapCache[SizeRec(width(), height())].first[m_outlineColour.pixel()]; delete map; - map = new QPixmap(width(), height()); + map = new TQPixmap(width(), height()); map->fill(colorGroup().background()); - QPainter paint(map); + TQPainter paint(map); paint.setBrush(colorGroup().background()); if (m_vertical) { @@ -494,7 +494,7 @@ Fader::calculateButtonPixmap() if (i != m_pixmapCache.end() && i->second.second) return ; - QPixmap *& map = m_pixmapCache[SizeRec(width(), height())].second; + TQPixmap *& map = m_pixmapCache[SizeRec(width(), height())].second; if (m_vertical) { @@ -510,13 +510,13 @@ Fader::calculateButtonPixmap() if (buttonWidth > width() - 2) buttonWidth = width() - 2; - map = new QPixmap(buttonWidth, buttonHeight); + map = new TQPixmap(buttonWidth, buttonHeight); map->fill(colorGroup().background()); int x = 0; int y = 0; - QPainter paint(map); + TQPainter paint(map); paint.setPen(colorGroup().light()); paint.drawLine(x + 1, y, x + buttonWidth - 2, y); diff --git a/src/gui/widgets/Fader.h b/src/gui/widgets/Fader.h index f4afb24..60aca20 100644 --- a/src/gui/widgets/Fader.h +++ b/src/gui/widgets/Fader.h @@ -28,16 +28,16 @@ #include "base/AudioLevel.h" #include <map> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqwidget.h> #include <utility> -class QWheelEvent; -class QTimer; -class QPixmap; -class QPaintEvent; -class QMouseEvent; +class TQWheelEvent; +class TQTimer; +class TQPixmap; +class TQPaintEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,25 +56,25 @@ public: * based on the given dimensions. */ Fader(AudioLevel::FaderType, - int width, int height, QWidget *parent); + int width, int height, TQWidget *parent); /** * Construct a fader on an integral scale. The fader calculates * its orientation based on the given dimensions. */ Fader(int min, int max, int deflt, - int width, int height, QWidget *parent); + int width, int height, TQWidget *parent); /** * Construct a fader on an integral scale, with a 1:1 ratio of * pixel positions and values. */ Fader(int min, int max, int deflt, - bool vertical, QWidget *parent); + bool vertical, TQWidget *parent); virtual ~Fader(); - void setOutlineColour(QColor); + void setOutlineColour(TQColor); float getFaderLevel() const; @@ -86,11 +86,11 @@ signals: void faderChanged(float); protected: - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void wheelEvent(TQWheelEvent *); float position_to_value(int); int value_to_position(float); @@ -114,16 +114,16 @@ protected: int m_clickButtonPos; TextFloat *m_float; - QTimer *m_floatTimer; + TQTimer *m_floatTimer; - QPixmap *groovePixmap(); - QPixmap *buttonPixmap(); + TQPixmap *groovePixmap(); + TQPixmap *buttonPixmap(); - QColor m_outlineColour; + TQColor m_outlineColour; typedef std::pair<int, int> SizeRec; - typedef std::map<unsigned int, QPixmap *> ColourPixmapRec; // key is QColor::pixel() - typedef std::pair<ColourPixmapRec, QPixmap *> PixmapRec; + typedef std::map<unsigned int, TQPixmap *> ColourPixmapRec; // key is TQColor::pixel() + typedef std::pair<ColourPixmapRec, TQPixmap *> PixmapRec; typedef std::map<SizeRec, PixmapRec> PixmapCache; static PixmapCache m_pixmapCache; }; diff --git a/src/gui/widgets/HSpinBox.cpp b/src/gui/widgets/HSpinBox.cpp index efdb9d1..f3b5970 100644 --- a/src/gui/widgets/HSpinBox.cpp +++ b/src/gui/widgets/HSpinBox.cpp @@ -25,16 +25,16 @@ #include "HSpinBox.h" -#include <qstring.h> +#include <tqstring.h> #include <cmath> #include <algorithm> namespace Rosegarden { -QString HSpinBox::mapValueToText(int j) +TQString HSpinBox::mapValueToText(int j) { - QString str; + TQString str; str.sprintf(m_format, float(j) / m_scaleFactor); return str; } @@ -46,27 +46,27 @@ int HSpinBox::mapTextToValue( bool* ok ) return int(f * m_scaleFactor); } -HSpinBox::HSpinBox( int minV, int maxV, int step, QWidget* parent, +HSpinBox::HSpinBox( int minV, int maxV, int step, TQWidget* parent, double bottom, double top, int decimals, float initialValue) - : QSpinBox(minV,maxV,step,parent) + : TQSpinBox(minV,maxV,step,parent) { - setValidator(new QDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,this)); initialize(decimals); setValuef(initialValue); } //constructor with default settings -HSpinBox::HSpinBox( QWidget* parent, float initialValue, int step, +HSpinBox::HSpinBox( TQWidget* parent, float initialValue, int step, double bottom, double top, int decimals, - const QObject* recv, const char* mem) - : QSpinBox((int)(bottom*pow(10.0, decimals)), + const TQObject* recv, const char* mem) + : TQSpinBox((int)(bottom*pow(10.0, decimals)), (int)(top*pow(10.0, decimals)), step, parent) { - setValidator(new QDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,this)); initialize(decimals); setValuef(initialValue); if (recv != NULL && mem != NULL) - QObject::connect(this, SIGNAL(valueChanged(int)), recv, mem); + TQObject::connect(this, TQT_SIGNAL(valueChanged(int)), recv, mem); } float HSpinBox::valuef() { return float(value()) / m_scaleFactor; } diff --git a/src/gui/widgets/HSpinBox.h b/src/gui/widgets/HSpinBox.h index aa60b65..70baf87 100644 --- a/src/gui/widgets/HSpinBox.h +++ b/src/gui/widgets/HSpinBox.h @@ -26,10 +26,10 @@ #ifndef _RG_HSPINBOX_H_ #define _RG_HSPINBOX_H_ -#include <qobject.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qvalidator.h> +#include <tqobject.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqvalidator.h> namespace Rosegarden @@ -37,18 +37,18 @@ namespace Rosegarden class HSpinBox : public QSpinBox { - QString mapValueToText(int j); + TQString mapValueToText(int j); int mapTextToValue( bool* ok ); public: - HSpinBox( int minV, int maxV, int step, QWidget* parent, + HSpinBox( int minV, int maxV, int step, TQWidget* parent, double bottom, double top, int decimals, float initialValue); //constructor with default settings - HSpinBox( QWidget* parent, float initialValue = 0.2, int step=1, + HSpinBox( TQWidget* parent, float initialValue = 0.2, int step=1, double bottom=-25.0, double top=25.0, int decimals=3, - const QObject* recv=NULL, const char* mem=NULL); + const TQObject* recv=NULL, const char* mem=NULL); float valuef(); void setValuef(float v); diff --git a/src/gui/widgets/Label.h b/src/gui/widgets/Label.h index e704c35..a30b196 100644 --- a/src/gui/widgets/Label.h +++ b/src/gui/widgets/Label.h @@ -26,12 +26,12 @@ #ifndef _RG_ROSEGARDENLABEL_H_ #define _RG_ROSEGARDENLABEL_H_ -#include <qlabel.h> +#include <tqlabel.h> -class QWidget; -class QWheelEvent; -class QMouseEvent; +class TQWidget; +class TQWheelEvent; +class TQMouseEvent; namespace Rosegarden @@ -41,14 +41,14 @@ class Label : public QLabel { Q_OBJECT public: - Label(QWidget *parent = 0, const char *name=0): - QLabel(parent, name) {;} + Label(TQWidget *parent = 0, const char *name=0): + TQLabel(parent, name) {;} protected: - virtual void mouseDoubleClickEvent(QMouseEvent * /*e*/) + virtual void mouseDoubleClickEvent(TQMouseEvent * /*e*/) { emit doubleClicked(); } - virtual void wheelEvent(QWheelEvent * e) + virtual void wheelEvent(TQWheelEvent * e) { emit scrollWheel(e->delta()); } signals: diff --git a/src/gui/widgets/MidiFaderWidget.cpp b/src/gui/widgets/MidiFaderWidget.cpp index a2ef7fc..27eafde 100644 --- a/src/gui/widgets/MidiFaderWidget.cpp +++ b/src/gui/widgets/MidiFaderWidget.cpp @@ -29,10 +29,10 @@ #include "Fader.h" #include "Rotary.h" #include <kcombobox.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/MidiFaderWidget.h b/src/gui/widgets/MidiFaderWidget.h index 7bdf520..308d022 100644 --- a/src/gui/widgets/MidiFaderWidget.h +++ b/src/gui/widgets/MidiFaderWidget.h @@ -26,12 +26,12 @@ #ifndef _RG_MIDIFADERWIDGET_H_ #define _RG_MIDIFADERWIDGET_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> -class QWidget; -class QPushButton; +class TQWidget; +class TQPushButton; class KComboBox; @@ -48,21 +48,21 @@ class MidiFaderWidget : public QFrame Q_OBJECT public: - MidiFaderWidget(QWidget *parent, - QString id = ""); + MidiFaderWidget(TQWidget *parent, + TQString id = ""); AudioVUMeter *m_vuMeter; Fader *m_fader; - QPushButton *m_muteButton; - QPushButton *m_soloButton; - QPushButton *m_recordButton; + TQPushButton *m_muteButton; + TQPushButton *m_soloButton; + TQPushButton *m_recordButton; Rotary *m_pan; KComboBox *m_output; - QString m_id; + TQString m_id; }; diff --git a/src/gui/widgets/PitchChooser.cpp b/src/gui/widgets/PitchChooser.cpp index e20647d..2aa1c57 100644 --- a/src/gui/widgets/PitchChooser.cpp +++ b/src/gui/widgets/PitchChooser.cpp @@ -28,59 +28,59 @@ #include <klocale.h> #include "gui/general/MidiPitchLabel.h" #include "PitchDragLabel.h" -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -PitchChooser::PitchChooser(QString title, - QWidget *parent, +PitchChooser::PitchChooser(TQString title, + TQWidget *parent, int defaultPitch) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); hbox->setSpacing(6); - new QLabel(i18n("Pitch:"), hbox); + new TQLabel(i18n("Pitch:"), hbox); - m_pitch = new QSpinBox(hbox); + m_pitch = new TQSpinBox(hbox); m_pitch->setMinValue(0); m_pitch->setMaxValue(127); m_pitch->setValue(defaultPitch); MidiPitchLabel pl(defaultPitch); - m_pitchLabel = new QLabel(pl.getQString(), hbox); + m_pitchLabel = new TQLabel(pl.getQString(), hbox); m_pitchLabel->setMinimumWidth(40); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SIGNAL(pitchChanged(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitch, SIGNAL(valueChanged(int)), - this, SIGNAL(preview(int))); + connect(m_pitch, TQT_SIGNAL(valueChanged(int)), + this, TQT_SIGNAL(preview(int))); - connect(m_pitchDragLabel, SIGNAL(pitchDragged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchDragged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - this, SLOT(slotSetPitch(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + this, TQT_SLOT(slotSetPitch(int))); - connect(m_pitchDragLabel, SIGNAL(pitchChanged(int)), - this, SIGNAL(pitchChanged(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(pitchChanged(int)), + this, TQT_SIGNAL(pitchChanged(int))); - connect(m_pitchDragLabel, SIGNAL(preview(int)), - this, SIGNAL(preview(int))); + connect(m_pitchDragLabel, TQT_SIGNAL(preview(int)), + this, TQT_SIGNAL(preview(int))); } diff --git a/src/gui/widgets/PitchChooser.h b/src/gui/widgets/PitchChooser.h index df3b8ef..4c844ca 100644 --- a/src/gui/widgets/PitchChooser.h +++ b/src/gui/widgets/PitchChooser.h @@ -26,13 +26,13 @@ #ifndef _RG_ROSEGARDENPITCHCHOOSER_H_ #define _RG_ROSEGARDENPITCHCHOOSER_H_ -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> -class QWidget; -class QSpinBox; -class QLabel; +class TQWidget; +class TQSpinBox; +class TQLabel; namespace Rosegarden @@ -45,8 +45,8 @@ class PitchChooser : public QGroupBox { Q_OBJECT public: - PitchChooser(QString title, - QWidget *parent, + PitchChooser(TQString title, + TQWidget *parent, int defaultPitch = 60); int getPitch() const; @@ -62,8 +62,8 @@ public slots: protected: int m_defaultPitch; PitchDragLabel *m_pitchDragLabel; - QSpinBox *m_pitch; - QLabel *m_pitchLabel; + TQSpinBox *m_pitch; + TQLabel *m_pitchLabel; }; diff --git a/src/gui/widgets/PitchDragLabel.cpp b/src/gui/widgets/PitchDragLabel.cpp index 1d22a77..9a174bb 100644 --- a/src/gui/widgets/PitchDragLabel.cpp +++ b/src/gui/widgets/PitchDragLabel.cpp @@ -28,20 +28,20 @@ #include "base/NotationRules.h" #include "base/NotationTypes.h" #include "gui/editors/notation/NotePixmapFactory.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -PitchDragLabel::PitchDragLabel(QWidget *parent, +PitchDragLabel::PitchDragLabel(TQWidget *parent, int defaultPitch, bool defaultSharps) : - QWidget(parent), + TQWidget(parent), m_pitch(defaultPitch), m_usingSharps(defaultSharps), m_clickedY(0), @@ -82,7 +82,7 @@ PitchDragLabel::slotSetPitch(int pitch, int octave, int step) } void -PitchDragLabel::mousePressEvent(QMouseEvent *e) +PitchDragLabel::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_clickedY = e->y(); @@ -93,7 +93,7 @@ PitchDragLabel::mousePressEvent(QMouseEvent *e) } void -PitchDragLabel::mouseMoveEvent(QMouseEvent *e) +PitchDragLabel::mouseMoveEvent(TQMouseEvent *e) { if (m_clicked) { @@ -132,7 +132,7 @@ PitchDragLabel::mouseMoveEvent(QMouseEvent *e) } void -PitchDragLabel::mouseReleaseEvent(QMouseEvent *e) +PitchDragLabel::mouseReleaseEvent(TQMouseEvent *e) { mouseMoveEvent(e); emitPitchChange(); @@ -159,7 +159,7 @@ PitchDragLabel::emitPitchChange() } void -PitchDragLabel::wheelEvent(QWheelEvent *e) +PitchDragLabel::wheelEvent(TQWheelEvent *e) { if (e->delta() > 0) { if (m_pitch < 127) { @@ -183,9 +183,9 @@ PitchDragLabel::wheelEvent(QWheelEvent *e) } void -PitchDragLabel::paintEvent(QPaintEvent *) +PitchDragLabel::paintEvent(TQPaintEvent *) { - QPainter paint(this); + TQPainter paint(this); paint.fillRect(0, 0, width(), height(), paint.backgroundColor()); int x = width() / 2 - m_pixmap.width() / 2; @@ -204,7 +204,7 @@ PitchDragLabel::paintEvent(QPaintEvent *) QSize PitchDragLabel::sizeHint() const { - return QSize(150, 135); + return TQSize(150, 135); } void @@ -226,7 +226,7 @@ PitchDragLabel::calculatePixmap(int pitch, int octave, int step) const } } - QCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap + TQCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap (m_pitch, Clef(clefType, octaveOffset), octave, step); @@ -255,7 +255,7 @@ PitchDragLabel::calculatePixmap() const } } - QCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap + TQCanvasPixmap *pmap = m_npf->makePitchDisplayPixmap (m_pitch, Clef(clefType, octaveOffset), m_usingSharps); diff --git a/src/gui/widgets/PitchDragLabel.h b/src/gui/widgets/PitchDragLabel.h index 7114611..fa3ecfd 100644 --- a/src/gui/widgets/PitchDragLabel.h +++ b/src/gui/widgets/PitchDragLabel.h @@ -26,14 +26,14 @@ #ifndef _RG_ROSEGARDENPITCHDRAGLABEL_H_ #define _RG_ROSEGARDENPITCHDRAGLABEL_H_ -#include <qpixmap.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqpixmap.h> +#include <tqsize.h> +#include <tqwidget.h> -class QWheelEvent; -class QPaintEvent; -class QMouseEvent; +class TQWheelEvent; +class TQPaintEvent; +class TQMouseEvent; namespace Rosegarden @@ -46,13 +46,13 @@ class PitchDragLabel : public QWidget { Q_OBJECT public: - PitchDragLabel(QWidget *parent, + PitchDragLabel(TQWidget *parent, int defaultPitch = 60, bool defaultSharps = true); ~PitchDragLabel(); int getPitch() const { return m_pitch; } - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; signals: void pitchDragged(int); @@ -68,11 +68,11 @@ public slots: void slotSetPitch(int,int,int); protected: - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); + virtual void paintEvent(TQPaintEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void calculatePixmap() const; void calculatePixmap(int pitch, int octave, int step) const; @@ -80,7 +80,7 @@ protected: /** emits 'pitchChanged' events, both diatonic and chromatic */ void emitPitchChange(); - mutable QPixmap m_pixmap; + mutable TQPixmap m_pixmap; int m_pitch; int m_clickedY; diff --git a/src/gui/widgets/PluginControl.cpp b/src/gui/widgets/PluginControl.cpp index acf33ea..69e9591 100644 --- a/src/gui/widgets/PluginControl.cpp +++ b/src/gui/widgets/PluginControl.cpp @@ -30,21 +30,21 @@ #include "gui/general/GUIPalette.h" #include "gui/studio/AudioPluginManager.h" #include "gui/widgets/Rotary.h" -#include <qfont.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> #include <cmath> namespace Rosegarden { -PluginControl::PluginControl(QWidget *parent, - QGridLayout *layout, +PluginControl::PluginControl(TQWidget *parent, + TQGridLayout *layout, ControlType type, PluginPort *port, AudioPluginManager *aPM, @@ -52,18 +52,18 @@ PluginControl::PluginControl(QWidget *parent, float initialValue, bool showBounds, bool hidden): - QObject(parent), + TQObject(parent), m_layout(layout), m_type(type), m_port(port), m_pluginManager(aPM), m_index(index) { - QFont plainFont; + TQFont plainFont; plainFont.setPointSize((plainFont.pointSize() * 9 ) / 10); - QLabel *controlTitle = - new QLabel(QString("%1 ").arg(strtoqstr(port->getName())), parent); + TQLabel *controlTitle = + new TQLabel(TQString("%1 ").arg(strtoqstr(port->getName())), parent); controlTitle->setFont(plainFont); if (type == Rotary) { @@ -118,12 +118,12 @@ PluginControl::PluginControl(QWidget *parent, initialValue = log10f(initialValue); } - QLabel *low; + TQLabel *low; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - low = new QLabel(QString("%1").arg(int(displayLower)), parent); + low = new TQLabel(TQString("%1").arg(int(displayLower)), parent); } else { - low = new QLabel(QString("%1").arg(displayLower), parent); + low = new TQLabel(TQString("%1").arg(displayLower), parent); } low->setFont(plainFont); @@ -148,23 +148,23 @@ PluginControl::PluginControl(QWidget *parent, m_dial->setKnobColour(GUIPalette::getColour(GUIPalette::RotaryPlugin)); - connect(m_dial, SIGNAL(valueChanged(float)), - this, SLOT(slotValueChanged(float))); + connect(m_dial, TQT_SIGNAL(valueChanged(float)), + this, TQT_SLOT(slotValueChanged(float))); - QLabel *upp; + TQLabel *upp; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - upp = new QLabel(QString("%1").arg(int(displayUpper)), parent); + upp = new TQLabel(TQString("%1").arg(int(displayUpper)), parent); } else { - upp = new QLabel(QString("%1").arg(displayUpper), parent); + upp = new TQLabel(TQString("%1").arg(displayUpper), parent); } upp->setFont(plainFont); - QWidgetItem *item; + TQWidgetItem *item; if (!hidden) { controlTitle->show(); - item = new QWidgetItem(controlTitle); + item = new TQWidgetItem(controlTitle); item->setAlignment(Qt::AlignRight | Qt::AlignBottom); m_layout->addItem(item); } else { @@ -173,7 +173,7 @@ PluginControl::PluginControl(QWidget *parent, if (showBounds && !hidden) { low->show(); - item = new QWidgetItem(low); + item = new TQWidgetItem(low); item->setAlignment(Qt::AlignRight | Qt::AlignBottom); m_layout->addItem(item); } else { @@ -182,7 +182,7 @@ PluginControl::PluginControl(QWidget *parent, if (!hidden) { m_dial->show(); - item = new QWidgetItem(m_dial); + item = new TQWidgetItem(m_dial); item->setAlignment(Qt::AlignCenter); m_layout->addItem(item); } else { @@ -191,7 +191,7 @@ PluginControl::PluginControl(QWidget *parent, if (showBounds && !hidden) { upp->show(); - item = new QWidgetItem(upp); + item = new TQWidgetItem(upp); item->setAlignment(Qt::AlignLeft | Qt::AlignBottom); m_layout->addItem(item); } else { diff --git a/src/gui/widgets/PluginControl.h b/src/gui/widgets/PluginControl.h index 83d2d33..d809d81 100644 --- a/src/gui/widgets/PluginControl.h +++ b/src/gui/widgets/PluginControl.h @@ -26,13 +26,13 @@ #ifndef _RG_PLUGINCONTROL_H_ #define _RG_PLUGINCONTROL_H_ -#include <qobject.h> +#include <tqobject.h> #include <vector> -class QWidget; -class QHBox; -class QGridLayout; +class TQWidget; +class TQHBox; +class TQGridLayout; namespace Rosegarden @@ -55,8 +55,8 @@ public: NumericSlider } ControlType; - PluginControl(QWidget *parent, - QGridLayout *layout, + PluginControl(TQWidget *parent, + TQGridLayout *layout, ControlType type, PluginPort *port, AudioPluginManager *pluginManager, @@ -83,7 +83,7 @@ protected: //--------------- Data members --------------------------------- - QGridLayout *m_layout; + TQGridLayout *m_layout; ControlType m_type; PluginPort *m_port; @@ -96,7 +96,7 @@ protected: }; typedef std::vector<PluginControl*>::iterator ControlIterator; -typedef std::vector<QHBox*>::iterator ControlLineIterator; +typedef std::vector<TQHBox*>::iterator ControlLineIterator; } diff --git a/src/gui/widgets/ProgressBar.cpp b/src/gui/widgets/ProgressBar.cpp index c4cb88e..c1a4456 100644 --- a/src/gui/widgets/ProgressBar.cpp +++ b/src/gui/widgets/ProgressBar.cpp @@ -26,7 +26,7 @@ #include "ProgressBar.h" #include <kprogress.h> -#include <qwidget.h> +#include <tqwidget.h> namespace Rosegarden @@ -34,7 +34,7 @@ namespace Rosegarden ProgressBar::ProgressBar(int totalSteps, bool /*useDelay*/, - QWidget *creator, + TQWidget *creator, const char *name, WFlags f) : KProgress(totalSteps, creator, name, f) diff --git a/src/gui/widgets/ProgressBar.h b/src/gui/widgets/ProgressBar.h index 3ce93e1..383a58a 100644 --- a/src/gui/widgets/ProgressBar.h +++ b/src/gui/widgets/ProgressBar.h @@ -29,7 +29,7 @@ #include <kprogress.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -44,7 +44,7 @@ class ProgressBar : public KProgress public: ProgressBar(int totalSteps, bool useDelay, - QWidget *creator = 0, + TQWidget *creator = 0, const char *name = 0, WFlags f = 0); diff --git a/src/gui/widgets/ProgressDialog.cpp b/src/gui/widgets/ProgressDialog.cpp index 1f6811f..715e9ae 100644 --- a/src/gui/widgets/ProgressDialog.cpp +++ b/src/gui/widgets/ProgressDialog.cpp @@ -28,11 +28,11 @@ #include "misc/Debug.h" #include "gui/application/RosegardenApplication.h" #include <klocale.h> -#include <qcursor.h> -#include <qprogressdialog.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqprogressdialog.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden @@ -41,11 +41,11 @@ namespace Rosegarden bool ProgressDialog::m_modalVisible = false; -ProgressDialog::ProgressDialog(QWidget *creator, +ProgressDialog::ProgressDialog(TQWidget *creator, const char *name, bool modal): KProgressDialog(creator, name, - i18n("Processing..."), QString::null, modal), + i18n("Processing..."), TQString::null, modal), m_wasVisible(false), m_frozen(false), m_modal(modal) @@ -54,8 +54,8 @@ ProgressDialog::ProgressDialog(QWidget *creator, RG_DEBUG << "ProgressDialog::ProgressDialog type 1 - " << labelText() << " - modal : " << modal << endl; - connect(progressBar(), SIGNAL(percentageChanged (int)), - this, SLOT(slotCheckShow(int))); + connect(progressBar(), TQT_SIGNAL(percentageChanged (int)), + this, TQT_SLOT(slotCheckShow(int))); m_chrono.start(); @@ -66,9 +66,9 @@ ProgressDialog::ProgressDialog(QWidget *creator, } ProgressDialog::ProgressDialog( - const QString &labelText, + const TQString &labelText, int totalSteps, - QWidget *creator, + TQWidget *creator, const char *name, bool modal) : KProgressDialog(creator, @@ -85,8 +85,8 @@ ProgressDialog::ProgressDialog( RG_DEBUG << "ProgressDialog::ProgressDialog type 2 - " << labelText << " - modal : " << modal << endl; - connect(progressBar(), SIGNAL(percentageChanged (int)), - this, SLOT(slotCheckShow(int))); + connect(progressBar(), TQT_SIGNAL(percentageChanged (int)), + this, TQT_SLOT(slotCheckShow(int))); m_chrono.start(); @@ -109,20 +109,20 @@ ProgressDialog::polish() if (allowCancel()) setCursor(Qt::ArrowCursor); else - QApplication::setOverrideCursor(QCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); } -void ProgressDialog::hideEvent(QHideEvent* e) +void ProgressDialog::hideEvent(TQHideEvent* e) { if (!allowCancel()) - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KProgressDialog::hideEvent(e); m_modalVisible = false; } void -ProgressDialog::slotSetOperationName(QString name) +ProgressDialog::slotSetOperationName(TQString name) { // RG_DEBUG << "ProgressDialog::slotSetOperationName(" // << name << ") visible : " << isVisible() << endl; @@ -172,7 +172,7 @@ void ProgressDialog::slotFreeze() // This is also a convenient place to ensure the wait cursor (if // currently shown) returns to the original cursor to ensure that // the user can respond to whatever's freezing the progress dialog - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); mShowTimer->stop(); m_frozen = true; diff --git a/src/gui/widgets/ProgressDialog.h b/src/gui/widgets/ProgressDialog.h index b753493..8e6e030 100644 --- a/src/gui/widgets/ProgressDialog.h +++ b/src/gui/widgets/ProgressDialog.h @@ -29,11 +29,11 @@ #define private protected // fugly #include <kprogress.h> #undef private -#include <qdatetime.h> +#include <tqdatetime.h> -class QWidget; -class QString; -class QHideEvent; +class TQWidget; +class TQString; +class TQHideEvent; namespace Rosegarden @@ -45,13 +45,13 @@ class ProgressDialog : public KProgressDialog { Q_OBJECT public: - ProgressDialog(QWidget * creator = 0, + ProgressDialog(TQWidget * creator = 0, const char * name = 0, bool modal = true); - ProgressDialog(const QString &labelText, + ProgressDialog(const TQString &labelText, int totalSteps, - QWidget *creator = 0, + TQWidget *creator = 0, const char *name = 0, bool modal = true); @@ -68,7 +68,7 @@ public: virtual void polish(); public slots: - void slotSetOperationName(QString); + void slotSetOperationName(TQString); void slotCancel(); /// Stop and hide (if it's shown) the progress dialog @@ -81,11 +81,11 @@ protected slots: void slotCheckShow(int); protected: - virtual void hideEvent(QHideEvent*); + virtual void hideEvent(TQHideEvent*); //--------------- Data members --------------------------------- - QTime m_chrono; + TQTime m_chrono; bool m_wasVisible; bool m_frozen; bool m_modal; diff --git a/src/gui/widgets/QDeferScrollView.cpp b/src/gui/widgets/QDeferScrollView.cpp index 01864a3..38cb211 100644 --- a/src/gui/widgets/QDeferScrollView.cpp +++ b/src/gui/widgets/QDeferScrollView.cpp @@ -25,17 +25,17 @@ #include "QDeferScrollView.h" -#include <qscrollview.h> -#include <qwidget.h> +#include <tqscrollview.h> +#include <tqwidget.h> namespace Rosegarden { -QDeferScrollView::QDeferScrollView(QWidget* parent, const char *name, WFlags f) - : QScrollView(parent, name, f) +QDeferScrollView::QDeferScrollView(TQWidget* parent, const char *name, WFlags f) + : TQScrollView(parent, name, f) { - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQWidget::WheelFocus); } void QDeferScrollView::setBottomMargin(int m) @@ -43,7 +43,7 @@ void QDeferScrollView::setBottomMargin(int m) setMargins(leftMargin(), topMargin(), rightMargin(), m); } -void QDeferScrollView::contentsWheelEvent(QWheelEvent* e) +void QDeferScrollView::contentsWheelEvent(TQWheelEvent* e) { emit gotWheelEvent(e); } diff --git a/src/gui/widgets/QDeferScrollView.h b/src/gui/widgets/QDeferScrollView.h index e4b2e3d..9ba02a9 100644 --- a/src/gui/widgets/QDeferScrollView.h +++ b/src/gui/widgets/QDeferScrollView.h @@ -26,11 +26,11 @@ #ifndef _RG_QDEFERSCROLLVIEW_H_ #define _RG_QDEFERSCROLLVIEW_H_ -#include <qscrollview.h> +#include <tqscrollview.h> -class QWidget; -class QWheelEvent; +class TQWidget; +class TQWheelEvent; namespace Rosegarden @@ -39,8 +39,8 @@ namespace Rosegarden /** - * A QScrollView which defers vertical scrolling (through mouse wheel) - * elsewhere, typically another QScrollView, so that both can be kept + * A TQScrollView which defers vertical scrolling (through mouse wheel) + * elsewhere, typically another TQScrollView, so that both can be kept * in sync. The master scrollview will connect its vertical scrollbar * to the slave view so the scrollbar will act on both views. * @@ -57,15 +57,15 @@ class QDeferScrollView : public QScrollView { Q_OBJECT public: - QDeferScrollView(QWidget* parent=0, const char *name=0, WFlags f=0); + QDeferScrollView(TQWidget* parent=0, const char *name=0, WFlags f=0); void setBottomMargin(int); signals: - void gotWheelEvent(QWheelEvent*); + void gotWheelEvent(TQWheelEvent*); protected: - virtual void contentsWheelEvent(QWheelEvent*); + virtual void contentsWheelEvent(TQWheelEvent*); }; diff --git a/src/gui/widgets/QuantizeParameters.cpp b/src/gui/widgets/QuantizeParameters.cpp index 19ba96a..1cb2a58 100644 --- a/src/gui/widgets/QuantizeParameters.cpp +++ b/src/gui/widgets/QuantizeParameters.cpp @@ -24,7 +24,7 @@ #include "QuantizeParameters.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -37,53 +37,53 @@ #include "gui/editors/notation/NotePixmapFactory.h" #include <kcombobox.h> #include <kconfig.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -QuantizeParameters::QuantizeParameters(QWidget *parent, +QuantizeParameters::QuantizeParameters(TQWidget *parent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, - QString configCategory, - QString preamble) : - QFrame(parent), + TQString configCategory, + TQString preamble) : + TQFrame(parent), m_configCategory(configCategory), m_standardQuantizations (BasicQuantizer::getStandardQuantizations()) { - m_mainLayout = new QGridLayout(this, + m_mainLayout = new TQGridLayout(this, preamble ? 3 : 4, 2, preamble ? 10 : 0, preamble ? 5 : 4); int zero = 0; if (preamble) { - QLabel *label = new QLabel(preamble, this); + TQLabel *label = new TQLabel(preamble, this); label->setAlignment(Qt::WordBreak); m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1); zero = 1; } - QGroupBox *quantizerBox = new QGroupBox + TQGroupBox *quantizerBox = new QGroupBox (1, Horizontal, i18n("Quantizer"), this); m_mainLayout->addWidget(quantizerBox, zero, 0); - QFrame *typeFrame = new QFrame(quantizerBox); + TQFrame *typeFrame = new TQFrame(quantizerBox); - QGridLayout *layout = new QGridLayout(typeFrame, 2, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Quantizer type:"), typeFrame), 0, 0); + TQGridLayout *layout = new TQGridLayout(typeFrame, 2, 2, 5, 3); + layout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0); m_typeCombo = new KComboBox(typeFrame); m_typeCombo->insertItem(i18n("Grid quantizer")); m_typeCombo->insertItem(i18n("Legato quantizer")); @@ -97,21 +97,21 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, if (!showNotationOption) m_notationTarget->hide(); - QHBox *parameterBox = new QHBox(this); + TQHBox *parameterBox = new TQHBox(this); m_mainLayout->addWidget(parameterBox, zero + 1, 0); m_notationBox = new QGroupBox (1, Horizontal, i18n("Notation parameters"), parameterBox); - QFrame *notationFrame = new QFrame(m_notationBox); + TQFrame *notationFrame = new TQFrame(m_notationBox); - layout = new QGridLayout(notationFrame, 4, 2, 5, 3); + layout = new TQGridLayout(notationFrame, 4, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Base grid unit:"), notationFrame), + layout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame), 1, 0); m_notationUnitCombo = new KComboBox(notationFrame); layout->addWidget(m_notationUnitCombo, 1, 1); - layout->addWidget(new QLabel(i18n("Complexity:"), + layout->addWidget(new TQLabel(i18n("Complexity:"), notationFrame), 0, 0); m_simplicityCombo = new KComboBox(notationFrame); @@ -122,7 +122,7 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_simplicityCombo->insertItem(i18n("Very low")); layout->addWidget(m_simplicityCombo, 0, 1); - layout->addWidget(new QLabel(i18n("Tuplet level:"), + layout->addWidget(new TQLabel(i18n("Tuplet level:"), notationFrame), 2, 0); m_maxTuplet = new KComboBox(notationFrame); m_maxTuplet->insertItem(i18n("None")); @@ -138,25 +138,25 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_maxTuplet->insertItem(i18n("Any")); layout->addWidget(m_maxTuplet, 2, 1); - m_counterpoint = new QCheckBox(i18n("Permit counterpoint"), notationFrame); + m_counterpoint = new TQCheckBox(i18n("Permit counterpoint"), notationFrame); layout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1); m_gridBox = new QGroupBox (1, Horizontal, i18n("Grid parameters"), parameterBox); - QFrame *gridFrame = new QFrame(m_gridBox); + TQFrame *gridFrame = new TQFrame(m_gridBox); - layout = new QGridLayout(gridFrame, 4, 2, 5, 3); + layout = new TQGridLayout(gridFrame, 4, 2, 5, 3); - layout->addWidget(new QLabel(i18n("Base grid unit:"), gridFrame), 0, 0); + layout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0); m_gridUnitCombo = new KComboBox(gridFrame); layout->addWidget(m_gridUnitCombo, 0, 1); - m_swingLabel = new QLabel(i18n("Swing:"), gridFrame); + m_swingLabel = new TQLabel(i18n("Swing:"), gridFrame); layout->addWidget(m_swingLabel, 1, 0); m_swingCombo = new KComboBox(gridFrame); layout->addWidget(m_swingCombo, 1, 1); - m_iterativeLabel = new QLabel(i18n("Iterative amount:"), gridFrame); + m_iterativeLabel = new TQLabel(i18n("Iterative amount:"), gridFrame); layout->addWidget(m_iterativeLabel, 2, 0); m_iterativeCombo = new KComboBox(gridFrame); layout->addWidget(m_iterativeCombo, 2, 1); @@ -180,27 +180,27 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, m_advancedButton = 0; if (showAdvancedButton) { m_advancedButton = - new QPushButton(i18n("Show advanced options"), this); + new TQPushButton(i18n("Show advanced options"), this); m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, Qt::AlignLeft); - QObject::connect(m_advancedButton, SIGNAL(clicked()), - this, SLOT(slotAdvancedChanged())); + TQObject::connect(m_advancedButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAdvancedChanged())); } - QFrame *postFrame = new QFrame(m_postProcessingBox); + TQFrame *postFrame = new TQFrame(m_postProcessingBox); - layout = new QGridLayout(postFrame, 4, 1, 5, 3); - m_rebeam = new QCheckBox(i18n("Re-beam"), postFrame); + layout = new TQGridLayout(postFrame, 4, 1, 5, 3); + m_rebeam = new TQCheckBox(i18n("Re-beam"), postFrame); m_articulate = new QCheckBox (i18n("Add articulations (staccato, tenuto, slurs)"), postFrame); - m_makeViable = new QCheckBox(i18n("Tie notes at barlines etc"), postFrame); - m_deCounterpoint = new QCheckBox(i18n("Split-and-tie overlapping chords"), postFrame); + m_makeViable = new TQCheckBox(i18n("Tie notes at barlines etc"), postFrame); + m_deCounterpoint = new TQCheckBox(i18n("Split-and-tie overlapping chords"), postFrame); layout->addWidget(m_rebeam, 0, 0); layout->addWidget(m_articulate, 1, 0); layout->addWidget(m_makeViable, 2, 0); layout->addWidget(m_deCounterpoint, 3, 0); - QPixmap noMap = NotePixmapFactory::toQPixmap + TQPixmap noMap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("menu-no-note")); int defaultType = 0; @@ -278,16 +278,16 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, timeT time = m_standardQuantizations[i]; timeT error = 0; - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(time, error)); - QString label = NotationStrings::makeNoteMenuLabel(time, false, error); + TQString label = NotationStrings::makeNoteMenuLabel(time, false, error); if (error == 0) { m_gridUnitCombo->insertItem(pmap, label); m_notationUnitCombo->insertItem(pmap, label); } else { - m_gridUnitCombo->insertItem(noMap, QString("%1").arg(time)); - m_notationUnitCombo->insertItem(noMap, QString("%1").arg(time)); + m_gridUnitCombo->insertItem(noMap, TQString("%1").arg(time)); + m_notationUnitCombo->insertItem(noMap, TQString("%1").arg(time)); } if (m_standardQuantizations[i] == defaultUnit) { @@ -298,14 +298,14 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, } for (int i = -100; i <= 200; i += 10) { - m_swingCombo->insertItem(i == 0 ? i18n("None") : QString("%1%").arg(i)); + m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").arg(i)); if (i == defaultSwing) m_swingCombo->setCurrentItem(m_swingCombo->count() - 1); } for (int i = 10; i <= 100; i += 10) { m_iterativeCombo->insertItem(i == 100 ? i18n("Full quantize") : - QString("%1%").arg(i)); + TQString("%1%").arg(i)); if (i == defaultIterate) m_iterativeCombo->setCurrentItem(m_iterativeCombo->count() - 1); } @@ -337,7 +337,7 @@ QuantizeParameters::QuantizeParameters(QWidget *parent, break; } - connect(m_typeCombo, SIGNAL(activated(int)), SLOT(slotTypeChanged(int))); + connect(m_typeCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotTypeChanged(int))); } Quantizer * diff --git a/src/gui/widgets/QuantizeParameters.h b/src/gui/widgets/QuantizeParameters.h index 8eee7ff..8efd0c5 100644 --- a/src/gui/widgets/QuantizeParameters.h +++ b/src/gui/widgets/QuantizeParameters.h @@ -26,18 +26,18 @@ #ifndef _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ #define _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ -#include <qframe.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -#include <qgroupbox.h> +#include <tqgroupbox.h> -class QWidget; -class QPushButton; -class QLabel; -class QGridLayout; -class QCheckBox; +class TQWidget; +class TQPushButton; +class TQLabel; +class TQGridLayout; +class TQCheckBox; class KComboBox; @@ -53,12 +53,12 @@ class QuantizeParameters : public QFrame public: enum QuantizerType { Grid, Legato, Notation }; - QuantizeParameters(QWidget *parent, + QuantizeParameters(TQWidget *parent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, - QString configCategory, - QString preamble = 0); + TQString configCategory, + TQString preamble = 0); /** * Returned quantizer object is on heap -- caller must delete. @@ -66,7 +66,7 @@ public: */ Quantizer *getQuantizer() const; - QWidget *getAdvancedWidget() { return m_postProcessingBox; } + TQWidget *getAdvancedWidget() { return m_postProcessingBox; } bool shouldRebeam() const { return m_rebeam; } bool shouldDeCounterpoint() const { return m_deCounterpoint; } @@ -79,35 +79,35 @@ public slots: void slotAdvancedChanged(); protected: - QString m_configCategory; + TQString m_configCategory; std::vector<timeT> m_standardQuantizations; - QGridLayout *m_mainLayout; + TQGridLayout *m_mainLayout; KComboBox *m_typeCombo; - QGroupBox *m_gridBox; - QCheckBox *m_durationCheckBox; + TQGroupBox *m_gridBox; + TQCheckBox *m_durationCheckBox; KComboBox *m_gridUnitCombo; - QLabel *m_swingLabel; + TQLabel *m_swingLabel; KComboBox *m_swingCombo; - QLabel *m_iterativeLabel; + TQLabel *m_iterativeLabel; KComboBox *m_iterativeCombo; - QGroupBox *m_notationBox; - QCheckBox *m_notationTarget; + TQGroupBox *m_notationBox; + TQCheckBox *m_notationTarget; KComboBox *m_notationUnitCombo; KComboBox *m_simplicityCombo; KComboBox *m_maxTuplet; - QCheckBox *m_counterpoint; - - QPushButton *m_advancedButton; - QGroupBox *m_postProcessingBox; - QCheckBox *m_articulate; - QCheckBox *m_makeViable; - QCheckBox *m_deCounterpoint; - QCheckBox *m_rebeam; + TQCheckBox *m_counterpoint; + + TQPushButton *m_advancedButton; + TQGroupBox *m_postProcessingBox; + TQCheckBox *m_articulate; + TQCheckBox *m_makeViable; + TQCheckBox *m_deCounterpoint; + TQCheckBox *m_rebeam; }; diff --git a/src/gui/widgets/RosegardenPopupMenu.h b/src/gui/widgets/RosegardenPopupMenu.h index aca82a9..8bc81cb 100644 --- a/src/gui/widgets/RosegardenPopupMenu.h +++ b/src/gui/widgets/RosegardenPopupMenu.h @@ -25,7 +25,7 @@ #ifndef _RG_ROSEGARDENPOPUPMENU_H_ #define _RG_ROSEGARDENPOPUPMENU_H_ -#include <qpopupmenu.h> +#include <tqpopupmenu.h> namespace Rosegarden { @@ -33,8 +33,8 @@ class RosegardenPopupMenu : public QPopupMenu { // just to make itemHeight public public: - RosegardenPopupMenu(QWidget *parent) : QPopupMenu(parent) { } - using QPopupMenu::itemHeight; + RosegardenPopupMenu(TQWidget *parent) : TQPopupMenu(parent) { } + using TQPopupMenu::itemHeight; }; diff --git a/src/gui/widgets/Rotary.cpp b/src/gui/widgets/Rotary.cpp index 36d5817..f7cd1ec 100644 --- a/src/gui/widgets/Rotary.cpp +++ b/src/gui/widgets/Rotary.cpp @@ -31,19 +31,19 @@ #include "TextFloat.h" #include <kapplication.h> #include <klocale.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qdialog.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqdialog.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <cmath> @@ -55,12 +55,12 @@ namespace Rosegarden #define ROTARY_RANGE (ROTARY_MAX - ROTARY_MIN) static TextFloat* _float = 0; -static QTimer *_floatTimer = 0; +static TQTimer *_floatTimer = 0; Rotary::PixmapCache Rotary::m_pixmaps; -Rotary::Rotary(QWidget *parent, +Rotary::Rotary(TQWidget *parent, float minValue, float maxValue, float step, @@ -71,7 +71,7 @@ Rotary::Rotary(QWidget *parent, bool snapToTicks, bool centred, bool logarithmic) : - QWidget(parent), + TQWidget(parent), m_minValue(minValue), m_maxValue(maxValue), m_step(step), @@ -95,15 +95,15 @@ Rotary::Rotary(QWidget *parent, _float = new TextFloat(this); if (!_floatTimer) { - _floatTimer = new QTimer(); + _floatTimer = new TQTimer(); } // connect timer - connect(_floatTimer, SIGNAL(timeout()), this, - SLOT(slotFloatTimeout())); + connect(_floatTimer, TQT_SIGNAL(timeout()), this, + TQT_SLOT(slotFloatTimeout())); _float->hide(); - QToolTip::add + TQToolTip::add (this, i18n("Click and drag up and down or left and right to modify.\nDouble click to edit value directly.")); setFixedSize(size, size); @@ -115,8 +115,8 @@ Rotary::~Rotary() { // Remove this connection // - disconnect(_floatTimer, SIGNAL(timeout()), this, - SLOT(slotFloatTimeout())); + disconnect(_floatTimer, TQT_SIGNAL(timeout()), this, + TQT_SLOT(slotFloatTimeout())); delete _float; _float = 0; @@ -130,16 +130,16 @@ Rotary::slotFloatTimeout() } void -Rotary::setKnobColour(const QColor &colour) +Rotary::setKnobColour(const TQColor &colour) { m_knobColour = colour; repaint(); } void -Rotary::paintEvent(QPaintEvent *) +Rotary::paintEvent(TQPaintEvent *) { - QPainter paint; + TQPainter paint; double angle = ROTARY_MIN // offset + (ROTARY_RANGE * @@ -178,12 +178,12 @@ Rotary::paintEvent(QPaintEvent *) int scale = 4; int width = m_size * scale; - QPixmap map(width, width); + TQPixmap map(width, width); map.fill(paletteBackgroundColor()); paint.begin(&map); - QPen pen; - pen.setColor(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); + TQPen pen; + pen.setColor(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); pen.setWidth(scale); paint.setPen(pen); @@ -191,10 +191,10 @@ Rotary::paintEvent(QPaintEvent *) paint.setBrush(m_knobColour); } else { paint.setBrush( - kapp->palette().color(QPalette::Active, QColorGroup::Base)); + kapp->palette().color(TQPalette::Active, TQColorGroup::Base)); } - QColor c(m_knobColour); + TQColor c(m_knobColour); pen.setColor(c); paint.setPen(pen); @@ -221,7 +221,7 @@ Rotary::paintEvent(QPaintEvent *) --darkWidth; } - paint.setBrush(QBrush::NoBrush); + paint.setBrush(TQBrush::NoBrush); pen.setColor(colorGroup().dark()); pen.setWidth(scale); @@ -296,15 +296,15 @@ Rotary::paintEvent(QPaintEvent *) paint.end(); - QImage i = map.convertToImage().smoothScale(m_size, m_size); - m_pixmaps[index] = QPixmap(i); + TQImage i = map.convertToImage().smoothScale(m_size, m_size); + m_pixmaps[index] = TQPixmap(i); paint.begin(this); paint.drawPixmap(0, 0, m_pixmaps[index]); paint.end(); } void -Rotary::drawTick(QPainter &paint, double angle, int size, bool internal) +Rotary::drawTick(TQPainter &paint, double angle, int size, bool internal) { double hyp = double(size) / 2.0; double x0 = hyp - (hyp - 1) * sin(angle); @@ -371,7 +371,7 @@ Rotary::snapPosition() } void -Rotary::mousePressEvent(QMouseEvent *e) +Rotary::mousePressEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_buttonPressed = true; @@ -391,16 +391,16 @@ Rotary::mousePressEvent(QMouseEvent *e) emit valueChanged(m_snapPosition); } - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); if (!_float) _float = new TextFloat(this); _float->reparent(this); - _float->move(totalPos + QPoint(width() + 2, -height() / 2)); + _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_position))); + _float->setText(TQString("%1").arg(powf(10, m_position))); } else { - _float->setText(QString("%1").arg(m_position)); + _float->setText(TQString("%1").arg(m_position)); } _float->show(); @@ -414,7 +414,7 @@ Rotary::mousePressEvent(QMouseEvent *e) } void -Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) +Rotary::mouseDoubleClickEvent(TQMouseEvent * /*e*/) { float minv = m_minValue; float maxv = m_maxValue; @@ -437,7 +437,7 @@ Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) val, step); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { float newval = dialog.getValue(); if (m_logarithmic) { if (m_position < powf(10, -10)) m_position = -10; @@ -453,7 +453,7 @@ Rotary::mouseDoubleClickEvent(QMouseEvent * /*e*/) } void -Rotary::mouseReleaseEvent(QMouseEvent *e) +Rotary::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_buttonPressed = false; @@ -468,7 +468,7 @@ Rotary::mouseReleaseEvent(QMouseEvent *e) } void -Rotary::mouseMoveEvent(QMouseEvent *e) +Rotary::mouseMoveEvent(TQMouseEvent *e) { if (m_buttonPressed) { // Dragging by x or y axis when clicked modifies value @@ -498,15 +498,15 @@ Rotary::mouseMoveEvent(QMouseEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); } else { - _float->setText(QString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").arg(m_snapPosition)); } } } void -Rotary::wheelEvent(QWheelEvent *e) +Rotary::wheelEvent(TQWheelEvent *e) { if (e->delta() > 0) m_position -= m_pageStep; @@ -527,17 +527,17 @@ Rotary::wheelEvent(QWheelEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(QString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); } else { - _float->setText(QString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").arg(m_snapPosition)); } // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). Move just top/right of the rotary // - QPoint totalPos = mapTo(topLevelWidget(), QPoint(0, 0)); + TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); _float->reparent(this); - _float->move(totalPos + QPoint(width() + 2, -height() / 2)); + _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); _float->show(); // one shot, 500ms diff --git a/src/gui/widgets/Rotary.h b/src/gui/widgets/Rotary.h index 2efacf9..cecff8c 100644 --- a/src/gui/widgets/Rotary.h +++ b/src/gui/widgets/Rotary.h @@ -27,14 +27,14 @@ #define _RG_ROSEGARDENROTARY_H_ #include <map> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqwidget.h> -class QWheelEvent; -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQWheelEvent; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -55,7 +55,7 @@ public: StepTicks // end points plus every step interval }; - Rotary(QWidget *parent, + Rotary(TQWidget *parent, float minValue = 0.0, float maxValue = 100.0, float step = 1.0, @@ -89,8 +89,8 @@ public: // Set the colour of the knob // - void setKnobColour(const QColor &colour); - QColor getKnobColour() const { return m_knobColour; } + void setKnobColour(const TQColor &colour); + TQColor getKnobColour() const { return m_knobColour; } signals: void valueChanged(float); @@ -99,16 +99,16 @@ protected slots: void slotFloatTimeout(); protected: - virtual void paintEvent(QPaintEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void wheelEvent(QWheelEvent *e); + virtual void paintEvent(TQPaintEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void snapPosition(); void drawPosition(); - void drawTick(QPainter &paint, double angle, int size, bool internal); + void drawTick(TQPainter &paint, double angle, int size, bool internal); float m_minValue; float m_maxValue; @@ -127,7 +127,7 @@ protected: int m_lastY; int m_lastX; - QColor m_knobColour; + TQColor m_knobColour; struct CacheIndex { @@ -156,7 +156,7 @@ protected: bool centred; }; - typedef std::map<CacheIndex, QPixmap> PixmapCache; + typedef std::map<CacheIndex, TQPixmap> PixmapCache; static PixmapCache m_pixmaps; }; diff --git a/src/gui/widgets/ScrollBox.cpp b/src/gui/widgets/ScrollBox.cpp index b409209..d129a08 100644 --- a/src/gui/widgets/ScrollBox.cpp +++ b/src/gui/widgets/ScrollBox.cpp @@ -29,28 +29,28 @@ #include "ScrollBox.h" -#include <qapplication.h> -#include <qframe.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqframe.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -ScrollBox::ScrollBox(QWidget* parent, SizeMode sizeMode, const char* name) : - QFrame(parent, name), +ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : + TQFrame(parent, name), m_sizeMode(sizeMode) { setFrameStyle(Panel | Sunken); } -void ScrollBox::mousePressEvent(QMouseEvent* e) +void ScrollBox::mousePressEvent(TQMouseEvent* e) { m_mouse = e->pos(); if (e->button() == RightButton) @@ -59,7 +59,7 @@ void ScrollBox::mousePressEvent(QMouseEvent* e) emit button2Pressed(); } -void ScrollBox::mouseMoveEvent(QMouseEvent* e) +void ScrollBox::mouseMoveEvent(TQMouseEvent* e) { if (e->state() != LeftButton) return ; @@ -67,18 +67,18 @@ void ScrollBox::mouseMoveEvent(QMouseEvent* e) int dx = (e->pos().x() - m_mouse.x()) * m_pagesize.width() / width(); int dy = (e->pos().y() - m_mouse.y()) * m_pagesize.height() / height(); - emit valueChanged(QPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); + emit valueChanged(TQPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); emit valueChangedRelative(dx, dy); m_mouse = e->pos(); } -void ScrollBox::drawContents(QPainter* paint) +void ScrollBox::drawContents(TQPainter* paint) { if (m_pagesize.isEmpty()) return ; - QRect c(contentsRect()); + TQRect c(contentsRect()); paint->setPen(Qt::red); @@ -97,15 +97,15 @@ void ScrollBox::drawContents(QPainter* paint) paint->drawRect(x, y, w, h); } -void ScrollBox::setPageSize(const QSize& s) +void ScrollBox::setPageSize(const TQSize& s) { m_pagesize = s; setFixedWidth(100); setFixedHeight(100); - int maxWidth = int(QApplication::desktop()->width() * 0.75); - int maxHeight = int(QApplication::desktop()->height() * 0.75); + int maxWidth = int(TQApplication::desktop()->width() * 0.75); + int maxHeight = int(TQApplication::desktop()->height() * 0.75); if (m_sizeMode == FixWidth) { int height = s.height() * width() / s.width(); @@ -126,13 +126,13 @@ void ScrollBox::setPageSize(const QSize& s) repaint(); } -void ScrollBox::setViewSize(const QSize& s) +void ScrollBox::setViewSize(const TQSize& s) { m_viewsize = s; repaint(); } -void ScrollBox::setViewPos(const QPoint& pos) +void ScrollBox::setViewPos(const TQPoint& pos) { m_viewpos = pos; repaint(); @@ -140,17 +140,17 @@ void ScrollBox::setViewPos(const QPoint& pos) void ScrollBox::setViewX(int x) { - m_viewpos = QPoint(x, m_viewpos.y()); + m_viewpos = TQPoint(x, m_viewpos.y()); repaint(); } void ScrollBox::setViewY(int y) { - m_viewpos = QPoint(m_viewpos.x(), y); + m_viewpos = TQPoint(m_viewpos.x(), y); repaint(); } -void ScrollBox::setThumbnail(QPixmap img) +void ScrollBox::setThumbnail(TQPixmap img) { setPaletteBackgroundPixmap(img.convertToImage().smoothScale(size())); } diff --git a/src/gui/widgets/ScrollBox.h b/src/gui/widgets/ScrollBox.h index 3f8140e..ebd99a8 100644 --- a/src/gui/widgets/ScrollBox.h +++ b/src/gui/widgets/ScrollBox.h @@ -30,15 +30,15 @@ #ifndef _RG_SCROLLBOX_H_ #define _RG_SCROLLBOX_H_ -#include <qframe.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqframe.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqsize.h> -class QWidget; -class QPainter; -class QMouseEvent; +class TQWidget; +class TQPainter; +class TQMouseEvent; namespace Rosegarden @@ -51,35 +51,35 @@ class ScrollBox: public QFrame public: enum SizeMode { FixWidth, FixHeight }; - ScrollBox(QWidget *parent = 0, + ScrollBox(TQWidget *parent = 0, SizeMode mode = FixWidth, const char *name = 0); public slots: - void setPageSize(const QSize&); - void setViewSize(const QSize&); - void setViewPos(const QPoint&); - void setViewPos(int x, int y) { setViewPos(QPoint(x, y)); } + void setPageSize(const TQSize&); + void setViewSize(const TQSize&); + void setViewPos(const TQPoint&); + void setViewPos(int x, int y) { setViewPos(TQPoint(x, y)); } void setViewX(int x); void setViewY(int y); - void setThumbnail(QPixmap img); + void setThumbnail(TQPixmap img); signals: - void valueChanged(const QPoint&); + void valueChanged(const TQPoint&); void valueChangedRelative(int dx, int dy); void button2Pressed(); void button3Pressed(); protected: - void mousePressEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - void drawContents(QPainter *); + void mousePressEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); + void drawContents(TQPainter *); private: - QPoint m_viewpos; - QPoint m_mouse; - QSize m_pagesize; - QSize m_viewsize; + TQPoint m_viewpos; + TQPoint m_mouse; + TQSize m_pagesize; + TQSize m_viewsize; SizeMode m_sizeMode; }; diff --git a/src/gui/widgets/ScrollBoxDialog.cpp b/src/gui/widgets/ScrollBoxDialog.cpp index e442985..008c868 100644 --- a/src/gui/widgets/ScrollBoxDialog.cpp +++ b/src/gui/widgets/ScrollBoxDialog.cpp @@ -27,18 +27,18 @@ #include "ScrollBox.h" #include <kdialog.h> -#include <qframe.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqframe.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -ScrollBoxDialog::ScrollBoxDialog(QWidget *parent, +ScrollBoxDialog::ScrollBoxDialog(TQWidget *parent, ScrollBox::SizeMode sizeMode, const char *name, WFlags flags) : @@ -51,13 +51,13 @@ ScrollBoxDialog::~ScrollBoxDialog() { } -void ScrollBoxDialog::closeEvent(QCloseEvent *e) +void ScrollBoxDialog::closeEvent(TQCloseEvent *e) { e->accept(); emit closed(); } -void ScrollBoxDialog::setPageSize(const QSize& s) +void ScrollBoxDialog::setPageSize(const TQSize& s) { m_scrollbox->setPageSize(s); setFixedHeight(m_scrollbox->height()); diff --git a/src/gui/widgets/ScrollBoxDialog.h b/src/gui/widgets/ScrollBoxDialog.h index 8da1771..a4478c1 100644 --- a/src/gui/widgets/ScrollBoxDialog.h +++ b/src/gui/widgets/ScrollBoxDialog.h @@ -30,9 +30,9 @@ #include <kdialog.h> -class QWidget; -class QSize; -class QCloseEvent; +class TQWidget; +class TQSize; +class TQCloseEvent; namespace Rosegarden @@ -45,17 +45,17 @@ class ScrollBoxDialog : public KDialog Q_OBJECT public: - ScrollBoxDialog(QWidget *parent = 0, + ScrollBoxDialog(TQWidget *parent = 0, ScrollBox::SizeMode mode = ScrollBox::FixWidth, const char *name = 0, WFlags flags = 0); ~ScrollBoxDialog(); ScrollBox *scrollbox() { return m_scrollbox; } - void setPageSize(const QSize&); + void setPageSize(const TQSize&); protected: - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); signals: void closed(); diff --git a/src/gui/widgets/SpinBox.cpp b/src/gui/widgets/SpinBox.cpp index 10963c8..64bd300 100644 --- a/src/gui/widgets/SpinBox.cpp +++ b/src/gui/widgets/SpinBox.cpp @@ -26,22 +26,22 @@ #include "SpinBox.h" #include "misc/Strings.h" -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -SpinBox::SpinBox(QWidget *parent, const char *name): - QSpinBox(parent, name), m_doubleValue(0) +SpinBox::SpinBox(TQWidget *parent, const char *name): + TQSpinBox(parent, name), m_doubleValue(0) {} QString SpinBox::mapValueToText(int value) { - QString doubleStr; + TQString doubleStr; // Assume we want to show the precision // diff --git a/src/gui/widgets/SpinBox.h b/src/gui/widgets/SpinBox.h index a0dfffe..804935b 100644 --- a/src/gui/widgets/SpinBox.h +++ b/src/gui/widgets/SpinBox.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENSPINBOX_H_ #define _RG_ROSEGARDENSPINBOX_H_ -#include <qspinbox.h> -#include <qstring.h> +#include <tqspinbox.h> +#include <tqstring.h> -class QWidget; +class TQWidget; namespace Rosegarden @@ -47,12 +47,12 @@ class SpinBox : public QSpinBox { Q_OBJECT public: - SpinBox(QWidget *parent = 0, const char *name=0); + SpinBox(TQWidget *parent = 0, const char *name=0); double getDoubleValue() const { return m_doubleValue; } protected: - virtual QString mapValueToText (int value); + virtual TQString mapValueToText (int value); virtual int mapTextToValue(bool *ok); double m_doubleValue; diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index 5e3ddbc..b1f5cfd 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -27,20 +27,20 @@ #include <kapplication.h> #include "gui/general/GUIPalette.h" -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TextFloat::TextFloat(QWidget *parent): - QWidget(parent, "TextFloat", +TextFloat::TextFloat(TQWidget *parent): + TQWidget(parent, "TextFloat", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop), m_text("") { @@ -49,9 +49,9 @@ TextFloat::TextFloat(QWidget *parent): } void -TextFloat::reparent(QWidget *newParent) +TextFloat::reparent(TQWidget *newParent) { - QPoint position = newParent->pos(); + TQPoint position = newParent->pos(); // Get position and reparent to either top level or dialog // @@ -63,36 +63,36 @@ TextFloat::reparent(QWidget *newParent) // Position this widget to the right of the parent // - //move(pos + QPoint(parent->width() + 5, 5)); + //move(pos + TQPoint(parent->width() + 5, 5)); - QWidget::reparent(newParent, + TQWidget::reparent(newParent, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop, - position + QPoint(20, 5)); + position + TQPoint(20, 5)); } void -TextFloat::paintEvent(QPaintEvent *e) +TextFloat::paintEvent(TQPaintEvent *e) { - QPainter paint(this); + TQPainter paint(this); paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - paint.setPen(kapp->palette().color(QPalette::Active, QColorGroup::Dark)); + paint.setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); paint.setPen(GUIPalette::getColour(GUIPalette::RotaryFloatForeground)); paint.setBrush(GUIPalette::getColour(GUIPalette::RotaryFloatBackground)); - QFontMetrics metrics(paint.fontMetrics()); + TQFontMetrics metrics(paint.fontMetrics()); - QRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); + TQRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); resize(r.width() + 7, r.height() + 7); paint.drawRect(0, 0, r.width() + 6, r.height() + 6); paint.setPen(Qt::black); - paint.drawText(QRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); + paint.drawText(TQRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); /* - QRect textBound = metrics.boundingRect(m_text); + TQRect textBound = metrics.boundingRect(m_text); resize(textBound.width() + 7, textBound.height() + 7); paint.drawRect(0, 0, textBound.width() + 6, textBound.height() + 6); @@ -103,7 +103,7 @@ TextFloat::paintEvent(QPaintEvent *e) } void -TextFloat::setText(const QString &text) +TextFloat::setText(const TQString &text) { m_text = text; repaint(); diff --git a/src/gui/widgets/TextFloat.h b/src/gui/widgets/TextFloat.h index d604a83..b9463aa 100644 --- a/src/gui/widgets/TextFloat.h +++ b/src/gui/widgets/TextFloat.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENTEXTFLOAT_H_ #define _RG_ROSEGARDENTEXTFLOAT_H_ -#include <qstring.h> -#include <qwidget.h> +#include <tqstring.h> +#include <tqwidget.h> -class QPaintEvent; +class TQPaintEvent; namespace Rosegarden @@ -41,19 +41,19 @@ namespace Rosegarden class TextFloat : public QWidget { public: - TextFloat(QWidget *parent); + TextFloat(TQWidget *parent); virtual ~TextFloat() {;} - void setText(const QString &text); + void setText(const TQString &text); // Reparent the float correctly by context // - void reparent(QWidget *newParent); + void reparent(TQWidget *newParent); protected: - virtual void paintEvent(QPaintEvent *e); + virtual void paintEvent(TQPaintEvent *e); - QString m_text; + TQString m_text; }; diff --git a/src/gui/widgets/TimeWidget.cpp b/src/gui/widgets/TimeWidget.cpp index b9bad6f..8eced3a 100644 --- a/src/gui/widgets/TimeWidget.cpp +++ b/src/gui/widgets/TimeWidget.cpp @@ -24,7 +24,7 @@ #include "TimeWidget.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include "misc/Debug.h" @@ -33,27 +33,27 @@ #include "base/RealTime.h" #include "gui/editors/notation/NotationStrings.h" #include "gui/editors/notation/NotePixmapFactory.h" -#include <qcombobox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpixmap.h> -#include <qspinbox.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcombobox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpixmap.h> +#include <tqspinbox.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { -TimeWidget::TimeWidget(QString title, - QWidget *parent, +TimeWidget::TimeWidget(TQString title, + TQWidget *parent, Composition *composition, timeT absTime, bool editable, bool constrainToCompositionDuration) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_composition(composition), m_isDuration(false), m_constrain(constrainToCompositionDuration), @@ -64,14 +64,14 @@ TimeWidget::TimeWidget(QString title, init(editable); } -TimeWidget::TimeWidget(QString title, - QWidget *parent, +TimeWidget::TimeWidget(TQString title, + TQWidget *parent, Composition *composition, timeT startTime, timeT duration, bool editable, bool constrainToCompositionDuration) : - QGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Horizontal, title, parent), m_composition(composition), m_isDuration(true), m_constrain(constrainToCompositionDuration), @@ -92,18 +92,18 @@ TimeWidget::init(bool editable) bool savedEditable = editable; editable = true; - QFrame *frame = new QFrame(this); - QGridLayout *layout = new QGridLayout(frame, 7, 3, 5, 5); - QLabel *label = 0; + TQFrame *frame = new TQFrame(this); + TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5); + TQLabel *label = 0; if (m_isDuration) { - label = new QLabel(i18n("Note:"), frame); + label = new TQLabel(i18n("Note:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 0); if (editable) { - m_note = new QComboBox(frame); + m_note = new TQComboBox(frame); m_noteDurations.push_back(0); m_note->insertItem(i18n("<inexact>")); for (size_t i = 0; i < sizeof(denoms) / sizeof(denoms[0]); ++i) { @@ -116,52 +116,52 @@ TimeWidget::init(bool editable) timeT dottedDuration = duration * 3 / 2; m_noteDurations.push_back(dottedDuration); timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (dottedDuration, false, error); - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(dottedDuration, error)); m_note->insertItem(pmap, label); // ignore error } m_noteDurations.push_back(duration); timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (duration, false, error); - QPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(duration, error)); m_note->insertItem(pmap, label); // ignore error } - connect(m_note, SIGNAL(activated(int)), - this, SLOT(slotNoteChanged(int))); + connect(m_note, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotNoteChanged(int))); layout->addMultiCellWidget(m_note, 0, 0, 1, 3); } else { m_note = 0; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel + TQString label = NotationStrings::makeNoteMenuLabel (m_time, false, error); if (error != 0) label = i18n("<inexact>"); - QLineEdit *le = new QLineEdit(label, frame); + TQLineEdit *le = new TQLineEdit(label, frame); le->setReadOnly(true); layout->addMultiCellWidget(le, 0, 0, 1, 3); } - label = new QLabel(i18n("Units:"), frame); + label = new TQLabel(i18n("Units:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 4); if (editable) { - m_timeT = new QSpinBox(frame); + m_timeT = new TQSpinBox(frame); m_timeT->setLineStep (Note(Note::Shortest).getDuration()); - connect(m_timeT, SIGNAL(valueChanged(int)), - this, SLOT(slotTimeTChanged(int))); + connect(m_timeT, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotTimeTChanged(int))); layout->addWidget(m_timeT, 0, 5); } else { m_timeT = 0; - QLineEdit *le = new QLineEdit(QString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); le->setReadOnly(true); layout->addWidget(le, 0, 5); } @@ -170,64 +170,64 @@ TimeWidget::init(bool editable) m_note = 0; - label = new QLabel(i18n("Time:"), frame); + label = new TQLabel(i18n("Time:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 0, 0); if (editable) { - m_timeT = new QSpinBox(frame); + m_timeT = new TQSpinBox(frame); m_timeT->setLineStep (Note(Note::Shortest).getDuration()); - connect(m_timeT, SIGNAL(valueChanged(int)), - this, SLOT(slotTimeTChanged(int))); + connect(m_timeT, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotTimeTChanged(int))); layout->addWidget(m_timeT, 0, 1); - layout->addWidget(new QLabel(i18n("units"), frame), 0, 2); + layout->addWidget(new TQLabel(i18n("units"), frame), 0, 2); } else { m_timeT = 0; - QLineEdit *le = new QLineEdit(QString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); le->setReadOnly(true); layout->addWidget(le, 0, 2); } } - label = new QLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); + label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 1, 0); if (editable) { m_barLabel = 0; - m_bar = new QSpinBox(frame); + m_bar = new TQSpinBox(frame); if (m_isDuration) m_bar->setMinValue(0); - connect(m_bar, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_bar, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_bar, 1, 1); } else { m_bar = 0; - m_barLabel = new QLineEdit(frame); + m_barLabel = new TQLineEdit(frame); m_barLabel->setReadOnly(true); layout->addWidget(m_barLabel, 1, 1); } - label = new QLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); + label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 1, 2); if (editable) { m_beatLabel = 0; - m_beat = new QSpinBox(frame); + m_beat = new TQSpinBox(frame); m_beat->setMinValue(1); - connect(m_beat, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_beat, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_beat, 1, 3); } else { m_beat = 0; - m_beatLabel = new QLineEdit(frame); + m_beatLabel = new TQLineEdit(frame); m_beatLabel->setReadOnly(true); layout->addWidget(m_beatLabel, 1, 3); } - label = new QLabel(i18n("%1:").arg(NotationStrings::getShortNoteName + label = new TQLabel(i18n("%1:").arg(NotationStrings::getShortNoteName (Note (Note::Shortest), true)), frame); @@ -236,61 +236,61 @@ TimeWidget::init(bool editable) if (editable) { m_fractionLabel = 0; - m_fraction = new QSpinBox(frame); + m_fraction = new TQSpinBox(frame); m_fraction->setMinValue(1); - connect(m_fraction, SIGNAL(valueChanged(int)), - this, SLOT(slotBarBeatOrFractionChanged(int))); + connect(m_fraction, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); layout->addWidget(m_fraction, 1, 5); } else { m_fraction = 0; - m_fractionLabel = new QLineEdit(frame); + m_fractionLabel = new TQLineEdit(frame); m_fractionLabel->setReadOnly(true); layout->addWidget(m_fractionLabel, 1, 5); } - m_timeSig = new QLabel(frame); + m_timeSig = new TQLabel(frame); layout->addWidget(m_timeSig, 1, 6); - label = new QLabel(i18n("Seconds:"), frame); + label = new TQLabel(i18n("Seconds:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 2, 0); if (editable) { m_secLabel = 0; - m_sec = new QSpinBox(frame); + m_sec = new TQSpinBox(frame); if (m_isDuration) m_sec->setMinValue(0); - connect(m_sec, SIGNAL(valueChanged(int)), - this, SLOT(slotSecOrMSecChanged(int))); + connect(m_sec, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSecOrMSecChanged(int))); layout->addWidget(m_sec, 2, 1); } else { m_sec = 0; - m_secLabel = new QLineEdit(frame); + m_secLabel = new TQLineEdit(frame); m_secLabel->setReadOnly(true); layout->addWidget(m_secLabel, 2, 1); } - label = new QLabel(i18n("msec:"), frame); + label = new TQLabel(i18n("msec:"), frame); label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); layout->addWidget(label, 2, 2); if (editable) { m_msecLabel = 0; - m_msec = new QSpinBox(frame); + m_msec = new TQSpinBox(frame); m_msec->setMinValue(0); m_msec->setLineStep(10); - connect(m_msec, SIGNAL(valueChanged(int)), - this, SLOT(slotSecOrMSecChanged(int))); + connect(m_msec, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotSecOrMSecChanged(int))); layout->addWidget(m_msec, 2, 3); } else { m_msec = 0; - m_msecLabel = new QLineEdit(frame); + m_msecLabel = new TQLineEdit(frame); m_msecLabel->setReadOnly(true); layout->addWidget(m_msecLabel, 2, 3); } if (m_isDuration) { - m_tempo = new QLabel(frame); + m_tempo = new TQLabel(frame); layout->addWidget(m_tempo, 2, 6); } else { m_tempo = 0; @@ -383,7 +383,7 @@ TimeWidget::populate() } m_bar->setValue(bars); } else { - m_barLabel->setText(QString("%1").arg(bars)); + m_barLabel->setText(TQString("%1").arg(bars)); } if (m_beat) { @@ -391,7 +391,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar() - 1); m_beat->setValue(beats); } else { - m_beatLabel->setText(QString("%1").arg(beats)); + m_beatLabel->setText(TQString("%1").arg(beats)); } if (m_fraction) { @@ -401,7 +401,7 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(QString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").arg(hemidemis)); } m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). @@ -422,7 +422,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(QString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").arg(rt.sec)); } if (m_msec) { @@ -430,7 +430,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(QString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").arg(rt.msec())); } bool change = (m_composition->getTempoChangeNumberAt(endTime) != @@ -507,7 +507,7 @@ TimeWidget::populate() } m_bar->setValue(bar + 1); } else { - m_barLabel->setText(QString("%1").arg(bar + 1)); + m_barLabel->setText(TQString("%1").arg(bar + 1)); } if (m_beat) { @@ -515,7 +515,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar()); m_beat->setValue(beat); } else { - m_beatLabel->setText(QString("%1").arg(beat)); + m_beatLabel->setText(TQString("%1").arg(beat)); } if (m_fraction) { @@ -525,7 +525,7 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(QString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").arg(hemidemis)); } m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). @@ -543,7 +543,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(QString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").arg(rt.sec)); } if (m_msec) { @@ -551,7 +551,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(QString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").arg(rt.msec())); } } diff --git a/src/gui/widgets/TimeWidget.h b/src/gui/widgets/TimeWidget.h index 5ffa17a..874981d 100644 --- a/src/gui/widgets/TimeWidget.h +++ b/src/gui/widgets/TimeWidget.h @@ -27,17 +27,17 @@ #define _RG_ROSEGARDENTIMEWIDGET_H_ #include "base/RealTime.h" -#include <qgroupbox.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QSpinBox; -class QLineEdit; -class QLabel; -class QComboBox; +class TQWidget; +class TQSpinBox; +class TQLineEdit; +class TQLabel; +class TQComboBox; namespace Rosegarden @@ -53,8 +53,8 @@ public: /** * Constructor for absolute time widget */ - TimeWidget(QString title, - QWidget *parent, + TimeWidget(TQString title, + TQWidget *parent, Composition *composition, // for bar/beat/msec timeT initialTime, bool editable = true, @@ -65,8 +65,8 @@ public: * at which this duration begins, necessary so that we can show the * correct real-time (based on tempo at startTime) etc. */ - TimeWidget(QString title, - QWidget *parent, + TimeWidget(TQString title, + TQWidget *parent, Composition *composition, // for bar/beat/msec timeT startTime, timeT initialDuration, @@ -98,20 +98,20 @@ private: timeT m_startTime; timeT m_defaultTime; - QComboBox *m_note; - QSpinBox *m_timeT; - QSpinBox *m_bar; - QSpinBox *m_beat; - QSpinBox *m_fraction; - QLineEdit *m_barLabel; - QLineEdit *m_beatLabel; - QLineEdit *m_fractionLabel; - QLabel *m_timeSig; - QSpinBox *m_sec; - QSpinBox *m_msec; - QLineEdit *m_secLabel; - QLineEdit *m_msecLabel; - QLabel *m_tempo; + TQComboBox *m_note; + TQSpinBox *m_timeT; + TQSpinBox *m_bar; + TQSpinBox *m_beat; + TQSpinBox *m_fraction; + TQLineEdit *m_barLabel; + TQLineEdit *m_beatLabel; + TQLineEdit *m_fractionLabel; + TQLabel *m_timeSig; + TQSpinBox *m_sec; + TQSpinBox *m_msec; + TQLineEdit *m_secLabel; + TQLineEdit *m_msecLabel; + TQLabel *m_tempo; void init(bool editable); void populate(); diff --git a/src/gui/widgets/TristateCheckBox.cpp b/src/gui/widgets/TristateCheckBox.cpp index 89ade5d..df52362 100644 --- a/src/gui/widgets/TristateCheckBox.cpp +++ b/src/gui/widgets/TristateCheckBox.cpp @@ -25,15 +25,15 @@ #include "TristateCheckBox.h" -#include <qcheckbox.h> -#include <qwidget.h> +#include <tqcheckbox.h> +#include <tqwidget.h> namespace Rosegarden { void -TristateCheckBox::mouseReleaseEvent(QMouseEvent *) +TristateCheckBox::mouseReleaseEvent(TQMouseEvent *) {} TristateCheckBox::~TristateCheckBox() diff --git a/src/gui/widgets/TristateCheckBox.h b/src/gui/widgets/TristateCheckBox.h index 699252a..30e7db0 100644 --- a/src/gui/widgets/TristateCheckBox.h +++ b/src/gui/widgets/TristateCheckBox.h @@ -26,11 +26,11 @@ #ifndef _RG_ROSEGARDENTRISTATECHECKBOX_H_ #define _RG_ROSEGARDENTRISTATECHECKBOX_H_ -#include <qcheckbox.h> +#include <tqcheckbox.h> -class QWidget; -class QMouseEvent; +class TQWidget; +class TQMouseEvent; namespace Rosegarden @@ -46,15 +46,15 @@ class TristateCheckBox : public QCheckBox { Q_OBJECT public: - TristateCheckBox(QWidget *parent=0, - const char *name=0):QCheckBox(parent, name) + TristateCheckBox(TQWidget *parent=0, + const char *name=0):TQCheckBox(parent, name) { setTristate(true) ;} virtual ~TristateCheckBox(); protected: // don't emit when the button is released - virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); private: }; diff --git a/src/gui/widgets/VUMeter.cpp b/src/gui/widgets/VUMeter.cpp index ae9fe84..1a6d90d 100644 --- a/src/gui/widgets/VUMeter.cpp +++ b/src/gui/widgets/VUMeter.cpp @@ -29,18 +29,18 @@ #include "base/AudioLevel.h" #include "gui/general/GUIPalette.h" #include "gui/rulers/VelocityColour.h" -#include <qbrush.h> -#include <qcolor.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqwidget.h> namespace Rosegarden { -VUMeter::VUMeter(QWidget *parent, +VUMeter::VUMeter(TQWidget *parent, VUMeterType type, bool stereo, bool hasRecord, @@ -48,7 +48,7 @@ VUMeter::VUMeter(QWidget *parent, int height, VUAlignment alignment, const char *name): - QLabel(parent, name), + TQLabel(parent, name), m_originalHeight(height), m_active(true), m_type(type), @@ -92,28 +92,28 @@ VUMeter::VUMeter(QWidget *parent, // Always init the left fall timer // - m_fallTimerLeft = new QTimer(); + m_fallTimerLeft = new TQTimer(); - connect(m_fallTimerLeft, SIGNAL(timeout()), - this, SLOT(slotReduceLevelLeft())); + connect(m_fallTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelLeft())); if (m_showPeakLevel) { - m_peakTimerLeft = new QTimer(); + m_peakTimerLeft = new TQTimer(); - connect(m_peakTimerLeft, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakLeft())); + connect(m_peakTimerLeft, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakLeft())); } if (stereo) { - m_fallTimerRight = new QTimer(); + m_fallTimerRight = new TQTimer(); - connect(m_fallTimerRight, SIGNAL(timeout()), - this, SLOT(slotReduceLevelRight())); + connect(m_fallTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotReduceLevelRight())); if (m_showPeakLevel) { - m_peakTimerRight = new QTimer(); - connect(m_peakTimerRight, SIGNAL(timeout()), - this, SLOT(slotStopShowingPeakRight())); + m_peakTimerRight = new TQTimer(); + connect(m_peakTimerRight, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotStopShowingPeakRight())); } } @@ -133,22 +133,22 @@ VUMeter::VUMeter(QWidget *parent, red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::ShortFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::ShortFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::ShortFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::LongFader); orange = AudioLevel::dB_to_fader( -2.0, max, AudioLevel::LongFader); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::LongFader); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIEC) { red = AudioLevel::dB_to_fader( -0.1, max, AudioLevel::IEC268Meter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268Meter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268Meter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else if (m_type == AudioPeakHoldIECLong) { red = AudioLevel::dB_to_fader( 0.0, max, AudioLevel::IEC268LongMeter); orange = AudioLevel::dB_to_fader( -6.0, max, AudioLevel::IEC268LongMeter); green = AudioLevel::dB_to_fader( -10.0, max, AudioLevel::IEC268LongMeter); - m_background = QColor(50, 50, 50); + m_background = TQColor(50, 50, 50); } else { red = max * 92 / 100; orange = max * 60 / 100; @@ -315,16 +315,16 @@ VUMeter::setLevel(double leftLevel, double rightLevel, bool record) } if (m_active) { - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } } void -VUMeter::paintEvent(QPaintEvent *e) +VUMeter::paintEvent(TQPaintEvent *e) { // RG_DEBUG << "VUMeter::paintEvent - height = " << height() << endl; - QPainter paint(this); + TQPainter paint(this); if (m_type == VUMeter::AudioPeakHoldShort || m_type == VUMeter::AudioPeakHoldLong || @@ -368,7 +368,7 @@ VUMeter::paintEvent(QPaintEvent *e) } void -VUMeter::drawColouredBar(QPainter *paint, int channel, +VUMeter::drawColouredBar(TQPainter *paint, int channel, int x, int y, int w, int h) { if (m_type == AudioPeakHoldLong || @@ -384,14 +384,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x, y, w, h - loud); } } else { if (w > loud) { paint->setPen(m_velocityColour->getLoudColour()); - paint->setBrush(QBrush(m_velocityColour->getLoudColour(), + paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), style)); paint->drawRect(x + loud, y, w - loud, h); } @@ -400,7 +400,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { if (h > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x, y + (h > loud ? (h - loud) : 0), w, std::min(h - medium, loud - medium)); @@ -408,7 +408,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } else { if (w > medium) { paint->setPen(m_velocityColour->getMediumColour()); - paint->setBrush(QBrush(m_velocityColour->getMediumColour(), + paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), style)); paint->drawRect(x + medium, y, std::min(w - medium, loud - medium), h); @@ -417,13 +417,13 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (m_alignment == Vertical) { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y + (h > medium ? (h - medium) : 0), w, std::min(h, medium)); } else { paint->setPen(m_velocityColour->getQuietColour()); - paint->setBrush(QBrush(m_velocityColour->getQuietColour(), + paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); paint->drawRect(x, y, std::min(w, medium), h); } @@ -432,14 +432,14 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, if (channel == 0) { - QColor mixedColour = m_velocityColour->getColour(m_levelLeft); + TQColor mixedColour = m_velocityColour->getColour(m_levelLeft); paint->setPen(mixedColour); paint->setBrush(mixedColour); } else { - QColor mixedColour = m_velocityColour->getColour(m_levelRight); + TQColor mixedColour = m_velocityColour->getColour(m_levelRight); paint->setPen(mixedColour); paint->setBrush(mixedColour); @@ -452,7 +452,7 @@ VUMeter::drawColouredBar(QPainter *paint, int channel, } void -VUMeter::drawMeterLevel(QPainter* paint) +VUMeter::drawMeterLevel(TQPainter* paint) { int medium = m_velocityColour->getMediumKnee(), loud = m_velocityColour->getLoudKnee(); @@ -639,7 +639,7 @@ VUMeter::slotReduceLevelRight() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } @@ -674,7 +674,7 @@ VUMeter::slotReduceLevelLeft() meterStop(); } - QPainter paint(this); + TQPainter paint(this); drawMeterLevel(&paint); } diff --git a/src/gui/widgets/VUMeter.h b/src/gui/widgets/VUMeter.h index 0a06dfd..fd75b9a 100644 --- a/src/gui/widgets/VUMeter.h +++ b/src/gui/widgets/VUMeter.h @@ -26,14 +26,14 @@ #ifndef _RG_VUMETER_H_ #define _RG_VUMETER_H_ -#include <qcolor.h> -#include <qlabel.h> +#include <tqcolor.h> +#include <tqlabel.h> -class QWidget; -class QTimer; -class QPaintEvent; -class QPainter; +class TQWidget; +class TQTimer; +class TQPaintEvent; +class TQPainter; namespace Rosegarden @@ -76,13 +76,13 @@ public: void setRecordLevel(double level); void setRecordLevel(double leftLevel, double rightLevel); - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); protected: // Constructor is protected - we can only create an object // from a sub-class of this type from a sub-class. // - VUMeter(QWidget *parent = 0, + VUMeter(TQWidget *parent = 0, VUMeterType type = Plain, bool stereo = false, bool hasRecord = false, @@ -109,13 +109,13 @@ private slots: private: - void drawMeterLevel(QPainter *paint); - void drawColouredBar(QPainter *paint, int channel, + void drawMeterLevel(TQPainter *paint); + void drawColouredBar(TQPainter *paint, int channel, int x, int y, int w, int h); VUMeterType m_type; VUAlignment m_alignment; - QColor m_background; + TQColor m_background; short m_maxLevel; @@ -124,16 +124,16 @@ private: short m_peakLevelLeft; short m_levelStepLeft; short m_recordLevelStepLeft; - QTimer *m_fallTimerLeft; - QTimer *m_peakTimerLeft; + TQTimer *m_fallTimerLeft; + TQTimer *m_peakTimerLeft; short m_levelRight; short m_recordLevelRight; short m_peakLevelRight; short m_levelStepRight; short m_recordLevelStepRight; - QTimer *m_fallTimerRight; - QTimer *m_peakTimerRight; + TQTimer *m_fallTimerRight; + TQTimer *m_peakTimerRight; bool m_showPeakLevel; short m_baseLevelStep; diff --git a/src/gui/widgets/WheelyButton.cpp b/src/gui/widgets/WheelyButton.cpp index e63cb3b..527a6d0 100644 --- a/src/gui/widgets/WheelyButton.cpp +++ b/src/gui/widgets/WheelyButton.cpp @@ -25,8 +25,8 @@ #include "WheelyButton.h" -#include <qpushbutton.h> -#include <qwidget.h> +#include <tqpushbutton.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/WheelyButton.h b/src/gui/widgets/WheelyButton.h index 83de80d..050fd9b 100644 --- a/src/gui/widgets/WheelyButton.h +++ b/src/gui/widgets/WheelyButton.h @@ -26,11 +26,11 @@ #ifndef _RG_WHEELYBUTTON_H_ #define _RG_WHEELYBUTTON_H_ -#include <qpushbutton.h> +#include <tqpushbutton.h> -class QWidget; -class QWheelEvent; +class TQWidget; +class TQWheelEvent; namespace Rosegarden @@ -43,14 +43,14 @@ class WheelyButton : public QPushButton Q_OBJECT public: - WheelyButton(QWidget *w) : QPushButton(w) { } + WheelyButton(TQWidget *w) : TQPushButton(w) { } virtual ~WheelyButton() { } signals: void wheel(bool up); protected: - void wheelEvent(QWheelEvent *e) { + void wheelEvent(TQWheelEvent *e) { emit wheel(e->delta() > 0); } }; diff --git a/src/gui/widgets/ZoomSlider.cpp b/src/gui/widgets/ZoomSlider.cpp index 1986635..aff7388 100644 --- a/src/gui/widgets/ZoomSlider.cpp +++ b/src/gui/widgets/ZoomSlider.cpp @@ -25,8 +25,8 @@ #include "ZoomSlider.h" -#include <qslider.h> -#include <qwidget.h> +#include <tqslider.h> +#include <tqwidget.h> namespace Rosegarden diff --git a/src/gui/widgets/ZoomSlider.h b/src/gui/widgets/ZoomSlider.h index 635d074..9f4235a 100644 --- a/src/gui/widgets/ZoomSlider.h +++ b/src/gui/widgets/ZoomSlider.h @@ -26,12 +26,12 @@ #ifndef _RG_ZOOMSLIDER_H_ #define _RG_ZOOMSLIDER_H_ -#include <qslider.h> +#include <tqslider.h> #include <vector> class T; -class QWidget; +class TQWidget; namespace Rosegarden @@ -60,7 +60,7 @@ public: * to the user as a nice continuous range. */ ZoomSlider(const std::vector<T> &sizes, T defaultValue, - Orientation, QWidget * parent, const char * name=0); + Orientation, TQWidget * parent, const char * name=0); virtual ~ZoomSlider(); @@ -85,8 +85,8 @@ protected: template<class T> ZoomSlider<T>::ZoomSlider(const std::vector<T> &sizes, T initialSize, Orientation o, - QWidget *parent, const char *name) : - QSlider(0, sizes.size()-1, 1, + TQWidget *parent, const char *name) : + TQSlider(0, sizes.size()-1, 1, getIndex(sizes, initialSize), o, parent, name), m_sizes(sizes), m_defaultValue(initialSize) |