diff options
| author | Werner Schweer <ws.seh.de> | 2006-11-26 17:12:35 +0000 | 
|---|---|---|
| committer | Werner Schweer <ws.seh.de> | 2006-11-26 17:12:35 +0000 | 
| commit | 7241ad863d32fa5627697f34aef2bc9ee7049b07 (patch) | |
| tree | 81edaee7dd63d5e29772b2e3e6d1f3a25b21813d | |
| parent | ffc4685901ad6b0a75a8be22fd27be10696ada8d (diff) | |
more fixes
| -rw-r--r-- | muse/awl/mslider.cpp | 71 | ||||
| -rw-r--r-- | muse/muse/arranger/canvas.cpp | 7 | ||||
| -rw-r--r-- | muse/muse/gui.h | 2 | ||||
| -rw-r--r-- | muse/muse/part.cpp | 3 | ||||
| -rw-r--r-- | muse/muse/song.cpp | 20 | ||||
| -rw-r--r-- | muse/muse/songpart.cpp | 2 | 
6 files changed, 41 insertions, 64 deletions
diff --git a/muse/awl/mslider.cpp b/muse/awl/mslider.cpp index 2639dde8..adb199ec 100644 --- a/muse/awl/mslider.cpp +++ b/muse/awl/mslider.cpp @@ -139,57 +139,38 @@ void MeterSlider::paint(const QRect& r)              else if (h > mh)                    h = mh; -	    QColor yellowRed; -	    yellowRed.setHsv(QColor(Qt::yellow).hue()-8, +            QColor yellowRed; +	      yellowRed.setHsv(QColor(Qt::yellow).hue()-8,  			     QColor(Qt::yellow).saturation(),  			     QColor(Qt::yellow).value()); -	    QColor yellRedRed; -	    yellRedRed.setHsv(QColor(Qt::yellow).hue()-16, +	      QColor yellRedRed; +	      yellRedRed.setHsv(QColor(Qt::yellow).hue()-16,  			      QColor(Qt::yellow).saturation(),  			      QColor(Qt::yellow).value()); -	    QLinearGradient linearGrad(QPointF(0, 0), QPointF(0, mh)); -	    linearGrad.setColorAt(0, Qt::red); -	    linearGrad.setColorAt(1-(double)(h1-5)/(double)mh, yellRedRed); -	    linearGrad.setColorAt(1-(double)(h1-6)/(double)mh, yellowRed); -	    linearGrad.setColorAt(1-(double)h2/(double)mh, Qt::yellow); -	    linearGrad.setColorAt(1, Qt::green); - -	    QColor darkYellowRed; -	    darkYellowRed.setHsv(QColor(Qt::darkYellow).hue()-8, +	      QLinearGradient linearGrad(QPointF(0, 0), QPointF(0, mh)); +	      linearGrad.setColorAt(0, Qt::red); +	      linearGrad.setColorAt(1-(double)(h1-5)/(double)mh, yellRedRed); +	      linearGrad.setColorAt(1-(double)(h1-6)/(double)mh, yellowRed); +	      linearGrad.setColorAt(1-(double)h2/(double)mh, Qt::yellow); +	      linearGrad.setColorAt(1, Qt::green); + +	      QColor darkYellowRed; +	      darkYellowRed.setHsv(QColor(Qt::darkYellow).hue()-8,  				 QColor(Qt::darkYellow).saturation(),  				 QColor(Qt::darkYellow).value()); -	    QColor darkYellRedRed; -	    darkYellRedRed.setHsv(QColor(Qt::darkYellow).hue()-16, +	      QColor darkYellRedRed; +	      darkYellRedRed.setHsv(QColor(Qt::darkYellow).hue()-16,  				  QColor(Qt::darkYellow).saturation(),  				  QColor(Qt::darkYellow).value()); -	    QLinearGradient linearDarkGrad(QPointF(0, 0), QPointF(0, mh)); -	    linearDarkGrad.setColorAt(0, Qt::darkRed); -	    linearDarkGrad.setColorAt(1-(double)(h1-5)/(double)mh, darkYellRedRed); -	    linearDarkGrad.setColorAt(1-(double)(h1-6)/(double)mh, darkYellowRed); -	    linearDarkGrad.setColorAt(1-(double)h2/(double)mh, Qt::darkYellow); -	    linearDarkGrad.setColorAt(1, Qt::darkGreen); - -	    p.fillRect(x, y1, mw, mh, linearGrad); -	    p.fillRect(x, y1, mw, mh-h, linearDarkGrad); - -            /*if (h > h1) { -                  p.fillRect(x, y3-h2, mw, h2,      QBrush(0x00ff00));  // green -                  p.fillRect(x, y3-h1, mw, h1 - h2, QBrush(0xffff00));  // yellow -                  p.fillRect(x, y3-h,  mw, h - h1,  QBrush(0xff0000));  // red -                  p.fillRect(x, y1,    mw, mh - h,  QBrush(0x8e0000));  // dark red -                  } -            else if (h > h2) { -                  p.fillRect(x, y3-h2, mw, h2, QBrush(0x00ff00));       // green -                  p.fillRect(x, y3-h,  mw,  h-h2, QBrush(0xffff00));    // yellow -                  p.fillRect(x, y3-h1, mw,  h1-h, QBrush(0x8e8e00));    // dark yellow -                  p.fillRect(x, y1,    mw, mh - h1,  QBrush(0x8e0000)); // dark red -                  } -            else { -                  p.fillRect(x, y3-h, mw, h,         QBrush(0x00ff00)); // green -                  p.fillRect(x, y3-h2, mw, h2-h,     QBrush(0x007000)); // dark green -                  p.fillRect(x, y3-h1,   mw,  h1-h2, QBrush(0x8e8e00)); // dark yellow -                  p.fillRect(x, y1,   mw,  mh - h1,  QBrush(0x8e0000)); // dark red -                  }*/ +	      QLinearGradient linearDarkGrad(QPointF(0, 0), QPointF(0, mh)); +	      linearDarkGrad.setColorAt(0, Qt::darkRed); +	      linearDarkGrad.setColorAt(1-(double)(h1-5)/(double)mh, darkYellRedRed); +	      linearDarkGrad.setColorAt(1-(double)(h1-6)/(double)mh, darkYellowRed); +	      linearDarkGrad.setColorAt(1-(double)h2/(double)mh, Qt::darkYellow); +	      linearDarkGrad.setColorAt(1, Qt::darkGreen); + +	      p.fillRect(x, y1, mw, mh, linearGrad); +	      p.fillRect(x, y1, mw, mh-h, linearDarkGrad);              //---------------------------------------------------              //    draw peak line @@ -198,8 +179,8 @@ void MeterSlider::paint(const QRect& r)              h = mh - (lrint(fast_log10(meterPeak[i]) * -20.0f * mh / range));              if (h > mh)                    h = mh; -	    if (h > 0) -	      p.drawLine(x, y3-h, x+mw, y3-h); +	      if (h > 0) +	            p.drawLine(x, y3-h, x+mw, y3-h);              x += mw;              } diff --git a/muse/muse/arranger/canvas.cpp b/muse/muse/arranger/canvas.cpp index 358520f8..cd871963 100644 --- a/muse/muse/arranger/canvas.cpp +++ b/muse/muse/arranger/canvas.cpp @@ -1018,17 +1018,14 @@ void PartCanvas::dragMove(QDragMoveEvent* event)        event->acceptProposedAction();        state = S_DRAG4;        ArrangerTrack* at = &(track->arrangerTrack); -      int y = at->tw->y() - splitWidth/2; -//      int h = at->tw->height();        PartCanvas* cw = (PartCanvas*)event->source();        QRect updateRect(drag);  	Pos pos(pix2pos(p.x() - cw->dragOffset()).snaped(raster())); -	int x = pos2pix(pos);        drag.setRect( -         x, -         y, +         pos2pix(pos), +         at->tw->y(),           rmapx(srcPart->lenTick()),           at->tw->height() - 1 - partBorderWidth           ); diff --git a/muse/muse/gui.h b/muse/muse/gui.h index 05217e23..87f8c47d 100644 --- a/muse/muse/gui.h +++ b/muse/muse/gui.h @@ -37,7 +37,7 @@ static const int defaultTrackHeight = minTrackHeight;  static const int infoHeight     = 20;  static const int infoWidth      = 140;  static const int trackSeparator = 1; -static const int yTrackOffset   = -4; +static const int yTrackOffset   = -2; // -4;  //  mixer:  static const int STRIP_WIDTH  = 66+4; diff --git a/muse/muse/part.cpp b/muse/muse/part.cpp index 6889f061..601515cd 100644 --- a/muse/muse/part.cpp +++ b/muse/muse/part.cpp @@ -360,9 +360,10 @@ void Part::ref()  void Part::deref()        {        --(_events->cloneCount); -      if (_events->cloneCount <= 0) { +/*      if (_events->cloneCount <= 0) {              delete _events;              _events = 0;              } +*/        } diff --git a/muse/muse/song.cpp b/muse/muse/song.cpp index c02ffa92..1ad7fde7 100644 --- a/muse/muse/song.cpp +++ b/muse/muse/song.cpp @@ -1021,33 +1021,31 @@ void Song::clear(bool signal)        _selectedTrack = 0;        _tracks.clear(); -//      qDeleteAll(_midis); -      for (iMidiTrack i = _midis.begin(); i != _midis.end(); ++i) -            delete *i; +      qDeleteAll(_midis);        _midis.clear(); -//      qDeleteAll(_waves); +      qDeleteAll(_waves);        _waves.clear(); -//      qDeleteAll(_inputs);     // audio input ports +      qDeleteAll(_inputs);     // audio input ports        _inputs.clear(); -//      qDeleteAll(_outputs);    // audio output ports +      qDeleteAll(_outputs);    // audio output ports        _outputs.clear(); -//      qDeleteAll(_groups);     // mixer groups +      qDeleteAll(_groups);     // mixer groups        _groups.clear(); -//      qDeleteAll(_synthIs); +      qDeleteAll(_synthIs);        _synthIs.clear(); -//      qDeleteAll(_midiSyntis); +      qDeleteAll(_midiSyntis);        _midiSyntis.clear(); -//      qDeleteAll(_midiOutPorts); +      qDeleteAll(_midiOutPorts);        _midiOutPorts.clear(); -//      qDeleteAll(_midiInPorts); +      qDeleteAll(_midiInPorts);        _midiInPorts.clear();        AL::tempomap.clear(); diff --git a/muse/muse/songpart.cpp b/muse/muse/songpart.cpp index e561476b..6ad52f47 100644 --- a/muse/muse/songpart.cpp +++ b/muse/muse/songpart.cpp @@ -117,7 +117,7 @@ void Song::removePart(Part* part)        audio->sendMessage(&msg, false);        undoOp(UndoOp::DeletePart, part);        updateFlags |= SC_PART_REMOVED; -      part->deref(); +//      part->deref();        part->track()->partListChanged();        }  | 
