31 #include <QApplication> 33 #include <QFileDialog> 34 #include <QHeaderView> 41 #include <QSignalMapper> 42 #include <QStackedWidget> 47 #include <QToolButton> 48 #include <QVBoxLayout> 61 ? QString (
"%1").
arg (from)
62 : QString (
"%1:%2").
arg (from).
arg (to));
65 static QSignalMapper *
69 list <<
"plot" <<
"bar" <<
"stem" <<
"stairs" <<
"area" <<
"pie" <<
"hist";
71 QSignalMapper *plot_mapper =
new QSignalMapper (menu);
73 for (
int i = 0;
i <
list.size(); ++
i)
75 plot_mapper->setMapping
76 (menu->addAction (
list.at (
i), plot_mapper, SLOT (
map ())),
77 "figure (); " +
list.at (
i) +
" (%1); title (\"%1\");");
90 setFocusPolicy (Qt::StrongFocus);
91 setAttribute (Qt::WA_DeleteOnClose);
97 connect (
this, SIGNAL (topLevelChanged(
bool)),
99 connect (
p, SIGNAL (visibilityChanged (
bool)),
100 this, SLOT (setVisible (
bool)));
102 #if defined (HAVE_QGUIAPPLICATION) 103 #define DOCKED_FULLSCREEN_BUTTON_TOOLTIP "Fullscreen undock" 104 #define UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP "Fullscreen" 107 m_fullscreen_action =
nullptr;
108 m_full_screen =
false;
109 m_prev_floating =
false;
110 m_prev_geom = QRect (0, 0, 0, 0);
112 QHBoxLayout *h_layout = findChild<QHBoxLayout *> ();
113 if (h_layout !=
nullptr && titleBarWidget () !=
nullptr)
115 m_fullscreen_action =
new QAction
117 m_fullscreen_action->setToolTip (tr (DOCKED_FULLSCREEN_BUTTON_TOOLTIP));
119 fullscreen_button->setDefaultAction (m_fullscreen_action);
120 fullscreen_button->setFocusPolicy (Qt::NoFocus);
122 QString css_button = QString (
"QToolButton {background: transparent; border: 0px;}");
123 fullscreen_button->setStyleSheet (css_button);
125 connect (m_fullscreen_action, SIGNAL (triggered ()),
130 if (
first !=
nullptr)
131 index = h_layout->indexOf (
first);
132 h_layout->insertWidget (index, fullscreen_button);
138 m_frame->setFrameStyle (QFrame::Box | QFrame::Sunken);
139 m_frame->setAttribute (Qt::WA_TransparentForMouseEvents);
146 #if defined (HAVE_QGUIAPPLICATION) 151 setGeometry (m_prev_geom);
153 m_full_screen =
false;
155 m_fullscreen_action->setToolTip (tr (DOCKED_FULLSCREEN_BUTTON_TOOLTIP));
158 m_fullscreen_action->setToolTip (tr (UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP));
161 setFloating (! isFloating ());
176 m_dock_action->setIcon (QIcon (
":/actions/icons/widget-dock.png"));
180 setFocus (Qt::OtherFocusReason);
184 m_dock_action->setIcon (QIcon (
":/actions/icons/widget-undock.png"));
187 setFocus (Qt::OtherFocusReason);
194 #if defined (HAVE_QGUIAPPLICATION) 197 m_prev_floating = isFloating ();
198 m_prev_geom = geometry ();
202 m_fullscreen_action->setToolTip (tr (
"Restore geometry"));
205 m_fullscreen_action->setToolTip (tr (
"Redock"));
210 QScreen *pscreen = QGuiApplication::primaryScreen ();
211 QRect rect (0, 0, 0, 0);
212 rect = pscreen->availableGeometry ();
215 m_full_screen =
true;
220 setGeometry (m_prev_geom);
222 m_fullscreen_action->setToolTip (tr (UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP));
226 m_fullscreen_action->setToolTip (tr (DOCKED_FULLSCREEN_BUTTON_TOOLTIP));
229 m_full_screen =
false;
231 #undef DOCKED_FULLSCREEN_BUTTON_TOOLTIP 232 #undef UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP 239 QDockWidget::closeEvent (
e);
245 octave_unused_parameter (
now);
250 QLabel *label = titleBarWidget ()->findChild<QLabel *> ();
251 if (label !=
nullptr)
253 label->setBackgroundRole (QPalette::Highlight);
254 label->setAutoFillBackground (
true);
259 else if (old == focusWidget())
261 QLabel *label = titleBarWidget ()->findChild<QLabel *> ();
263 label->setBackgroundRole (QPalette::NoRole);
279 setFocusPolicy (Qt::StrongFocus);
292 viewer->setLineWrapMode (QTextEdit::NoWrap);
293 viewer->setReadOnly (
true);
324 if (model !=
nullptr)
325 m_disp_view->setPlainText (model->data (QModelIndex ()).toString ());
341 QString
name = objectName ();
345 if (
name.endsWith (
')') ||
name.endsWith (
'}'))
347 name.remove (QRegExp (
"(\\(|\\{)[^({]*(\\)|\\})$"));
358 QString
name = objectName ();
360 = QFileDialog::getSaveFileName (
this,
361 tr (
"Save Variable %1 As").
arg (
name),
363 QString (
"./%1.txt").
arg (
name),
365 QFileDialog::DontUseNativeDialog);
370 if (!
file.isEmpty ())
383 setContextMenuPolicy (Qt::CustomContextMenu);
384 setSelectionMode (QAbstractItemView::ContiguousSelection);
386 horizontalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
387 verticalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
389 setHorizontalScrollMode (QAbstractItemView::ScrollPerPixel);
390 setVerticalScrollMode (QAbstractItemView::ScrollPerPixel);
392 #if defined (HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE) 393 verticalHeader ()->setSectionResizeMode (QHeaderView::Interactive);
395 verticalHeader ()->setResizeMode (QHeaderView::Interactive);
402 QTableView::setModel (model);
404 #if defined (HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE) 405 horizontalHeader ()->setSectionResizeMode (QHeaderView::Interactive);
407 horizontalHeader ()->setResizeMode (QHeaderView::Interactive);
417 QFontMetrics fm (font ());
419 horizontalHeader ()->setDefaultSectionSize (
w);
426 QItemSelectionModel *sel = selectionModel ();
429 if (! sel->hasSelection ())
441 for (
const auto& idx : indices)
443 from_row =
std::min (from_row, idx.row ());
444 to_row =
std::max (to_row, idx.row ());
445 from_col =
std::min (from_col, idx.column ());
446 to_col =
std::max (to_col, idx.column ());
450 vect << from_row + 1 << to_row + 1 << from_col + 1 << to_col + 1;
460 if (
range.isEmpty ())
461 return objectName ();
468 return QString (
"%1(%2, %3)").arg (objectName ()).arg (rows).arg (cols);
478 if (! selarg.isEmpty ())
484 const QString& qualifier_string)
487 tr (
"Cut") + qualifier_string,
491 tr (
"Copy") + qualifier_string,
504 menu->addSeparator ();
507 tr (
"Clear") + qualifier_string,
511 tr (
"Delete") + qualifier_string,
515 tr (
"Variable from Selection"),
522 QModelIndex index = indexAt (qpos);
524 if (index.isValid ())
535 QItemSelectionModel *sel = selectionModel ();
539 if (! indices.isEmpty ())
541 menu->addSeparator ();
545 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
549 menu->exec (mapToGlobal (qpos));
556 int index = horizontalHeader ()->logicalIndexAt (pt);
558 if (index < 0 || index > model ()->columnCount ())
563 bool nothingSelected = coords.isEmpty ();
565 bool whole_columns_selected
568 : (coords[0] == 1 && coords[1] == model ()->rowCount ()));
570 bool current_column_selected
571 = nothingSelected ?
false : (coords[2] <= index+1 && coords[3] > index);
573 int column_selection_count
574 = nothingSelected ? 0 : (coords[3] - coords[2] + 1);
576 if (! whole_columns_selected || ! current_column_selected)
578 selectColumn (index);
579 column_selection_count = 1;
580 current_column_selected =
true;
581 whole_columns_selected =
true;
584 QString column_string
585 = tr (column_selection_count > 1 ?
" columns" :
" column");
591 menu->addSeparator ();
595 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
599 menupos.setY (horizontalHeader ()->height ());
601 menu->exec (mapToGlobal (menupos));
607 int index = verticalHeader ()->logicalIndexAt (pt);
609 if (index < 0 || index > model ()->columnCount ())
614 bool nothingSelected = coords.isEmpty ();
616 bool whole_rows_selected
619 : (coords[2] == 1 && coords[3] == model ()->columnCount ()));
621 bool current_row_selected
622 = (nothingSelected ?
false : (coords[0] <= index+1 && coords[1] > index));
624 int rowselection_count = nothingSelected ? 0 : (coords[3] - coords[2] + 1);
626 if (! whole_rows_selected || ! current_row_selected)
629 rowselection_count = 1;
630 current_row_selected =
true;
631 whole_rows_selected =
true;
634 QString row_string = tr (rowselection_count > 1 ?
" rows" :
" row");
640 menu->addSeparator ();
644 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
648 menupos.setX (verticalHeader ()->width ());
654 menu->exec (mapToGlobal (menupos));
680 QAbstractItemModel *
mod = model ();
683 if (coords.isEmpty ())
686 bool whole_columns_selected
687 = coords[0] == 1 && coords[1] ==
mod->rowCount ();
689 bool whole_rows_selected
690 = coords[2] == 1 && coords[3] ==
mod->columnCount ();
694 if (whole_columns_selected == whole_rows_selected)
697 if (whole_rows_selected)
698 mod->removeRows (coords[0], coords[1] - coords[0]);
700 if (whole_columns_selected)
701 mod->removeColumns (coords[2], coords[3] - coords[2]);
713 QItemSelectionModel *sel = selectionModel ();
718 for (
const auto& idx : indices)
736 QItemSelectionModel *sel = selectionModel ();
740 if (indices.isEmpty ())
746 QAbstractItemModel *
mod = model ();
747 QModelIndex previous = indices.first ();
748 QString copy =
mod->data (previous).toString ();
749 indices.removeFirst ();
750 foreach (QModelIndex idx, indices)
752 copy.push_back (previous.row () != idx.row () ?
'\n' :
'\t');
753 copy.append (
mod->data (idx).toString ());
757 QClipboard *clipboard = QApplication::clipboard ();
758 clipboard->setText (copy);
767 QAbstractItemModel *
mod = model ();
768 QItemSelectionModel *sel = selectionModel ();
771 QClipboard *clipboard = QApplication::clipboard ();
774 if (indices.isEmpty ())
776 if (size () == QSize (1,1))
777 mod->setData (
mod->index (0,0),
text.toDouble ());
778 else if (size () == QSize (0,0))
780 mod->insertColumn (0);
782 mod->setData (
mod->index (0,0),
text.toDouble ());
787 QStringList cells =
text.split(QRegExp(
"\n|\r\n|\r"));
788 int clen = cells.size ();
789 for (
int i = 0;
i < indices.size ();
i++)
790 mod->setData (indices[
i], cells.at (
i % clen).toDouble ());
799 QAbstractItemModel *
mod = model ();
800 QItemSelectionModel *sel = selectionModel ();
803 QClipboard *clipboard = QApplication::clipboard ();
808 QPoint tabsize = QPoint (
mod->rowCount (),
mod->columnCount ());
810 if (indices.isEmpty ())
812 start = QPoint (0,0);
815 else if (indices.size () == 1)
825 for (
int i = 0;
i < indices.size ();
i++)
828 start.setY (indices[
i].column ());
830 if (indices[
i].
column () > end.y ())
831 end.setY (indices[
i].column ());
834 start.setX (indices[
i].column ());
836 if (indices[
i].
row () > end.x ())
837 end.setX (indices[
i].column ());
844 QStringList rows =
text.split (
'\n');
845 for (
const auto&
row : rows)
847 if (rownum > end.x () -
start.x ())
850 QStringList cols =
row.split (
'\t');
854 for (
const auto& col : cols)
858 if (colnum > end.y () -
start.y () )
862 colnum +
start.y ()),
876 if (action == QAbstractSlider::SliderSingleStepAdd
877 || action == QAbstractSlider::SliderPageStepAdd
878 || action == QAbstractSlider::SliderToMaximum
879 || action == QAbstractSlider::SliderMove)
883 QScrollBar *sb = horizontalScrollBar ();
885 if (sb && sb->value () == sb->maximum ())
898 if (action == QAbstractSlider::SliderSingleStepAdd
899 || action == QAbstractSlider::SliderPageStepAdd
900 || action == QAbstractSlider::SliderToMaximum
901 || action == QAbstractSlider::SliderMove)
905 QScrollBar *sb = verticalScrollBar ();
907 if (sb && sb->value () == sb->maximum ())
923 installEventFilter (
this);
928 if (ev->type () == QEvent::HoverEnter)
930 else if (ev->type () == QEvent::MouseButtonPress ||
931 ev->type () == QEvent::MouseButtonPress)
934 return QToolButton::eventFilter (obj, ev);
940 installEventFilter (
this);
946 if (ev->type () == QEvent::MouseButtonRelease && isDown ())
951 QAction *action = defaultAction ();
952 if (action !=
nullptr)
953 action->activate (QAction::Trigger);
964 installEventFilter (
this);
969 if (ev->type () == QEvent::MouseButtonRelease && underMouse ())
974 return QMenu::eventFilter (obj, ev);
982 m_tool_bar (new QToolBar (m_main)),
983 m_default_width (30),
984 m_default_height (100),
985 m_add_font_height (0),
986 m_use_terminal_font (true),
987 m_alternate_rows (true),
992 m_current_focus_vname (
""),
993 m_hovered_focus_vname (
""),
994 m_variable_focus_widget (nullptr)
996 setObjectName (
"VariableEditor");
998 setStatusTip (tr (
"Edit variables."));
999 setWindowIcon (QIcon (
":/actions/icons/logo.png"));
1000 setAttribute (Qt::WA_AlwaysShowToolTips);
1002 m_main->setParent (
this);
1004 #if (QT_VERSION < 0x050601) || (QT_VERSION >= 0x050701) 1005 m_main->setDockOptions (QMainWindow::AnimatedDocks |
1006 QMainWindow::AllowNestedDocks |
1007 QMainWindow::VerticalTabs);
1009 m_main->setDockNestingEnabled (
true);
1026 QMdiArea *central_mdiarea =
new QMdiArea (
m_main);
1027 central_mdiarea->setMinimumSize (QSize (0, 0));
1028 central_mdiarea->setMaximumSize (QSize (0, 0));
1029 central_mdiarea->resize (QSize (0, 0));
1030 m_main->setCentralWidget (central_mdiarea);
1035 p, SLOT (execute_command_in_terminal (
const QString&)));
1040 octave_dock_widget::focusInEvent (ev);
1055 octave_dock_widget::focusOutEvent (ev);
1062 const QString&
text,
1068 a = menu->addAction (icon,
text,
this, member);
1071 a =
new QAction (
this);
1072 connect (
a, SIGNAL (triggered ()),
this, member);
1076 a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
1091 if (existing_qdw != NULL)
1096 if (
m_main->focusWidget () !=
nullptr)
1098 QFocusEvent event (QEvent::FocusOut, Qt::OtherFocusReason);
1099 QApplication::sendEvent (
m_main->focusWidget (), &event);
1103 m_main->parentWidget ()->show ();
1104 existing_qdw->show ();
1105 existing_qdw->raise ();
1106 existing_qdw->activateWindow ();
1108 existing_qdw->setFocus ();
1115 m_main->addDockWidget (Qt::LeftDockWidgetArea,
page);
1117 connect (QApplication::instance(), SIGNAL (focusChanged (
QWidget *,
QWidget *)),
1121 connect (
page, SIGNAL (variable_focused_signal (
const QString&)),
1125 stack->setObjectName (
name);
1126 page->setWidget (stack);
1127 page->setFocusProxy (stack);
1131 connect (stack, SIGNAL (edit_variable_signal (
const QString&,
const octave_value&)),
1136 stack, SLOT (
save ()));
1140 edit_view->setObjectName (
name);
1141 edit_view->setFont (
m_font);
1150 edit_view, SLOT (delete_selected ()));
1152 edit_view, SLOT (clearContent ()));
1160 edit_view, SLOT (selected_command_requested (
const QString&)));
1161 connect (edit_view->horizontalHeader (),
1162 SIGNAL (customContextMenuRequested (
const QPoint&)),
1163 edit_view, SLOT (createColumnMenu (
const QPoint&)));
1164 connect (edit_view->verticalHeader (),
1165 SIGNAL (customContextMenuRequested (
const QPoint&)),
1166 edit_view, SLOT (createRowMenu (
const QPoint&)));
1167 connect (edit_view, SIGNAL (customContextMenuRequested (
const QPoint&)),
1168 edit_view, SLOT (createContextMenu (
const QPoint&)));
1169 connect (edit_view->horizontalScrollBar (), SIGNAL (actionTriggered (
int)),
1170 edit_view, SLOT (handle_horizontal_scroll_action (
int)));
1171 connect (edit_view->verticalScrollBar (), SIGNAL (actionTriggered (
int)),
1172 edit_view, SLOT (handle_vertical_scroll_action (
int)));
1177 connect (model, SIGNAL (edit_variable_signal (
const QString&,
const octave_value&)),
1179 connect (model, SIGNAL (dataChanged (
const QModelIndex&,
const QModelIndex&)),
1180 this, SLOT (
callUpdate (
const QModelIndex&,
const QModelIndex&)));
1182 model, SLOT (update_data_cache ()));
1183 connect (model, SIGNAL (set_editable_signal (
bool)),
1184 stack, SLOT (set_editable (
bool)));
1187 connect (edit_view, SIGNAL (doubleClicked (
const QModelIndex&)),
1188 model, SLOT (double_click (
const QModelIndex&)));
1195 QLabel *existing_ql =
page->titleBarWidget ()->findChild<QLabel *> ();
1196 connect (model, SIGNAL (update_label_signal (
const QString&)),
1197 existing_ql, SLOT (setText (
const QString&)));
1198 existing_ql->setMargin (2);
1200 model->update_data (
val);
1203 if (viewlist.size () == 1)
1206 m_main->parentWidget ()->show ();
1209 page->activateWindow ();
1217 if (parent () !=
nullptr)
1220 QVariant this_value (reinterpret_cast<quintptr> (
this));
1222 foreach (
QTabBar *tbar, barlist)
1223 for (
int i = 0;
i < tbar->count ();
i++)
1224 if (tbar->tabData (
i) == this_value)
1226 tbar->setCurrentIndex (
i);
1243 colorlist << qApp->palette ().color (QPalette::WindowText);
1244 colorlist << qApp->palette ().color (QPalette::Base);
1245 colorlist << qApp->palette ().color (QPalette::HighlightedText);
1246 colorlist << qApp->palette ().color (QPalette::Highlight);
1247 colorlist << qApp->palette ().color (QPalette::AlternateBase);
1257 output << tr(
"Foreground");
1258 output << tr(
"Background");
1259 output << tr(
"Selected Foreground");
1260 output << tr(
"Selected Background");
1261 output << tr(
"Alternate Background");
1298 font_name = settings->value (
"terminal/fontName",
"Courier New").toString ();
1299 font_size = settings->value (
"terminal/fontSize", 10).toInt ();
1303 font_name = settings->value (
"variable_editor/font_name",
1304 settings->value (
"terminal/fontName",
1305 "Courier New")).toString ();
1307 font_size = settings->value (
"variable_editor/font_size", 10).toInt ();
1310 m_font = QFont (font_name, font_size);
1312 QFontMetrics fm (
m_font);
1316 for (
int i = 0;
i < class_chars.length ();
i++)
1318 QVariant default_var;
1322 default_var = QColor ();
1324 QColor setting_color = settings->value (
"variable_editor/color_" 1325 + class_chars.mid (
i, 1),
1326 default_var).value<QColor> ();
1336 int icon_size_settings = settings->value (
"toolbar_icon_size", 0).toInt ();
1337 QStyle *st = style ();
1338 int icon_size = st->pixelMetric (QStyle::PM_ToolBarIconSize);
1342 if (icon_size_settings == 1)
1343 icon_size = st->pixelMetric (QStyle::PM_LargeIconSize);
1344 else if (icon_size_settings == -1)
1345 icon_size = st->pixelMetric (QStyle::PM_SmallIconSize);
1347 m_tool_bar->setIconSize (QSize (icon_size, icon_size));
1362 if (vdwlist.isEmpty ())
1382 if (tofocus !=
nullptr)
1389 QApplication::setActiveWindow(tofocus->window());
1390 tofocus->activateWindow ();
1391 tofocus->setFocus (Qt::OtherFocusReason);
1462 m_stylesheet +=
"QTableView::item:selected{ background-color: " 1468 +=
"QTableView::item:alternate{ background-color: " 1472 +=
"QTableView::item:alternate:selected{ background-color: " 1477 for (
int i = 0;
i < viewlist.size ();
i++)
1493 const QString &
text,
1497 QAction *action =
new QAction (icon,
text,
this);
1498 connect(action, SIGNAL (triggered ()), receiver, member);
1500 button->setDefaultAction (action);
1501 button->setText (
text);
1502 button->setToolTip (
text);
1503 button->setIcon (icon);
1512 m_tool_bar->setAllowedAreas (Qt::TopToolBarArea);
1514 m_tool_bar->setObjectName (
"VariableEditorToolBar");
1516 m_tool_bar->setWindowTitle (tr (
"Variable Editor Toolbar"));
1520 tr (
"Save"),
this, SLOT (
save ()));
1521 action->setShortcuts (QKeySequence::Save);
1522 action->setStatusTip(tr(
"Save variable to a file"));
1528 action->setStatusTip(tr(
"Cut data to clipboard"));
1532 action->setStatusTip(tr(
"Copy data to clipboard"));
1536 action->setStatusTip(tr(
"Paste clipboard into variable data"));
1543 action->setStatusTip(tr(
"Another paste clipboard into variable data"));
1553 action->setToolTip (tr (
"Plot Selected Data"));
1555 plot_tool_button->setDefaultAction (action);
1557 plot_tool_button->setText (tr (
"Plot"));
1558 plot_tool_button->setToolTip (tr (
"Plot selected data"));
1561 plot_tool_button->setPopupMode (QToolButton::InstantPopup);
1564 plot_menu->setTitle (tr (
"Plot"));
1565 plot_menu->setSeparatorsCollapsible (
false);
1569 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
1572 plot_tool_button->setMenu (plot_menu);
1579 tr (
"Up"),
this, SLOT (
levelUp ()));
1580 action->setStatusTip(tr(
"Go one level up in variable hierarchy"));
1587 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS) 1588 , Qt::FindDirectChildrenOnly
1591 for (
int i = 0;
i < hbuttonlist.size ();
i++)
1593 connect (hbuttonlist.at (
i), SIGNAL (hovered_signal ()),
1595 connect (hbuttonlist.at (
i), SIGNAL (popup_shown_signal ()),
1601 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS) 1602 , Qt::FindDirectChildrenOnly
1605 for (
int i = 0;
i < rfbuttonlist.size ();
i++)
1607 connect (rfbuttonlist.at (
i), SIGNAL (about_to_activate ()),
1614 for (
int i = 0;
i < menulist.size ();
i++)
1616 connect (menulist.at (
i), SIGNAL (about_to_activate ()),
1620 m_tool_bar->setAttribute(Qt::WA_ShowWithoutActivating);
void command_signal(const QString &cmd)
void focusOutEvent(QFocusEvent *ev)
static QStringList color_names(void)
QString m_hovered_focus_vname
void add_edit_actions(QMenu *menu, const QString &qualifier_string)
OCTAVE_EXPORT octave_value_list column
For example cd octave end example noindent changes the current working directory to file
void closeEvent(QCloseEvent *)
void pasteClipboard(void)
void refresh_signal(void)
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
void selected_command_requested(const QString &cmd)
void focusInEvent(QFocusEvent *ev)
void construct_tool_bar(void)
identity matrix If supplied two scalar respectively For allows like xample val
bool clear_content(const QModelIndex &idx)
void callUpdate(const QModelIndex &, const QModelIndex &)
void set_editable(bool editable)
octave_int< T > mod(const octave_int< T > &x, const octave_int< T > &y)
void level_up_signal(void)
OCTAVE_EXPORT octave_value_list page
QString m_current_focus_vname
variable_editor_model * m_var_model
void record_hovered_focus_variable(void)
void maybe_resize_columns(int cols)
QString selected_to_octave(void)
void pasteTableClipboard(void)
void createContextMenu(const QPoint &pt)
void edit_variable_signal(const QString &name, const octave_value &val)
void paste_clipboard_signal(void)
QTextEdit * make_disp_view(QWidget *parent)
void createRowMenu(const QPoint &pt)
void transposeContent(void)
variable_editor(QWidget *parent=nullptr)
static QList< QColor > varedit_default_colors(void)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
void restore_hovered_focus_variable(void)
void variable_destroyed(QObject *obj)
QAction * add_tool_bar_button(const QIcon &icon, const QString &text, const QObject *receiver, const char *member)
nd deftypefn *std::string name
static QSignalMapper * make_plot_mapper(QMenu *menu)
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit first
void variable_focused(const QString &name)
text(const graphics_handle &mh, const graphics_handle &p)
std::complex< double > w(std::complex< double > z, double relerr=0)
static QList< QColor > default_colors(void)
void pasteClipboard(void)
returns the type of the matrix and caches it for future use Called with more than one the function will not attempt to guess the type if it is still unknown This is useful for debugging purposes The possible matrix types depend on whether the matrix is full or and can be one of the following able sis tem and mark type as unknown tem as the structure of the matrix explicitly gives this(Sparse matrices only) tem code
variable_editor_view * edit_view(void)
void edit_variable(const QString &name, const octave_value &val)
QList< QColor > m_table_colors
void delete_selected_signal(void)
static QString idx_to_expr(int32_t from, int32_t to)
int display_columns(void) const
static QIcon icon(const QString &icon_name, bool fallback=true)
charNDArray max(char d, const charNDArray &m)
int display_rows(void) const
void handle_horizontal_scroll_action(int action)
QWidget * m_variable_focus_widget
static QString varedit_color_chars(void)
void notice_settings(const QSettings *)
void createVariable(void)
void delete_selected(void)
void setModel(QAbstractItemModel *model)
QList< int > range_selected(void)
static QSettings * get_settings(void)
void createColumnMenu(const QPoint &pt)
variable_editor_view(QWidget *p=nullptr)
void copy_clipboard_signal(void)
void relay_selected_command(const QString &cmd)
variable_editor_view * m_edit_view
OCTAVE_EXPORT octave_value_list or cell arrays Arguments are concatenated vertically The returned values are padded with blanks as needed to make each row of the string array have the same length Empty input strings are significant and will concatenated in the output For numerical each element is converted to the corresponding ASCII character A range error results if an input is outside the ASCII range(0-255). For cell arrays
void paste_table_clipboard_signal(void)
void pasteTableClipboard(void)
variable_editor_stack(QWidget *p=nullptr)
void handle_vertical_scroll_action(int action)
void command_signal(const QString &cmd)
void command_signal(const QString &cmd)
void maybe_resize_rows(int rows)
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
QAction * add_action(QMenu *menu, const QIcon &icon, const QString &text, const char *member)
charNDArray min(char d, const charNDArray &m)
int column_width(void) const
void clear_content_signal(void)
void selected_command_signal(const QString &cmd)