23 #if defined (HAVE_CONFIG_H) 59 update (uicontrol::properties::ID_VALUE);
61 connect (
box, SIGNAL (activated (
int)),
71 QComboBox *
box = qWidget<QComboBox> ();
75 case uicontrol::properties::ID_STRING:
78 int oldCurrent =
box->currentIndex ();
82 (up.get_string_string ()).split (
'|'));
85 && oldCurrent <
box->count ())
87 box->setCurrentIndex (oldCurrent);
100 case uicontrol::properties::ID_VALUE:
105 if (
value.numel () > 0)
108 warning (
"popupmenu value should be integer");
111 int newIndex = int (
value(0)) - 1;
113 if (newIndex >= 0 && newIndex < box->count ())
115 if (newIndex !=
box->currentIndex ())
116 box->setCurrentIndex (newIndex);
119 warning (
"popupmenu value not within valid display range");
static PopupMenuControl * create(const graphics_object &go)
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
QString fromStdString(const std::string &s)
static Object * parentObject(const graphics_object &go)
virtual Container * innerContainer(void)=0
static octave_value box(JNIEnv *jni_env, void *jobj, void *jcls_arg=nullptr)
void currentIndexChanged(int index)
PopupMenuControl(const graphics_object &go, QComboBox *box)
void warning(const char *fmt,...)
nd group nd example For each display the value
static void post_set(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)