diff options
Diffstat (limited to 'src/gui/editors/segment/TriggerSegmentManager.cpp')
-rw-r--r-- | src/gui/editors/segment/TriggerSegmentManager.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/src/gui/editors/segment/TriggerSegmentManager.cpp b/src/gui/editors/segment/TriggerSegmentManager.cpp index 3fb1732..76e71bf 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.cpp +++ b/src/gui/editors/segment/TriggerSegmentManager.cpp @@ -25,7 +25,7 @@ #include "TriggerSegmentManager.h" #include "TriggerManagerItem.h" -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include "base/BaseProperties.h" @@ -56,30 +56,30 @@ #include <kstdaccel.h> #include <kstdaction.h> #include <kconfig.h> -#include <qaccel.h> -#include <qdialog.h> -#include <qframe.h> -#include <qiconset.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qsizepolicy.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qcanvas.h> +#include <tqaccel.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqiconset.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqsizepolicy.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqcanvas.h> namespace Rosegarden { -TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, +TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, RosegardenGUIDoc *doc): KMainWindow(parent, "triggereditordialog"), m_doc(doc), m_modified(false) { - QVBox* mainFrame = new QVBox(this); + TQVBox* mainFrame = new TQVBox(this); setCentralWidget(mainFrame); setCaption(i18n("Manage Triggered Segments")); @@ -97,32 +97,32 @@ TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, for (int i = 0; i < 2; ++i) m_listView->setColumnAlignment(i, Qt::AlignHCenter); - QFrame* btnBox = new QFrame(mainFrame); + TQFrame* btnBox = new TQFrame(mainFrame); btnBox->setSizePolicy( - QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); + TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - QHBoxLayout* layout = new QHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); - m_addButton = new QPushButton(i18n("Add"), btnBox); - m_deleteButton = new QPushButton(i18n("Delete"), btnBox); - m_deleteAllButton = new QPushButton(i18n("Delete All"), btnBox); + m_addButton = new TQPushButton(i18n("Add"), btnBox); + m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); + m_deleteAllButton = new TQPushButton(i18n("Delete All"), btnBox); - m_closeButton = new QPushButton(i18n("Close"), btnBox); + m_closeButton = new TQPushButton(i18n("Close"), btnBox); - QToolTip::add + TQToolTip::add (m_addButton, i18n("Add a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteButton, i18n("Delete a Triggered Segment")); - QToolTip::add + TQToolTip::add (m_deleteAllButton, i18n("Delete All Triggered Segments")); - QToolTip::add + TQToolTip::add (m_closeButton, i18n("Close the Triggered Segment Manager")); @@ -135,41 +135,41 @@ TriggerSegmentManager::TriggerSegmentManager(QWidget *parent, layout->addWidget(m_closeButton); layout->addSpacing(5); - connect(m_addButton, SIGNAL(released()), - SLOT(slotAdd())); + connect(m_addButton, TQT_SIGNAL(released()), + TQT_SLOT(slotAdd())); - connect(m_deleteButton, SIGNAL(released()), - SLOT(slotDelete())); + connect(m_deleteButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDelete())); - connect(m_closeButton, SIGNAL(released()), - SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), + TQT_SLOT(slotClose())); - connect(m_deleteAllButton, SIGNAL(released()), - SLOT(slotDeleteAll())); + connect(m_deleteAllButton, TQT_SIGNAL(released()), + TQT_SLOT(slotDeleteAll())); setupActions(); m_doc->getCommandHistory()->attachView(actionCollection()); - connect(m_doc->getCommandHistory(), SIGNAL(commandExecuted()), - this, SLOT(slotUpdate())); + connect(m_doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), + this, TQT_SLOT(slotUpdate())); - connect(m_listView, SIGNAL(doubleClicked(QListViewItem *)), - SLOT(slotEdit(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + TQT_SLOT(slotEdit(TQListViewItem *))); - connect(m_listView, SIGNAL(pressed(QListViewItem *)), - this, SLOT(slotItemClicked(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(pressed(TQListViewItem *)), + this, TQT_SLOT(slotItemClicked(TQListViewItem *))); // Highlight all columns - enable extended selection mode // m_listView->setAllColumnsShowFocus(true); - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); m_listView->setItemsRenameable(true); initDialog(); setAutoSaveSettings(TriggerManagerConfigGroup, true); - m_accelerators = new QAccel(this); + m_accelerators = new TQAccel(this); } TriggerSegmentManager::~TriggerSegmentManager() @@ -237,25 +237,25 @@ TriggerSegmentManager::slotUpdate() (*it)->getSegment()->getEndMarkerTime() - (*it)->getSegment()->getStartTime(); - QString timeString = makeDurationString + TQString timeString = makeDurationString (first, duration, timeMode); - QString label = strtoqstr((*it)->getSegment()->getLabel()); + TQString label = strtoqstr((*it)->getSegment()->getLabel()); if (label == "") label = i18n("<no label>"); - QString used = i18n("%1 on 1 track", + TQString used = i18n("%1 on 1 track", "%1 on %n tracks", tracks.size()).arg(uses); - QString pitch = QString("%1 (%2)") + TQString pitch = TQString("%1 (%2)") .arg(MidiPitchLabel((*it)->getBasePitch()).getQString()) .arg((*it)->getBasePitch()); - QString velocity = QString("%1").arg((*it)->getBaseVelocity()); + TQString velocity = TQString("%1").arg((*it)->getBaseVelocity()); item = new TriggerManagerItem - (m_listView, QString("%1").arg(i + 1), QString("%1").arg((*it)->getId()), + (m_listView, TQString("%1").arg(i + 1), TQString("%1").arg((*it)->getId()), label, timeString, pitch, velocity, used); item->setRawDuration(duration); @@ -268,13 +268,13 @@ TriggerSegmentManager::slotUpdate() } if (m_listView->childCount() == 0) { - QListViewItem *item = + TQListViewItem *item = new TriggerManagerItem(m_listView, i18n("<none>")); m_listView->insertItem(item); - m_listView->setSelectionMode(QListView::NoSelection); + m_listView->setSelectionMode(TQListView::NoSelection); } else { - m_listView->setSelectionMode(QListView::Extended); + m_listView->setSelectionMode(TQListView::Extended); } } @@ -287,7 +287,7 @@ TriggerSegmentManager::slotDeleteAll() RG_DEBUG << "TriggerSegmentManager::slotDeleteAll" << endl; KMacroCommand *command = new KMacroCommand(i18n("Remove all triggered segments")); - QListViewItem *it = m_listView->firstChild(); + TQListViewItem *it = m_listView->firstChild(); do { @@ -314,7 +314,7 @@ TriggerSegmentManager::slotAdd() &m_doc->getComposition(), 0, 3840, false); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { addCommandToHistory(new AddTriggerSegmentCommand (m_doc, dialog.getTime(), 64)); } @@ -376,13 +376,13 @@ void TriggerSegmentManager::setupActions() { KAction* close = KStdAction::close(this, - SLOT(slotClose()), + TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, SIGNAL(released()), this, SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // some adjustments new KToolBarPopupAction(i18n("Und&o"), @@ -398,7 +398,7 @@ TriggerSegmentManager::setupActions() KStdAction::stdName(KStdAction::Redo)); new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, this, - SLOT(slotPasteAsNew()), actionCollection(), + TQT_SLOT(slotPasteAsNew()), actionCollection(), "paste_to_trigger_segment"); kapp->config()->setGroup(TriggerManagerConfigGroup); @@ -406,31 +406,31 @@ TriggerSegmentManager::setupActions() KRadioAction *action; - QCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); - QIconSet icon(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); + TQIconSet icon(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) @@ -469,7 +469,7 @@ TriggerSegmentManager::checkModified() } void -TriggerSegmentManager::slotEdit(QListViewItem *i) +TriggerSegmentManager::slotEdit(TQListViewItem *i) { RG_DEBUG << "TriggerSegmentManager::slotEdit" << endl; @@ -487,7 +487,7 @@ TriggerSegmentManager::slotEdit(QListViewItem *i) } void -TriggerSegmentManager::closeEvent(QCloseEvent *e) +TriggerSegmentManager::closeEvent(TQCloseEvent *e) { emit closing(); KMainWindow::closeEvent(e); @@ -504,7 +504,7 @@ TriggerSegmentManager::setDocument(RosegardenGUIDoc *doc) } void -TriggerSegmentManager::slotItemClicked(QListViewItem *item) +TriggerSegmentManager::slotItemClicked(TQListViewItem *item) { RG_DEBUG << "TriggerSegmentManager::slotItemClicked" << endl; } @@ -522,7 +522,7 @@ TriggerSegmentManager::makeDurationString(timeT time, int bar, beat, fraction, remainder; m_doc->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) @@ -539,12 +539,12 @@ TriggerSegmentManager::makeDurationString(timeT time, RealTime rt = m_doc->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); } } |