summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/tempo
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editors/tempo')
-rw-r--r--src/gui/editors/tempo/TempoListItem.h6
-rw-r--r--src/gui/editors/tempo/TempoView.cpp64
-rw-r--r--src/gui/editors/tempo/TempoView.h3
3 files changed, 37 insertions, 36 deletions
diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h
index 640b7b1..be9e7a1 100644
--- a/src/gui/editors/tempo/TempoListItem.h
+++ b/src/gui/editors/tempo/TempoListItem.h
@@ -42,12 +42,12 @@ public:
Type type,
timeT time,
int index,
- KListView *parent,
+ KListView *tqparent,
TQString label1,
TQString label2,
TQString label3,
- TQString label4 = TQString::null) :
- KListViewItem(parent, label1, label2, label3, label4),
+ TQString label4 = TQString()) :
+ KListViewItem(tqparent, label1, label2, label3, label4),
m_composition(composition),
m_type(type),
m_time(time),
diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp
index c3bc23e..1184ac3 100644
--- a/src/gui/editors/tempo/TempoView.cpp
+++ b/src/gui/editors/tempo/TempoView.cpp
@@ -70,8 +70,8 @@ int
TempoView::m_lastSetFilter = -1;
-TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime):
- EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"),
+TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT openTime):
+ EditViewBase(doc, std::vector<Segment *>(), 2, tqparent, "tempoview"),
m_filter(Tempo | TimeSignature),
m_ignoreUpdates(true)
{
@@ -86,7 +86,7 @@ TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime):
// define some note filtering buttons in a group
//
m_filterGroup =
- new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget());
+ new TQButtonGroup(1, Qt::Horizontal, i18n("Filter"), getCentralWidget());
m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup);
m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup);
@@ -218,7 +218,7 @@ TempoView::applyLayout(int /*staffNo*/)
new TempoListItem(comp, TempoListItem::TimeSignature,
sig.first, i, m_list, timeString,
i18n("Time Signature "),
- TQString("%1/%2 ").arg(sig.second.getNumerator()).
+ TQString("%1/%2 ").tqarg(sig.second.getNumerator()).
arg(sig.second.getDenominator()),
properties);
}
@@ -243,7 +243,7 @@ TempoView::applyLayout(int /*staffNo*/)
if (sig.getBeatDuration() ==
Note(Note::Crotchet).getDuration()) {
desc = i18n("%1.%2%3").
- arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths);
+ tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths);
} else {
float bpm = (qpm *
Note(Note::Crotchet).getDuration()) /
@@ -253,8 +253,8 @@ TempoView::applyLayout(int /*staffNo*/)
int bpmHundredths = int((bpm - bpmUnits - bpmTenths / 10.0) * 100 + 0.001);
desc = i18n("%1.%2%3 qpm (%4.%5%6 bpm) ").
- arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths).
- arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths);
+ tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths).
+ tqarg(bpmUnits).tqarg(bpmTenths).tqarg(bpmHundredths);
}
TQString timeString = makeTimeString(tempo.first, timeMode);
@@ -342,7 +342,7 @@ TempoView::getCurrentSegment()
return *m_segments.begin();
}
-QString
+TQString
TempoView::makeTimeString(timeT time, int timeMode)
{
switch (timeMode) {
@@ -354,27 +354,27 @@ TempoView::makeTimeString(timeT time, int timeMode)
(time, bar, beat, fraction, remainder);
++bar;
return TQString("%1%2%3-%4%5-%6%7-%8%9 ")
- .arg(bar / 100)
- .arg((bar % 100) / 10)
- .arg(bar % 10)
- .arg(beat / 10)
- .arg(beat % 10)
- .arg(fraction / 10)
- .arg(fraction % 10)
- .arg(remainder / 10)
- .arg(remainder % 10);
+ .tqarg(bar / 100)
+ .tqarg((bar % 100) / 10)
+ .tqarg(bar % 10)
+ .tqarg(beat / 10)
+ .tqarg(beat % 10)
+ .tqarg(fraction / 10)
+ .tqarg(fraction % 10)
+ .tqarg(remainder / 10)
+ .tqarg(remainder % 10);
}
case 1: // real time
{
RealTime rt =
getDocument()->getComposition().getElapsedRealTime(time);
- // return TQString("%1 ").arg(rt.toString().c_str());
- return TQString("%1 ").arg(rt.toText().c_str());
+ // return TQString("%1 ").tqarg(rt.toString().c_str());
+ return TQString("%1 ").tqarg(rt.toText().c_str());
}
default:
- return TQString("%1 ").arg(time);
+ return TQString("%1 ").tqarg(time);
}
}
@@ -578,36 +578,36 @@ TempoView::setupActions()
TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png"));
- new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this,
+ new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, TQT_TQOBJECT(this),
TQT_SLOT(slotEditInsertTempo()), actionCollection(),
"insert_tempo");
TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png");
icon = TQIconSet(pixmap);
- new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this,
+ new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, TQT_TQOBJECT(this),
TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(),
"insert_timesig");
pixmap.load(pixmapDir + "/toolbar/event-delete.png");
icon = TQIconSet(pixmap);
- new KAction(i18n("&Delete"), icon, Key_Delete, this,
+ new KAction(i18n("&Delete"), icon, Key_Delete, TQT_TQOBJECT(this),
TQT_SLOT(slotEditDelete()), actionCollection(),
"delete");
pixmap.load(pixmapDir + "/toolbar/event-edit.png");
icon = TQIconSet(pixmap);
- new KAction(i18n("&Edit Item"), icon, Key_E, this,
+ new KAction(i18n("&Edit Item"), icon, Key_E, TQT_TQOBJECT(this),
TQT_SLOT(slotEdit()), actionCollection(),
"edit");
- new KAction(i18n("Select &All"), 0, this,
+ new KAction(i18n("Select &All"), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSelectAll()), actionCollection(),
"select_all");
- new KAction(i18n("Clear Selection"), Key_Escape, this,
+ new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this),
TQT_SLOT(slotClearSelection()), actionCollection(),
"clear_selection");
@@ -619,7 +619,7 @@ TempoView::setupActions()
pixmap.load(pixmapDir + "/toolbar/time-musical.png");
icon = TQIconSet(pixmap);
- action = new KRadioAction(i18n("&Musical Times"), icon, 0, this,
+ action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotMusicalTime()),
actionCollection(), "time_musical");
action->setExclusiveGroup("timeMode");
@@ -629,7 +629,7 @@ TempoView::setupActions()
pixmap.load(pixmapDir + "/toolbar/time-real.png");
icon = TQIconSet(pixmap);
- action = new KRadioAction(i18n("&Real Times"), icon, 0, this,
+ action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotRealTime()),
actionCollection(), "time_real");
action->setExclusiveGroup("timeMode");
@@ -639,7 +639,7 @@ TempoView::setupActions()
pixmap.load(pixmapDir + "/toolbar/time-raw.png");
icon = TQIconSet(pixmap);
- action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this,
+ action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotRawTime()),
actionCollection(), "time_raw");
action->setExclusiveGroup("timeMode");
@@ -660,7 +660,7 @@ TempoView::initStatusBar()
AlignLeft | AlignVCenter);
}
-QSize
+TQSize
TempoView::getViewSize()
{
return m_list->size();
@@ -692,7 +692,7 @@ TempoView::slotSaveOptions()
void
TempoView::slotModifyFilter(int button)
{
- TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button));
+ TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button));
if (checkBox == 0)
return ;
@@ -832,7 +832,7 @@ void
TempoView::updateViewCaption()
{
setCaption(i18n("%1 - Tempo and Time Signature Editor")
- .arg(getDocument()->getTitle()));
+ .tqarg(getDocument()->getTitle()));
}
}
diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h
index fcf3efb..b715d24 100644
--- a/src/gui/editors/tempo/TempoView.h
+++ b/src/gui/editors/tempo/TempoView.h
@@ -62,6 +62,7 @@ class Composition;
class TempoView : public EditViewBase, public CompositionObserver
{
Q_OBJECT
+ TQ_OBJECT
enum Filter
{
@@ -71,7 +72,7 @@ class TempoView : public EditViewBase, public CompositionObserver
};
public:
- TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT);
+ TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT);
virtual ~TempoView();
virtual bool applyLayout(int staffNo = -1);