26 #if defined (HAVE_CONFIG_H)
34 #include <QHBoxLayout>
35 #include <QHeaderView>
38 #include <QModelIndexList>
39 #include <QMouseEvent>
41 #include <QStringList>
42 #include <QTableWidget>
43 #include <QTableWidgetItem>
64 #define AUTO_HEIGHT (tp.get_fontsize () * 2 - 1)
68 int w = t->verticalHeader ()->width () + 4;
69 for (
int i = 0; i < t->columnCount (); i++)
70 w += t->columnWidth (i);
71 int h = t->horizontalHeader ()->height () + 4;
72 for (
int i = 0; i < t->rowCount (); i++)
73 h += t->rowHeight (i);
77 #define FORMATNUMBER(type) \
78 static QString formatNumber (type d, \
86 return QString::number (d, 'g', precision); \
87 else if (d <= pow (ten, precision - 1) \
88 && d > pow (ten, 1 - precision)) \
89 return QString::number (d, 'f', precision); \
91 return QString::number (d, 'e', precision); \
93 else if (format == 'F') \
95 int exponent = floor (log10 (d) / 3) * 3; \
96 d *= pow (ten, -exponent); \
97 return QString::number (d, 'f', precision) + "e" + \
98 (exponent < 0 ? "-" : "+") + \
99 QString ("%1").arg (abs (exponent), 3, 10, QChar ('0')); \
101 else if (format == 'E') \
103 int exponent = floor (log10 (d) / 3) * 3; \
104 d *= pow (ten, -exponent); \
105 return QString::number (d, \
107 precision - floor (log10 (d)) - 1) + \
108 "e" + (exponent < 0 ? "-" : "+") + \
109 QString ("%1").arg (abs (exponent), 3, 10, QChar ('0')); \
112 return QString::number (d, format, precision); \
126 #define FORMAT_VALUE_EXCEPT_RAT(f,l) \
127 if (format == "numeric" || format == "short") \
128 text = formatNumber (value, 'n', f); \
129 else if (format == "short f" || format == "shortf") \
130 text = formatNumber (value, 'f', f); \
131 else if (format == "short e" || format == "shorte") \
132 text = formatNumber (value, 'e', f); \
133 else if (format == "short eng" || format == "shorteng") \
134 text = formatNumber (value, 'F', f); \
135 else if (format == "short g" || format == "shortg") \
136 text = formatNumber (value, 'g', f + 1); \
137 else if (format == "long") \
138 text = formatNumber (value, 'n', l); \
139 else if (format == "long f" || format == "longf") \
140 text = formatNumber (value, 'f', l); \
141 else if (format == "long e" || format == "longe") \
142 text = formatNumber (value, 'e', l); \
143 else if (format == "long eng" || format == "longeng") \
144 text = formatNumber (value, 'E', l); \
145 else if (format == "long g" || format == "longg") \
146 text = formatNumber (value, 'g', l + 1); \
147 else if (format == "bank") \
148 text = QString::number (value, 'f', 2); \
149 else if (format == "+") \
151 text = Utils::fromStdString ("+"); \
152 else if (value < 0) \
153 text = Utils::fromStdString ("-"); \
155 text = Utils::fromStdString ("");
157 #define FORMAT_VALUE(f,l) \
158 FORMAT_VALUE_EXCEPT_RAT(f,l) \
159 else if (format == "rat") \
160 text = Utils::fromStdString (rational_approx (double (value), 0)); \
163 text = formatNumber (value, 'n', f); \
164 flag = Qt::AlignLeft ; \
167 #define FORMAT_UINT_VALUE() \
168 text = QString::number (value); \
169 if (format == "char" || format == "popup") \
170 flag = Qt::AlignLeft; \
171 else if (format == "+") \
174 text = Utils::fromStdString ("+"); \
176 text = Utils::fromStdString (""); \
179 #define FORMAT_INT_VALUE() \
180 text = QString::number (value); \
181 if (format == "char" || format == "popup") \
182 flag = Qt::AlignLeft ; \
183 else if (format == "+") \
186 text = Utils::fromStdString ("+"); \
187 else if (value < 0) \
188 text = Utils::fromStdString ("-"); \
190 text = Utils::fromStdString (""); \
193 static std::pair<Qt::AlignmentFlag, QString>
196 Qt::AlignmentFlag flag = Qt::AlignRight;
201 flag = Qt::AlignLeft;
206 flag = Qt::AlignLeft;
220 else if (
format ==
"long")
228 else if (
format ==
"bank")
229 text = QString::number (c.real (),
'f', 2);
234 else if (c.real () < 0)
242 else if (
format ==
"numeric")
243 text = QString::number (c.real (),
'g', 5) +
" + "
244 + QString::number (c.imag (),
'g', 5) +
"i";
247 text = QString::number (c.real (),
'g', 5) +
" + "
248 + QString::number (c.imag (),
'g', 5) +
"i";
249 flag = Qt::AlignLeft;
308 flag = Qt::AlignLeft;
313 flag = Qt::AlignLeft;
326 return std::make_pair (flag, text);
330 #undef FORMAT_VALUE_EXCEPT_RAT
331 #undef FORMAT_UINT_VALUE
332 #undef FORMAT_INT_VALUE
335 bool enabled =
false)
337 QTableWidgetItem *retval =
new QTableWidgetItem ();
338 std::pair<Qt::AlignmentFlag, QString> flag_and_text =
340 retval->setTextAlignment (flag_and_text.first);
341 retval->setText (flag_and_text.second);
344 retval->setFlags (retval->flags () | Qt::ItemIsEditable);
346 retval->setFlags (retval->flags () & ~Qt::ItemIsEditable);
360 #define SCANF_AND_CONVERT(name,ctype,format) \
361 else if (old_value.is_ ## name ## _type ()) \
365 const std::string cxx_str = ov.string_value (); \
366 const char *c_str = cxx_str.c_str (); \
367 int error = sscanf (c_str, format, &val, &n); \
368 if (error != 1 || c_str[n]) \
372 retval = octave_value ( octave_ ## name (val)); \
386 #undef SCANF_AND_CONVERT
415 QCheckBox *checkBox =
new QCheckBox ();
416 QHBoxLayout *layout =
new QHBoxLayout (retval);
417 layout->addWidget (checkBox);
418 layout->setAlignment (Qt::AlignCenter);
419 layout->setContentsMargins (0, 0, 0, 0);
420 retval->setLayout (layout);
423 checkBox->setCheckState (Qt::Checked);
425 checkBox->setCheckState (Qt::Unchecked);
427 checkBox->setAttribute (Qt::WA_TransparentForMouseEvents,
true);
428 checkBox->setFocusPolicy (Qt::NoFocus);
429 checkBox->setProperty (
"Enabled", QVariant (enabled));
436 const graphics_object& go)
445 return new Table (oct_qobj, interp, go,
new QTableWidget (container));
451 Table::Table (octave::base_qobject& oct_qobj, octave::interpreter& interp,
452 const graphics_object& go, QTableWidget *tableWidget)
453 :
Object (oct_qobj, interp, go, tableWidget), m_tableWidget (tableWidget),
454 m_curData (), m_blockUpdates (false)
456 qObject ()->setObjectName (
"UItable");
460 Matrix bb = tp.get_boundingbox (
false);
468 m_tableWidget->setSelectionBehavior (QAbstractItemView::SelectItems);
495 if (! (properties<uitable> ().get_cellselectioncallback ().isempty ()))
497 QModelIndexList modelIndexList =
499 int length = modelIndexList.size ();
501 for (
int i = 0; i < length; i++)
503 indices(i, 0) = modelIndexList.value (i).
row () + 1;
504 indices(i, 1) = modelIndexList.value (i).
column () + 1;
507 eventData.
setfield (
"Indices", indices);
508 octave_value cellSelectionCallbackEventObject (eventData);
510 cellSelectionCallbackEventObject);
517 QCheckBox *checkBox =
nullptr;
519 = qobject_cast<QWidget *> (
m_tableWidget->cellWidget (row, col));
520 if (widget && ! widget->children ().isEmpty ())
523 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
525 if (layout && layout->count () > 0)
526 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
529 if (checkBox && checkBox->property (
"Enabled").toBool ())
542 if (!(properties<uitable> ().get_celleditcallback ().isempty ()))
545 indices(0, 0) = row + 1;
546 indices(0, 1) = col + 1;
549 eventData.
setfield (
"Indices", indices);
550 eventData.
setfield (
"PreviousData", old_value);
551 eventData.
setfield (
"NewData", new_value);
552 eventData.
setfield (
"EditData", edit_data);
558 cellEditCallbackEventObject);
572 octave::autolock guard (gh_mgr.graphics_lock ());
577 QComboBox *comboBox = qobject_cast<QComboBox *> (sender ());
578 int row = comboBox->property (
"row").toInt ();
579 int col = comboBox->property (
"col").toInt ();
589 if (cell(row, col).is_string ())
591 cell(row, col) = edit_data;
664 octave_value (
"Table data is not editable at this location.");
675 comboBox->setCurrentIndex (-1);
676 comboBox->setEditable (
true);
677 comboBox->setEditText (comboBox->property (
"original_value").toString ());
678 comboBox->lineEdit ()->setReadOnly (
true);
692 octave::autolock guard (gh_mgr.graphics_lock ());
694 bool new_value = ! checkBox->isChecked ();
701 if (row < matrix.
rows () && col < matrix.
columns ())
703 bool old_value = matrix(row, col);
704 matrix(row, col) = new_value;
705 checkBox->setChecked (new_value);
706 if (new_value != old_value)
727 octave_value (
"Table data is not editable at this location."));
735 if (cell(row, col).islogical ())
737 bool old_value = cell(row, col).bool_value ();
739 checkBox->setChecked (new_value);
740 if (new_value != old_value)
761 octave_value (
"Cannot convert logical edit to other type."));
771 octave_value (
"Table data is not editable at this location."));
783 octave_value (
"Cannot convert logical edit to other type."));
792 octave_value (
"Table data is not editable at this location."));
807 octave::autolock guard (gh_mgr.graphics_lock ());
811 int row = item->row ();
812 int col = item->column ();
831 new_value = edit_data;
835 std::pair<Qt::AlignmentFlag, QString> flag_and_text =
837 item->setTextAlignment (flag_and_text.first);
838 item->setText (flag_and_text.second);
844 cell(row, col) = new_value;
867 octave_value (
"Table data is not editable at this location.");
882 update (uitable::properties::ID_POSITION);
892 case uitable::properties::ID_BACKGROUNDCOLOR:
893 case uitable::properties::ID_FOREGROUNDCOLOR:
897 case uitable::properties::ID_COLUMNNAME:
902 case uitable::properties::ID_COLUMNWIDTH:
906 case uitable::properties::ID_COLUMNEDITABLE:
907 case uitable::properties::ID_COLUMNFORMAT:
908 case uitable::properties::ID_DATA:
919 case uitable::properties::ID_ENABLE:
923 case uitable::properties::ID_KEYPRESSFCN:
927 case uitable::properties::ID_KEYRELEASEFCN:
931 case uitable::properties::ID_FONTNAME:
932 case uitable::properties::ID_FONTSIZE:
933 case uitable::properties::ID_FONTWEIGHT:
934 case uitable::properties::ID_FONTANGLE:
945 case uitable::properties::ID_POSITION:
947 Matrix bb = tp.get_boundingbox (
false);
956 case uitable::properties::ID_REARRANGEABLECOLUMNS:
960 case uitable::properties::ID_ROWNAME:
964 case uitable::properties::ID_ROWSTRIPING:
968 case uitable::properties::ID_TOOLTIPSTRING:
972 case base_properties::ID_VISIBLE:
996 l << QString::number (i + 1);
1004 else if (columnname.
isempty ())
1011 else if (columnname.
iscell ())
1030 if (data.
rows () > 1 && data.
cols () > 1)
1034 l << QString::number (data(j));
1048 l << QString::number (matrix_value(i));
1057 l.replaceInStrings (
"|",
"\n");
1064 for (
int col = oldColumnCount; col < l.length (); col++)
1094 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1095 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1097 if (column_size > header_size)
1098 header_size = column_size;
1101 else if (columnwidth.
iscell ())
1113 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1114 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1116 if (column_size > header_size)
1117 header_size = column_size;
1129 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1130 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1132 if (column_size > header_size)
1133 header_size = column_size;
1157 bool editable =
false;
1174 if (ov_columnformat.
iscell ())
1183 else if (! format_value.
isempty () && format_value.
iscell ())
1197 octave_value data = properties<uitable> ().get_data ();
1215 octave_value data = properties<uitable> ().get_data ();
1227 std::string
format =
"",
bool enabled =
false)
1235 m_tableWidget->cellWidget (row, col)->setProperty (
"row", QVariant (row));
1236 m_tableWidget->cellWidget (row, col)->setProperty (
"col", QVariant (col));
1238 else if (
format ==
"popup" && enabled)
1247 QComboBox *comboBox =
new QComboBox ();
1248 comboBox->setProperty (
"row", QVariant (row));
1249 comboBox->setProperty (
"col", QVariant (col));
1252 for (
int k = 0; k < format_value.
numel (); k++)
1257 comboBox->addItem (popup_item);
1259 if (popup_item == string_value)
1262 comboBox->setCurrentIndex (index);
1266 comboBox->setEditable (
true);
1267 comboBox->setEditText (string_value);
1268 comboBox->lineEdit ()->setReadOnly (
true);
1271 comboBox->setProperty (
"original_value", QVariant (string_value));
1273 comboBox->installEventFilter (
this);
1275 connect (comboBox, SIGNAL(currentIndexChanged (
const QString&)),
1310 bool enabled = tp.is_enable ();
1313 bool rearrangeableColumns = tp.is_rearrangeablecolumns ();
1317 ? QAbstractItemView::ExtendedSelection
1318 : QAbstractItemView::NoSelection);
1321 m_tableWidget->horizontalHeader ()->setSectionsMovable (enabled && rearrangeableColumns);
1322 m_tableWidget->horizontalHeader ()->setDragEnabled (enabled && rearrangeableColumns);
1323 m_tableWidget->horizontalHeader ()->setDragDropMode (QAbstractItemView::InternalMove);
1326 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1331 if (QTableWidgetItem *item =
m_tableWidget->item (row, col))
1333 Qt::ItemFlags flags = item->flags ();
1334 if (enabled && editable)
1335 item->setFlags (flags | Qt::ItemIsEditable);
1337 item->setFlags (flags & ~Qt::ItemIsEditable);
1341 QCheckBox *checkBox =
nullptr;
1342 if (widget && ! widget->children ().isEmpty ())
1345 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
1347 if (layout && layout->count () > 0)
1348 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
1352 widget->setProperty (
"Enabled", QVariant (enabled & editable));
1355 widget->setAttribute (Qt::WA_TransparentForMouseEvents,
1356 !(editable & enabled));
1358 widget->setFocusPolicy (Qt::NoFocus);
1371 extent(0, 2) = s.width ();
1372 extent(0, 3) = s.height () ;
1373 graphics_object go =
object ();
1374 emit
gh_set_event (go.get_handle (),
"extent", extent,
false);
1383 p.setColor (QPalette::Text,
1385 p.setColor (QPalette::Base,
1387 p.setColor (QPalette::AlternateBase,
1390 m_tableWidget->setAlternatingRowColors (tp.is_rowstriping ());
1404 bool visible =
true;
1408 l << QString::number (i + 1);
1422 else if (rowname.
iscell ())
1441 if (data.
rows () > 1 && data.
cols () > 1)
1445 l << QString::number (data(j));
1459 l << QString::number (matrix_value(i));
1474 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1479 for (
int row = oldRowCount; row < l.length (); row++)
1497 bool rearrangeableColumns = tp.is_rearrangeablecolumns ();
1498 bool enabled = tp.is_enable ();
1500 m_tableWidget->horizontalHeader ()->setSectionsMovable (enabled && rearrangeableColumns);
1501 m_tableWidget->horizontalHeader ()->setDragEnabled (enabled && rearrangeableColumns);
1502 m_tableWidget->horizontalHeader ()->setDragDropMode (QAbstractItemView::InternalMove);
1511 if (qobject_cast<QTableWidget *> (watched))
1513 switch (xevent->type ())
1515 case QEvent::Resize:
1517 octave::autolock guard (gh_mgr.graphics_lock ());
1519 graphics_object go =
object ();
1520 if (go.valid_object ())
1523 Utils::properties<uitable> (go);
1524 if (tp.fontunits_is (
"normalized"))
1530 case QEvent::MouseButtonPress:
1532 octave::autolock guard (gh_mgr.graphics_lock ());
1534 QMouseEvent *
m =
dynamic_cast<QMouseEvent *
> (xevent);
1535 graphics_object go =
object ();
1537 Utils::properties<uitable> (go);
1538 graphics_object fig = go.get_ancestor (
"figure");
1540 if (
m->button () != Qt::LeftButton || ! tp.is_enable ())
1548 "windowbuttondownfcn");
1551 if (
m->button () == Qt::RightButton)
1563 case QEvent::KeyPress:
1565 QKeyEvent *k =
dynamic_cast<QKeyEvent *
> (xevent);
1568 octave::autolock guard (gh_mgr.graphics_lock ());
1571 graphics_object fig =
object ().get_ancestor (
"figure");
1573 emit
gh_set_event (fig.get_handle (),
"currentcharacter",
1574 keyData.
getfield (
"Character"),
false);
1583 QCheckBox *checkBox =
nullptr;
1586 = qobject_cast<QWidget *> (
m_tableWidget->cellWidget (row, col));
1588 if (widget && ! widget->children ().isEmpty ())
1591 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
1593 if (layout && layout->count () > 0)
1594 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
1597 if (checkBox && checkBox->property (
"Enabled").toBool ())
1601 = qobject_cast<QComboBox *> (
m_tableWidget->cellWidget (row, col));
1604 comboBox->showPopup ();
1608 case Qt::Key_Return:
1611 if (k->modifiers () == Qt::NoModifier)
1623 else if (k->modifiers () == Qt::ShiftModifier)
1648 case QEvent::KeyRelease:
1652 octave::autolock guard (gh_mgr.graphics_lock ());
1654 QKeyEvent *k =
dynamic_cast<QKeyEvent *
> (xevent);
1657 graphics_object fig =
object ().get_ancestor (
"figure");
1659 emit
gh_set_event (fig.get_handle (),
"currentcharacter",
1660 keyData.
getfield (
"Character"),
false);
1670 else if (qobject_cast<QComboBox *> (watched))
1672 switch (xevent->type ())
1674 case QEvent::MouseButtonPress:
1676 octave::autolock guard (gh_mgr.graphics_lock ());
1678 QMouseEvent *
m =
dynamic_cast<QMouseEvent *
> (xevent);
1679 graphics_object go =
object ();
1681 graphics_object fig = go.get_ancestor (
"figure");
1683 if (
m->button () != Qt::LeftButton || ! tp.is_enable ())
1691 "windowbuttondownfcn");
1694 if (
m->button () == Qt::RightButton)
1702 QComboBox *comboBox_0 = qobject_cast<QComboBox *> (watched);
1705 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1707 QComboBox *comboBox_1
1708 = qobject_cast<QComboBox *> (
m_tableWidget->cellWidget (row, col));
1710 if (comboBox_0 == comboBox_1)
#define FORMAT_INT_VALUE()
#define SCANF_AND_CONVERT(name, ctype, format)
static octave_value attempt_type_conversion(const octave_value &ov, const octave_value &old_value)
static QTableWidgetItem * itemFor(octave_value val, std::string format="", bool enabled=false)
static QString formatComplex(Complex c, char format='f', int precision=4)
static QSize realQSizeForTable(QTableWidget *t)
#define FORMAT_VALUE(f, l)
static std::pair< Qt::AlignmentFlag, QString > qStringValueFor(octave_value val, std::string format="")
#define FORMAT_UINT_VALUE()
static const int AUTO_WIDTH
static QString formatNumber(double d, char format='f', int precision=4)
#define FORMATNUMBER(type)
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type columns(void) const
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type numel(void) const
Number of elements in the array.
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type rows(void) const
OCTARRAY_OVERRIDABLE_FUNC_API octave_idx_type cols(void) const
OCTARRAY_OVERRIDABLE_FUNC_API T & xelem(octave_idx_type n)
Size of the specified dimension.
OCTAVE_API RowVector row(octave_idx_type i) const
OCTAVE_API ColumnVector column(octave_idx_type i) const
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)
base_properties & properties(void)
graphics_object object(void) const
virtual QObject * qObject(void)
virtual Container * innerContainer(void)=0
octave::interpreter & m_interpreter
bool m_keyReleaseHandlerDefined
void updateDataColumn(int col)
bool m_keyPressHandlerDefined
void updateRearrangeableColumns(void)
std::string columnformat(int column)
QTableWidget * m_tableWidget
bool eventFilter(QObject *watched, QEvent *event)
void updateColumnwidth(void)
void cellClicked(int row, int col)
void checkBoxClicked(int row, int col, QCheckBox *checkBox)
void comboBoxCurrentIndexChanged(const QString &value)
static Table * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
void sendCellEditCallback(int row, int col, octave_value old_value, octave_value new_value, octave_value edit_data, octave_value error)
void itemChanged(QTableWidgetItem *item)
void itemSelectionChanged(void)
bool columneditable(int column)
QWidget * checkBoxForLogical(octave_value cal, bool enabled)
void updateColumnname(void)
Table(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, QTableWidget *tableWidget)
void setfield(const std::string &key, const octave_value &val)
octave_value getfield(const std::string &key) const
uint64_t uint64_value(bool req_int=false, bool frc_str_conv=false) const
bool bool_value(bool warn=false) const
bool fast_elem_insert(octave_idx_type n, const octave_value &x)
Assign the n-th element, aka 'val(n) = x'.
int int_value(bool req_int=false, bool frc_str_conv=false) const
bool is_uint16_type(void) const
bool is_bool_scalar(void) const
int64_t int64_value(bool req_int=false, bool frc_str_conv=false) const
short int short_value(bool req_int=false, bool frc_str_conv=false) const
Complex complex_value(bool frc_str_conv=false) const
bool is_int8_type(void) const
octave_idx_type rows(void) const
bool isnumeric(void) const
octave_idx_type numel(void) const
unsigned short int ushort_value(bool req_int=false, bool frc_str_conv=false) const
bool is_string(void) const
bool isinteger(void) const
bool is_double_type(void) const
Cell cell_value(void) const
bool is_uint32_type(void) const
octave_idx_type columns(void) const
bool is_int64_type(void) const
float float_value(bool frc_str_conv=false) const
unsigned long int ulong_value(bool req_int=false, bool frc_str_conv=false) const
boolMatrix bool_matrix_value(bool warn=false) const
octave_value fast_elem_extract(octave_idx_type n) const
Extract the n-th element, aka 'val(n)'.
std::string string_value(bool force=false) const
bool is_matrix_type(void) const
bool is_int32_type(void) const
bool is_uint64_type(void) const
bool is_int16_type(void) const
long int long_value(bool req_int=false, bool frc_str_conv=false) const
bool is_single_type(void) const
bool is_uint8_type(void) const
Matrix matrix_value(bool frc_str_conv=false) const
bool iscomplex(void) const
double double_value(bool frc_str_conv=false) const
unsigned int uint_value(bool req_int=false, bool frc_str_conv=false) const
bool islogical(void) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void error(const char *fmt,...)
std::complex< double > w(std::complex< double > z, double relerr=0)
std::string toStdString(const QString &s)
Matrix figureCurrentPoint(const graphics_object &fig, QMouseEvent *event)
QString fromStdString(const std::string &s)
template QFont computeFont< uitable >(const uitable::properties &props, int height)
octave_scalar_map makeKeyEventStruct(QKeyEvent *event)
std::string figureSelectionType(QMouseEvent *event, bool isDoubleClick)
QColor fromRgb(const Matrix &rgb)
T::properties & properties(graphics_object obj)
std::complex< double > Complex
std::complex< float > FloatComplex
std::string rational_approx(T val, int len)
OCTAVE_API Complex str2double(const std::string &str_arg)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
std::size_t format(std::ostream &os, const char *fmt,...)