1 QSlider2D : QAbstractStepValue {
2 *qtClass { ^"QcSlider2D" }
4 *new { arg parent, bounds;
5 var me = super.new( parent, bounds );
6 me.connectMethod( "randomize()", \randomize );
11 // FIXME for now we are using step instead
16 // FIXME for now we are using step instead
21 ^this.getProperty( \xValue );
25 this.setProperty( \xValue, aFloat );
28 activex_ { arg aFloat;
34 ^this.getProperty( \yValue );
38 this.setProperty( \yValue, aFloat );
41 activey_ { arg aFloat;
51 setXYActive { arg x, y;
56 incrementX { arg factor=1.0; this.invokeMethod( \incrementX, factor.asFloat ); }
57 decrementX { arg factor=1.0; this.invokeMethod( \decrementX, factor.asFloat ); }
58 incrementY { arg factor=1.0; this.invokeMethod( \incrementY, factor.asFloat ); }
59 decrementY { arg factor=1.0; this.invokeMethod( \decrementY, factor.asFloat ); }
62 this.setXYActive( 1.0.rand, 1.0.rand );
66 ^this.palette.buttonText;
69 knobColor_ { arg color;
70 this.palette = this.palette.buttonText_(color);
74 ^this.getProperty(\grooveColor);
77 background_ { arg color;
78 this.setProperty(\grooveColor, color);
81 defaultGetDrag { ^Point(this.x,this.y); }
82 defaultCanReceiveDrag { ^(QView.currentDrag.class === Point); }
84 var pt = QView.currentDrag;
85 this.setXYActive( pt.x, pt.y );