diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
commit | 458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch) | |
tree | 624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/editors/notation/NotationStrings.cpp | |
parent | 747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff) | |
download | rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip |
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/notation/NotationStrings.cpp')
-rw-r--r-- | src/gui/editors/notation/NotationStrings.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6065323..0c73bbc 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -39,7 +39,7 @@ namespace Rosegarden { -QString +TQString NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { @@ -49,31 +49,31 @@ NotationStrings::addDots(TQString s, int dots, if (internationalize) { if (dots > 1) { if (hyphenate) - return i18n("%1-dotted-%2").arg(dots).arg(s); + return i18n("%1-dotted-%2").tqarg(dots).tqarg(s); else - return i18n("%1-dotted %2").arg(dots).arg(s); + return i18n("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return i18n("dotted-%1").arg(s); + return i18n("dotted-%1").tqarg(s); else - return i18n("dotted %1").arg(s); + return i18n("dotted %1").tqarg(s); } } else { if (dots > 1) { if (hyphenate) - return TQString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").tqarg(dots).tqarg(s); else - return TQString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return TQString("dotted-%1").arg(s); + return TQString("dotted-%1").tqarg(s); else - return TQString("dotted %1").arg(s); + return TQString("dotted %1").tqarg(s); } } } -QString +TQString NotationStrings::getNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -93,17 +93,17 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getAmericanName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -123,17 +123,17 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").tqarg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").tqarg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } } -QString +TQString NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -151,17 +151,17 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getReferenceName(Note note, bool isRest) { Note::Type type = note.getNoteType(); @@ -182,7 +182,7 @@ Note NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); - int pos = name.find('-'); + int pos = name.tqfind('-'); int dots = 0; if (pos > 0 && pos < 6 && pos < int(name.length()) - 1) { @@ -236,7 +236,7 @@ NotationStrings::getNoteForName(TQString name) throw MalformedNoteName("Can't parse note name \"" + origName + "\""); } -QString +TQString NotationStrings::makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, @@ -271,11 +271,11 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return TQString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").tqarg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return TQString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").tqarg(duration / wholeNote); } else { - return i18n("%1 ticks").arg(duration); + return i18n("%1 ticks").tqarg(duration); plural = false; } |