5 @SuppressWarnings public class QAbstractSlider : QWidget{
7 public static class SliderEventListener{
8 public void onValueChanged(QAbstractSlider, int value) {
12 public void onPressed(QAbstractSlider) {
16 public void onMoved(QAbstractSlider, int position) {
20 public void onReleased(QAbstractSlider) {
24 public void onRangeChanged(QAbstractSlider, int min, int max) {
28 public void onActionTriggered(QAbstractSlider, int action) {
33 SliderEventListener listener = nilptr;
52 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETMIN, v);
56 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETMIN);
60 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETMAX, v);
64 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETMAX);
68 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETSINGLESTEP, v);
72 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETSINGLESTEP);
76 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETPAGESTEP, v);
80 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETPAGESTEP);
84 QtXnl.widget_set_bool_value(nativehandle, Constant.SLD_SETTRACKING, enable);
88 return QtXnl.widget_get_bool_value(nativehandle, Constant.SLD_GETTRACKING);
92 QtXnl.widget_set_bool_value(nativehandle, Constant.SLD_SETSLIDDOWN, enable);
96 return QtXnl.widget_get_bool_value(nativehandle, Constant.SLD_GETSLIDDOWN);
100 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETSLIDPOS, v);
104 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETSLIDPOS);
108 QtXnl.widget_set_bool_value(nativehandle, Constant.SLD_SETINVERTEDAPPEARANCE, enable);
112 return QtXnl.widget_get_bool_value(nativehandle, Constant.SLD_GETINVERTEDAPPEARANCE);
116 QtXnl.widget_set_bool_value(nativehandle, Constant.SLD_SETINVERTEDCONTROLS, enable);
120 return QtXnl.widget_get_bool_value(nativehandle, Constant.SLD_GETINVERTEDCONTROLS);
123 public enum SliderAction {
135 return QtXnl.widget_get_int_value(nativehandle, Constant.SLD_GETVALUE);
139 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_TRIGGERACTION, action);
144 QtXnl.widget_set_vint_value(nativehandle,Constant. SLD_SETVALUE, v);
148 QtXnl.widget_set_vint_value(nativehandle, Constant.SLD_SETORIENTATION, orientation);
152 QtXnl.widget_set_v2int_value(nativehandle,Constant. SLD_SETRANGE, min, max);
158 if (listener != nilptr){
159 listener.onValueChanged(
this, value);
164 if (listener != nilptr){
165 listener.onPressed(
this);
170 if (listener != nilptr){
171 listener.onMoved(
this, position);
176 if (listener != nilptr){
177 listener.onReleased(
this);
182 if (listener != nilptr){
183 listener.onRangeChanged(
this, min, max);
188 if (listener != nilptr){
189 listener.onActionTriggered(
this, action);
SliderEventListener getSliderEventListener()
void setSingleStep(int v)
void onRangeChanged(int min, int max)
QAbstractSlider(long handle)
void setInvertedAppearance(bool enable)
bool invertedAppearance()
void setInvertedControls(bool enable)
void setSliderPosition(int v)
void setSliderDown(bool enable)
void setRange(int min, int max)
void onMoved(int position)
void onActionTriggered(int action)
void triggerAction(SliderAction action)
void setOrientation(int orientation)
void setTracking(bool enable)
void setSliderEventListener(SliderEventListener l)
void onValueChanged(int value)