From 11f31c37e5fa4889d9989f10272f44845449cb7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 6 Sep 2010 20:59:29 +0000 Subject: Initial TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/editors/notation/TrackHeader.cpp | 70 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/gui/editors/notation/TrackHeader.cpp') 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 #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include 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(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); -- cgit v1.2.1