summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/velocity.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-08 14:08:06 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-08 14:08:06 +0000
commit94583a696436a3bec385223efaea730768720975 (patch)
treecf216cbc526a27582e43b6e39a3c80788cbb7a13 /muse2/muse/widgets/velocity.cpp
parent777badc6ba80b5bc244e8e3141b2fd0257271a89 (diff)
made quantize, modify note len and modify velocity functions global
added quantize-dialog and improved the other dialogs
Diffstat (limited to 'muse2/muse/widgets/velocity.cpp')
-rw-r--r--muse2/muse/widgets/velocity.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/muse2/muse/widgets/velocity.cpp b/muse2/muse/widgets/velocity.cpp
index 309beb4d..ad9bbfe4 100644
--- a/muse2/muse/widgets/velocity.cpp
+++ b/muse2/muse/widgets/velocity.cpp
@@ -12,7 +12,7 @@
// Velocity
//---------------------------------------------------------
-Velocity::Velocity(QDialog* parent)
+Velocity::Velocity(QWidget* parent)
: QDialog(parent)
{
setupUi(this);
@@ -21,6 +21,8 @@ Velocity::Velocity(QDialog* parent)
rangeGroup->addButton(selectedEvents,1);
rangeGroup->addButton(loopedEvents,2);
rangeGroup->addButton(selectedLooped,3);
+
+ pullValues();
}
//---------------------------------------------------------
@@ -29,18 +31,30 @@ Velocity::Velocity(QDialog* parent)
void Velocity::accept()
{
- _range = rangeGroup->checkedId();
- _rateVal = rate->value();
- _offsetVal = offset->value();
+ pullValues();
QDialog::accept();
}
//---------------------------------------------------------
-// setRange
+// pullValues
//---------------------------------------------------------
-void Velocity::setRange(int id)
+void Velocity::pullValues()
{
- rangeGroup->button(id)->setChecked(true);
+ range = rangeGroup->checkedId();
+ rateVal = rate->value();
+ offsetVal = offset->value();
}
+//---------------------------------------------------------
+// exec
+//---------------------------------------------------------
+
+int Velocity::exec()
+ {
+ rangeGroup->button(range)->setChecked(true);
+ rate->setValue(rateVal);
+ offset->setValue(offsetVal);
+
+ return QDialog::exec();
+ }