summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/QuantizeParameters.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/widgets/QuantizeParameters.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/widgets/QuantizeParameters.cpp')
-rw-r--r--src/gui/widgets/QuantizeParameters.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/src/gui/widgets/QuantizeParameters.cpp b/src/gui/widgets/QuantizeParameters.cpp
index 1cb2a58..a00969a 100644
--- a/src/gui/widgets/QuantizeParameters.cpp
+++ b/src/gui/widgets/QuantizeParameters.cpp
@@ -52,13 +52,13 @@
namespace Rosegarden
{
-QuantizeParameters::QuantizeParameters(TQWidget *parent,
+QuantizeParameters::QuantizeParameters(TQWidget *tqparent,
QuantizerType defaultQuantizer,
bool showNotationOption,
bool showAdvancedButton,
TQString configCategory,
TQString preamble) :
- TQFrame(parent),
+ TQFrame(tqparent),
m_configCategory(configCategory),
m_standardQuantizations
(BasicQuantizer::getStandardQuantizations())
@@ -71,47 +71,47 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
int zero = 0;
if (preamble) {
TQLabel *label = new TQLabel(preamble, this);
- label->setAlignment(Qt::WordBreak);
+ label->tqsetAlignment(TQt::WordBreak);
m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1);
zero = 1;
}
- TQGroupBox *quantizerBox = new QGroupBox
- (1, Horizontal, i18n("Quantizer"), this);
+ TQGroupBox *quantizerBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("Quantizer"), this);
m_mainLayout->addWidget(quantizerBox, zero, 0);
TQFrame *typeFrame = new TQFrame(quantizerBox);
- TQGridLayout *layout = new TQGridLayout(typeFrame, 2, 2, 5, 3);
- layout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0);
+ TQGridLayout *tqlayout = new TQGridLayout(typeFrame, 2, 2, 5, 3);
+ tqlayout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0);
m_typeCombo = new KComboBox(typeFrame);
m_typeCombo->insertItem(i18n("Grid quantizer"));
m_typeCombo->insertItem(i18n("Legato quantizer"));
m_typeCombo->insertItem(i18n("Heuristic notation quantizer"));
- layout->addWidget(m_typeCombo, 0, 1);
+ tqlayout->addWidget(m_typeCombo, 0, 1);
- m_notationTarget = new QCheckBox
+ m_notationTarget = new TQCheckBox
(i18n("Quantize for notation only (leave performance unchanged)"),
typeFrame);
- layout->addMultiCellWidget(m_notationTarget, 1, 1, 0, 1);
+ tqlayout->addMultiCellWidget(m_notationTarget, 1, 1, 0, 1);
if (!showNotationOption)
m_notationTarget->hide();
TQHBox *parameterBox = new TQHBox(this);
m_mainLayout->addWidget(parameterBox, zero + 1, 0);
- m_notationBox = new QGroupBox
- (1, Horizontal, i18n("Notation parameters"), parameterBox);
+ m_notationBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("Notation parameters"), parameterBox);
TQFrame *notationFrame = new TQFrame(m_notationBox);
- layout = new TQGridLayout(notationFrame, 4, 2, 5, 3);
+ tqlayout = new TQGridLayout(notationFrame, 4, 2, 5, 3);
- layout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame),
+ tqlayout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame),
1, 0);
m_notationUnitCombo = new KComboBox(notationFrame);
- layout->addWidget(m_notationUnitCombo, 1, 1);
+ tqlayout->addWidget(m_notationUnitCombo, 1, 1);
- layout->addWidget(new TQLabel(i18n("Complexity:"),
+ tqlayout->addWidget(new TQLabel(i18n("Complexity:"),
notationFrame), 0, 0);
m_simplicityCombo = new KComboBox(notationFrame);
@@ -120,9 +120,9 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_simplicityCombo->insertItem(i18n("Normal"));
m_simplicityCombo->insertItem(i18n("Low"));
m_simplicityCombo->insertItem(i18n("Very low"));
- layout->addWidget(m_simplicityCombo, 0, 1);
+ tqlayout->addWidget(m_simplicityCombo, 0, 1);
- layout->addWidget(new TQLabel(i18n("Tuplet level:"),
+ tqlayout->addWidget(new TQLabel(i18n("Tuplet level:"),
notationFrame), 2, 0);
m_maxTuplet = new KComboBox(notationFrame);
m_maxTuplet->insertItem(i18n("None"));
@@ -136,37 +136,37 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_maxTuplet->insertItem(i18n("8-Tuplet"));
*/
m_maxTuplet->insertItem(i18n("Any"));
- layout->addWidget(m_maxTuplet, 2, 1);
+ tqlayout->addWidget(m_maxTuplet, 2, 1);
m_counterpoint = new TQCheckBox(i18n("Permit counterpoint"), notationFrame);
- layout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1);
+ tqlayout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1);
- m_gridBox = new QGroupBox
- (1, Horizontal, i18n("Grid parameters"), parameterBox);
+ m_gridBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("Grid parameters"), parameterBox);
TQFrame *gridFrame = new TQFrame(m_gridBox);
- layout = new TQGridLayout(gridFrame, 4, 2, 5, 3);
+ tqlayout = new TQGridLayout(gridFrame, 4, 2, 5, 3);
- layout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0);
+ tqlayout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0);
m_gridUnitCombo = new KComboBox(gridFrame);
- layout->addWidget(m_gridUnitCombo, 0, 1);
+ tqlayout->addWidget(m_gridUnitCombo, 0, 1);
m_swingLabel = new TQLabel(i18n("Swing:"), gridFrame);
- layout->addWidget(m_swingLabel, 1, 0);
+ tqlayout->addWidget(m_swingLabel, 1, 0);
m_swingCombo = new KComboBox(gridFrame);
- layout->addWidget(m_swingCombo, 1, 1);
+ tqlayout->addWidget(m_swingCombo, 1, 1);
m_iterativeLabel = new TQLabel(i18n("Iterative amount:"), gridFrame);
- layout->addWidget(m_iterativeLabel, 2, 0);
+ tqlayout->addWidget(m_iterativeLabel, 2, 0);
m_iterativeCombo = new KComboBox(gridFrame);
- layout->addWidget(m_iterativeCombo, 2, 1);
+ tqlayout->addWidget(m_iterativeCombo, 2, 1);
- m_durationCheckBox = new QCheckBox
+ m_durationCheckBox = new TQCheckBox
(i18n("Quantize durations as well as start times"), gridFrame);
- layout->addMultiCellWidget(m_durationCheckBox, 3, 3, 0, 1);
+ tqlayout->addMultiCellWidget(m_durationCheckBox, 3, 3, 0, 1);
- m_postProcessingBox = new QGroupBox
- (1, Horizontal, i18n("After quantization"), this);
+ m_postProcessingBox = new TQGroupBox
+ (1, Qt::Horizontal, i18n("After quantization"), this);
if (preamble) {
m_mainLayout->addMultiCellWidget(m_postProcessingBox,
@@ -181,26 +181,26 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
if (showAdvancedButton) {
m_advancedButton =
new TQPushButton(i18n("Show advanced options"), this);
- m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, Qt::AlignLeft);
+ m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, TQt::AlignLeft);
TQObject::connect(m_advancedButton, TQT_SIGNAL(clicked()),
this, TQT_SLOT(slotAdvancedChanged()));
}
TQFrame *postFrame = new TQFrame(m_postProcessingBox);
- layout = new TQGridLayout(postFrame, 4, 1, 5, 3);
+ tqlayout = new TQGridLayout(postFrame, 4, 1, 5, 3);
m_rebeam = new TQCheckBox(i18n("Re-beam"), postFrame);
- m_articulate = new QCheckBox
+ m_articulate = new TQCheckBox
(i18n("Add articulations (staccato, tenuto, slurs)"), postFrame);
m_makeViable = new TQCheckBox(i18n("Tie notes at barlines etc"), postFrame);
m_deCounterpoint = new TQCheckBox(i18n("Split-and-tie overlapping chords"), postFrame);
- layout->addWidget(m_rebeam, 0, 0);
- layout->addWidget(m_articulate, 1, 0);
- layout->addWidget(m_makeViable, 2, 0);
- layout->addWidget(m_deCounterpoint, 3, 0);
+ tqlayout->addWidget(m_rebeam, 0, 0);
+ tqlayout->addWidget(m_articulate, 1, 0);
+ tqlayout->addWidget(m_makeViable, 2, 0);
+ tqlayout->addWidget(m_deCounterpoint, 3, 0);
- TQPixmap noMap = NotePixmapFactory::toQPixmap
+ TQPixmap noMap = NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("menu-no-note"));
int defaultType = 0;
@@ -278,7 +278,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
timeT time = m_standardQuantizations[i];
timeT error = 0;
- TQPixmap pmap = NotePixmapFactory::toQPixmap
+ TQPixmap pmap = NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeNoteMenuPixmap(time, error));
TQString label = NotationStrings::makeNoteMenuLabel(time, false, error);
@@ -286,8 +286,8 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_gridUnitCombo->insertItem(pmap, label);
m_notationUnitCombo->insertItem(pmap, label);
} else {
- m_gridUnitCombo->insertItem(noMap, TQString("%1").arg(time));
- m_notationUnitCombo->insertItem(noMap, TQString("%1").arg(time));
+ m_gridUnitCombo->insertItem(noMap, TQString("%1").tqarg(time));
+ m_notationUnitCombo->insertItem(noMap, TQString("%1").tqarg(time));
}
if (m_standardQuantizations[i] == defaultUnit) {
@@ -298,14 +298,14 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
}
for (int i = -100; i <= 200; i += 10) {
- m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").arg(i));
+ m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").tqarg(i));
if (i == defaultSwing)
m_swingCombo->setCurrentItem(m_swingCombo->count() - 1);
}
for (int i = 10; i <= 100; i += 10) {
m_iterativeCombo->insertItem(i == 100 ? i18n("Full quantize") :
- TQString("%1%").arg(i));
+ TQString("%1%").tqarg(i));
if (i == defaultIterate)
m_iterativeCombo->setCurrentItem(m_iterativeCombo->count() - 1);
}