summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/TupletDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/TupletDialog.cpp')
-rw-r--r--src/gui/dialogs/TupletDialog.cpp142
1 files changed, 71 insertions, 71 deletions
diff --git a/src/gui/dialogs/TupletDialog.cpp b/src/gui/dialogs/TupletDialog.cpp
index ed1c583..a785097 100644
--- a/src/gui/dialogs/TupletDialog.cpp
+++ b/src/gui/dialogs/TupletDialog.cpp
@@ -24,7 +24,7 @@
#include "TupletDialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include "base/NotationTypes.h"
@@ -32,29 +32,29 @@
#include "gui/editors/notation/NotePixmapFactory.h"
#include <kcombobox.h>
#include <kdialogbase.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgrid.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqgrid.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
namespace Rosegarden
{
-TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
+TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
timeT maxDuration) :
KDialogBase(parent, 0, true, i18n("Tuplet"), Ok | Cancel | Help),
m_maxDuration(maxDuration)
{
setHelp("nv-tuplets");
- QVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox = makeVBoxMainWidget();
- QGroupBox *timingBox = new QGroupBox
+ TQGroupBox *timingBox = new QGroupBox
(1, Horizontal, i18n("New timing for tuplet group"), vbox);
if (m_maxDuration > 0) {
@@ -70,10 +70,10 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
defaultUnitType = maxUnitType;
}
- QFrame *timingFrame = new QFrame(timingBox);
- QGridLayout *timingLayout = new QGridLayout(timingFrame, 3, 3, 5, 5);
+ TQFrame *timingFrame = new TQFrame(timingBox);
+ TQGridLayout *timingLayout = new TQGridLayout(timingFrame, 3, 3, 5, 5);
- timingLayout->addWidget(new QLabel(i18n("Play "), timingFrame), 0, 0);
+ timingLayout->addWidget(new TQLabel(i18n("Play "), timingFrame), 0, 0);
m_untupledCombo = new KComboBox(timingFrame);
timingLayout->addWidget(m_untupledCombo, 0, 1);
@@ -95,7 +95,7 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
}
}
- timingLayout->addWidget(new QLabel(i18n("in the time of "), timingFrame), 1, 0);
+ timingLayout->addWidget(new TQLabel(i18n("in the time of "), timingFrame), 1, 0);
m_tupledCombo = new KComboBox(timingFrame);
timingLayout->addWidget(m_tupledCombo, 1, 1);
@@ -105,7 +105,7 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
m_hasTimingAlready->setChecked(false);
timingLayout->addMultiCellWidget(m_hasTimingAlready, 2, 2, 0, 2);
- connect(m_hasTimingAlready, SIGNAL(clicked()), this, SLOT(slotHasTimingChanged()));
+ connect(m_hasTimingAlready, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHasTimingChanged()));
updateUntupledCombo();
updateTupledCombo();
@@ -113,45 +113,45 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
m_timingDisplayBox = new QGroupBox
(1, Horizontal, i18n("Timing calculations"), vbox);
- QGrid *timingDisplayGrid = new QGrid(3, QGrid::Horizontal, m_timingDisplayBox);
+ TQGrid *timingDisplayGrid = new TQGrid(3, TQGrid::Horizontal, m_timingDisplayBox);
if (maxDuration > 0) {
- new QLabel(i18n("Selected region:"), timingDisplayGrid);
- new QLabel("", timingDisplayGrid);
- m_selectionDurationDisplay = new QLabel("x", timingDisplayGrid);
- m_selectionDurationDisplay->setAlignment(int(QLabel::AlignVCenter |
- QLabel::AlignRight));
+ new TQLabel(i18n("Selected region:"), timingDisplayGrid);
+ new TQLabel("", timingDisplayGrid);
+ m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid);
+ m_selectionDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ TQLabel::AlignRight));
} else {
m_selectionDurationDisplay = 0;
}
- new QLabel(i18n("Group with current timing:"), timingDisplayGrid);
- m_untupledDurationCalculationDisplay = new QLabel("x", timingDisplayGrid);
- m_untupledDurationDisplay = new QLabel("x", timingDisplayGrid);
- m_untupledDurationDisplay->setAlignment(int(QLabel::AlignVCenter |
- QLabel::AlignRight));
+ 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 |
+ TQLabel::AlignRight));
- new QLabel(i18n("Group with new timing:"), timingDisplayGrid);
- m_tupledDurationCalculationDisplay = new QLabel("x", timingDisplayGrid);
- m_tupledDurationDisplay = new QLabel("x", timingDisplayGrid);
- m_tupledDurationDisplay->setAlignment(int(QLabel::AlignVCenter |
- QLabel::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 |
+ TQLabel::AlignRight));
- new QLabel(i18n("Gap created by timing change:"), timingDisplayGrid);
- m_newGapDurationCalculationDisplay = new QLabel("x", timingDisplayGrid);
- m_newGapDurationDisplay = new QLabel("x", timingDisplayGrid);
- m_newGapDurationDisplay->setAlignment(int(QLabel::AlignVCenter |
- QLabel::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 |
+ TQLabel::AlignRight));
if (maxDuration > 0) {
- new QLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid);
+ new TQLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid);
m_unchangedDurationCalculationDisplay = new QLabel
("x", timingDisplayGrid);
- m_unchangedDurationDisplay = new QLabel("x", timingDisplayGrid);
- m_unchangedDurationDisplay->setAlignment(int(QLabel::AlignVCenter |
- QLabel::AlignRight));
+ m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid);
+ m_unchangedDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
+ TQLabel::AlignRight));
} else {
m_unchangedDurationDisplay = 0;
@@ -159,18 +159,18 @@ TupletDialog::TupletDialog(QWidget *parent, Note::Type defaultUnitType,
updateTimingDisplays();
- QObject::connect(m_unitCombo, SIGNAL(activated(const QString &)),
- this, SLOT(slotUnitChanged(const QString &)));
+ TQObject::connect(m_unitCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotUnitChanged(const TQString &)));
- QObject::connect(m_untupledCombo, SIGNAL(activated(const QString &)),
- this, SLOT(slotUntupledChanged(const QString &)));
- QObject::connect(m_untupledCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotUntupledChanged(const QString &)));
+ TQObject::connect(m_untupledCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotUntupledChanged(const TQString &)));
+ TQObject::connect(m_untupledCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotUntupledChanged(const TQString &)));
- QObject::connect(m_tupledCombo, SIGNAL(activated(const QString &)),
- this, SLOT(slotTupledChanged(const QString &)));
- QObject::connect(m_tupledCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotTupledChanged(const QString &)));
+ TQObject::connect(m_tupledCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotTupledChanged(const TQString &)));
+ TQObject::connect(m_tupledCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotTupledChanged(const TQString &)));
}
void
@@ -235,10 +235,10 @@ TupletDialog::updateUntupledCombo()
}
}
- QString previousText = m_untupledCombo->currentText();
+ TQString previousText = m_untupledCombo->currentText();
if (previousText.toInt() == 0) {
if (maxValue < 3)
- previousText = QString("%1").arg(maxValue);
+ previousText = TQString("%1").arg(maxValue);
else
previousText = "3";
}
@@ -247,7 +247,7 @@ TupletDialog::updateUntupledCombo()
bool setText = false;
for (int i = 1; i <= maxValue; ++i) {
- QString text = QString("%1").arg(i);
+ TQString text = TQString("%1").arg(i);
m_untupledCombo->insertItem(text);
if (m_hasTimingAlready->isChecked()) {
if (i == (m_maxDuration * 3) / (Note(getUnitType()).getDuration()*2)) {
@@ -274,11 +274,11 @@ TupletDialog::updateTupledCombo()
int untupled = getUntupledCount();
- QString previousText = m_tupledCombo->currentText();
+ TQString previousText = m_tupledCombo->currentText();
if (previousText.toInt() == 0 ||
previousText.toInt() > untupled) {
if (untupled < 2)
- previousText = QString("%1").arg(untupled);
+ previousText = TQString("%1").arg(untupled);
else
previousText = "2";
}
@@ -286,7 +286,7 @@ TupletDialog::updateTupledCombo()
m_tupledCombo->clear();
for (int i = 1; i < untupled; ++i) {
- QString text = QString("%1").arg(i);
+ TQString text = TQString("%1").arg(i);
m_tupledCombo->insertItem(text);
if (m_hasTimingAlready->isChecked()) {
if (i == m_maxDuration / Note(getUnitType()).getDuration()) {
@@ -310,38 +310,38 @@ TupletDialog::updateTimingDisplays()
timeT tupledDuration = unitDuration * tupledCount;
if (m_selectionDurationDisplay) {
- m_selectionDurationDisplay->setText(QString("%1").arg(m_maxDuration));
+ m_selectionDurationDisplay->setText(TQString("%1").arg(m_maxDuration));
}
m_untupledDurationCalculationDisplay->setText
- (QString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration));
+ (TQString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration));
m_untupledDurationDisplay->setText
- (QString("%1").arg(untupledDuration));
+ (TQString("%1").arg(untupledDuration));
m_tupledDurationCalculationDisplay->setText
- (QString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration));
+ (TQString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration));
m_tupledDurationDisplay->setText
- (QString("%1").arg(tupledDuration));
+ (TQString("%1").arg(tupledDuration));
m_newGapDurationCalculationDisplay->setText
- (QString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration));
+ (TQString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration));
m_newGapDurationDisplay->setText
- (QString("%1").arg(untupledDuration - tupledDuration));
+ (TQString("%1").arg(untupledDuration - tupledDuration));
if (m_selectionDurationDisplay && m_unchangedDurationDisplay) {
if (m_maxDuration != untupledDuration) {
m_unchangedDurationCalculationDisplay->setText
- (QString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration));
+ (TQString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration));
} else {
m_unchangedDurationCalculationDisplay->setText("");
}
m_unchangedDurationDisplay->setText
- (QString("%1").arg(m_maxDuration - untupledDuration));
+ (TQString("%1").arg(m_maxDuration - untupledDuration));
}
}
void
-TupletDialog::slotUnitChanged(const QString &)
+TupletDialog::slotUnitChanged(const TQString &)
{
updateUntupledCombo();
updateTupledCombo();
@@ -349,14 +349,14 @@ TupletDialog::slotUnitChanged(const QString &)
}
void
-TupletDialog::slotUntupledChanged(const QString &)
+TupletDialog::slotUntupledChanged(const TQString &)
{
updateTupledCombo();
updateTimingDisplays();
}
void
-TupletDialog::slotTupledChanged(const QString &)
+TupletDialog::slotTupledChanged(const TQString &)
{
updateTimingDisplays();
}