diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/eventlist | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/eventlist')
-rw-r--r-- | src/gui/editors/eventlist/EventView.cpp | 316 | ||||
-rw-r--r-- | src/gui/editors/eventlist/EventView.h | 64 | ||||
-rw-r--r-- | src/gui/editors/eventlist/EventViewItem.cpp | 6 | ||||
-rw-r--r-- | src/gui/editors/eventlist/EventViewItem.h | 36 | ||||
-rw-r--r-- | src/gui/editors/eventlist/TrivialVelocityDialog.cpp | 14 | ||||
-rw-r--r-- | src/gui/editors/eventlist/TrivialVelocityDialog.h | 8 |
6 files changed, 222 insertions, 222 deletions
diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp index 13bd294..cdf73cc 100644 --- a/src/gui/editors/eventlist/EventView.cpp +++ b/src/gui/editors/eventlist/EventView.cpp @@ -68,23 +68,23 @@ #include <klineeditdlg.h> #include <klistview.h> #include <kxmlguiclient.h> -#include <qbuttongroup.h> -#include <qcanvas.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqcanvas.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> #include <algorithm> @@ -97,7 +97,7 @@ EventView::m_lastSetEventFilter = -1; EventView::EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent): + TQWidget *parent): EditViewBase(doc, segments, 2, parent, "eventview"), m_eventFilter(Note | Text | SystemExclusive | Controller | ProgramChange | PitchBend | Indication | Other), @@ -126,25 +126,25 @@ EventView::EventView(RosegardenGUIDoc *doc, // define some note filtering buttons in a group // m_filterGroup = - new QButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); - - m_noteCheckBox = new QCheckBox(i18n("Note"), m_filterGroup); - m_programCheckBox = new QCheckBox(i18n("Program Change"), m_filterGroup); - m_controllerCheckBox = new QCheckBox(i18n("Controller"), m_filterGroup); - m_pitchBendCheckBox = new QCheckBox(i18n("Pitch Bend"), m_filterGroup); - m_sysExCheckBox = new QCheckBox(i18n("System Exclusive"), m_filterGroup); - m_keyPressureCheckBox = new QCheckBox(i18n("Key Pressure"), m_filterGroup); - m_channelPressureCheckBox = new QCheckBox(i18n("Channel Pressure"), m_filterGroup); - m_restCheckBox = new QCheckBox(i18n("Rest"), m_filterGroup); - m_indicationCheckBox = new QCheckBox(i18n("Indication"), m_filterGroup); - m_textCheckBox = new QCheckBox(i18n("Text"), m_filterGroup); - m_otherCheckBox = new QCheckBox(i18n("Other"), m_filterGroup); + new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); + + m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup); + m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup); + m_controllerCheckBox = new TQCheckBox(i18n("Controller"), m_filterGroup); + m_pitchBendCheckBox = new TQCheckBox(i18n("Pitch Bend"), m_filterGroup); + m_sysExCheckBox = new TQCheckBox(i18n("System Exclusive"), m_filterGroup); + m_keyPressureCheckBox = new TQCheckBox(i18n("Key Pressure"), m_filterGroup); + m_channelPressureCheckBox = new TQCheckBox(i18n("Channel Pressure"), m_filterGroup); + m_restCheckBox = new TQCheckBox(i18n("Rest"), m_filterGroup); + m_indicationCheckBox = new TQCheckBox(i18n("Indication"), m_filterGroup); + m_textCheckBox = new TQCheckBox(i18n("Text"), m_filterGroup); + m_otherCheckBox = new TQCheckBox(i18n("Other"), m_filterGroup); m_grid->addWidget(m_filterGroup, 2, 0); // Connect up // - connect(m_filterGroup, SIGNAL(released(int)), - SLOT(slotModifyFilter(int))); + connect(m_filterGroup, TQT_SIGNAL(released(int)), + TQT_SLOT(slotModifyFilter(int))); m_eventList = new KListView(getCentralWidget()); m_eventList->setItemsRenameable(true); @@ -157,41 +157,41 @@ EventView::EventView(RosegardenGUIDoc *doc, TriggerSegmentRec *rec = segments[0]->getComposition()->getTriggerSegmentRec(id); - QGroupBox *groupBox = new QGroupBox + TQGroupBox *groupBox = new QGroupBox (1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); - QFrame *frame = new QFrame(groupBox); - QGridLayout *layout = new QGridLayout(frame, 5, 3, 5, 5); + TQFrame *frame = new TQFrame(groupBox); + TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5); - layout->addWidget(new QLabel(i18n("Label: "), frame), 0, 0); - QString label = strtoqstr(segments[0]->getLabel()); + layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); + TQString label = strtoqstr(segments[0]->getLabel()); if (label == "") label = i18n("<no label>"); - m_triggerName = new QLabel(label, frame); + m_triggerName = new TQLabel(label, frame); layout->addWidget(m_triggerName, 0, 1); - QPushButton *editButton = new QPushButton(i18n("edit"), frame); + TQPushButton *editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 0, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerName())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName())); - layout->addWidget(new QLabel(i18n("Base pitch: "), frame), 1, 0); - m_triggerPitch = new QLabel(QString("%1").arg(rec->getBasePitch()), frame); + layout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); + m_triggerPitch = new TQLabel(TQString("%1").arg(rec->getBasePitch()), frame); layout->addWidget(m_triggerPitch, 1, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 1, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerPitch())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch())); - layout->addWidget(new QLabel(i18n("Base velocity: "), frame), 2, 0); - m_triggerVelocity = new QLabel(QString("%1").arg(rec->getBaseVelocity()), frame); + layout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); + m_triggerVelocity = new TQLabel(TQString("%1").arg(rec->getBaseVelocity()), frame); layout->addWidget(m_triggerVelocity, 2, 1); - editButton = new QPushButton(i18n("edit"), frame); + editButton = new TQPushButton(i18n("edit"), frame); layout->addWidget(editButton, 2, 2); - connect(editButton, SIGNAL(clicked()), this, SLOT(slotEditTriggerVelocity())); + connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity())); /*!!! Comment out these two options, which are not yet used anywhere else -- intended for use with library ornaments, not yet implemented - layout->addWidget(new QLabel(i18n("Default timing: "), frame), 3, 0); + layout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); KComboBox *adjust = new KComboBox(frame); layout->addMultiCellWidget(adjust, 3, 3, 1, 2); @@ -211,11 +211,11 @@ EventView::EventView(RosegardenGUIDoc *doc, adjust->setCurrentItem(2); } - connect(adjust, SIGNAL(activated(int)), this, SLOT(slotTriggerTimeAdjustChanged(int))); + connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int))); - QCheckBox *retune = new QCheckBox(i18n("Adjust pitch to trigger note by default"), frame); + TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame); retune->setChecked(rec->getDefaultRetune()); - connect(retune, SIGNAL(clicked()), this, SLOT(slotTriggerRetuneChanged())); + connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged())); layout->addMultiCellWidget(retune, 4, 4, 1, 2); */ @@ -232,15 +232,15 @@ EventView::EventView(RosegardenGUIDoc *doc, // Connect double clicker // - connect(m_eventList, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotPopupEventEditor(QListViewItem*))); + connect(m_eventList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotPopupEventEditor(TQListViewItem*))); connect(m_eventList, - SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), - SLOT(slotPopupMenu(QListViewItem*, const QPoint&, int))); + TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)), + TQT_SLOT(slotPopupMenu(TQListViewItem*, const TQPoint&, int))); m_eventList->setAllColumnsShowFocus(true); - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); m_eventList->addColumn(i18n("Time ")); m_eventList->addColumn(i18n("Duration ")); @@ -299,11 +299,11 @@ EventView::applyLayout(int /*staffNo*/) // of the view. // if (m_listSelection.size() == 0) { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -327,11 +327,11 @@ EventView::applyLayout(int /*staffNo*/) timeT eventTime = helper.getSoundingAbsoluteTime(it); - QString velyStr; - QString pitchStr; - QString data1Str = ""; - QString data2Str = ""; - QString durationStr; + TQString velyStr; + TQString pitchStr; + TQString data1Str = ""; + TQString data2Str = ""; + TQString durationStr; // Event filters // @@ -386,14 +386,14 @@ EventView::applyLayout(int /*staffNo*/) if ((*it)->has(BaseProperties::PITCH)) { int p = (*it)->get <Int>(BaseProperties::PITCH); - pitchStr = QString("%1 %2 ") + pitchStr = TQString("%1 %2 ") .arg(p).arg(MidiPitchLabel(p).getQString()); } else if ((*it)->isa(Note::EventType)) { pitchStr = "<not set>"; } if ((*it)->has(BaseProperties::VELOCITY)) { - velyStr = QString("%1 "). + velyStr = TQString("%1 "). arg((*it)->get <Int>(BaseProperties::VELOCITY)); } else if ((*it)->isa(Note::EventType)) { @@ -401,60 +401,60 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(Controller::NUMBER)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(Controller::NUMBER)); } else if ((*it)->has(Text::TextTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextTypePropertyName))); } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Indication:: IndicationTypePropertyName))); } else if ((*it)->has(::Rosegarden::Key::KeyPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (::Rosegarden::Key::KeyPropertyName))); } else if ((*it)->has(Clef::ClefPropertyName)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Clef::ClefPropertyName))); } else if ((*it)->has(PitchBend::MSB)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::MSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_TYPE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (BaseProperties::BEAMED_GROUP_TYPE))); } if ((*it)->has(Controller::VALUE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(Controller::VALUE)); } else if ((*it)->has(Text::TextPropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg(strtoqstr((*it)->get <String> (Text::TextPropertyName))); /*!!! } else if ((*it)->has(Indication:: IndicationTypePropertyName)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get<Int>(Indication:: IndicationDurationPropertyName)); */ } else if ((*it)->has(PitchBend::LSB)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(PitchBend::LSB)); } else if ((*it)->has(BaseProperties::BEAMED_GROUP_ID)) { @@ -464,26 +464,26 @@ EventView::applyLayout(int /*staffNo*/) } if ((*it)->has(ProgramChange::PROGRAM)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ProgramChange::PROGRAM) + 1); } if ((*it)->has(ChannelPressure::PRESSURE)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(ChannelPressure::PRESSURE)); } if ((*it)->isa(KeyPressure::EventType) && (*it)->has(KeyPressure::PITCH)) { - data1Str = QString("%1 "). + data1Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PITCH)); } if ((*it)->has(KeyPressure::PRESSURE)) { - data2Str = QString("%1 "). + data2Str = TQString("%1 "). arg((*it)->get <Int>(KeyPressure::PRESSURE)); } @@ -497,7 +497,7 @@ EventView::applyLayout(int /*staffNo*/) timeMode); } - QString timeStr = makeTimeString(eventTime, timeMode); + TQString timeStr = makeTimeString(eventTime, timeMode); new EventViewItem(m_segments[i], *it, @@ -515,15 +515,15 @@ EventView::applyLayout(int /*staffNo*/) if (m_eventList->childCount() == 0) { if (m_segments.size()) - new QListViewItem(m_eventList, + new TQListViewItem(m_eventList, i18n("<no events at this filter level>")); else - new QListViewItem(m_eventList, i18n("<no events>")); + new TQListViewItem(m_eventList, i18n("<no events>")); - m_eventList->setSelectionMode(QListView::NoSelection); + m_eventList->setSelectionMode(TQListView::NoSelection); stateChanged("have_selection", KXMLGUIClient::StateReverse); } else { - m_eventList->setSelectionMode(QListView::Extended); + m_eventList->setSelectionMode(TQListView::Extended); // If no selection then select the first event if (m_listSelection.size() == 0) @@ -566,7 +566,7 @@ EventView::makeInitialSelection(timeT time) int i = 0; - for (QListViewItem *child = m_eventList->firstChild(); + for (TQListViewItem *child = m_eventList->firstChild(); child; child = child->nextSibling()) { @@ -612,7 +612,7 @@ EventView::makeTimeString(timeT time, int timeMode) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (time, bar, beat, fraction, remainder); ++bar; - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -628,12 +628,12 @@ EventView::makeTimeString(timeT time, int timeMode) { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(time); + return TQString("%1 ").arg(time); } } @@ -648,7 +648,7 @@ EventView::makeDurationString(timeT time, int bar, beat, fraction, remainder; getDocument()->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); - return QString("%1%2%3-%4%5-%6%7-%8%9 ") + return TQString("%1%2%3-%4%5-%6%7-%8%9 ") .arg(bar / 100) .arg((bar % 100) / 10) .arg(bar % 10) @@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time, RealTime rt = getDocument()->getComposition().getRealTimeDifference (time, time + duration); - // return QString("%1 ").arg(rt.toString().c_str()); - return QString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").arg(rt.toString().c_str()); + return TQString("%1 ").arg(rt.toText().c_str()); } default: - return QString("%1 ").arg(duration); + return TQString("%1 ").arg(duration); } } @@ -693,7 +693,7 @@ void EventView::slotEditTriggerName() { bool ok = false; - QString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), + TQString newLabel = KLineEditDlg::getText(i18n("Segment label"), i18n("Label:"), strtoqstr(m_segments[0]->getLabel()), &ok, this); @@ -716,10 +716,10 @@ EventView::slotEditTriggerPitch() PitchDialog *dlg = new PitchDialog(this, i18n("Base pitch"), rec->getBasePitch()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBasePitchCommand (&getDocument()->getComposition(), id, dlg->getPitch())); - m_triggerPitch->setText(QString("%1").arg(dlg->getPitch())); + m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch())); } } @@ -734,10 +734,10 @@ EventView::slotEditTriggerVelocity() TrivialVelocityDialog *dlg = new TrivialVelocityDialog (this, i18n("Base velocity"), rec->getBaseVelocity()); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand (&getDocument()->getComposition(), id, dlg->getVelocity())); - m_triggerVelocity->setText(QString("%1").arg(dlg->getVelocity())); + m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity())); } } @@ -789,7 +789,7 @@ EventView::slotTriggerRetuneChanged() void EventView::slotEditCut() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -797,8 +797,8 @@ EventView::slotEditCut() RG_DEBUG << "EventView::slotEditCut - cutting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *cutSelection = 0; int itemIndex = -1; @@ -833,7 +833,7 @@ EventView::slotEditCut() void EventView::slotEditCopy() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; @@ -841,8 +841,8 @@ EventView::slotEditCopy() RG_DEBUG << "EventView::slotEditCopy - copying " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *copySelection = 0; @@ -883,7 +883,7 @@ EventView::slotEditPaste() timeT insertionTime = 0; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count()) { EventViewItem *item = dynamic_cast<EventViewItem*>(selection.at(0)); @@ -894,8 +894,8 @@ EventView::slotEditPaste() // m_listSelection.clear(); - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { m_listSelection.push_back(m_eventList->itemIndex(*it)); @@ -920,15 +920,15 @@ EventView::slotEditPaste() void EventView::slotEditDelete() { - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; RG_DEBUG << "EventView::slotEditDelete - deleting " << selection.count() << " items" << endl; - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; EventViewItem *item; EventSelection *deleteSelection = 0; int itemIndex = -1; @@ -974,7 +974,7 @@ EventView::slotEditInsert() timeT insertTime = m_segments[0]->getStartTime(); timeT insertDuration = 960; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -999,7 +999,7 @@ EventView::slotEditInsert() SimpleEventEditDialog dialog(this, getDocument(), *event, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { EventInsertionCommand *command = new EventInsertionCommand(*m_segments[0], new Event(dialog.getEvent())); @@ -1012,7 +1012,7 @@ EventView::slotEditEvent() { RG_DEBUG << "EventView::slotEditEvent" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1022,7 +1022,7 @@ EventView::slotEditEvent() Event *event = item->getEvent(); SimpleEventEditDialog dialog(this, getDocument(), *event, false); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1039,7 +1039,7 @@ EventView::slotEditEventAdvanced() { RG_DEBUG << "EventView::slotEditEventAdvanced" << endl; - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() > 0) { EventViewItem *item = @@ -1049,7 +1049,7 @@ EventView::slotEditEventAdvanced() Event *event = item->getEvent(); EventEditDialog dialog(this, *event); - if (dialog.exec() == QDialog::Accepted && dialog.isModified()) { + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand(*(item->getSegment()), event, @@ -1084,15 +1084,15 @@ void EventView::slotFilterSelection() { m_listSelection.clear(); - QPtrList<QListViewItem> selection = m_eventList->selectedItems(); + TQPtrList<TQListViewItem> selection = m_eventList->selectedItems(); if (selection.count() == 0) return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { - QPtrListIterator<QListViewItem> it(selection); - QListViewItem *listItem; + TQPtrListIterator<TQListViewItem> it(selection); + TQListViewItem *listItem; while ((listItem = it.current()) != 0) { @@ -1117,45 +1117,45 @@ EventView::setupActions() { EditViewBase::setupActions("eventlist.rc"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert.png")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); new KAction(i18n("&Insert Event"), icon, Key_I, this, - SLOT(slotEditInsert()), actionCollection(), + TQT_SLOT(slotEditInsert()), actionCollection(), "insert"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); + icon = TQIconSet(pixmap); new KAction(i18n("&Delete Event"), icon, Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Edit Event"), icon, Key_E, this, - SLOT(slotEditEvent()), actionCollection(), + TQT_SLOT(slotEditEvent()), actionCollection(), "edit_simple"); pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this, - SLOT(slotEditEventAdvanced()), actionCollection(), + TQT_SLOT(slotEditEventAdvanced()), actionCollection(), "edit_advanced"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); m_config->setGroup(EventViewConfigGroup); @@ -1164,30 +1164,30 @@ EventView::setupActions() KRadioAction *action; pixmap.load(pixmapDir + "/toolbar/time-musical.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, - SLOT(slotMusicalTime()), + TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); if (timeMode == 0) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-real.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Real Times"), icon, 0, this, - SLOT(slotRealTime()), + TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); if (timeMode == 1) action->setChecked(true); pixmap.load(pixmapDir + "/toolbar/time-raw.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, - SLOT(slotRawTime()), + TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); if (timeMode == 2) @@ -1211,8 +1211,8 @@ EventView::initStatusBar() KStatusBar* sb = statusBar(); /* - m_hoveredOverNoteName = new QLabel(sb); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); m_hoveredOverAbsoluteTime->setMinimumWidth(160); @@ -1226,7 +1226,7 @@ EventView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - //m_selectionCounter = new QLabel(sb); + //m_selectionCounter = new TQLabel(sb); //sb->addWidget(m_selectionCounter); } @@ -1237,7 +1237,7 @@ EventView::getViewSize() } void -EventView::setViewSize(QSize s) +EventView::setViewSize(TQSize s) { m_eventList->setFixedSize(s); } @@ -1271,7 +1271,7 @@ EventView::getCurrentSegment() void EventView::slotModifyFilter(int button) { - QCheckBox *checkBox = dynamic_cast<QCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); if (checkBox == 0) return ; @@ -1468,7 +1468,7 @@ EventView::slotRawTime() } void -EventView::slotPopupEventEditor(QListViewItem *item) +EventView::slotPopupEventEditor(TQListViewItem *item) { EventViewItem *eItem = dynamic_cast<EventViewItem*>(item); @@ -1479,7 +1479,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1492,7 +1492,7 @@ EventView::slotPopupEventEditor(QListViewItem *item) } void -EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) +EventView::slotPopupMenu(TQListViewItem *item, const TQPoint &pos, int) { if (!item) return ; @@ -1505,7 +1505,7 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) createMenu(); if (m_menu) - //m_menu->exec(QCursor::pos()); + //m_menu->exec(TQCursor::pos()); m_menu->exec(pos); else RG_DEBUG << "EventView::showMenu() : no menu to show\n"; @@ -1514,12 +1514,12 @@ EventView::slotPopupMenu(QListViewItem *item, const QPoint &pos, int) void EventView::createMenu() { - m_menu = new QPopupMenu(this); + m_menu = new TQPopupMenu(this); m_menu->insertItem(i18n("Open in Event Editor"), 0); m_menu->insertItem(i18n("Open in Expert Event Editor"), 1); - connect(m_menu, SIGNAL(activated(int)), - SLOT(slotMenuActivated(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), + TQT_SLOT(slotMenuActivated(int))); } void @@ -1536,7 +1536,7 @@ EventView::slotMenuActivated(int value) SimpleEventEditDialog *dialog = new SimpleEventEditDialog(this, getDocument(), *event, false); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, @@ -1554,7 +1554,7 @@ EventView::slotMenuActivated(int value) Event *event = eItem->getEvent(); EventEditDialog *dialog = new EventEditDialog(this, *event); - if (dialog->exec() == QDialog::Accepted && dialog->isModified()) { + if (dialog->exec() == TQDialog::Accepted && dialog->isModified()) { EventEditCommand *command = new EventEditCommand(*(eItem->getSegment()), event, diff --git a/src/gui/editors/eventlist/EventView.h b/src/gui/editors/eventlist/EventView.h index 4c540e6..fc4719a 100644 --- a/src/gui/editors/eventlist/EventView.h +++ b/src/gui/editors/eventlist/EventView.h @@ -31,19 +31,19 @@ #include "base/Segment.h" #include "gui/general/EditViewBase.h" #include <set> -#include <qsize.h> -#include <qstring.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" -class QWidget; -class QPopupMenu; -class QPoint; -class QListViewItem; -class QLabel; -class QCheckBox; -class QButtonGroup; +class TQWidget; +class TQPopupMenu; +class TQPoint; +class TQListViewItem; +class TQLabel; +class TQCheckBox; +class TQButtonGroup; class KListView; @@ -80,7 +80,7 @@ class EventView : public EditViewBase, public SegmentObserver public: EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent); + TQWidget *parent); virtual ~EventView(); @@ -94,8 +94,8 @@ public: virtual void setupActions(); virtual void initStatusBar(); - virtual QSize getViewSize(); - virtual void setViewSize(QSize); + virtual TQSize getViewSize(); + virtual void setViewSize(TQSize); // Set the button states to the current filter positions // @@ -128,12 +128,12 @@ public slots: // Show RMB menu // - void slotPopupMenu(QListViewItem*, const QPoint&, int); + void slotPopupMenu(TQListViewItem*, const TQPoint&, int); void slotMenuActivated(int); // on double click on the event list // - void slotPopupEventEditor(QListViewItem*); + void slotPopupEventEditor(TQListViewItem*); // Change filter parameters // @@ -160,8 +160,8 @@ protected: virtual void readOptions(); void makeInitialSelection(timeT); - QString makeTimeString(timeT time, int timeMode); - QString makeDurationString(timeT time, + TQString makeTimeString(timeT time, int timeMode); + TQString makeDurationString(timeT time, timeT duration, int timeMode); virtual Segment *getCurrentSegment(); @@ -170,32 +170,32 @@ protected: //--------------- Data members --------------------------------- bool m_isTriggerSegment; - QLabel *m_triggerName; - QLabel *m_triggerPitch; - QLabel *m_triggerVelocity; + TQLabel *m_triggerName; + TQLabel *m_triggerPitch; + TQLabel *m_triggerVelocity; KListView *m_eventList; int m_eventFilter; static int m_lastSetEventFilter; - QButtonGroup *m_filterGroup; - QCheckBox *m_noteCheckBox; - QCheckBox *m_textCheckBox; - QCheckBox *m_sysExCheckBox; - QCheckBox *m_programCheckBox; - QCheckBox *m_controllerCheckBox; - QCheckBox *m_restCheckBox; - QCheckBox *m_pitchBendCheckBox; - QCheckBox *m_keyPressureCheckBox; - QCheckBox *m_channelPressureCheckBox; - QCheckBox *m_indicationCheckBox; - QCheckBox *m_otherCheckBox; + TQButtonGroup *m_filterGroup; + TQCheckBox *m_noteCheckBox; + TQCheckBox *m_textCheckBox; + TQCheckBox *m_sysExCheckBox; + TQCheckBox *m_programCheckBox; + TQCheckBox *m_controllerCheckBox; + TQCheckBox *m_restCheckBox; + TQCheckBox *m_pitchBendCheckBox; + TQCheckBox *m_keyPressureCheckBox; + TQCheckBox *m_channelPressureCheckBox; + TQCheckBox *m_indicationCheckBox; + TQCheckBox *m_otherCheckBox; std::vector<int> m_listSelection; std::set<Event *> m_deletedEvents; // deleted since last refresh - QPopupMenu *m_menu; + TQPopupMenu *m_menu; }; diff --git a/src/gui/editors/eventlist/EventViewItem.cpp b/src/gui/editors/eventlist/EventViewItem.cpp index 4435a2b..b5f4d38 100644 --- a/src/gui/editors/eventlist/EventViewItem.cpp +++ b/src/gui/editors/eventlist/EventViewItem.cpp @@ -30,13 +30,13 @@ namespace Rosegarden // Reimplementation of sort for numeric columns - taking the // right hand argument from the left is equivalent to the -// the QString compare(). +// the TQString compare(). // int -EventViewItem::compare(QListViewItem *i, int col, bool ascending) const +EventViewItem::compare(TQListViewItem *i, int col, bool ascending) const { EventViewItem *ei = dynamic_cast<EventViewItem *>(i); - if (!ei) return QListViewItem::compare(i, col, ascending); + if (!ei) return TQListViewItem::compare(i, col, ascending); if (col == 0) { // time Rosegarden::Event &e1 = *m_event; diff --git a/src/gui/editors/eventlist/EventViewItem.h b/src/gui/editors/eventlist/EventViewItem.h index 832e652..a94e29f 100644 --- a/src/gui/editors/eventlist/EventViewItem.h +++ b/src/gui/editors/eventlist/EventViewItem.h @@ -33,7 +33,7 @@ namespace Rosegarden class Segment; class Event; -// EventView specialisation of a QListViewItem with the +// EventView specialisation of a TQListViewItem with the // addition of a segment pointer // class EventViewItem : public KListViewItem @@ -55,14 +55,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - QListView *parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null) : + TQListView *parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -70,14 +70,14 @@ public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *parent, QString label1, - QString label2 = QString::null, - QString label3 = QString::null, - QString label4 = QString::null, - QString label5 = QString::null, - QString label6 = QString::null, - QString label7 = QString::null, - QString label8 = QString::null) : + KListViewItem *parent, TQString label1, + TQString label2 = TQString::null, + TQString label3 = TQString::null, + TQString label4 = TQString::null, + TQString label5 = TQString::null, + TQString label6 = TQString::null, + TQString label7 = TQString::null, + TQString label8 = TQString::null) : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), @@ -88,7 +88,7 @@ public: // Reimplement so that we can sort numerically // - virtual int compare(QListViewItem *i, int col, bool ascending) const; + virtual int compare(TQListViewItem *i, int col, bool ascending) const; protected: diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp index 4e609d4..6b9f748 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp @@ -24,18 +24,18 @@ #include "TrivialVelocityDialog.h" -#include <qspinbox.h> -#include <qlabel.h> -#include <qhbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqhbox.h> namespace Rosegarden { -TrivialVelocityDialog::TrivialVelocityDialog(QWidget *parent, QString label, int deft) : +TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *parent, TQString label, int deft) : KDialogBase(parent, 0, true, label, Ok | Cancel) { - QHBox *hbox = makeHBoxMainWidget(); - new QLabel(label, hbox); - m_spin = new QSpinBox(0, 127, 1, hbox); + TQHBox *hbox = makeHBoxMainWidget(); + new TQLabel(label, hbox); + m_spin = new TQSpinBox(0, 127, 1, hbox); m_spin->setValue(deft); } diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.h b/src/gui/editors/eventlist/TrivialVelocityDialog.h index ca19de9..c164110 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.h +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.h @@ -27,20 +27,20 @@ #include <kdialogbase.h> -class QHBox; -class QSpinBox; +class TQHBox; +class TQSpinBox; namespace Rosegarden { class TrivialVelocityDialog : public KDialogBase { public: - TrivialVelocityDialog(QWidget *parent, QString label, int deft); + TrivialVelocityDialog(TQWidget *parent, TQString label, int deft); int getVelocity(); protected: - QSpinBox *m_spin; + TQSpinBox *m_spin; }; } |