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 | |
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')
16 files changed, 106 insertions, 98 deletions
diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp index bfa61a8..d7bf79a 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp @@ -115,7 +115,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, << ", index = " << index << ", plugin = " << plugin << endl; - TQColor pluginBackgroundColour = Qt::black; + TQColor pluginBackgroundColour = TQt::black; bool bypassed = false; TQPushButton *button = 0; @@ -179,7 +179,7 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, AudioPluginInstance *inst = m_selectedInstrument->getPlugin(pluginIndex); - TQColor backgroundColour = Qt::black; // default background colour + TQColor backgroundColour = TQt::black; // default background colour if (inst && inst->isAssigned()) { AudioPlugin *pluginClass @@ -203,7 +203,7 @@ AudioInstrumentParameterPanel::setButtonColour( RG_DEBUG << "AudioInstrumentParameterPanel::setButtonColour " << "pluginIndex = " << pluginIndex << ", bypassState = " << bypassState - << ", rgb = " << colour.name() << endl; + << ", rgb = " << TQString(colour.name()).ascii() << endl; TQPushButton *button = 0; @@ -225,7 +225,7 @@ AudioInstrumentParameterPanel::setButtonColour( button-> setPaletteBackgroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); - } else if (colour == Qt::black) { + } else if (colour == TQt::black) { button-> setPaletteForegroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); @@ -235,15 +235,15 @@ AudioInstrumentParameterPanel::setButtonColour( color(TQPalette::Active, TQColorGroup::Button)); } else { button-> - setPaletteForegroundColor(Qt::white); + setPaletteForegroundColor(TQt::white); button-> setPaletteBackgroundColor(colour); } } -AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent) - : InstrumentParameterPanel(doc, parent), +AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent) + : InstrumentParameterPanel(doc, tqparent), m_audioFader(new AudioFaderBox(this)) { TQGridLayout *gridLayout = new TQGridLayout(this, 3, 2, 5, 5); @@ -382,7 +382,7 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) button->setText(noneText); TQToolTip::add (button, noneText); - setButtonColour(index, inst ? inst->isBypassed() : false, Qt::black); + setButtonColour(index, inst ? inst->isBypassed() : false, TQt::black); } } diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h index 87da334..a9ff117 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h @@ -47,8 +47,9 @@ class AudioFaderBox; class AudioInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent); + AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent); virtual void setupForInstrument(Instrument*); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.cpp b/src/gui/editors/parameters/InstrumentParameterBox.cpp index 1d5b99d..610f9ed 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.cpp +++ b/src/gui/editors/parameters/InstrumentParameterBox.cpp @@ -49,10 +49,10 @@ namespace Rosegarden { InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Instrument"), i18n("Instrument Parameters"), - parent), + tqparent), m_widgetStack(new TQWidgetStack(this)), m_noInstrumentParameters(new TQVBox(this)), m_midiInstrumentParameters(new MIDIInstrumentParameterPanel(doc, this)), @@ -66,16 +66,16 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, m_midiInstrumentParameters->setFont(m_font); m_audioInstrumentParameters->setFont(m_font); - bool contains = false; + bool tqcontains = false; std::vector<InstrumentParameterBox*>::iterator it = instrumentParamBoxes.begin(); for (; it != instrumentParamBoxes.end(); it++) if ((*it) == this) - contains = true; + tqcontains = true; - if (!contains) + if (!tqcontains) instrumentParamBoxes.push_back(this); m_widgetStack->addWidget(m_midiInstrumentParameters); @@ -122,8 +122,8 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, // Layout the groups left to right. - TQBoxLayout* layout = new TQVBoxLayout(this); - layout->addWidget(m_widgetStack); + TQBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->addWidget(m_widgetStack); } @@ -149,7 +149,7 @@ InstrumentParameterBox::getSelectedInstrument() return m_doc->getStudio().getInstrumentById(m_selectedInstrument); } -QString +TQString InstrumentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { return i18n("Track"); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.h b/src/gui/editors/parameters/InstrumentParameterBox.h index cc36351..cb50d7a 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.h +++ b/src/gui/editors/parameters/InstrumentParameterBox.h @@ -53,10 +53,11 @@ class AudioInstrumentParameterPanel; class InstrumentParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent = 0); + TQWidget *tqparent = 0); ~InstrumentParameterBox(); void useInstrument(Instrument *instrument); diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.cpp b/src/gui/editors/parameters/InstrumentParameterPanel.cpp index a47a8a8..d0f45d4 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/InstrumentParameterPanel.cpp @@ -38,8 +38,8 @@ namespace Rosegarden { InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, - TQWidget* parent) - : TQFrame(parent), + TQWidget* tqparent) + : TQFrame(tqparent), m_instrumentLabel(new KSqueezedTextLabel(this)), m_selectedInstrument(0), m_doc(doc) @@ -48,7 +48,7 @@ InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, int width25 = metrics.width("1234567890123456789012345"); m_instrumentLabel->setFixedWidth(width25); - m_instrumentLabel->setAlignment(Qt::AlignCenter); + m_instrumentLabel->tqsetAlignment(TQt::AlignCenter); } void diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.h b/src/gui/editors/parameters/InstrumentParameterPanel.h index 717ffd2..42ceee5 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.h +++ b/src/gui/editors/parameters/InstrumentParameterPanel.h @@ -47,11 +47,12 @@ typedef std::vector<std::pair<int, RotaryPair> > RotaryMap; //////////////////////////////////////////////////////////////////////// -class InstrumentParameterPanel : public QFrame +class InstrumentParameterPanel : public TQFrame { Q_OBJECT + TQ_OBJECT public: - InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); virtual ~InstrumentParameterPanel() {}; 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++; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h index 22c0ba1..635c009 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h @@ -52,9 +52,10 @@ class Instrument; class MIDIInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); void setupControllers(MidiDevice *); // setup ControlParameters on box diff --git a/src/gui/editors/parameters/RosegardenParameterArea.cpp b/src/gui/editors/parameters/RosegardenParameterArea.cpp index 8790122..1fc924e 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.cpp +++ b/src/gui/editors/parameters/RosegardenParameterArea.cpp @@ -46,11 +46,11 @@ namespace Rosegarden { -RosegardenParameterArea::RosegardenParameterArea(TQWidget *parent, +RosegardenParameterArea::RosegardenParameterArea(TQWidget *tqparent, const char *name, WFlags f) - : TQWidgetStack(parent, name, f), + : TQWidgetStack(tqparent, name, f), m_style(RosegardenParameterArea::CLASSIC_STYLE), - m_scrollView(new TQScrollView(this, 0, Qt::WStaticContents)), + m_scrollView(new TQScrollView(this, 0, TQt::WStaticContents)), m_classic(new TQVBox(m_scrollView->viewport())), m_tabBox(new KTabWidget(this)), m_active(0), @@ -86,15 +86,15 @@ void RosegardenParameterArea::addRosegardenParameterBox( m_parameterBoxes.push_back(b); m_scrollView->setMinimumWidth(std::max(m_scrollView->minimumWidth(), - b->sizeHint().width()) + 8); + b->tqsizeHint().width()) + 8); - // Create a titled group box for the parameter box, parented by the - // classic layout widget, so that it can be used to provide a title + // Create a titled group box for the parameter box, tqparented by the + // classic tqlayout widget, so that it can be used to provide a title // and outline, in classic mode. Add this container to an array that // parallels the above array of parameter boxes. TQVGroupBox *box = new TQVGroupBox(b->getLongLabel(), m_classic); - box->layout()->setMargin( 4 ); // about half the default value + box->tqlayout()->setMargin( 4 ); // about half the default value TQFont f; f.setBold( true ); box->setFont( f ); @@ -204,7 +204,7 @@ void RosegardenParameterArea::moveWidget(TQWidget *old_container, m_tabBox->removePage(box); } - // Reparent the parameter box, and perform any container-specific + // Retqparent the parameter box, and perform any container-specific // configuration. if (new_container == m_classic) { diff --git a/src/gui/editors/parameters/RosegardenParameterArea.h b/src/gui/editors/parameters/RosegardenParameterArea.h index 7af178a..1000017 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.h +++ b/src/gui/editors/parameters/RosegardenParameterArea.h @@ -49,14 +49,15 @@ class RosegardenParameterBox; * A widget that arranges a set of Rosegarden parameter-box widgets * within a frame, in a dynamically configurable manner. */ -class RosegardenParameterArea : public QWidgetStack +class RosegardenParameterArea : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: // Create the parameter display area. - RosegardenParameterArea(TQWidget *parent=0, const char *name=0, WFlags f=0); + RosegardenParameterArea(TQWidget *tqparent=0, const char *name=0, WFlags f=0); // Add a rosegarden parameter box to the list that are to be displayed. @@ -71,13 +72,13 @@ public: TAB_BOX_STYLE // A horizontal list of tabs, displaying one box at a time. }; - // Redisplay the widgets with a different layout style. + // Redisplay the widgets with a different tqlayout style. void setArrangement(Arrangement style); protected: private: - Arrangement m_style; // The current layout style. + Arrangement m_style; // The current tqlayout style. // The list of parameter box widgets that are being displayed by this // widget. diff --git a/src/gui/editors/parameters/RosegardenParameterBox.cpp b/src/gui/editors/parameters/RosegardenParameterBox.cpp index dbefda0..b52d65c 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.cpp +++ b/src/gui/editors/parameters/RosegardenParameterBox.cpp @@ -41,9 +41,9 @@ namespace Rosegarden RosegardenParameterBox::RosegardenParameterBox(const TQString &shortLabel, const TQString &longLabel, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQFrame(parent, name), + TQFrame(tqparent, name), m_shortLabel(shortLabel), m_longLabel(longLabel), m_mode(LANDSCAPE_MODE) diff --git a/src/gui/editors/parameters/RosegardenParameterBox.h b/src/gui/editors/parameters/RosegardenParameterBox.h index 629245f..c75f875 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.h +++ b/src/gui/editors/parameters/RosegardenParameterBox.h @@ -43,18 +43,19 @@ namespace Rosegarden /** * A flat TQFrame, in which a group of parameters can be laid out. - * Virtual method functions are defined for for requesting a layout + * Virtual method functions are defined for for requesting a tqlayout * style, and returning the single-word to use for labelling the * box. */ -class RosegardenParameterBox : public QFrame +class RosegardenParameterBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: RosegardenParameterBox(const TQString &shortLabel, // e.g. i18n("Track") const TQString &longLabel, // e.g. i18n("Track Parameters") - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); // Ask for a one-word string that can be used to label the widget. @@ -71,11 +72,11 @@ public: protected: void init(); - // List the layout styles that may be requested via a call to setStyle(). + // List the tqlayout styles that may be requested via a call to setStyle(). enum LayoutMode { - LANDSCAPE_MODE, // Optimize the layout for a tall and narrow parent. - PORTRAIT_MODE // Optimize the layout for a short and wide parent. + LANDSCAPE_MODE, // Optimize the tqlayout for a tall and narrow tqparent. + PORTRAIT_MODE // Optimize the tqlayout for a short and wide tqparent. }; void setLayoutMode(LayoutMode mode); @@ -83,7 +84,7 @@ protected: 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. + LayoutMode m_mode; // The current tqlayout mode. }; diff --git a/src/gui/editors/parameters/SegmentParameterBox.cpp b/src/gui/editors/parameters/SegmentParameterBox.cpp index 23fce12..8e35960 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.cpp +++ b/src/gui/editors/parameters/SegmentParameterBox.cpp @@ -84,10 +84,10 @@ namespace Rosegarden { SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Segment"), i18n("Segment Parameters"), - parent), + tqparent), m_highestPlayable(127), m_lowestPlayable(0), m_standardQuantizations(BasicQuantizer::getStandardQuantizations()), @@ -315,14 +315,14 @@ SegmentParameterBox::initBox() // populate the quantize combo // - TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(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, TQString("%1").arg(i)); + m_transposeValue->insertItem(noMap, TQString("%1").tqarg(i)); if (i == 0) m_transposeValue->setCurrentItem(m_transposeValue->count() - 1); } @@ -356,14 +356,14 @@ SegmentParameterBox::initBox() // timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_delayValue->insertItem((error ? noMap : pmap), label); } for (int i = 0; i < 10; i++) { int rtd = (i < 5 ? ((i + 1) * 10) : ((i - 3) * 50)); m_realTimeDelays.push_back(rtd); - m_delayValue->insertItem(i18n("%1 ms").arg(rtd)); + m_delayValue->insertItem(i18n("%1 ms").tqarg(rtd)); } // set delay blank initially @@ -662,11 +662,11 @@ SegmentParameterBox::populateBoxFromSegments() m_quantizeValue->setEnabled(quantized != NotApplicable); switch (transposed) { - // setCurrentItem works with QStrings + // setCurrentItem works with TQStrings // 2nd arg of "true" means "add if necessary" case All: m_transposeValue-> - setCurrentItem(TQString("%1").arg(transposeLevel), true); + setCurrentItem(TQString("%1").tqarg(transposeLevel), true); break; case Some: @@ -694,7 +694,7 @@ SegmentParameterBox::populateBoxFromSegments() } else if (delayLevel < 0) { - m_delayValue->setCurrentItem(i18n("%1 ms").arg( -delayLevel), + m_delayValue->setCurrentItem(i18n("%1 ms").tqarg( -delayLevel), 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(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))); +// m_highButton->setText(TQString("&High: %1%2").tqarg(highest.getNoteName(key)).tqarg(highest.getOctave(base))); +// m_lowButton->setText(TQString("&Low: %1%2").tqarg(lowest.getNoteName(key)).tqarg(lowest.getOctave(base))); } void @@ -1200,7 +1200,7 @@ SegmentParameterBox::showAdditionalControls(bool showThem) m_rangeLabel->setShown(showThem); */ } -QString +TQString SegmentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/SegmentParameterBox.h b/src/gui/editors/parameters/SegmentParameterBox.h index 0a7a266..b67a8f1 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.h +++ b/src/gui/editors/parameters/SegmentParameterBox.h @@ -60,6 +60,7 @@ class SegmentParameterBox : public RosegardenParameterBox, public CompositionObserver { Q_OBJECT + TQ_OBJECT public: @@ -72,7 +73,7 @@ public: } Tristate; SegmentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~SegmentParameterBox(); // Use Segments to update GUI parameters diff --git a/src/gui/editors/parameters/TrackParameterBox.cpp b/src/gui/editors/parameters/TrackParameterBox.cpp index 3ddfa69..a2a29c4 100644 --- a/src/gui/editors/parameters/TrackParameterBox.cpp +++ b/src/gui/editors/parameters/TrackParameterBox.cpp @@ -88,10 +88,10 @@ namespace Rosegarden { TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Track"), i18n("Track Parameters"), - parent), + tqparent), m_doc(doc), m_highestPlayable(127), m_lowestPlayable(0), @@ -128,7 +128,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // track label // m_trackLabel = new KSqueezedTextLabel(i18n("<untitled>"), this); - m_trackLabel->setAlignment(Qt::AlignCenter); + m_trackLabel->tqsetAlignment(TQt::AlignCenter); //mainLayout->addMultiCellWidget(m_trackLabel, 0, 0, 0, 5, AlignCenter); mainLayout->addWidget(m_trackLabel, 0, 0); @@ -311,7 +311,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, int transposeRange = 48; for (int i = -transposeRange; i < transposeRange + 1; i++) { - m_defTranspose->insertItem(TQString("%1").arg(i)); + m_defTranspose->insertItem(TQString("%1").tqarg(i)); if (i == 0) m_defTranspose->setCurrentItem(m_defTranspose->count() - 1); } @@ -453,7 +453,7 @@ TrackParameterBox::populatePlaybackDeviceList() DeviceId devId = device->getId(); if ((*it)->getType() == Instrument::SoftSynth) { - iname.replace("Synth plugin ", ""); + iname.tqreplace("Synth plugin ", ""); pname = ""; AudioPluginInstance *plugin = (*it)->getPlugin (Instrument::SYNTH_PLUGIN_POSITION); @@ -468,7 +468,7 @@ TrackParameterBox::populatePlaybackDeviceList() pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = TQString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").tqarg(label).tqarg(pname); } else { pname = label; } @@ -527,12 +527,12 @@ TrackParameterBox::populateRecordingDeviceList() m_recChannel->setEnabled(false); // hide these for audio instruments - m_defaultsGroup->parentWidget()->setShown(false); + m_defaultsGroup->tqparentWidget()->setShown(false); } else { // InstrumentType::Midi and InstrumentType::SoftSynth // show these if not audio instrument - m_defaultsGroup->parentWidget()->setShown(true); + m_defaultsGroup->tqparentWidget()->setShown(true); m_recDeviceIds.push_back(Device::ALL_DEVICES); m_recDevice->insertItem(i18n("All")); @@ -547,7 +547,7 @@ TrackParameterBox::populateRecordingDeviceList() && dev->isRecording()) { TQString connection = strtoqstr(dev->getConnection()); // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); m_recDevice->insertItem(connection); m_recDeviceIds.push_back(dev->getId()); } @@ -601,10 +601,10 @@ TrackParameterBox::updateHighLow() bool useSharps = true; bool includeOctave = true; -// 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(TQString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); - m_lowButton->setText(TQString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); +// m_highButton->setText(i18n("High: %1").tqarg(highest.getAsString(useSharps, includeOctave, base))); +// m_lowButton->setText(i18n("Low: %1").tqarg(lowest.getAsString(useSharps, includeOctave, base))); + m_highButton->setText(TQString("%1").tqarg(highest.getAsString(useSharps, includeOctave, base).c_str())); + m_lowButton->setText(TQString("%1").tqarg(lowest.getAsString(useSharps, includeOctave, base).c_str())); m_presetLbl->setEnabled(false); } @@ -624,13 +624,13 @@ TrackParameterBox::slotUpdateControls(int /*dummy*/) return ; m_defClef->setCurrentItem(trk->getClef()); - m_defTranspose->setCurrentItem(TQString("%1").arg(trk->getTranspose()), true); + m_defTranspose->setCurrentItem(TQString("%1").tqarg(trk->getTranspose()), true); m_defColor->setCurrentItem(trk->getColor()); m_highestPlayable = trk->getHighestPlayable(); m_lowestPlayable = trk->getLowestPlayable(); updateHighLow(); // set this down here because updateHighLow just disabled the label - m_presetLbl->setText(trk->getPresetLabel()); + m_presetLbl->setText(trk->getPresetLabel().c_str()); m_presetLbl->setEnabled(true); m_staffSizeCombo->setCurrentItem(trk->getStaffSize()); @@ -657,13 +657,13 @@ TrackParameterBox::slotSelectedTrackNameChanged() RG_DEBUG << "TrackParameterBox::sotSelectedTrackNameChanged()\n"; Composition &comp = m_doc->getComposition(); Track *trk = comp.getTrackById(m_selectedTrackId); - TQString m_trackName = trk->getLabel(); + TQString m_trackName = trk->getLabel().c_str(); if (m_trackName.isEmpty()) m_trackName = i18n("<untitled>"); else m_trackName.truncate(20); int trackNum = trk->getPosition() + 1; - m_trackLabel->setText(i18n("[ Track %1 - %2 ]").arg(trackNum).arg(m_trackName)); + m_trackLabel->setText(i18n("[ Track %1 - %2 ]").tqarg(trackNum).tqarg(m_trackName)); } void @@ -792,7 +792,7 @@ TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, TQString label) void TrackParameterBox::showAdditionalControls(bool showThem) { - // m_defaultsGroup->parentWidget()->setShown(showThem); + // m_defaultsGroup->tqparentWidget()->setShown(showThem); } void @@ -952,7 +952,7 @@ TrackParameterBox::slotPresetPressed() try { if (dialog.exec() == TQDialog::Accepted) { m_presetLbl->setText(dialog.getName()); - trk->setPresetLabel(dialog.getName()); + trk->setPresetLabel(dialog.getName().ascii()); if (dialog.getConvertAllSegments()) { SegmentSyncCommand* command = new SegmentSyncCommand( comp.getSegments(), comp.getSelectedTrack(), @@ -1008,7 +1008,7 @@ TrackParameterBox::slotStaffBracketChanged(int index) trk->setStaffBracket(index); } -QString +TQString TrackParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h index 696e3f7..3d55201 100644 --- a/src/gui/editors/parameters/TrackParameterBox.h +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -57,10 +57,11 @@ class RosegardenGUIDoc; class TrackParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~TrackParameterBox(); void setDocument( RosegardenGUIDoc *doc ); |