33 #include <QApplication>
35 #include <QFileDialog>
36 #include <QHeaderView>
43 #include <QStackedWidget>
48 #include <QToolButton>
49 #include <QVBoxLayout>
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)
74 plot_mapper->setMapping
75 (menu->addAction (list.at (i), plot_mapper, SLOT (map ())), list.at (i));
87 , m_waiting_for_mouse_move (false)
88 , m_waiting_for_mouse_button_release (false)
91 setFocusPolicy (Qt::StrongFocus);
92 setAttribute (Qt::WA_DeleteOnClose);
98 connect (
this, SIGNAL (topLevelChanged(
bool)),
100 connect (p, SIGNAL (visibilityChanged (
bool)),
101 this, SLOT (setVisible (
bool)));
103 #if defined (HAVE_QGUIAPPLICATION)
104 #define DOCKED_FULLSCREEN_BUTTON_TOOLTIP "Fullscreen undock"
105 #define UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP "Fullscreen"
108 m_fullscreen_action =
nullptr;
109 m_full_screen =
false;
110 m_prev_floating =
false;
111 m_prev_geom = QRect (0, 0, 0, 0);
113 QHBoxLayout *h_layout =
m_title_widget->findChild<QHBoxLayout *> ();
116 =
new QAction (rmgr.icon (
"view-fullscreen",
false),
"",
this);
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);
137 m_frame->setFrameStyle (QFrame::Box | QFrame::Sunken);
138 m_frame->setAttribute (Qt::WA_TransparentForMouseEvents);
145 #if defined (HAVE_QGUIAPPLICATION)
150 setGeometry (m_prev_geom);
152 m_fullscreen_action->setIcon (rmgr.
icon (
"view-fullscreen",
false));
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"));
179 setWindowFlags (Qt::Window);
180 setWindowTitle (tr (
"Variable Editor: ") + objectName ());
187 #if (QT_VERSION >= 0x050302) && (QT_VERSION <= QTBUG_44813_FIX_VERSION)
188 m_waiting_for_mouse_move =
true;
193 m_dock_action->setIcon (QIcon (
":/actions/icons/widget-undock.png"));
199 #if (QT_VERSION >= 0x050302) && (QT_VERSION <= QTBUG_44813_FIX_VERSION)
200 m_waiting_for_mouse_move =
false;
201 m_waiting_for_mouse_button_release =
false;
209 #if defined (HAVE_QGUIAPPLICATION)
214 m_prev_floating = isFloating ();
215 m_fullscreen_action->setIcon (rmgr.
icon (
"view-restore",
false));
217 m_fullscreen_action->setToolTip (tr (
"Restore geometry"));
220 m_fullscreen_action->setToolTip (tr (
"Redock"));
223 m_prev_geom = geometry ();
226 QScreen *pscreen = QGuiApplication::primaryScreen ();
227 QRect rect (0, 0, 0, 0);
228 rect = pscreen->availableGeometry ();
231 m_full_screen =
true;
235 m_fullscreen_action->setIcon (rmgr.
icon (
"view-fullscreen",
false));
236 setGeometry (m_prev_geom);
238 m_fullscreen_action->setToolTip (tr (UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP));
242 m_fullscreen_action->setToolTip (tr (DOCKED_FULLSCREEN_BUTTON_TOOLTIP));
245 m_full_screen =
false;
247 #undef DOCKED_FULLSCREEN_BUTTON_TOOLTIP
248 #undef UNDOCKED_FULLSCREEN_BUTTON_TOOLTIP
255 QDockWidget::closeEvent (e);
261 octave_unused_parameter (now);
269 if (titleBarWidget () !=
nullptr)
271 QLabel *label = titleBarWidget ()->findChild<QLabel *> ();
272 if (label !=
nullptr)
274 label->setBackgroundRole (QPalette::Highlight);
275 label->setStyleSheet (
"background-color: palette(highlight); color: palette(highlightedText);");
281 else if (old == focusWidget())
283 if (titleBarWidget () !=
nullptr)
285 QLabel *label = titleBarWidget ()->findChild<QLabel *> ();
286 if (label !=
nullptr)
288 label->setBackgroundRole (QPalette::NoRole);
289 label->setStyleSheet (
";");
302 #if (QT_VERSION >= 0x050302) && (QT_VERSION <= QTBUG_44813_FIX_VERSION)
305 variable_dock_widget::event (QEvent *event)
309 if (event->type () == QEvent::MouseButtonPress)
311 m_waiting_for_mouse_move =
false;
312 m_waiting_for_mouse_button_release =
false;
314 if (event->type () == QEvent::MouseMove && m_waiting_for_mouse_move)
316 m_waiting_for_mouse_move =
false;
317 m_waiting_for_mouse_button_release =
true;
319 if (event->type () == QEvent::MouseButtonRelease
320 && m_waiting_for_mouse_button_release)
322 m_waiting_for_mouse_button_release =
false;
323 bool retval = QDockWidget::event (event);
329 return QDockWidget::event (event);
339 m_waiting_for_mouse_move =
false;
340 m_waiting_for_mouse_button_release =
false;
347 m_waiting_for_mouse_move =
false;
348 m_waiting_for_mouse_button_release =
false;
373 setFocusPolicy (Qt::StrongFocus);
386 viewer->setLineWrapMode (QTextEdit::NoWrap);
387 viewer->setReadOnly (
true);
418 if (model !=
nullptr)
419 m_disp_view->setPlainText (model->data (QModelIndex ()).toString ());
435 QString
name = objectName ();
439 if (
name.endsWith (
')') ||
name.endsWith (
'}'))
441 name.remove ( QRegExp (
"[({][^({]*[)}]$)") );
457 opts = QFileDialog::DontUseNativeDialog;
459 QString
name = objectName ();
461 = QFileDialog::getSaveFileName (
this,
462 tr (
"Save Variable %1 As").arg (
name),
464 QString (
"./%1.txt").arg (
name),
465 0, 0, QFileDialog::Option (opts));
470 if (! file.isEmpty ())
481 :
QTableView (p), m_octave_qobj (oct_qobj), m_var_model (nullptr)
484 setContextMenuPolicy (Qt::CustomContextMenu);
485 setSelectionMode (QAbstractItemView::ContiguousSelection);
487 horizontalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
488 verticalHeader ()->setContextMenuPolicy (Qt::CustomContextMenu);
490 setHorizontalScrollMode (QAbstractItemView::ScrollPerPixel);
491 setVerticalScrollMode (QAbstractItemView::ScrollPerPixel);
493 #if defined (HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE)
494 verticalHeader ()->setSectionResizeMode (QHeaderView::Interactive);
496 verticalHeader ()->setResizeMode (QHeaderView::Interactive);
503 QTableView::setModel (model);
505 #if defined (HAVE_QHEADERVIEW_SETSECTIONRESIZEMODE)
506 horizontalHeader ()->setSectionResizeMode (QHeaderView::Interactive);
508 horizontalHeader ()->setResizeMode (QHeaderView::Interactive);
518 QFontMetrics fm (font ());
521 horizontalHeader ()->setDefaultSectionSize (
w);
528 QItemSelectionModel *sel = selectionModel ();
531 if (! sel->hasSelection ())
543 for (
const auto& idx : indices)
545 from_row =
std::min (from_row, idx.row ());
546 to_row =
std::max (to_row, idx.row ());
547 from_col =
std::min (from_col, idx.column ());
548 to_col =
std::max (to_col, idx.column ());
552 vect << from_row + 1 << to_row + 1 << from_col + 1 << to_col + 1;
565 if (range.isEmpty ())
574 if (s1 < range.at (0) || s2 < range.at (2))
581 QString variable = QString (
"%1(%2:%3,%4:%5)")
583 .arg (range.at (0)).arg (s1)
584 .arg (range.at (2)).arg (s2);
589 command = QString (
"unnamed = %1;").arg (variable);
591 command = QString (
"figure (); %1 (%2); title ('%2');")
592 .arg (cmd).arg (variable);
599 const QString& qualifier_string)
603 menu->addAction (rmgr.
icon (
"edit-cut"),
604 tr (
"Cut") + qualifier_string,
607 menu->addAction (rmgr.
icon (
"edit-copy"),
608 tr (
"Copy") + qualifier_string,
611 menu->addAction (rmgr.
icon (
"edit-paste"),
615 menu->addSeparator ();
617 menu->addAction (rmgr.
icon (
"edit-delete"),
618 tr (
"Clear") + qualifier_string,
621 menu->addAction (rmgr.
icon (
"edit-delete"),
622 tr (
"Delete") + qualifier_string,
625 menu->addAction (rmgr.
icon (
"document-new"),
626 tr (
"Variable from Selection"),
633 QModelIndex index = indexAt (qpos);
635 if (index.isValid ())
646 QItemSelectionModel *sel = selectionModel ();
650 if (! indices.isEmpty ())
652 menu->addSeparator ();
656 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
660 menu->exec (mapToGlobal (qpos));
667 int index = horizontalHeader ()->logicalIndexAt (pt);
669 if (index < 0 || index > model ()->columnCount ())
674 bool nothingSelected = coords.isEmpty ();
676 bool whole_columns_selected
679 : (coords[0] == 1 && coords[1] == model ()->rowCount ()));
681 bool current_column_selected
682 = nothingSelected ? false : (coords[2] <= index+1 && coords[3] > index);
684 int column_selection_count
685 = nothingSelected ? 0 : (coords[3] - coords[2] + 1);
687 if (! whole_columns_selected || ! current_column_selected)
689 selectColumn (index);
690 column_selection_count = 1;
693 QString column_string
694 = column_selection_count > 1 ? tr (
" columns") : tr (
" column");
700 menu->addSeparator ();
704 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
708 menupos.setY (horizontalHeader ()->height ());
710 menu->exec (mapToGlobal (menupos));
716 int index = verticalHeader ()->logicalIndexAt (pt);
718 if (index < 0 || index > model ()->columnCount ())
723 bool nothingSelected = coords.isEmpty ();
725 bool whole_rows_selected
728 : (coords[2] == 1 && coords[3] == model ()->columnCount ()));
730 bool current_row_selected
731 = (nothingSelected ? false : (coords[0] <= index+1 && coords[1] > index));
733 int rowselection_count = nothingSelected ? 0 : (coords[3] - coords[2] + 1);
735 if (! whole_rows_selected || ! current_row_selected)
738 rowselection_count = 1;
741 QString row_string = rowselection_count > 1 ? tr (
" rows") : tr (
" row");
747 menu->addSeparator ();
751 connect (plot_mapper, SIGNAL (mapped (
const QString&)),
755 menupos.setX (verticalHeader ()->width ());
761 menu->exec (mapToGlobal (menupos));
787 QAbstractItemModel *
mod = model ();
790 if (coords.isEmpty ())
793 bool whole_columns_selected
794 = coords[0] == 1 && coords[1] ==
mod->rowCount ();
796 bool whole_rows_selected
797 = coords[2] == 1 && coords[3] ==
mod->columnCount ();
801 if (whole_columns_selected == whole_rows_selected)
804 if (whole_rows_selected)
805 mod->removeRows (coords[0], coords[1] - coords[0]);
807 if (whole_columns_selected)
808 mod->removeColumns (coords[2], coords[3] - coords[2]);
820 QItemSelectionModel *sel = selectionModel ();
825 for (
const auto& idx : indices)
843 QItemSelectionModel *sel = selectionModel ();
845 std::sort (indices.begin (), indices.end ());
847 if (indices.isEmpty ())
853 QAbstractItemModel *
mod = model ();
854 QModelIndex previous = indices.first ();
855 QString copy =
mod->data (previous).toString ();
856 indices.removeFirst ();
857 for (
auto idx : indices)
859 copy.push_back (previous.row () != idx.row () ?
'\n' :
'\t');
860 copy.append (
mod->data (idx).toString ());
864 QClipboard *clipboard = QApplication::clipboard ();
865 clipboard->setText (copy);
874 QAbstractItemModel *
mod = model ();
875 QItemSelectionModel *sel = selectionModel ();
878 QClipboard *clipboard = QApplication::clipboard ();
883 QPoint tabsize = QPoint (
mod->rowCount (),
mod->columnCount ());
885 if (indices.isEmpty ())
887 start = QPoint (0,0);
890 else if (indices.size () == 1)
892 start = QPoint (indices[0].row (), indices[0].column ());
900 for (
int i = 0; i < indices.size (); i++)
902 if (indices[i].column () < start.y ())
903 start.setY (indices[i].column ());
905 if (indices[i].column () > end.y ())
906 end.setY (indices[i].column ());
908 if (indices[i].row () < start.x ())
909 start.setX (indices[i].column ());
911 if (indices[i].row () > end.x ())
912 end.setX (indices[i].column ());
919 QStringList rows =
text.split (
'\n');
920 for (
const auto& row : rows)
922 if (rownum > end.x () - start.x ())
925 QStringList cols = row.split (
'\t');
929 for (
const auto& col : cols)
933 if (colnum > end.y () - start.y () )
936 mod->setData (
mod->index (rownum + start.x (),
937 colnum + start.y ()),
951 if (action == QAbstractSlider::SliderSingleStepAdd
952 || action == QAbstractSlider::SliderPageStepAdd
953 || action == QAbstractSlider::SliderToMaximum
954 || action == QAbstractSlider::SliderMove)
958 QScrollBar *sb = horizontalScrollBar ();
960 if (sb && sb->value () == sb->maximum ())
973 if (action == QAbstractSlider::SliderSingleStepAdd
974 || action == QAbstractSlider::SliderPageStepAdd
975 || action == QAbstractSlider::SliderToMaximum
976 || action == QAbstractSlider::SliderMove)
980 QScrollBar *sb = verticalScrollBar ();
982 if (sb && sb->value () == sb->maximum ())
998 installEventFilter (
this);
1003 if (ev->type () == QEvent::HoverEnter)
1005 else if (ev->type () == QEvent::MouseButtonPress)
1008 return QToolButton::eventFilter (obj, ev);
1014 installEventFilter (
this);
1020 if (ev->type () == QEvent::MouseButtonRelease && isDown ())
1025 QAction *action = defaultAction ();
1026 if (action !=
nullptr)
1027 action->activate (QAction::Trigger);
1038 installEventFilter (
this);
1043 if (ev->type () == QEvent::MouseButtonRelease && underMouse ())
1048 return QMenu::eventFilter (obj, ev);
1056 m_tool_bar (new QToolBar (m_main)),
1057 m_default_width (30),
1058 m_default_height (100),
1059 m_add_font_height (0),
1060 m_use_terminal_font (true),
1061 m_alternate_rows (true),
1066 m_current_focus_vname (
""),
1067 m_hovered_focus_vname (
""),
1068 m_plot_mapper (nullptr),
1069 m_focus_widget (nullptr),
1070 m_focus_widget_vdw (nullptr)
1073 setStatusTip (tr (
"Edit variables."));
1074 setWindowIcon (QIcon (
":/actions/icons/logo.png"));
1075 setAttribute (Qt::WA_AlwaysShowToolTips);
1077 m_main->setParent (
this);
1079 #if (QT_VERSION < 0x050601) || (QT_VERSION >= 0x050701)
1080 m_main->setDockOptions (QMainWindow::AnimatedDocks |
1081 QMainWindow::AllowNestedDocks |
1082 QMainWindow::VerticalTabs);
1084 m_main->setDockNestingEnabled (
true);
1101 QMdiArea *central_mdiarea =
new QMdiArea (
m_main);
1102 central_mdiarea->setMinimumSize (QSize (0, 0));
1103 central_mdiarea->setMaximumSize (QSize (0, 0));
1104 central_mdiarea->resize (QSize (0, 0));
1105 m_main->setCentralWidget (central_mdiarea);
1110 p, SLOT (execute_command_in_terminal (
const QString&)));
1115 octave_dock_widget::focusInEvent (ev);
1136 if (any_qdw !=
nullptr)
1139 any_qdw->setFocus ();
1151 const QString&
text,
1157 a = menu->addAction (icon,
text,
this, member);
1160 a =
new QAction (
this);
1161 connect (a, SIGNAL (triggered ()),
this, member);
1165 a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
1182 if (existing_qdw != NULL)
1187 if (
m_main->focusWidget () !=
nullptr)
1189 QFocusEvent
event (QEvent::FocusOut, Qt::OtherFocusReason);
1190 QApplication::sendEvent (
m_main->focusWidget (), &
event);
1194 m_main->parentWidget ()->show ();
1195 existing_qdw->show ();
1196 existing_qdw->raise ();
1197 existing_qdw->activateWindow ();
1199 existing_qdw->setFocus ();
1207 page->setObjectName (
name);
1208 m_main->addDockWidget (Qt::LeftDockWidgetArea, page);
1210 connect (QApplication::instance(), SIGNAL (focusChanged (
QWidget *,
QWidget *)),
1212 connect (page, SIGNAL (destroyed (
QObject *)),
1214 connect (page, SIGNAL (variable_focused_signal (
const QString&)),
1217 #if (QT_VERSION >= 0x050302) && (QT_VERSION <= QTBUG_44813_FIX_VERSION)
1218 connect (page, SIGNAL (queue_unfloat_float ()),
1219 page, SLOT (unfloat_float ()), Qt::QueuedConnection);
1220 connect (page, SIGNAL (queue_float ()),
1221 page, SLOT (refloat ()), Qt::QueuedConnection);
1227 stack->setObjectName (
name);
1228 page->setWidget (stack);
1229 page->setFocusProxy (stack);
1233 connect (stack, SIGNAL (edit_variable_signal (
const QString&,
const octave_value&)),
1238 stack, SLOT (
save ()));
1242 edit_view->setObjectName (
name);
1243 edit_view->setFont (
m_font);
1250 edit_view, SLOT (selected_command_requested (
const QString&)));
1255 edit_view, SLOT (delete_selected ()));
1257 edit_view, SLOT (clearContent ()));
1262 connect (edit_view->horizontalHeader (),
1263 SIGNAL (customContextMenuRequested (
const QPoint&)),
1264 edit_view, SLOT (createColumnMenu (
const QPoint&)));
1265 connect (edit_view->verticalHeader (),
1266 SIGNAL (customContextMenuRequested (
const QPoint&)),
1267 edit_view, SLOT (createRowMenu (
const QPoint&)));
1268 connect (edit_view, SIGNAL (customContextMenuRequested (
const QPoint&)),
1269 edit_view, SLOT (createContextMenu (
const QPoint&)));
1270 connect (edit_view->horizontalScrollBar (), SIGNAL (actionTriggered (
int)),
1271 edit_view, SLOT (handle_horizontal_scroll_action (
int)));
1272 connect (edit_view->verticalScrollBar (), SIGNAL (actionTriggered (
int)),
1273 edit_view, SLOT (handle_vertical_scroll_action (
int)));
1278 connect (model, SIGNAL (edit_variable_signal (
const QString&,
const octave_value&)),
1280 connect (model, SIGNAL (dataChanged (
const QModelIndex&,
const QModelIndex&)),
1281 this, SLOT (
callUpdate (
const QModelIndex&,
const QModelIndex&)));
1283 model, SLOT (update_data_cache ()));
1284 connect (model, SIGNAL (set_editable_signal (
bool)),
1285 stack, SLOT (set_editable (
bool)));
1288 connect (edit_view, SIGNAL (doubleClicked (
const QModelIndex&)),
1289 model, SLOT (double_click (
const QModelIndex&)));
1305 if (page->titleBarWidget () !=
nullptr)
1307 QLabel *existing_ql = page->titleBarWidget ()->findChild<QLabel *> ();
1308 connect (model, SIGNAL (update_label_signal (
const QString&)),
1309 existing_ql, SLOT (setText (
const QString&)));
1310 existing_ql->setMargin (2);
1316 if (viewlist.size () == 1)
1319 m_main->parentWidget ()->show ();
1322 page->activateWindow ();
1330 if (parent () !=
nullptr)
1333 QVariant this_value (
reinterpret_cast<quintptr
> (
this));
1335 for (
auto *tbar : barlist)
1336 for (
int i = 0; i < tbar->count (); i++)
1337 if (tbar->tabData (i) == this_value)
1339 tbar->setCurrentIndex (i);
1385 m_font = QFont (font_name, font_size);
1387 QFontMetrics fm (
m_font);
1395 QColor default_color = qApp->palette ().color
1396 (
static_cast<QPalette::ColorRole
> (
ve_colors[i].def.toInt ()));
1400 QColor setting_color =
1411 size_idx = (size_idx > 0) - (size_idx < 0) + 1;
1413 QStyle *st = style ();
1415 m_tool_bar->setIconSize (QSize (icon_size, icon_size));
1438 if (vdwlist.isEmpty ())
1441 QFocusEvent ev (QEvent::FocusIn);
1453 QWidget *current = QApplication::focusWidget ();
1456 if (current !=
nullptr)
1459 for (
int i = 0; i < vdwlist.size (); i++)
1462 if (vdw->isAncestorOf (current))
1482 if (tofocus !=
nullptr)
1489 QApplication::setActiveWindow(tofocus->window());
1490 tofocus->activateWindow ();
1491 tofocus->setFocus (Qt::OtherFocusReason);
1548 m_stylesheet +=
"QTableView::item:selected{ background-color: "
1553 m_stylesheet +=
"QTableView::item:alternate{ background-color: "
1556 m_stylesheet +=
"QTableView::item:alternate:selected{ background-color: "
1561 for (
int i = 0; i < viewlist.size (); i++)
1577 const QString &
text,
1581 QAction *action =
new QAction (icon,
text,
this);
1582 connect(action, SIGNAL (triggered ()), receiver, member);
1584 button->setDefaultAction (action);
1585 button->setText (
text);
1586 button->setToolTip (
text);
1587 button->setIcon (icon);
1596 m_tool_bar->setAllowedAreas (Qt::TopToolBarArea);
1598 m_tool_bar->setObjectName (
"VariableEditorToolBar");
1600 m_tool_bar->setWindowTitle (tr (
"Variable Editor Toolbar"));
1606 this, SLOT (
save ()));
1608 action->setShortcutContext (Qt::WidgetWithChildrenShortcut);
1609 action->setShortcuts (QKeySequence::Save);
1610 action->setStatusTip(tr(
"Save variable to a file"));
1616 action->setStatusTip(tr(
"Cut data to clipboard"));
1620 action->setStatusTip(tr(
"Copy data to clipboard"));
1624 action->setStatusTip(tr(
"Paste clipboard into variable data"));
1632 action =
new QAction (rmgr.
icon (
"plot-xy-curve"), tr (
"Plot"),
m_tool_bar);
1633 action->setToolTip (tr (
"Plot Selected Data"));
1635 plot_tool_button->setDefaultAction (action);
1637 plot_tool_button->setText (tr (
"Plot"));
1638 plot_tool_button->setToolTip (tr (
"Plot selected data"));
1639 plot_tool_button->setIcon (rmgr.
icon (
"plot-xy-curve"));
1641 plot_tool_button->setPopupMode (QToolButton::InstantPopup);
1644 plot_menu->setTitle (tr (
"Plot"));
1645 plot_menu->setSeparatorsCollapsible (
false);
1649 plot_tool_button->setMenu (plot_menu);
1657 action->setStatusTip(tr(
"Go one level up in variable hierarchy"));
1664 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS)
1665 , Qt::FindDirectChildrenOnly
1668 for (
int i = 0; i < hbuttonlist.size (); i++)
1670 connect (hbuttonlist.at (i), SIGNAL (hovered_signal ()),
1672 connect (hbuttonlist.at (i), SIGNAL (popup_shown_signal ()),
1678 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS)
1679 , Qt::FindDirectChildrenOnly
1682 for (
int i = 0; i < rfbuttonlist.size (); i++)
1684 connect (rfbuttonlist.at (i), SIGNAL (about_to_activate ()),
1691 for (
int i = 0; i < menulist.size (); i++)
1693 connect (menulist.at (i), SIGNAL (about_to_activate ()),
1697 m_tool_bar->setAttribute(Qt::WA_ShowWithoutActivating);
charNDArray max(char d, const charNDArray &m)
charNDArray min(char d, const charNDArray &m)
Base class for Octave interfaces that use Qt.
resource_manager & get_resource_manager(void)
void notice_settings(const gui_settings *)
gui_settings * get_settings(void) const
QIcon icon(const QString &icon_name, bool fallback=true)
void maybe_resize_rows(int rows)
int column_width(void) const
int display_columns(void) const
bool clear_content(const QModelIndex &idx)
int display_rows(void) const
void update_data(const octave_value &val)
octave_idx_type data_rows(void) const
void maybe_resize_columns(int cols)
octave_idx_type data_columns(void) const
void edit_variable_signal(const QString &name, const octave_value &val)
base_qobject & m_octave_qobj
variable_editor_view * m_edit_view
variable_editor_stack(QWidget *p, base_qobject &oct_qobj)
variable_editor_view * edit_view(void)
void command_signal(const QString &cmd)
void set_editable(bool editable)
QTextEdit * make_disp_view(QWidget *parent)
void add_edit_actions(QMenu *menu, const QString &qualifier_string)
QList< int > range_selected(void)
void createColumnMenu(const QPoint &pt)
void pasteClipboard(void)
void selected_command_requested(const QString &cmd)
void command_signal(const QString &cmd)
variable_editor_model * m_var_model
void createContextMenu(const QPoint &pt)
variable_editor_view(QWidget *p, base_qobject &oct_qobj)
void delete_selected(void)
void handle_vertical_scroll_action(int action)
base_qobject & m_octave_qobj
void createRowMenu(const QPoint &pt)
void transposeContent(void)
void createVariable(void)
void setModel(QAbstractItemModel *model)
void handle_horizontal_scroll_action(int action)
void variable_destroyed(QObject *obj)
void clear_content_signal(void)
void closeEvent(QCloseEvent *)
QAction * add_action(QMenu *menu, const QIcon &icon, const QString &text, const char *member)
void copy_clipboard_signal(void)
void record_hovered_focus_variable(void)
QList< QColor > m_table_colors
QAction * add_tool_bar_button(const QIcon &icon, const QString &text, const QObject *receiver, const char *member)
variable_editor(QWidget *parent, base_qobject &oct_qobj)
void notice_settings(const gui_settings *)
QString m_hovered_focus_vname
variable_dock_widget * m_focus_widget_vdw
void paste_clipboard_signal(void)
void level_up_signal(void)
void refresh_signal(void)
void edit_variable(const QString &name, const octave_value &val)
void focusInEvent(QFocusEvent *ev)
void delete_selected_signal(void)
void command_signal(const QString &cmd)
void restore_hovered_focus_variable(void)
void callUpdate(const QModelIndex &, const QModelIndex &)
void construct_tool_bar(void)
void pasteClipboard(void)
void variable_focused(const QString &name)
QSignalMapper * m_plot_mapper
QString m_current_focus_vname
text(const graphics_handle &mh, const graphics_handle &p)
const gui_pref cs_font_size("terminal/fontSize", QVariant(10))
const gui_pref cs_font("terminal/fontName", QVariant())
const gui_pref global_mono_font("monospace_font", global_font_family)
const QStyle::PixelMetric global_icon_sizes[3]
const gui_pref global_use_native_dialogs("use_native_file_dialogs", QVariant(true))
const gui_pref global_icon_size("toolbar_icon_size", QVariant(0))
const int ve_colors_count
const gui_pref ve_column_width("variable_editor/column_width", QVariant(100))
const gui_pref ve_colors[ve_colors_count]
const gui_pref ve_use_terminal_font("variable_editor/use_terminal_font", QVariant(true))
const gui_pref ve_font_size("variable_editor/font_size", QVariant(10))
const gui_pref ve_alternate_rows("variable_editor/alternate_rows", QVariant(false))
const gui_pref ve_font_name("variable_editor/font_name", QVariant())
const gui_pref ve_row_height("variable_editor/row_height", QVariant(10))
std::complex< double > w(std::complex< double > z, double relerr=0)
std::function< void(octave::interpreter &)> meth_callback
std::function< void(void)> fcn_callback
static QSignalMapper * make_plot_mapper(QMenu *menu)
int qt_fontmetrics_horizontal_advance(const QFontMetrics &fm, QChar ch)
octave_int< T > mod(const octave_int< T > &x, const octave_int< T > &y)
octave_value::octave_value(const Array< char > &chm, char type) return retval
#define QTBUG_44813_FIX_VERSION