27 #include <QAbstractButton>
42 if (btn->isCheckable () || up.
style_is (
"togglebutton"))
44 btn->setCheckable (
true);
49 btn->setChecked (
true);
64 QAbstractButton* btn = qWidget<QAbstractButton> ();
74 if (btn->isCheckable ())
78 if (value.
numel () > 0)
80 double dValue = value(0);
82 if (dValue != 0.0 && dValue != 1.0)
83 warning (
"button value not within valid display range");
84 else if (dValue == up.
get_min () && btn->isChecked ())
85 btn->setChecked (
false);
86 else if (dValue == up.
get_max () && ! btn->isChecked ())
87 btn->setChecked (
true);
102 QAbstractButton* btn = qWidget<QAbstractButton> ();
113 if (oldValue.numel() != 1
114 || (newValue != oldValue(0)))
123 QAbstractButton* btn = qWidget<QAbstractButton> ();
125 if (! btn->isCheckable ())
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
octave_idx_type numel(void) const
Number of elements in the array.
QString fromStdString(const std::string &s)
std::string get_string_string(void) const
Matrix matrix_value(bool frc_str_conv=false) const
double get_min(void) const
void warning(const char *fmt,...)
octave_value get_value(void) const
double get_max(void) const
bool style_is(const std::string &v) const
static void post_set(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)