26 #if defined (HAVE_CONFIG_H)
41 #define RANGE_INT_MAX 1000000
47 octave::interpreter& interp,
48 const graphics_object& go)
58 new QScrollBar (container));
65 octave::interpreter& interp,
66 const graphics_object& go,
67 QAbstractSlider *slider)
68 :
BaseControl (oct_qobj, interp, go, slider), m_blockUpdates (false)
72 slider->setTracking (
false);
73 Matrix bb = up.get_boundingbox ();
74 bool vertical_slider = ( bb(2) < bb(3) );
75 slider->setOrientation (vertical_slider ? Qt::Vertical : Qt::Horizontal);
77 slider->setInvertedAppearance (
true);
78 Matrix steps = up.get_sliderstep ().matrix_value ();
79 slider->setMinimum (0);
83 Matrix value = up.get_value ().matrix_value ();
84 if (value.
numel () > 0)
86 double dmin = up.get_min (), dmax = up.get_max ();
92 connect (slider, &QAbstractSlider::valueChanged,
103 QScrollBar *slider = qWidget<QScrollBar> ();
107 case uicontrol::properties::ID_SLIDERSTEP:
109 Matrix steps = up.get_sliderstep ().matrix_value ();
116 case uicontrol::properties::ID_VALUE:
118 Matrix value = up.get_value ().matrix_value ();
119 double dmax = up.get_max (), dmin = up.get_min ();
121 if (value.
numel () > 0)
127 slider->setValue (ival);
146 octave::autolock guard (gh_mgr.graphics_lock ());
148 graphics_object go =
object ();
150 if (go.valid_object ())
154 Matrix value = up.get_value ().matrix_value ();
155 double dmin = up.get_min (), dmax = up.get_max ();
157 int ival_tmp = (value.
numel () > 0 ?
162 if (ival != ival_tmp || value.
numel () > 0)
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
void gh_callback_event(const graphics_handle &h, const std::string &name)
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
graphics_object object(void) const
virtual Container * innerContainer(void)=0
octave::interpreter & m_interpreter
void valueChanged(int ival)
SliderControl(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, QAbstractSlider *slider)
static SliderControl * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
T::properties & properties(graphics_object obj)