summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/TupletDialog.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/TupletDialog.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/TupletDialog.cpp')
-rw-r--r--src/gui/dialogs/TupletDialog.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/gui/dialogs/TupletDialog.cpp b/src/gui/dialogs/TupletDialog.cpp
index a785097..aaa50da 100644
--- a/src/gui/dialogs/TupletDialog.cpp
+++ b/src/gui/dialogs/TupletDialog.cpp
@@ -46,16 +46,16 @@
namespace Rosegarden
{
-TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
+TupletDialog::TupletDialog(TQWidget *tqparent, Note::Type defaultUnitType,
timeT maxDuration) :
- KDialogBase(parent, 0, true, i18n("Tuplet"), Ok | Cancel | Help),
+ KDialogBase(tqparent, 0, true, i18n("Tuplet"), Ok | Cancel | Help),
m_maxDuration(maxDuration)
{
setHelp("nv-tuplets");
TQVBox *vbox = makeVBoxMainWidget();
- TQGroupBox *timingBox = new QGroupBox
- (1, Horizontal, i18n("New timing for tuplet group"), vbox);
+ TQGroupBox *timingBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("New timing for tuplet group"), vbox);
if (m_maxDuration > 0) {
@@ -87,7 +87,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
if (maxDuration > 0 && (2 * duration > maxDuration))
break;
timeT e; // error factor, ignore
- m_unitCombo->insertItem(NotePixmapFactory::toQPixmap
+ m_unitCombo->insertItem(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeNoteMenuPixmap(duration, e)),
NotationStrings::makeNoteMenuLabel(duration, false, e, true));
if (defaultUnitType == t) {
@@ -100,7 +100,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
m_tupledCombo = new KComboBox(timingFrame);
timingLayout->addWidget(m_tupledCombo, 1, 1);
- m_hasTimingAlready = new QCheckBox
+ m_hasTimingAlready = new TQCheckBox
(i18n("Timing is already correct: update display only"), timingFrame);
m_hasTimingAlready->setChecked(false);
timingLayout->addMultiCellWidget(m_hasTimingAlready, 2, 2, 0, 2);
@@ -110,17 +110,17 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
updateUntupledCombo();
updateTupledCombo();
- m_timingDisplayBox = new QGroupBox
- (1, Horizontal, i18n("Timing calculations"), vbox);
+ m_timingDisplayBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("Timing calculations"), vbox);
- TQGrid *timingDisplayGrid = new TQGrid(3, TQGrid::Horizontal, m_timingDisplayBox);
+ TQGrid *timingDisplayGrid = new TQGrid(3, Qt::Horizontal, m_timingDisplayBox);
if (maxDuration > 0) {
new TQLabel(i18n("Selected region:"), timingDisplayGrid);
new TQLabel("", timingDisplayGrid);
m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid);
- m_selectionDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ m_selectionDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight));
} else {
m_selectionDurationDisplay = 0;
@@ -129,28 +129,28 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
new TQLabel(i18n("Group with current timing:"), timingDisplayGrid);
m_untupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_untupledDurationDisplay = new TQLabel("x", timingDisplayGrid);
- m_untupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ m_untupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight));
new TQLabel(i18n("Group with new timing:"), timingDisplayGrid);
m_tupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_tupledDurationDisplay = new TQLabel("x", timingDisplayGrid);
- m_tupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ m_tupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight));
new TQLabel(i18n("Gap created by timing change:"), timingDisplayGrid);
m_newGapDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_newGapDurationDisplay = new TQLabel("x", timingDisplayGrid);
- m_newGapDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ m_newGapDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight));
if (maxDuration > 0) {
new TQLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid);
- m_unchangedDurationCalculationDisplay = new QLabel
+ m_unchangedDurationCalculationDisplay = new TQLabel
("x", timingDisplayGrid);
m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid);
- m_unchangedDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ m_unchangedDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight));
} else {
@@ -238,7 +238,7 @@ TupletDialog::updateUntupledCombo()
TQString previousText = m_untupledCombo->currentText();
if (previousText.toInt() == 0) {
if (maxValue < 3)
- previousText = TQString("%1").arg(maxValue);
+ previousText = TQString("%1").tqarg(maxValue);
else
previousText = "3";
}
@@ -247,7 +247,7 @@ TupletDialog::updateUntupledCombo()
bool setText = false;
for (int i = 1; i <= maxValue; ++i) {
- TQString text = TQString("%1").arg(i);
+ TQString text = TQString("%1").tqarg(i);
m_untupledCombo->insertItem(text);
if (m_hasTimingAlready->isChecked()) {
if (i == (m_maxDuration * 3) / (Note(getUnitType()).getDuration()*2)) {
@@ -278,7 +278,7 @@ TupletDialog::updateTupledCombo()
if (previousText.toInt() == 0 ||
previousText.toInt() > untupled) {
if (untupled < 2)
- previousText = TQString("%1").arg(untupled);
+ previousText = TQString("%1").tqarg(untupled);
else
previousText = "2";
}
@@ -286,7 +286,7 @@ TupletDialog::updateTupledCombo()
m_tupledCombo->clear();
for (int i = 1; i < untupled; ++i) {
- TQString text = TQString("%1").arg(i);
+ TQString text = TQString("%1").tqarg(i);
m_tupledCombo->insertItem(text);
if (m_hasTimingAlready->isChecked()) {
if (i == m_maxDuration / Note(getUnitType()).getDuration()) {
@@ -310,33 +310,33 @@ TupletDialog::updateTimingDisplays()
timeT tupledDuration = unitDuration * tupledCount;
if (m_selectionDurationDisplay) {
- m_selectionDurationDisplay->setText(TQString("%1").arg(m_maxDuration));
+ m_selectionDurationDisplay->setText(TQString("%1").tqarg(m_maxDuration));
}
m_untupledDurationCalculationDisplay->setText
- (TQString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration));
+ (TQString(" %1 x %2 = ").tqarg(untupledCount).tqarg(unitDuration));
m_untupledDurationDisplay->setText
- (TQString("%1").arg(untupledDuration));
+ (TQString("%1").tqarg(untupledDuration));
m_tupledDurationCalculationDisplay->setText
- (TQString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration));
+ (TQString(" %1 x %2 = ").tqarg(tupledCount).tqarg(unitDuration));
m_tupledDurationDisplay->setText
- (TQString("%1").arg(tupledDuration));
+ (TQString("%1").tqarg(tupledDuration));
m_newGapDurationCalculationDisplay->setText
- (TQString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration));
+ (TQString(" %1 - %2 = ").tqarg(untupledDuration).tqarg(tupledDuration));
m_newGapDurationDisplay->setText
- (TQString("%1").arg(untupledDuration - tupledDuration));
+ (TQString("%1").tqarg(untupledDuration - tupledDuration));
if (m_selectionDurationDisplay && m_unchangedDurationDisplay) {
if (m_maxDuration != untupledDuration) {
m_unchangedDurationCalculationDisplay->setText
- (TQString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration));
+ (TQString(" %1 - %2 = ").tqarg(m_maxDuration).tqarg(untupledDuration));
} else {
m_unchangedDurationCalculationDisplay->setText("");
}
m_unchangedDurationDisplay->setText
- (TQString("%1").arg(m_maxDuration - untupledDuration));
+ (TQString("%1").tqarg(m_maxDuration - untupledDuration));
}
}