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/parameters/MIDIInstrumentParameterPanel.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/parameters/MIDIInstrumentParameterPanel.cpp')
-rw-r--r-- | src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp index 61a9256..37ea57c 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp @@ -60,10 +60,10 @@ namespace Rosegarden { -MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent): - InstrumentParameterPanel(doc, parent), +MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent): + InstrumentParameterPanel(doc, tqparent), m_rotaryFrame(0), - m_rotaryMapper(new TQSignalMapper(this)) + m_rotaryMapper(new TQSignalMapper(TQT_TQOBJECT(this))) { m_mainGrid = new TQGridLayout(this, 10, 3, 2, 1); @@ -98,7 +98,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc m_variationValue->setMinimumWidth(width22); m_connectionLabel->setFixedWidth(width25); - m_connectionLabel->setAlignment(Qt::AlignCenter); + m_connectionLabel->tqsetAlignment(TQt::AlignCenter); // Configure the empty final row to accomodate any extra vertical space. @@ -131,7 +131,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Populate channel lists // for (int i = 0; i < 16; i++) { - m_channelValue->insertItem(TQString("%1").arg(i + 1)); + m_channelValue->insertItem(TQString("%1").tqarg(i + 1)); } m_channelValue->setSizeLimit(16); @@ -212,13 +212,13 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument) // TQString connection(strtoqstr(md->getConnection())); if (connection == "") { - m_connectionLabel->setText(i18n("[ %1 ]").arg(i18n("No connection"))); + m_connectionLabel->setText(i18n("[ %1 ]").tqarg(i18n("No connection"))); } else { // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); - TQString text = i18n("[ %1 ]").arg(connection); + TQString text = i18n("[ %1 ]").tqarg(connection); /*TQString origText(text); TQFontMetrics metrics(m_connectionLabel->fontMetrics()); @@ -293,7 +293,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) { if (!m_rotaryFrame) { m_rotaryFrame = new TQFrame(this); - m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, Qt::AlignHCenter); + m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, TQt::AlignHCenter); m_rotaryGrid = new TQGridLayout(m_rotaryFrame, 10, 3, 8, 1); m_rotaryGrid->addItem(new TQSpacerItem(10, 4), 0, 1); } @@ -321,7 +321,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Get the knob colour - only if the colour is non-default (>0) // - TQColor knobColour = Qt::black; // special case for Rotary + TQColor knobColour = TQt::black; // special case for Rotary if (it->getColourIndex() > 0) { Colour c = comp.getGeneralColourMap().getColourByIndex @@ -361,7 +361,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) redraw = 0; } if (redraw == 2) { - rotary->repaint(); + rotary->tqrepaint(); } // Update the controller name that is associated with @@ -425,7 +425,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Add signal mapping // - m_rotaryMapper->setMapping(rotary, + m_rotaryMapper->setMapping(TQT_TQOBJECT(rotary), int(it->getControllerValue())); count++; @@ -641,8 +641,8 @@ MIDIInstrumentParameterPanel::populateProgramList() std::string programName = programs[i].getName(); if (programName != "") { m_programValue->insertItem(TQString("%1. %2") - .arg(programs[i].getProgram() + 1) - .arg(strtoqstr(programName))); + .tqarg(programs[i].getProgram() + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == programs[i]) { currentProgram = m_programs.size(); } @@ -763,8 +763,8 @@ MIDIInstrumentParameterPanel::populateVariationList() strtoqstr(programName)); */ m_variationValue->insertItem(TQString("%1. %2") - .arg(variations[i] + 1) - .arg(strtoqstr(programName))); + .tqarg(variations[i] + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == program) { currentVariation = m_variations.size(); } @@ -787,7 +787,7 @@ MIDIInstrumentParameterPanel::populateVariationList() } } else { - //!!! seem to have problems here -- the grid layout doesn't + //!!! seem to have problems here -- the grid tqlayout doesn't //like us adding stuff in the middle so if we go from 1 //visible row (say program) to 2 (program + variation) the //second one overlaps the control knobs @@ -1164,7 +1164,7 @@ MIDIInstrumentParameterPanel::showAdditionalControls(bool showThem) m_instrumentLabel->setShown(showThem); int index = 0; for (RotaryMap::iterator it = m_rotaries.begin(); it != m_rotaries.end(); ++it) { - it->second.first->parentWidget()->setShown(showThem || (index < 8)); + it->second.first->tqparentWidget()->setShown(showThem || (index < 8)); //it->second.first->setShown(showThem || (index < 8)); //it->second.second->setShown(showThem || (index < 8)); index++; |