26 #if defined (HAVE_CONFIG_H)
41 #define RANGE_INT_MAX 1000000
59 new QScrollBar (container));
68 QAbstractSlider *slider)
69 :
BaseControl (oct_qobj, interp, go, slider), m_blockUpdates (false)
73 slider->setTracking (
false);
75 bool vertical_slider = ( bb(2) < bb(3) );
76 slider->setOrientation (vertical_slider ? Qt::Vertical : Qt::Horizontal);
78 slider->setInvertedAppearance (
true);
79 Matrix steps = up.get_sliderstep ().matrix_value ();
80 slider->setMinimum (0);
84 Matrix value = up.get_value ().matrix_value ();
85 if (value.
numel () > 0)
87 double dmin = up.get_min (), dmax = up.get_max ();
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);
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)
octave_idx_type numel(void) const
Number of elements in the array.
graphics_object object(void) const
virtual Container * innerContainer(void)=0
octave::interpreter & m_interpreter
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
void gh_callback_event(const graphics_handle &h, const std::string &name)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
static SliderControl * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
void valueChanged(int ival)
SliderControl(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, QAbstractSlider *slider)
octave::mutex graphics_lock(void)
bool valid_object(void) const
Base class for Octave interfaces that use Qt.
gh_manager & get_gh_manager(void)
Matrix get_boundingbox(bool internal=false, const Matrix &parent_pix_size=Matrix()) const