diff options
Diffstat (limited to 'src/gui/application/main.cpp')
-rw-r--r-- | src/gui/application/main.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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(); |