It was less obvious to me if it would be desired, if it would work as well
or if the same increment amount would work for the WOverview and
WVisualWaveform objects, so I just commented out the stubs for them.    'was
also thinking some sort of sensitivity configurability would be a good idea
(but too much work for a first go at it)...

Anyway, if anyone wants to take a poke at it, hop over to ~line 288 of
track.cpp, uncomment WOverview or WVisualWaveform if blocks and copy in the
three lines  from "double newValue" to "qobject_cast ... updateValue" from
the WSlider/Wknob if block, then play with the newValue calc till you reach
the desired level of sensitivity.  This is the relevant code:

      case QEvent::Wheel: {
         QWidget* targetWidget;
         targetWidget = ((QWidget *)obj)->childAt(((QWheelEvent *)e)->x(),
((QWheelEvent *)e)->y());
         if (targetWidget == 0) { qDebug() << "Mouse Wheel Event -- Null
Target Object."; return true; };
         double wheelDirection = ((QWheelEvent *)e)->delta() / 120.;
         if (qobject_cast<WSliderComposed *>(targetWidget) != 0 ||
qobject_cast<WKnob *>(targetWidget) != 0) {
           double newValue = qobject_cast<WWidget
*>(targetWidget)->getValue() + (wheelDirection);
//           qDebug() << "Mouse Wheel Event -- Destination Object Class
Type:"<<targetWidget->metaObject()->className()<<" (target control's value:"
<< qobject_cast<WWidget *>(targetWidget)->getValue() << " event direction$
           qobject_cast<WWidget *>(targetWidget)->updateValue(newValue);
//         } else if (qobject_cast<WVisualWaveform *>(targetWidget) != 0) {
//           qDebug() << "Manuiplate
a"<<targetWidget->metaObject()->className()<<"...";
//         } else if (qobject_cast<WOverview *>(targetWidget) != 0) {
//           qDebug() << "Manuiplate
a"<<targetWidget->metaObject()->className()<<"...";
         }
         return true;
         }

If anyone does decide to play around with this, please keep the reset
mechanism consistent with the knobs and sliders where a right click restores
them to their default position, my eeePC doesn't have a middle button on the
trackpad.

Cheers,

-G


On Feb 8, 2008 4:19 AM, Ben Wheeler <[EMAIL PROTECTED]> wrote:

> On Fri, Feb 08, 2008 at 12:38:41AM -0800, Tom Jennings wrote:
> > On Thu, 7 Feb 2008, Garth Dahlstrom wrote:
> >
> > > I committed some hacky code to adjust the various sliders and knob
> controls
> > > using your mouse's wheel when you hover over them.
> > >
> > > One of the other side effects that never occurred to me as I was
> > > implementing it, is that the change provides a physical slider control
> to
> > > anyone with a laptop that has a scroll line on the side of their track
> pad.
> > > It seems to works quite well on my eeePC.  :D
> >
> > That. Is. A. Good. Hack.!
> >
> > Pitch bending/jog dial? ...
>
> If it's made to do the same thing over the waveform control as it does
> on the other controls, it will act as a jog wheel. I haven't tried it
> to see if it already does. However, it then becomes vitally important
> to be able to re-center the control (and that would be useful for most
> other controls too). Is there a means of doing that? Middle click?
>
> Ben
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Mixxx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>



-- 
              __
--- == __/ t.O ==--
http://stacktrace.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to