summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/tempo/TempoView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editors/tempo/TempoView.cpp')
-rw-r--r--src/gui/editors/tempo/TempoView.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp
index 6ff6c1d..c3bc23e 100644
--- a/src/gui/editors/tempo/TempoView.cpp
+++ b/src/gui/editors/tempo/TempoView.cpp
@@ -49,17 +49,17 @@
#include <kconfig.h>
#include <klistview.h>
#include <kxmlguiclient.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qiconset.h>
-#include <qlistview.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qcanvas.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqiconset.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqcanvas.h>
#include <kstatusbar.h>
@@ -70,7 +70,7 @@ int
TempoView::m_lastSetFilter = -1;
-TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
+TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime):
EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"),
m_filter(Tempo | TimeSignature),
m_ignoreUpdates(true)
@@ -86,16 +86,16 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
// define some note filtering buttons in a group
//
m_filterGroup =
- new QButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget());
+ new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget());
- m_tempoCheckBox = new QCheckBox(i18n("Tempo"), m_filterGroup);
- m_timeSigCheckBox = new QCheckBox(i18n("Time Signature"), m_filterGroup);
+ m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup);
+ m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), 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_list = new KListView(getCentralWidget());
m_list->setItemsRenameable(true);
@@ -108,11 +108,11 @@ TempoView::TempoView(RosegardenGUIDoc *doc, QWidget *parent, timeT openTime):
// Connect double clicker
//
- connect(m_list, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(slotPopupEditor(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(slotPopupEditor(TQListViewItem*)));
m_list->setAllColumnsShowFocus(true);
- m_list->setSelectionMode(QListView::Extended);
+ m_list->setSelectionMode(TQListView::Extended);
m_list->addColumn(i18n("Time "));
m_list->addColumn(i18n("Type "));
@@ -140,7 +140,7 @@ TempoView::~TempoView()
}
void
-TempoView::closeEvent(QCloseEvent *e)
+TempoView::closeEvent(TQCloseEvent *e)
{
emit closing();
EditViewBase::closeEvent(e);
@@ -174,11 +174,11 @@ TempoView::applyLayout(int /*staffNo*/)
// of the view. This code borrowed from EventView.
//
if (m_listSelection.size() == 0) {
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->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_list->itemIndex(*it));
@@ -202,7 +202,7 @@ TempoView::applyLayout(int /*staffNo*/)
std::pair<timeT, Rosegarden::TimeSignature> sig =
comp->getTimeSignatureChange(i);
- QString properties;
+ TQString properties;
if (sig.second.isHidden()) {
if (sig.second.isCommon())
properties = i18n("Common, hidden");
@@ -213,12 +213,12 @@ TempoView::applyLayout(int /*staffNo*/)
properties = i18n("Common");
}
- QString timeString = makeTimeString(sig.first, timeMode);
+ TQString timeString = makeTimeString(sig.first, timeMode);
new TempoListItem(comp, TempoListItem::TimeSignature,
sig.first, i, m_list, timeString,
i18n("Time Signature "),
- QString("%1/%2 ").arg(sig.second.getNumerator()).
+ TQString("%1/%2 ").arg(sig.second.getNumerator()).
arg(sig.second.getDenominator()),
properties);
}
@@ -230,7 +230,7 @@ TempoView::applyLayout(int /*staffNo*/)
std::pair<timeT, tempoT> tempo =
comp->getTempoChange(i);
- QString desc;
+ TQString desc;
//!!! imprecise -- better to work from tempoT directly
@@ -257,7 +257,7 @@ TempoView::applyLayout(int /*staffNo*/)
arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths);
}
- QString timeString = makeTimeString(tempo.first, timeMode);
+ TQString timeString = makeTimeString(tempo.first, timeMode);
new TempoListItem(comp, TempoListItem::Tempo,
tempo.first, i, m_list, timeString,
@@ -267,12 +267,12 @@ TempoView::applyLayout(int /*staffNo*/)
}
if (m_list->childCount() == 0) {
- new QListViewItem(m_list,
+ new TQListViewItem(m_list,
i18n("<nothing at this filter level>"));
- m_list->setSelectionMode(QListView::NoSelection);
+ m_list->setSelectionMode(TQListView::NoSelection);
stateChanged("have_selection", KXMLGUIClient::StateReverse);
} else {
- m_list->setSelectionMode(QListView::Extended);
+ m_list->setSelectionMode(TQListView::Extended);
// If no selection then select the first event
if (m_listSelection.size() == 0)
@@ -353,7 +353,7 @@ TempoView::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)
@@ -369,12 +369,12 @@ TempoView::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);
}
}
@@ -415,15 +415,15 @@ TempoView::slotEditPaste()
void
TempoView::slotEditDelete()
{
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() == 0)
return ;
RG_DEBUG << "TempoView::slotEditDelete - deleting "
<< selection.count() << " items" << endl;
- QPtrListIterator<QListViewItem> it(selection);
- QListViewItem *listItem;
+ TQPtrListIterator<TQListViewItem> it(selection);
+ TQListViewItem *listItem;
TempoListItem *item;
int itemIndex = -1;
@@ -476,7 +476,7 @@ void
TempoView::slotEditInsertTempo()
{
timeT insertTime = 0;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -489,12 +489,12 @@ TempoView::slotEditInsertTempo()
dialog.setTempoPosition(insertTime);
connect(&dialog,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)),
this,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)));
@@ -506,7 +506,7 @@ void
TempoView::slotEditInsertTimeSignature()
{
timeT insertTime = 0;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -520,7 +520,7 @@ TempoView::slotEditInsertTimeSignature()
TimeSignatureDialog dialog(this, &composition, insertTime, sig, true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
insertTime = dialog.getTime();
@@ -541,7 +541,7 @@ TempoView::slotEdit()
{
RG_DEBUG << "TempoView::slotEdit" << endl;
- QPtrList<QListViewItem> selection = m_list->selectedItems();
+ TQPtrList<TQListViewItem> selection = m_list->selectedItems();
if (selection.count() > 0) {
TempoListItem *item =
@@ -575,40 +575,40 @@ TempoView::setupActions()
{
EditViewBase::setupActions("tempoview.rc", false);
- QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
- QIconSet icon(QPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
+ TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
+ TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this,
- SLOT(slotEditInsertTempo()), actionCollection(),
+ TQT_SLOT(slotEditInsertTempo()), actionCollection(),
"insert_tempo");
- QCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png");
- icon = QIconSet(pixmap);
+ TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png");
+ icon = TQIconSet(pixmap);
new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this,
- SLOT(slotEditInsertTimeSignature()), actionCollection(),
+ TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(),
"insert_timesig");
pixmap.load(pixmapDir + "/toolbar/event-delete.png");
- icon = QIconSet(pixmap);
+ icon = TQIconSet(pixmap);
new KAction(i18n("&Delete"), 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 Item"), icon, Key_E, this,
- SLOT(slotEdit()), actionCollection(),
+ TQT_SLOT(slotEdit()), actionCollection(),
"edit");
new KAction(i18n("Select &All"), 0, 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(TempoViewConfigGroup);
@@ -617,30 +617,30 @@ TempoView::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)
@@ -667,7 +667,7 @@ TempoView::getViewSize()
}
void
-TempoView::setViewSize(QSize s)
+TempoView::setViewSize(TQSize s)
{
m_list->setFixedSize(s);
}
@@ -692,7 +692,7 @@ TempoView::slotSaveOptions()
void
TempoView::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 ;
@@ -770,7 +770,7 @@ TempoView::slotRawTime()
}
void
-TempoView::slotPopupEditor(QListViewItem *qitem)
+TempoView::slotPopupEditor(TQListViewItem *qitem)
{
TempoListItem *item = dynamic_cast<TempoListItem *>(qitem);
if (!item)
@@ -786,12 +786,12 @@ TempoView::slotPopupEditor(QListViewItem *qitem)
dialog.setTempoPosition(time);
connect(&dialog,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)),
this,
- SIGNAL(changeTempo(timeT,
+ TQT_SIGNAL(changeTempo(timeT,
tempoT,
tempoT,
TempoDialog::TempoDialogAction)));
@@ -807,7 +807,7 @@ TempoView::slotPopupEditor(QListViewItem *qitem)
TimeSignatureDialog dialog(this, &composition, time, sig, true);
- if (dialog.exec() == QDialog::Accepted) {
+ if (dialog.exec() == TQDialog::Accepted) {
time = dialog.getTime();