26#if defined (HAVE_CONFIG_H)
38#include <QModelIndexList>
42#include <QTableWidget>
43#include <QTableWidgetItem>
65#define AUTO_HEIGHT (tp.get_fontsize () * 2 - 1)
69 int w = t->verticalHeader ()->width () + 4;
70 for (
int i = 0; i < t->columnCount (); i++)
71 w += t->columnWidth (i);
72 int h = t->horizontalHeader ()->height () + 4;
73 for (
int i = 0; i < t->rowCount (); i++)
74 h += t->rowHeight (i);
78#define FORMATNUMBER(type) \
79 static QString formatNumber (type d, \
87 return QString::number (d, 'g', precision); \
88 else if (d <= pow (ten, precision - 1) \
89 && d > pow (ten, 1 - precision)) \
90 return QString::number (d, 'f', precision); \
92 return QString::number (d, 'e', precision); \
94 else if (format == 'F') \
96 int exponent = floor (log10 (d) / 3) * 3; \
97 d *= pow (ten, -exponent); \
98 return QString::number (d, 'f', precision) + "e" + \
99 (exponent < 0 ? "-" : "+") + \
100 QString ("%1").arg (abs (exponent), 3, 10, QChar ('0')); \
102 else if (format == 'E') \
104 int exponent = floor (log10 (d) / 3) * 3; \
105 d *= pow (ten, -exponent); \
106 return QString::number (d, \
108 precision - floor (log10 (d)) - 1) + \
109 "e" + (exponent < 0 ? "-" : "+") + \
110 QString ("%1").arg (abs (exponent), 3, 10, QChar ('0')); \
113 return QString::number (d, format, precision); \
127#define FORMAT_VALUE_EXCEPT_RAT(f,l) \
128 if (format == "numeric" || format == "short") \
129 text = formatNumber (value, 'n', f); \
130 else if (format == "short f" || format == "shortf") \
131 text = formatNumber (value, 'f', f); \
132 else if (format == "short e" || format == "shorte") \
133 text = formatNumber (value, 'e', f); \
134 else if (format == "short eng" || format == "shorteng") \
135 text = formatNumber (value, 'F', f); \
136 else if (format == "short g" || format == "shortg") \
137 text = formatNumber (value, 'g', f + 1); \
138 else if (format == "long") \
139 text = formatNumber (value, 'n', l); \
140 else if (format == "long f" || format == "longf") \
141 text = formatNumber (value, 'f', l); \
142 else if (format == "long e" || format == "longe") \
143 text = formatNumber (value, 'e', l); \
144 else if (format == "long eng" || format == "longeng") \
145 text = formatNumber (value, 'E', l); \
146 else if (format == "long g" || format == "longg") \
147 text = formatNumber (value, 'g', l + 1); \
148 else if (format == "bank") \
149 text = QString::number (value, 'f', 2); \
150 else if (format == "+") \
152 text = Utils::fromStdString ("+"); \
153 else if (value < 0) \
154 text = Utils::fromStdString ("-"); \
156 text = Utils::fromStdString ("");
158#define FORMAT_VALUE(f,l) \
159 FORMAT_VALUE_EXCEPT_RAT(f,l) \
160 else if (format == "rat") \
161 text = Utils::fromStdString (rational_approx (double (value), 0)); \
164 text = formatNumber (value, 'n', f); \
165 flag = Qt::AlignLeft ; \
168#define FORMAT_UINT_VALUE() \
169 text = QString::number (value); \
170 if (format == "char" || format == "popup") \
171 flag = Qt::AlignLeft; \
172 else if (format == "+") \
175 text = Utils::fromStdString ("+"); \
177 text = Utils::fromStdString (""); \
180#define FORMAT_INT_VALUE() \
181 text = QString::number (value); \
182 if (format == "char" || format == "popup") \
183 flag = Qt::AlignLeft ; \
184 else if (format == "+") \
187 text = Utils::fromStdString ("+"); \
188 else if (value < 0) \
189 text = Utils::fromStdString ("-"); \
191 text = Utils::fromStdString (""); \
194 static std::pair<Qt::AlignmentFlag, QString>
197 Qt::AlignmentFlag flag = Qt::AlignRight;
202 flag = Qt::AlignLeft;
207 flag = Qt::AlignLeft;
221 else if (
format ==
"long")
229 else if (
format ==
"bank")
230 text = QString::number (c.real (),
'f', 2);
235 else if (c.real () < 0)
243 else if (
format ==
"numeric")
244 text = QString::number (c.real (),
'g', 5) +
" + "
245 + QString::number (c.imag (),
'g', 5) +
"i";
248 text = QString::number (c.real (),
'g', 5) +
" + "
249 + QString::number (c.imag (),
'g', 5) +
"i";
250 flag = Qt::AlignLeft;
309 flag = Qt::AlignLeft;
314 flag = Qt::AlignLeft;
321 std::stringstream warn_string;
322 warn_string <<
"Unknown conversion for datatype " << val.
class_name ()
325 warning (
"%s", warn_string.str ().c_str ());
330 return std::make_pair (flag, text);
334#undef FORMAT_VALUE_EXCEPT_RAT
335#undef FORMAT_UINT_VALUE
336#undef FORMAT_INT_VALUE
339 bool enabled =
false)
341 QTableWidgetItem *retval =
new QTableWidgetItem ();
342 std::pair<Qt::AlignmentFlag, QString> flag_and_text =
344 retval->setTextAlignment (flag_and_text.first);
345 retval->setText (flag_and_text.second);
348 retval->setFlags (retval->flags () | Qt::ItemIsEditable);
350 retval->setFlags (retval->flags () & ~Qt::ItemIsEditable);
364#define SCANF_AND_CONVERT(name,ctype,format) \
365 else if (old_value.is_ ## name ## _type ()) \
369 const std::string cxx_str = ov.string_value (); \
370 const char *c_str = cxx_str.c_str (); \
371 int error = sscanf (c_str, format, &val, &n); \
372 if (error != 1 || c_str[n]) \
376 retval = octave_value ( octave_ ## name (val)); \
390#undef SCANF_AND_CONVERT
419 QCheckBox *checkBox =
new QCheckBox ();
420 QHBoxLayout *layout =
new QHBoxLayout (retval);
421 layout->addWidget (checkBox);
422 layout->setAlignment (Qt::AlignCenter);
423 layout->setContentsMargins (0, 0, 0, 0);
424 retval->setLayout (layout);
427 checkBox->setCheckState (Qt::Checked);
429 checkBox->setCheckState (Qt::Unchecked);
431 checkBox->setAttribute (Qt::WA_TransparentForMouseEvents,
true);
432 checkBox->setFocusPolicy (Qt::NoFocus);
433 checkBox->setProperty (
"Enabled", QVariant (enabled));
440 const graphics_object& go)
449 return new Table (oct_qobj, interp, go,
new QTableWidget (container));
456 const graphics_object& go, QTableWidget *tableWidget)
457 :
Object (oct_qobj, interp, go, tableWidget), m_tableWidget (tableWidget),
458 m_curData (), m_blockUpdates (false)
460 qObject ()->setObjectName (
"UItable");
464 Matrix bb = tp.get_boundingbox (
false);
472 m_tableWidget->setSelectionBehavior (QAbstractItemView::SelectItems);
500 if (! (properties<uitable> ().get_cellselectioncallback ().isempty ()))
502 QModelIndexList modelIndexList =
504 int length = modelIndexList.size ();
506 for (
int i = 0; i < length; i++)
508 indices(i, 0) = modelIndexList.value (i).
row () + 1;
509 indices(i, 1) = modelIndexList.value (i).
column () + 1;
512 eventData.
setfield (
"Indices", indices);
513 octave_value cellSelectionCallbackEventObject (eventData);
515 cellSelectionCallbackEventObject);
522 QCheckBox *checkBox =
nullptr;
524 = qobject_cast<QWidget *> (
m_tableWidget->cellWidget (row, col));
525 if (widget && ! widget->children ().isEmpty ())
528 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
530 if (layout && layout->count () > 0)
531 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
534 if (checkBox && checkBox->property (
"Enabled").toBool ())
547 if (!(properties<uitable> ().get_celleditcallback ().isempty ()))
550 indices(0, 0) = row + 1;
551 indices(0, 1) = col + 1;
554 eventData.
setfield (
"Indices", indices);
555 eventData.
setfield (
"PreviousData", old_value);
556 eventData.
setfield (
"NewData", new_value);
557 eventData.
setfield (
"EditData", edit_data);
563 cellEditCallbackEventObject);
565 else if (
error.string_value ().length () > 0)
584 QComboBox *comboBox = qobject_cast<QComboBox *> (sender ());
585 int row = comboBox->property (
"row").toInt ();
586 int col = comboBox->property (
"col").toInt ();
596 if (cell(row, col).is_string ())
598 cell(row, col) = edit_data;
671 octave_value (
"Table data is not editable at this location.");
682 comboBox->setCurrentIndex (-1);
683 comboBox->setEditable (
true);
684 comboBox->setEditText (comboBox->property (
"original_value").toString ());
685 comboBox->lineEdit ()->setReadOnly (
true);
701 bool new_value = ! checkBox->isChecked ();
708 if (row < matrix.
rows () && col < matrix.
columns ())
710 bool old_value = matrix(row, col);
711 matrix(row, col) = new_value;
712 checkBox->setChecked (new_value);
713 if (new_value != old_value)
734 octave_value (
"Table data is not editable at this location."));
742 if (cell(row, col).islogical ())
744 bool old_value = cell(row, col).bool_value ();
746 checkBox->setChecked (new_value);
747 if (new_value != old_value)
768 octave_value (
"Cannot convert logical edit to other type."));
778 octave_value (
"Table data is not editable at this location."));
790 octave_value (
"Cannot convert logical edit to other type."));
799 octave_value (
"Table data is not editable at this location."));
819 int row = item->row ();
820 int col = item->column ();
839 new_value = edit_data;
843 std::pair<Qt::AlignmentFlag, QString> flag_and_text =
845 item->setTextAlignment (flag_and_text.first);
846 item->setText (flag_and_text.second);
852 cell(row, col) = new_value;
875 octave_value (
"Table data is not editable at this location.");
890 update (uitable::properties::ID_POSITION);
900 case uitable::properties::ID_BACKGROUNDCOLOR:
901 case uitable::properties::ID_FOREGROUNDCOLOR:
905 case uitable::properties::ID_COLUMNNAME:
910 case uitable::properties::ID_COLUMNWIDTH:
914 case uitable::properties::ID_COLUMNEDITABLE:
915 case uitable::properties::ID_COLUMNFORMAT:
916 case uitable::properties::ID_DATA:
927 case uitable::properties::ID_ENABLE:
931 case uitable::properties::ID_KEYPRESSFCN:
935 case uitable::properties::ID_KEYRELEASEFCN:
939 case uitable::properties::ID_FONTNAME:
940 case uitable::properties::ID_FONTSIZE:
941 case uitable::properties::ID_FONTWEIGHT:
942 case uitable::properties::ID_FONTANGLE:
953 case uitable::properties::ID_POSITION:
955 Matrix bb = tp.get_boundingbox (
false);
964 case uitable::properties::ID_REARRANGEABLECOLUMNS:
968 case uitable::properties::ID_ROWNAME:
972 case uitable::properties::ID_ROWSTRIPING:
976 case uitable::properties::ID_TOOLTIPSTRING:
980 case base_properties::ID_VISIBLE:
1000 bool visible =
true;
1004 l << QString::number (i + 1);
1012 else if (columnname.
isempty ())
1019 else if (columnname.
iscell ())
1038 if (data.
rows () > 1 && data.
cols () > 1)
1042 l << QString::number (data(j));
1056 l << QString::number (matrix_value(i));
1065 l.replaceInStrings (
"|",
"\n");
1072 for (
int col = oldColumnCount; col < l.length (); col++)
1102 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1103 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1105 if (column_size > header_size)
1106 header_size = column_size;
1109 else if (columnwidth.
iscell ())
1121 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1122 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1124 if (column_size > header_size)
1125 header_size = column_size;
1137 (qobject_cast<QAbstractItemView *> (
m_tableWidget))->sizeHintForColumn (i);
1138 int header_size =
m_tableWidget->horizontalHeader ()->sectionSizeHint (i);
1140 if (column_size > header_size)
1141 header_size = column_size;
1165 bool editable =
false;
1182 if (ov_columnformat.
iscell ())
1191 else if (! format_value.
isempty () && format_value.
iscell ())
1205 octave_value data = properties<uitable> ().get_data ();
1223 octave_value data = properties<uitable> ().get_data ();
1235 std::string
format =
"",
bool enabled =
false)
1243 m_tableWidget->cellWidget (row, col)->setProperty (
"row", QVariant (row));
1244 m_tableWidget->cellWidget (row, col)->setProperty (
"col", QVariant (col));
1246 else if (
format ==
"popup" && enabled)
1255 QComboBox *comboBox =
new QComboBox ();
1256 comboBox->setProperty (
"row", QVariant (row));
1257 comboBox->setProperty (
"col", QVariant (col));
1260 for (
int k = 0; k < format_value.
numel (); k++)
1265 comboBox->addItem (popup_item);
1267 if (popup_item == string_value)
1270 comboBox->setCurrentIndex (index);
1274 comboBox->setEditable (
true);
1275 comboBox->setEditText (string_value);
1276 comboBox->lineEdit ()->setReadOnly (
true);
1279 comboBox->setProperty (
"original_value", QVariant (string_value));
1281 comboBox->installEventFilter (
this);
1283 connect (comboBox, SIGNAL(currentIndexChanged (
const QString&)),
1318 bool enabled = tp.is_enable ();
1321 bool rearrangeableColumns = tp.is_rearrangeablecolumns ();
1325 ? QAbstractItemView::ExtendedSelection
1326 : QAbstractItemView::NoSelection);
1329 m_tableWidget->horizontalHeader ()->setSectionsMovable (enabled && rearrangeableColumns);
1330 m_tableWidget->horizontalHeader ()->setDragEnabled (enabled && rearrangeableColumns);
1331 m_tableWidget->horizontalHeader ()->setDragDropMode (QAbstractItemView::InternalMove);
1334 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1339 if (QTableWidgetItem *item =
m_tableWidget->item (row, col))
1341 Qt::ItemFlags flags = item->flags ();
1342 if (enabled && editable)
1343 item->setFlags (flags | Qt::ItemIsEditable);
1345 item->setFlags (flags & ~Qt::ItemIsEditable);
1349 QCheckBox *checkBox =
nullptr;
1350 if (widget && ! widget->children ().isEmpty ())
1353 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
1355 if (layout && layout->count () > 0)
1356 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
1360 widget->setProperty (
"Enabled", QVariant (enabled & editable));
1363 widget->setAttribute (Qt::WA_TransparentForMouseEvents,
1364 !(editable & enabled));
1366 widget->setFocusPolicy (Qt::NoFocus);
1379 extent(0, 2) = s.width ();
1380 extent(0, 3) = s.height () ;
1381 graphics_object go =
object ();
1382 emit
gh_set_event (go.get_handle (),
"extent", extent,
false);
1391 p.setColor (QPalette::Text,
1393 p.setColor (QPalette::Base,
1395 p.setColor (QPalette::AlternateBase,
1398 m_tableWidget->setAlternatingRowColors (tp.is_rowstriping ());
1412 bool visible =
true;
1416 l << QString::number (i + 1);
1430 else if (rowname.
iscell ())
1449 if (data.
rows () > 1 && data.
cols () > 1)
1453 l << QString::number (data(j));
1467 l << QString::number (matrix_value(i));
1482 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1487 for (
int row = oldRowCount; row < l.length (); row++)
1505 bool rearrangeableColumns = tp.is_rearrangeablecolumns ();
1506 bool enabled = tp.is_enable ();
1508 m_tableWidget->horizontalHeader ()->setSectionsMovable (enabled && rearrangeableColumns);
1509 m_tableWidget->horizontalHeader ()->setDragEnabled (enabled && rearrangeableColumns);
1510 m_tableWidget->horizontalHeader ()->setDragDropMode (QAbstractItemView::InternalMove);
1519 if (qobject_cast<QTableWidget *> (watched))
1521 switch (xevent->type ())
1523 case QEvent::Resize:
1527 graphics_object go =
object ();
1528 if (go.valid_object ())
1531 Utils::properties<uitable> (go);
1532 if (tp.fontunits_is (
"normalized"))
1538 case QEvent::MouseButtonPress:
1542 QMouseEvent *m =
dynamic_cast<QMouseEvent *
> (xevent);
1543 graphics_object go =
object ();
1545 Utils::properties<uitable> (go);
1546 graphics_object fig = go.get_ancestor (
"figure");
1548 if (m->button () != Qt::LeftButton || ! tp.is_enable ())
1556 "windowbuttondownfcn");
1559 if (m->button () == Qt::RightButton)
1571 case QEvent::KeyPress:
1573 QKeyEvent *k =
dynamic_cast<QKeyEvent *
> (xevent);
1579 graphics_object fig =
object ().get_ancestor (
"figure");
1581 emit
gh_set_event (fig.get_handle (),
"currentcharacter",
1582 keyData.
getfield (
"Character"),
false);
1591 QCheckBox *checkBox =
nullptr;
1594 = qobject_cast<QWidget *> (
m_tableWidget->cellWidget (row, col));
1596 if (widget && ! widget->children ().isEmpty ())
1599 = qobject_cast<QHBoxLayout *> (widget->children ().first ());
1601 if (layout && layout->count () > 0)
1602 checkBox = qobject_cast<QCheckBox *> (layout->itemAt (0)-> widget ());
1605 if (checkBox && checkBox->property (
"Enabled").toBool ())
1609 = qobject_cast<QComboBox *> (
m_tableWidget->cellWidget (row, col));
1612 comboBox->showPopup ();
1616 case Qt::Key_Return:
1619 if (k->modifiers () == Qt::NoModifier)
1631 else if (k->modifiers () == Qt::ShiftModifier)
1656 case QEvent::KeyRelease:
1662 QKeyEvent *k =
dynamic_cast<QKeyEvent *
> (xevent);
1665 graphics_object fig =
object ().get_ancestor (
"figure");
1667 emit
gh_set_event (fig.get_handle (),
"currentcharacter",
1668 keyData.
getfield (
"Character"),
false);
1678 else if (qobject_cast<QComboBox *> (watched))
1680 switch (xevent->type ())
1682 case QEvent::MouseButtonPress:
1686 QMouseEvent *m =
dynamic_cast<QMouseEvent *
> (xevent);
1687 graphics_object go =
object ();
1689 graphics_object fig = go.get_ancestor (
"figure");
1691 if (m->button () != Qt::LeftButton || ! tp.is_enable ())
1699 "windowbuttondownfcn");
1702 if (m->button () == Qt::RightButton)
1710 QComboBox *comboBox_0 = qobject_cast<QComboBox *> (watched);
1713 for (
int col = 0; col <
m_tableWidget->columnCount (); col++)
1715 QComboBox *comboBox_1
1716 = qobject_cast<QComboBox *> (
m_tableWidget->cellWidget (row, col));
1718 if (comboBox_0 == comboBox_1)
#define FORMAT_INT_VALUE()
#define SCANF_AND_CONVERT(name, ctype, format)
#define FORMAT_VALUE(f, l)
#define FORMAT_UINT_VALUE()
#define FORMATNUMBER(type)
T & xelem(octave_idx_type n)
Size of the specified dimension.
octave_idx_type numel(void) const
Number of elements in the array.
octave_idx_type cols(void) const
octave_idx_type rows(void) const
octave_idx_type columns(void) const
OCTAVE_API RowVector row(octave_idx_type i) const
OCTAVE_API ColumnVector column(octave_idx_type i) const
virtual Container * innerContainer(void)=0
void gh_callback_event(const graphics_handle &h, const std::string &name)
octave::interpreter & m_interpreter
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
virtual QObject * qObject(void)
graphics_object object(void) const
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
base_properties & properties(void)
void updateColumnwidth(void)
static Table * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
bool m_keyReleaseHandlerDefined
void updateDataColumn(int col)
void checkBoxClicked(int row, int col, QCheckBox *checkBox)
Table(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, QTableWidget *tableWidget)
QWidget * checkBoxForLogical(octave_value cal, bool enabled)
void updateColumnname(void)
void itemSelectionChanged(void)
void sendCellEditCallback(int row, int col, octave_value old_value, octave_value new_value, octave_value edit_data, octave_value error)
bool columneditable(int column)
void itemChanged(QTableWidgetItem *item)
void cellClicked(int row, int col)
std::string columnformat(int column)
QTableWidget * m_tableWidget
void updateRearrangeableColumns(void)
bool eventFilter(QObject *watched, QEvent *event)
bool m_keyPressHandlerDefined
void comboBoxCurrentIndexChanged(const QString &value)
Base class for Octave interfaces that use Qt.
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
std::string class_name(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
void warning(const char *fmt,...)
void error(const char *fmt,...)
std::complex< double > w(std::complex< double > z, double relerr=0)
QColor fromRgb(const Matrix &rgb)
QString fromStdString(const std::string &s)
template QFont computeFont< uitable >(const uitable::properties &props, int height)
std::string figureSelectionType(QMouseEvent *event, bool isDoubleClick)
T::properties & properties(graphics_object obj)
octave_scalar_map makeKeyEventStruct(QKeyEvent *event)
std::string toStdString(const QString &s)
Matrix figureCurrentPoint(const graphics_object &fig, QMouseEvent *event)
OCTAVE_API Complex str2double(const std::string &str_arg)
static QSize realQSizeForTable(QTableWidget *t)
static QString formatNumber(double d, char format='f', int precision=4)
static QString formatComplex(Complex c, char format='f', int precision=4)
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 std::pair< Qt::AlignmentFlag, QString > qStringValueFor(octave_value val, std::string format="")
static const int AUTO_WIDTH
std::complex< double > Complex
std::complex< float > FloatComplex
std::string rational_approx(T val, int len)
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,...)