23 #if defined (HAVE_CONFIG_H) 27 #include <QAbstractButton> 43 str.replace (
"&",
"&&");
45 if (btn->isCheckable () || up.style_is (
"togglebutton"))
47 btn->setCheckable (
true);
51 if (
value.numel () > 0 &&
value(0) == up.get_max ())
52 btn->setChecked (
true);
66 QAbstractButton *btn = qWidget<QAbstractButton> ();
70 case uicontrol::properties::ID_STRING:
73 str.replace (
"&",
"&&");
78 case uicontrol::properties::ID_VALUE:
80 if (btn->isCheckable ())
84 if (
value.numel () > 0)
86 double dValue =
value(0);
88 if (dValue != 0.0 && dValue != 1.0)
89 warning (
"button value not within valid display range");
90 else if (dValue == up.get_min () && btn->isChecked ())
92 btn->setChecked (
false);
93 if (up.style_is (
"radiobutton") || up.style_is (
"togglebutton"))
96 up.get___myhandle__ ()));
102 else if (dValue == up.get_max () && ! btn->isChecked ())
103 btn->setChecked (
true);
118 QAbstractButton *btn = qWidget<QAbstractButton> ();
126 Matrix oldValue = up.get_value ().matrix_value ();
127 double newValue = (checked ? up.get_max () : up.get_min ());
129 if (oldValue.numel () != 1 || (newValue != oldValue(0)))
138 QAbstractButton *btn = qWidget<QAbstractButton> ();
140 if (! btn->isCheckable ())
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)
void warning(const char *fmt,...)
static graphics_object get_object(double val)
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)