23 #if defined (HAVE_CONFIG_H)
27 #include <QListWidget>
40 int lc = list->count ();
42 list->clearSelection ();
48 if (1 <= idx && idx <= lc)
50 list->item (idx-1)->setSelected (
true);
51 list->scrollToItem (list->item (idx-1));
53 && list->selectionMode () == QAbstractItemView::SingleSelection)
59 list->clearSelection ();
88 list->setSelectionMode (QAbstractItemView::ExtendedSelection);
90 list->setSelectionMode (QAbstractItemView::SingleSelection);
92 if (value.
numel () > 0)
95 int lc = list->count ();
101 if (1 <= idx && idx <= lc)
103 list->item (idx-1)->setSelected (
true);
104 list->scrollToItem (list->item (idx-1));
105 if (
i == 0 && (list->selectionMode ()
106 == QAbstractItemView::SingleSelection))
112 list->removeEventFilter (
this);
113 list->viewport ()->installEventFilter (
this);
126 QListWidget*
list = qWidget<QListWidget> ();
142 list->setSelectionMode (QAbstractItemView::ExtendedSelection);
144 list->setSelectionMode (QAbstractItemView::SingleSelection);
148 m_blockCallback =
true;
150 m_blockCallback =
false;
164 QListWidget*
list = qWidget<QListWidget> ();
166 QModelIndexList l = list->selectionModel ()->selectedIndexes ();
170 foreach (
const QModelIndex& idx, l)
171 value(i++) = (idx.row () + 1);
static void post_callback(const graphics_handle &h, const std::string &name, const octave_value &data=Matrix())
The value of lines which begin with a space character are not saved in the history list A value of all commands are saved on the history list
octave_idx_type numel(void) const
Number of elements in the array.
void itemSelectionChanged(void)
string_vector get_string_vector(void) const
static Object * parentObject(const graphics_object &go)
ListBoxControl(const graphics_object &go, QListWidget *list)
QStringList fromStringVector(const string_vector &v)
virtual Container * innerContainer(void)=0
Matrix matrix_value(bool frc_str_conv=false) const
double get_min(void) const
=val(i)}if ode{val(i)}occurs in table i
OCTAVE_EXPORT octave_value_list or N dimensional array whose elements are all equal to the IEEE symbol zero divided by nd tex zero divided by nd ifnottex and any operation involving another NaN value(5+NaN).Note that NaN always compares not equal to NaN(NaN!
static ListBoxControl * create(const graphics_object &go)
octave_value get_value(void) const
Vector representing the dimensions (size) of an Array.
double get_max(void) const
static void updateSelection(QListWidget *list, const Matrix &value)
static void post_set(const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit=true)