diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
commit | 4a1be16bbfafb8455b54336c4465da8f8bfe3ab6 (patch) | |
tree | 01cbdba041d5e864294909d834c1a189f0edb98b /muse2/synti/organ | |
parent | f681783c513b54002aa4dfec2566f26bfc38689b (diff) |
ported many Qt3 methods to Qt4
Diffstat (limited to 'muse2/synti/organ')
-rw-r--r-- | muse2/synti/organ/organ.cpp | 4 | ||||
-rw-r--r-- | muse2/synti/organ/organgui.cpp | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/muse2/synti/organ/organ.cpp b/muse2/synti/organ/organ.cpp index 0ab7880d..ebbdde95 100644 --- a/muse2/synti/organ/organ.cpp +++ b/muse2/synti/organ/organ.cpp @@ -159,7 +159,7 @@ static inline float table_pos (float* table, unsigned long freq_256, unsigned *a bool Organ::init(const char* name) { gui = new OrganGui; - gui->setCaption(QString(name)); + gui->setWindowTitle(QString(name)); gui->show(); for (int i = 0; i < NUM_CONTROLLER; ++i) @@ -682,7 +682,7 @@ void Organ::setGeometry(int x, int y, int w, int h) // construct a new synthesizer instance //--------------------------------------------------------- -static Mess* instantiate(int sr, QWidget*, QString* projectPathPtr, const char* name) +static Mess* instantiate(int sr, QWidget*, QString* /*projectPathPtr*/, const char* name) { Organ* synth = new Organ(sr); if (synth->init(name)) { diff --git a/muse2/synti/organ/organgui.cpp b/muse2/synti/organ/organgui.cpp index 340c67f6..9b763fd6 100644 --- a/muse2/synti/organ/organgui.cpp +++ b/muse2/synti/organ/organgui.cpp @@ -84,7 +84,7 @@ void OrganGui::ctrlChanged(int idx) QSlider* slider = (QSlider*)(ctrl->editor); val = slider->value(); // By T356. Apply auto-bias center value. - if(slider->minValue() < 0) + if(slider->minimum() < 0) val += 8192; } else if (ctrl->type == SynthGuiCtrl::SWITCH) { @@ -106,8 +106,8 @@ int OrganGui::getControllerMinMax(int id, int* min, int* max) const //int val = 0; if (ctrl->type == SynthGuiCtrl::SLIDER) { QSlider* slider = (QSlider*)(ctrl->editor); - *max = slider->maxValue(); - *min = slider->minValue(); + *max = slider->maximum(); + *min = slider->minimum(); //val = (slider->value() * 16383 + max/2) / max; //val = 16383 + 1/2 @@ -140,12 +140,12 @@ void OrganGui::setParam(int param, int val) ctrl->editor->blockSignals(true); if (ctrl->type == SynthGuiCtrl::SLIDER) { QSlider* slider = (QSlider*)(ctrl->editor); -// int max = slider->maxValue(); +// int max = slider->maximum(); // if(val < 0) val = (val * max + 8191) / 16383 - 1; // else val = (val * max + 8191) / 16383; // By T356. Apply auto-bias center value. - if(slider->minValue() < 0) + if(slider->minimum() < 0) val -= 8192; #ifdef ORGANGUI_DEBUG |