summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/TimeWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/TimeWidget.cpp')
-rw-r--r--src/gui/widgets/TimeWidget.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/gui/widgets/TimeWidget.cpp b/src/gui/widgets/TimeWidget.cpp
index 82877f8..d1aedb2 100644
--- a/src/gui/widgets/TimeWidget.cpp
+++ b/src/gui/widgets/TimeWidget.cpp
@@ -24,7 +24,7 @@
#include "TimeWidget.h"
-#include <tqlayout.h>
+#include <layout.h>
#include <klocale.h>
#include "misc/Debug.h"
@@ -93,14 +93,14 @@ TimeWidget::init(bool editable)
editable = true;
TQFrame *frame = new TQFrame(this);
- TQGridLayout *tqlayout = new TQGridLayout(frame, 7, 3, 5, 5);
+ TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5);
TQLabel *label = 0;
if (m_isDuration) {
label = new TQLabel(i18n("Note:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 0, 0);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 0, 0);
if (editable) {
m_note = new TQComboBox(frame);
@@ -133,7 +133,7 @@ TimeWidget::init(bool editable)
}
connect(m_note, TQT_SIGNAL(activated(int)),
this, TQT_SLOT(slotNoteChanged(int)));
- tqlayout->addMultiCellWidget(m_note, 0, 0, 1, 3);
+ layout->addMultiCellWidget(m_note, 0, 0, 1, 3);
} else {
@@ -145,12 +145,12 @@ TimeWidget::init(bool editable)
label = i18n("<inexact>");
TQLineEdit *le = new TQLineEdit(label, frame);
le->setReadOnly(true);
- tqlayout->addMultiCellWidget(le, 0, 0, 1, 3);
+ layout->addMultiCellWidget(le, 0, 0, 1, 3);
}
label = new TQLabel(i18n("Units:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 0, 4);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 0, 4);
if (editable) {
m_timeT = new TQSpinBox(frame);
@@ -158,12 +158,12 @@ TimeWidget::init(bool editable)
(Note(Note::Shortest).getDuration());
connect(m_timeT, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotTimeTChanged(int)));
- tqlayout->addWidget(m_timeT, 0, 5);
+ layout->addWidget(m_timeT, 0, 5);
} else {
m_timeT = 0;
- TQLineEdit *le = new TQLineEdit(TQString("%1").tqarg(m_time), frame);
+ TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame);
le->setReadOnly(true);
- tqlayout->addWidget(le, 0, 5);
+ layout->addWidget(le, 0, 5);
}
} else {
@@ -171,8 +171,8 @@ TimeWidget::init(bool editable)
m_note = 0;
label = new TQLabel(i18n("Time:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 0, 0);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 0, 0);
if (editable) {
m_timeT = new TQSpinBox(frame);
@@ -180,19 +180,19 @@ TimeWidget::init(bool editable)
(Note(Note::Shortest).getDuration());
connect(m_timeT, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotTimeTChanged(int)));
- tqlayout->addWidget(m_timeT, 0, 1);
- tqlayout->addWidget(new TQLabel(i18n("units"), frame), 0, 2);
+ layout->addWidget(m_timeT, 0, 1);
+ layout->addWidget(new TQLabel(i18n("units"), frame), 0, 2);
} else {
m_timeT = 0;
- TQLineEdit *le = new TQLineEdit(TQString("%1").tqarg(m_time), frame);
+ TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame);
le->setReadOnly(true);
- tqlayout->addWidget(le, 0, 2);
+ layout->addWidget(le, 0, 2);
}
}
label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 1, 0);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 1, 0);
if (editable) {
m_barLabel = 0;
@@ -201,17 +201,17 @@ TimeWidget::init(bool editable)
m_bar->setMinValue(0);
connect(m_bar, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotBarBeatOrFractionChanged(int)));
- tqlayout->addWidget(m_bar, 1, 1);
+ layout->addWidget(m_bar, 1, 1);
} else {
m_bar = 0;
m_barLabel = new TQLineEdit(frame);
m_barLabel->setReadOnly(true);
- tqlayout->addWidget(m_barLabel, 1, 1);
+ layout->addWidget(m_barLabel, 1, 1);
}
label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 1, 2);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 1, 2);
if (editable) {
m_beatLabel = 0;
@@ -219,20 +219,20 @@ TimeWidget::init(bool editable)
m_beat->setMinValue(1);
connect(m_beat, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotBarBeatOrFractionChanged(int)));
- tqlayout->addWidget(m_beat, 1, 3);
+ layout->addWidget(m_beat, 1, 3);
} else {
m_beat = 0;
m_beatLabel = new TQLineEdit(frame);
m_beatLabel->setReadOnly(true);
- tqlayout->addWidget(m_beatLabel, 1, 3);
+ layout->addWidget(m_beatLabel, 1, 3);
}
- label = new TQLabel(i18n("%1:").tqarg(NotationStrings::getShortNoteName
+ label = new TQLabel(i18n("%1:").arg(NotationStrings::getShortNoteName
(Note
(Note::Shortest), true)),
frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 1, 4);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 1, 4);
if (editable) {
m_fractionLabel = 0;
@@ -240,20 +240,20 @@ TimeWidget::init(bool editable)
m_fraction->setMinValue(1);
connect(m_fraction, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotBarBeatOrFractionChanged(int)));
- tqlayout->addWidget(m_fraction, 1, 5);
+ layout->addWidget(m_fraction, 1, 5);
} else {
m_fraction = 0;
m_fractionLabel = new TQLineEdit(frame);
m_fractionLabel->setReadOnly(true);
- tqlayout->addWidget(m_fractionLabel, 1, 5);
+ layout->addWidget(m_fractionLabel, 1, 5);
}
m_timeSig = new TQLabel(frame);
- tqlayout->addWidget(m_timeSig, 1, 6);
+ layout->addWidget(m_timeSig, 1, 6);
label = new TQLabel(i18n("Seconds:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 2, 0);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 2, 0);
if (editable) {
m_secLabel = 0;
@@ -262,17 +262,17 @@ TimeWidget::init(bool editable)
m_sec->setMinValue(0);
connect(m_sec, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotSecOrMSecChanged(int)));
- tqlayout->addWidget(m_sec, 2, 1);
+ layout->addWidget(m_sec, 2, 1);
} else {
m_sec = 0;
m_secLabel = new TQLineEdit(frame);
m_secLabel->setReadOnly(true);
- tqlayout->addWidget(m_secLabel, 2, 1);
+ layout->addWidget(m_secLabel, 2, 1);
}
label = new TQLabel(i18n("msec:"), frame);
- label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter);
- tqlayout->addWidget(label, 2, 2);
+ label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
+ layout->addWidget(label, 2, 2);
if (editable) {
m_msecLabel = 0;
@@ -281,17 +281,17 @@ TimeWidget::init(bool editable)
m_msec->setLineStep(10);
connect(m_msec, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotSecOrMSecChanged(int)));
- tqlayout->addWidget(m_msec, 2, 3);
+ layout->addWidget(m_msec, 2, 3);
} else {
m_msec = 0;
m_msecLabel = new TQLineEdit(frame);
m_msecLabel->setReadOnly(true);
- tqlayout->addWidget(m_msecLabel, 2, 3);
+ layout->addWidget(m_msecLabel, 2, 3);
}
if (m_isDuration) {
m_tempo = new TQLabel(frame);
- tqlayout->addWidget(m_tempo, 2, 6);
+ layout->addWidget(m_tempo, 2, 6);
} else {
m_tempo = 0;
}
@@ -383,7 +383,7 @@ TimeWidget::populate()
}
m_bar->setValue(bars);
} else {
- m_barLabel->setText(TQString("%1").tqarg(bars));
+ m_barLabel->setText(TQString("%1").arg(bars));
}
if (m_beat) {
@@ -391,7 +391,7 @@ TimeWidget::populate()
m_beat->setMaxValue(timeSig.getBeatsPerBar() - 1);
m_beat->setValue(beats);
} else {
- m_beatLabel->setText(TQString("%1").tqarg(beats));
+ m_beatLabel->setText(TQString("%1").arg(beats));
}
if (m_fraction) {
@@ -401,10 +401,10 @@ TimeWidget::populate()
getDuration() - 1);
m_fraction->setValue(hemidemis);
} else {
- m_fractionLabel->setText(TQString("%1").tqarg(hemidemis));
+ m_fractionLabel->setText(TQString("%1").arg(hemidemis));
}
- m_timeSig->setText(i18n("(%1/%2 time)").tqarg(timeSig.getNumerator()).
+ m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()).
arg(timeSig.getDenominator()));
timeT endTime = m_startTime + m_time;
@@ -422,7 +422,7 @@ TimeWidget::populate()
}
m_sec->setValue(rt.sec);
} else {
- m_secLabel->setText(TQString("%1").tqarg(rt.sec));
+ m_secLabel->setText(TQString("%1").arg(rt.sec));
}
if (m_msec) {
@@ -430,7 +430,7 @@ TimeWidget::populate()
m_msec->setMaxValue(999);
m_msec->setValue(rt.msec());
} else {
- m_msecLabel->setText(TQString("%1").tqarg(rt.msec()));
+ m_msecLabel->setText(TQString("%1").arg(rt.msec()));
}
bool change = (m_composition->getTempoChangeNumberAt(endTime) !=
@@ -507,7 +507,7 @@ TimeWidget::populate()
}
m_bar->setValue(bar + 1);
} else {
- m_barLabel->setText(TQString("%1").tqarg(bar + 1));
+ m_barLabel->setText(TQString("%1").arg(bar + 1));
}
if (m_beat) {
@@ -515,7 +515,7 @@ TimeWidget::populate()
m_beat->setMaxValue(timeSig.getBeatsPerBar());
m_beat->setValue(beat);
} else {
- m_beatLabel->setText(TQString("%1").tqarg(beat));
+ m_beatLabel->setText(TQString("%1").arg(beat));
}
if (m_fraction) {
@@ -525,10 +525,10 @@ TimeWidget::populate()
getDuration() - 1);
m_fraction->setValue(hemidemis);
} else {
- m_fractionLabel->setText(TQString("%1").tqarg(hemidemis));
+ m_fractionLabel->setText(TQString("%1").arg(hemidemis));
}
- m_timeSig->setText(i18n("(%1/%2 time)").tqarg(timeSig.getNumerator()).
+ m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()).
arg(timeSig.getDenominator()));
RealTime rt = m_composition->getElapsedRealTime(m_time);
@@ -543,7 +543,7 @@ TimeWidget::populate()
}
m_sec->setValue(rt.sec);
} else {
- m_secLabel->setText(TQString("%1").tqarg(rt.sec));
+ m_secLabel->setText(TQString("%1").arg(rt.sec));
}
if (m_msec) {
@@ -551,7 +551,7 @@ TimeWidget::populate()
m_msec->setMaxValue(999);
m_msec->setValue(rt.msec());
} else {
- m_msecLabel->setText(TQString("%1").tqarg(rt.msec()));
+ m_msecLabel->setText(TQString("%1").arg(rt.msec()));
}
}