summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-11-27 20:30:44 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-11-27 20:30:44 +0000
commit59e3c2271cb4e23cbb1021b2a0136e6bd90ea4f1 (patch)
treecb94221e0ed30b8e17964ee9b8333c46ac0859e1 /muse2/muse
parenta0ed94cfa536025b1c51b6b1c4dffe1683ea2808 (diff)
Ported Quant Config dialog
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/midiedit/quantconfig.cpp66
-rw-r--r--muse2/muse/midiedit/quantconfig.h2
2 files changed, 44 insertions, 24 deletions
diff --git a/muse2/muse/midiedit/quantconfig.cpp b/muse2/muse/midiedit/quantconfig.cpp
index 867dedea..b82f66d6 100644
--- a/muse2/muse/midiedit/quantconfig.cpp
+++ b/muse2/muse/midiedit/quantconfig.cpp
@@ -6,16 +6,13 @@
// (C) Copyright 1999/2003 Werner Schweer (ws@seh.de)
//=========================================================
-#include <qspinbox.h>
-#include <QLayout>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <q3groupbox.h>
-#include <q3whatsthis.h>
+#include <QCheckBox>
+#include <QGroupBox>
+#include <QLabel>
+#include <QSpinBox>
+#include <QVBoxLayout>
#include "quantconfig.h"
-//Added by qt3to4:
-#include <QVBoxLayout>
const char* wtStrengthTxt = QT_TR_NOOP("sets amount of quantization:\n"
"0 - no quantization\n"
@@ -31,29 +28,52 @@ QuantConfig::QuantConfig(int s, int l, bool lenFlag)
: QDialog()
{
setCaption(tr("MusE: Config Quantize"));
- QVBoxLayout* layout = new QVBoxLayout(this);
- Q3GroupBox* gb = new Q3GroupBox(2, Qt::Horizontal, tr("Config Quantize"), this);
- layout->addWidget(gb);
+ QVBoxLayout *mainlayout = new QVBoxLayout;
+
+ QGridLayout* layout = new QGridLayout;
+ QGroupBox* gb = new QGroupBox(tr("Config Quantize"));
- QLabel* l1 = new QLabel(tr("Strength"), gb);
- QSpinBox* sb1 = new QSpinBox(0, 100, 1, gb);
+ QLabel* l1 = new QLabel(tr("Strength"));
+ layout->addWidget(l1, 0, 0);
+ QSpinBox* sb1 = new QSpinBox;
+ sb1->setMinimum(0);
+ sb1->setMaximum(100);
+ sb1->setSingleStep(1);
sb1->setSuffix(QString("%"));
sb1->setValue(s);
- QLabel* l2 = new QLabel(tr("Donīt Quantize"), gb);
- QSpinBox* sb2 = new QSpinBox(0, 500, 1, gb);
+ layout->addWidget(sb1, 0, 1);
+
+ QLabel* l2 = new QLabel(tr("Donīt Quantize"));
+ layout->addWidget(l2, 1, 0);
+ QSpinBox* sb2 = new QSpinBox;
+ sb2->setMinimum(0);
+ sb2->setMaximum(500);
+ sb2->setSingleStep(1);
sb2->setValue(l);
- QLabel* l3 = new QLabel(tr("Quant Len"), gb);
- QRadioButton* but = new QRadioButton(gb);
+ layout->addWidget(sb2, 1, 1);
+
+ QLabel* l3 = new QLabel(tr("Quant Len"));
+ layout->addWidget(l3, 2, 0);
+ QCheckBox* but = new QCheckBox;
but->setChecked(lenFlag);
+ layout->addWidget(but, 2, 1);
+
connect(sb1, SIGNAL(valueChanged(int)), SIGNAL(setQuantStrength(int)));
connect(sb2, SIGNAL(valueChanged(int)), SIGNAL(setQuantLimit(int)));
connect(but, SIGNAL(toggled(bool)), SIGNAL(setQuantLen(bool)));
- Q3WhatsThis::add(l1, tr(wtStrengthTxt));
- Q3WhatsThis::add(sb1, tr(wtStrengthTxt));
- Q3WhatsThis::add(l2, tr(wtQLimitTxt));
- Q3WhatsThis::add(sb2, tr(wtQLimitTxt));
- Q3WhatsThis::add(l3, tr(wtQLenTxt));
- Q3WhatsThis::add(but, tr(wtQLenTxt));
+ gb->setLayout(layout);
+ mainlayout->addWidget(gb);
+ setLayout(mainlayout);
+
+ l1->setWhatsThis(tr(wtStrengthTxt));
+ l1->setToolTip(tr(wtStrengthTxt));
+ sb1->setWhatsThis(tr(wtStrengthTxt));
+ l2->setWhatsThis(tr(wtQLimitTxt));
+ l2->setToolTip(tr(wtQLimitTxt));
+ sb2->setWhatsThis(tr(wtQLimitTxt));
+ l3->setWhatsThis(tr(wtQLenTxt));
+ l3->setToolTip(tr(wtQLenTxt));
+ but->setWhatsThis(tr(wtQLenTxt));
}
diff --git a/muse2/muse/midiedit/quantconfig.h b/muse2/muse/midiedit/quantconfig.h
index 31ab2285..4466cdf0 100644
--- a/muse2/muse/midiedit/quantconfig.h
+++ b/muse2/muse/midiedit/quantconfig.h
@@ -9,7 +9,7 @@
#ifndef __QCONFIG_H__
#define __QCONFIG_H__
-#include <qdialog.h>
+#include <QDialog>
//---------------------------------------------------------
// QuantConfig