summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/TempoDialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/dialogs/TempoDialog.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/dialogs/TempoDialog.cpp')
-rw-r--r--src/gui/dialogs/TempoDialog.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/gui/dialogs/TempoDialog.cpp b/src/gui/dialogs/TempoDialog.cpp
index 1edab6b..6d2c716 100644
--- a/src/gui/dialogs/TempoDialog.cpp
+++ b/src/gui/dialogs/TempoDialog.cpp
@@ -51,30 +51,30 @@
namespace Rosegarden
{
-TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
+TempoDialog::TempoDialog(TQWidget *tqparent, RosegardenGUIDoc *doc,
bool timeEditable):
- KDialogBase(parent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help),
+ KDialogBase(tqparent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help),
m_doc(doc),
m_tempoTime(0)
{
setHelp("tempo");
TQVBox *vbox = makeVBoxMainWidget();
- TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Tempo"), vbox);
+ TQGroupBox *groupBox = new TQGroupBox(1, Qt::Horizontal, i18n("Tempo"), vbox);
TQFrame *frame = new TQFrame(groupBox);
- TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 5, 5);
+ TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 5, 5);
// Set tempo
- layout->addWidget(new TQLabel(i18n("New tempo:"), frame), 0, 1);
+ tqlayout->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);
+ tqlayout->addWidget(m_tempoValueSpinBox, 0, 2);
connect(m_tempoValueSpinBox, TQT_SIGNAL(valueChanged(const TQString &)),
TQT_SLOT(slotTempoChanged(const TQString &)));
m_tempoTap= new TQPushButton(i18n("Tap"), frame);
- layout->addWidget(m_tempoTap, 0, 3);
+ tqlayout->addWidget(m_tempoTap, 0, 3);
connect(m_tempoTap, TQT_SIGNAL(clicked()), TQT_SLOT(slotTapClicked()));
@@ -85,13 +85,13 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
// 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);
- // layout->addWidget(m_tempoTargetSpinBox, 1, 2);
+ // tqlayout->addMultiCellWidget(m_tempoTargetCheckBox, 1, 1, 0, 1, AlignRight);
+ // tqlayout->addWidget(m_tempoTargetSpinBox, 1, 2);
- layout->addMultiCellWidget(m_tempoConstant, 1, 1, 1, 2);
- layout->addMultiCellWidget(m_tempoRampToNext, 2, 2, 1, 2);
- layout->addWidget(m_tempoRampToTarget, 3, 1);
- layout->addWidget(m_tempoTargetSpinBox, 3, 2);
+ tqlayout->addMultiCellWidget(m_tempoConstant, 1, 1, 1, 2);
+ tqlayout->addMultiCellWidget(m_tempoRampToNext, 2, 2, 1, 2);
+ tqlayout->addWidget(m_tempoRampToTarget, 3, 1);
+ tqlayout->addWidget(m_tempoTargetSpinBox, 3, 2);
// connect(m_tempoTargetCheckBox, TQT_SIGNAL(clicked()),
// TQT_SLOT(slotTargetCheckBoxClicked()));
@@ -105,13 +105,13 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
TQT_SLOT(slotTargetChanged(const TQString &)));
m_tempoBeatLabel = new TQLabel(frame);
- layout->addWidget(m_tempoBeatLabel, 0, 4);
+ tqlayout->addWidget(m_tempoBeatLabel, 0, 4);
m_tempoBeat = new TQLabel(frame);
- layout->addWidget(m_tempoBeat, 0, 5);
+ tqlayout->addWidget(m_tempoBeat, 0, 5);
m_tempoBeatsPerMinute = new TQLabel(frame);
- layout->addWidget(m_tempoBeatsPerMinute, 0, 6);
+ tqlayout->addWidget(m_tempoBeatsPerMinute, 0, 6);
m_timeEditor = 0;
@@ -124,7 +124,7 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
}
// Scope Box
- TQButtonGroup *scopeGroup = new TQButtonGroup(1, Horizontal,
+ TQButtonGroup *scopeGroup = new TQButtonGroup(1, Qt::Horizontal,
i18n("Scope"), vbox);
// new TQLabel(scopeBox);
@@ -150,25 +150,25 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc,
TQVBox *changeWhereVBox = new TQVBox(changeWhereBox);
changeWhereBox->setStretchFactor(changeWhereVBox, 20);
- m_tempoChangeHere = new QRadioButton
+ m_tempoChangeHere = new TQRadioButton
(i18n("Apply this tempo from here onwards"),
changeWhereVBox);
- m_tempoChangeBefore = new QRadioButton
+ m_tempoChangeBefore = new TQRadioButton
(i18n("Replace the last tempo change"),
changeWhereVBox);
m_tempoChangeBeforeAt = new TQLabel(changeWhereVBox);
m_tempoChangeBeforeAt->hide();
- m_tempoChangeStartOfBar = new QRadioButton
+ m_tempoChangeStartOfBar = new TQRadioButton
(i18n("Apply this tempo from the start of this bar"), changeWhereVBox);
- m_tempoChangeGlobal = new QRadioButton
+ m_tempoChangeGlobal = new TQRadioButton
(i18n("Apply this tempo to the whole composition"), changeWhereVBox);
TQHBox *optionHBox = new TQHBox(changeWhereVBox);
new TQLabel(" ", optionHBox);
- m_defaultBox = new QCheckBox
+ m_defaultBox = new TQCheckBox
(i18n("Also make this the default tempo"), optionHBox);
spare = new TQLabel(optionHBox);
optionHBox->setStretchFactor(spare, 20);
@@ -253,17 +253,17 @@ TempoDialog::populateTempo()
RealTime tempoTime = comp.getElapsedRealTime(m_tempoTime);
TQString milliSeconds;
milliSeconds.sprintf("%03d", tempoTime.msec());
- m_tempoTimeLabel->setText(i18n("%1.%2 s,").arg(tempoTime.sec)
- .arg(milliSeconds));
+ m_tempoTimeLabel->setText(i18n("%1.%2 s,").tqarg(tempoTime.sec)
+ .tqarg(milliSeconds));
int barNo = comp.getBarNumber(m_tempoTime);
if (comp.getBarStart(barNo) == m_tempoTime) {
m_tempoBarLabel->setText
- (i18n("at the start of measure %1.").arg(barNo + 1));
+ (i18n("at the start of measure %1.").tqarg(barNo + 1));
m_tempoChangeStartOfBar->setEnabled(false);
} else {
m_tempoBarLabel->setText(
- i18n("in the middle of measure %1.").arg(barNo + 1));
+ i18n("in the middle of measure %1.").tqarg(barNo + 1));
m_tempoChangeStartOfBar->setEnabled(true);
}
@@ -282,8 +282,8 @@ TempoDialog::populateTempo()
lastms.sprintf("%03d", lastRT.msec());
int lastBar = comp.getBarNumber(lastTempoTime);
m_tempoChangeBeforeAt->setText
- (i18n(" (at %1.%2 s, in measure %3)").arg(lastRT.sec)
- .arg(lastms).arg(lastBar + 1));
+ (i18n(" (at %1.%2 s, in measure %3)").tqarg(lastRT.sec)
+ .tqarg(lastms).tqarg(lastBar + 1));
m_tempoChangeBeforeAt->show();
m_tempoChangeBefore->setEnabled(true);
@@ -334,11 +334,11 @@ TempoDialog::updateBeatLabels(double qpm)
m_tempoBeatLabel->setText(" ");
timeT error = 0;
- m_tempoBeat->setPixmap(NotePixmapFactory::toQPixmap
+ m_tempoBeat->setPixmap(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeNoteMenuPixmap(beat, error)));
m_tempoBeat->setMaximumWidth(25);
if (error)
- m_tempoBeat->setPixmap(NotePixmapFactory::toQPixmap
+ m_tempoBeat->setPixmap(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap
("menu-no-note")));