summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/TempoDialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/dialogs/TempoDialog.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-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/dialogs/TempoDialog.cpp')
-rw-r--r--src/gui/dialogs/TempoDialog.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/src/gui/dialogs/TempoDialog.cpp b/src/gui/dialogs/TempoDialog.cpp
index 3896fde..1edab6b 100644
--- a/src/gui/dialogs/TempoDialog.cpp
+++ b/src/gui/dialogs/TempoDialog.cpp
@@ -24,7 +24,7 @@
#include "TempoDialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "misc/Debug.h"
@@ -36,22 +36,22 @@
#include "gui/widgets/TimeWidget.h"
#include "gui/widgets/HSpinBox.h"
#include <kdialogbase.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qstring.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace Rosegarden
{
-TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
+TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
bool timeEditable):
KDialogBase(parent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help),
m_doc(doc),
@@ -59,30 +59,30 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
{
setHelp("tempo");
- QVBox *vbox = makeVBoxMainWidget();
- QGroupBox *groupBox = new QGroupBox(1, Horizontal, i18n("Tempo"), vbox);
+ TQVBox *vbox = makeVBoxMainWidget();
+ TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Tempo"), vbox);
- QFrame *frame = new QFrame(groupBox);
- QGridLayout *layout = new QGridLayout(frame, 4, 3, 5, 5);
+ TQFrame *frame = new TQFrame(groupBox);
+ TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 5, 5);
// Set tempo
- layout->addWidget(new QLabel(i18n("New tempo:"), frame), 0, 1);
+ layout->addWidget(new TQLabel(i18n("New tempo:"), frame), 0, 1);
m_tempoValueSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5);
layout->addWidget(m_tempoValueSpinBox, 0, 2);
- connect(m_tempoValueSpinBox, SIGNAL(valueChanged(const QString &)),
- SLOT(slotTempoChanged(const QString &)));
+ connect(m_tempoValueSpinBox, TQT_SIGNAL(valueChanged(const TQString &)),
+ TQT_SLOT(slotTempoChanged(const TQString &)));
- m_tempoTap= new QPushButton(i18n("Tap"), frame);
+ m_tempoTap= new TQPushButton(i18n("Tap"), frame);
layout->addWidget(m_tempoTap, 0, 3);
- connect(m_tempoTap, SIGNAL(clicked()), SLOT(slotTapClicked()));
+ connect(m_tempoTap, TQT_SIGNAL(clicked()), TQT_SLOT(slotTapClicked()));
- m_tempoConstant = new QRadioButton(i18n("Tempo is fixed until the following tempo change"), frame);
- m_tempoRampToNext = new QRadioButton(i18n("Tempo ramps to the following tempo"), frame);
- m_tempoRampToTarget = new QRadioButton(i18n("Tempo ramps to:"), frame);
+ m_tempoConstant = new TQRadioButton(i18n("Tempo is fixed until the following tempo change"), frame);
+ m_tempoRampToNext = new TQRadioButton(i18n("Tempo ramps to the following tempo"), frame);
+ m_tempoRampToTarget = new TQRadioButton(i18n("Tempo ramps to:"), frame);
- // m_tempoTargetCheckBox = new QCheckBox(i18n("Ramping to:"), frame);
+ // m_tempoTargetCheckBox = new TQCheckBox(i18n("Ramping to:"), frame);
m_tempoTargetSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5);
// layout->addMultiCellWidget(m_tempoTargetCheckBox, 1, 1, 0, 1, AlignRight);
@@ -93,24 +93,24 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
layout->addWidget(m_tempoRampToTarget, 3, 1);
layout->addWidget(m_tempoTargetSpinBox, 3, 2);
- // connect(m_tempoTargetCheckBox, SIGNAL(clicked()),
- // SLOT(slotTargetCheckBoxClicked()));
- connect(m_tempoConstant, SIGNAL(clicked()),
- SLOT(slotTempoConstantClicked()));
- connect(m_tempoRampToNext, SIGNAL(clicked()),
- SLOT(slotTempoRampToNextClicked()));
- connect(m_tempoRampToTarget, SIGNAL(clicked()),
- SLOT(slotTempoRampToTargetClicked()));
- connect(m_tempoTargetSpinBox, SIGNAL(valueChanged(const QString &)),
- SLOT(slotTargetChanged(const QString &)));
-
- m_tempoBeatLabel = new QLabel(frame);
+ // connect(m_tempoTargetCheckBox, TQT_SIGNAL(clicked()),
+ // TQT_SLOT(slotTargetCheckBoxClicked()));
+ connect(m_tempoConstant, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotTempoConstantClicked()));
+ connect(m_tempoRampToNext, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotTempoRampToNextClicked()));
+ connect(m_tempoRampToTarget, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotTempoRampToTargetClicked()));
+ connect(m_tempoTargetSpinBox, TQT_SIGNAL(valueChanged(const TQString &)),
+ TQT_SLOT(slotTargetChanged(const TQString &)));
+
+ m_tempoBeatLabel = new TQLabel(frame);
layout->addWidget(m_tempoBeatLabel, 0, 4);
- m_tempoBeat = new QLabel(frame);
+ m_tempoBeat = new TQLabel(frame);
layout->addWidget(m_tempoBeat, 0, 5);
- m_tempoBeatsPerMinute = new QLabel(frame);
+ m_tempoBeatsPerMinute = new TQLabel(frame);
layout->addWidget(m_tempoBeatsPerMinute, 0, 6);
m_timeEditor = 0;
@@ -124,30 +124,30 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
}
// Scope Box
- QButtonGroup *scopeGroup = new QButtonGroup(1, Horizontal,
+ TQButtonGroup *scopeGroup = new TQButtonGroup(1, Horizontal,
i18n("Scope"), vbox);
-// new QLabel(scopeBox);
+// new TQLabel(scopeBox);
- QVBox *scopeBox = new QVBox(scopeGroup);
+ TQVBox *scopeBox = new TQVBox(scopeGroup);
scopeBox->setSpacing(5);
scopeBox->setMargin(5);
- QHBox *currentBox = new QHBox(scopeBox);
- new QLabel(i18n("The pointer is currently at "), currentBox);
- m_tempoTimeLabel = new QLabel(currentBox);
- m_tempoBarLabel = new QLabel(currentBox);
- QLabel *spare = new QLabel(currentBox);
+ TQHBox *currentBox = new TQHBox(scopeBox);
+ new TQLabel(i18n("The pointer is currently at "), currentBox);
+ m_tempoTimeLabel = new TQLabel(currentBox);
+ m_tempoBarLabel = new TQLabel(currentBox);
+ TQLabel *spare = new TQLabel(currentBox);
currentBox->setStretchFactor(spare, 20);
- m_tempoStatusLabel = new QLabel(scopeBox);
+ m_tempoStatusLabel = new TQLabel(scopeBox);
-// new QLabel(scopeBox);
+// new TQLabel(scopeBox);
- QHBox *changeWhereBox = new QHBox(scopeBox);
- spare = new QLabel(" ", changeWhereBox);
- QVBox *changeWhereVBox = new QVBox(changeWhereBox);
+ TQHBox *changeWhereBox = new TQHBox(scopeBox);
+ spare = new TQLabel(" ", changeWhereBox);
+ TQVBox *changeWhereVBox = new TQVBox(changeWhereBox);
changeWhereBox->setStretchFactor(changeWhereVBox, 20);
m_tempoChangeHere = new QRadioButton
@@ -157,7 +157,7 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
m_tempoChangeBefore = new QRadioButton
(i18n("Replace the last tempo change"),
changeWhereVBox);
- m_tempoChangeBeforeAt = new QLabel(changeWhereVBox);
+ m_tempoChangeBeforeAt = new TQLabel(changeWhereVBox);
m_tempoChangeBeforeAt->hide();
m_tempoChangeStartOfBar = new QRadioButton
@@ -166,23 +166,23 @@ TempoDialog::TempoDialog(QWidget *parent, RosegardenGUIDoc *doc,
m_tempoChangeGlobal = new QRadioButton
(i18n("Apply this tempo to the whole composition"), changeWhereVBox);
- QHBox *optionHBox = new QHBox(changeWhereVBox);
- new QLabel(" ", optionHBox);
+ TQHBox *optionHBox = new TQHBox(changeWhereVBox);
+ new TQLabel(" ", optionHBox);
m_defaultBox = new QCheckBox
(i18n("Also make this the default tempo"), optionHBox);
- spare = new QLabel(optionHBox);
+ spare = new TQLabel(optionHBox);
optionHBox->setStretchFactor(spare, 20);
-// new QLabel(scopeBox);
+// new TQLabel(scopeBox);
- connect(m_tempoChangeHere, SIGNAL(clicked()),
- SLOT(slotActionChanged()));
- connect(m_tempoChangeBefore, SIGNAL(clicked()),
- SLOT(slotActionChanged()));
- connect(m_tempoChangeStartOfBar, SIGNAL(clicked()),
- SLOT(slotActionChanged()));
- connect(m_tempoChangeGlobal, SIGNAL(clicked()),
- SLOT(slotActionChanged()));
+ connect(m_tempoChangeHere, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotActionChanged()));
+ connect(m_tempoChangeBefore, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotActionChanged()));
+ connect(m_tempoChangeStartOfBar, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotActionChanged()));
+ connect(m_tempoChangeGlobal, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotActionChanged()));
m_tempoChangeHere->setChecked(true);
@@ -251,7 +251,7 @@ TempoDialog::populateTempo()
}
RealTime tempoTime = comp.getElapsedRealTime(m_tempoTime);
- QString milliSeconds;
+ TQString milliSeconds;
milliSeconds.sprintf("%03d", tempoTime.msec());
m_tempoTimeLabel->setText(i18n("%1.%2 s,").arg(tempoTime.sec)
.arg(milliSeconds));
@@ -278,7 +278,7 @@ TempoDialog::populateTempo()
if (lastTempoTime < m_tempoTime) {
RealTime lastRT = comp.getElapsedRealTime(lastTempoTime);
- QString lastms;
+ TQString lastms;
lastms.sprintf("%03d", lastRT.msec());
int lastBar = comp.getBarNumber(lastTempoTime);
m_tempoChangeBeforeAt->setText
@@ -343,8 +343,8 @@ TempoDialog::updateBeatLabels(double qpm)
("menu-no-note")));
m_tempoBeatsPerMinute->setText
- // (QString("= %1 )").arg
- (QString("= %1 ").arg
+ // (TQString("= %1 )").arg
+ (TQString("= %1 ").arg
(int(qpm * Note(Note::Crotchet).getDuration() / beat)));
m_tempoBeatLabel->show();
m_tempoBeat->show();
@@ -353,13 +353,13 @@ TempoDialog::updateBeatLabels(double qpm)
}
void
-TempoDialog::slotTempoChanged(const QString &)
+TempoDialog::slotTempoChanged(const TQString &)
{
updateBeatLabels(double(m_tempoValueSpinBox->valuef()));
}
void
-TempoDialog::slotTargetChanged(const QString &)
+TempoDialog::slotTargetChanged(const TQString &)
{
//...
}
@@ -443,9 +443,9 @@ TempoDialog::slotOk()
void
TempoDialog::slotTapClicked()
{
- QTime now = QTime::currentTime();
+ TQTime now = TQTime::currentTime();
- if (m_tapMinusOne != QTime()) {
+ if (m_tapMinusOne != TQTime()) {
int ms1 = m_tapMinusOne.msecsTo(now);
@@ -453,7 +453,7 @@ TempoDialog::slotTapClicked()
int msec = ms1;
- if (m_tapMinusTwo != QTime()) {
+ if (m_tapMinusTwo != TQTime()) {
int ms2 = m_tapMinusTwo.msecsTo(m_tapMinusOne);
if (ms2 < 10000) {
msec = (ms1 + ms2) / 2;