26 #if defined (HAVE_CONFIG_H)
43 octave::interpreter& interp,
44 const graphics_object& go)
54 new QComboBox (container));
61 octave::interpreter& interp,
62 const graphics_object& go,
70 update (uicontrol::properties::ID_VALUE);
82 QComboBox *
box = qWidget<QComboBox> ();
86 case uicontrol::properties::ID_STRING:
89 int oldCurrent =
box->currentIndex ();
93 (up.get_string_string ()).split (
'|'));
96 && oldCurrent < box->count ())
98 box->setCurrentIndex (oldCurrent);
110 case uicontrol::properties::ID_VALUE:
113 Matrix value = up.get_value ().matrix_value ();
115 if (value.
numel () > 0)
117 if (value(0) !=
static_cast<int> (value(0)))
118 warning (
"popupmenu value should be integer");
121 int newIndex = int (value(0)) - 1;
123 if (newIndex >= 0 && newIndex < box->count ())
125 if (newIndex !=
box->currentIndex ())
126 box->setCurrentIndex (newIndex);
129 warning (
"popupmenu value not within valid display range");
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)
virtual Container * innerContainer(void)=0
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void warning(const char *fmt,...)
QString fromStdString(const std::string &s)
T::properties & properties(graphics_object obj)
static octave_value box(JNIEnv *jni_env, void *jobj, void *jcls_arg=nullptr)