26 #if defined (HAVE_CONFIG_H)
30 #if defined (HAVE_QSCINTILLA)
34 #include <QApplication>
36 #include <QFileDialog>
38 #include <QMessageBox>
41 #include <QPushButton>
44 #include <QTextStream>
45 #include <QVBoxLayout>
46 #include <Qsci/qscicommandset.h>
73 connect (bar, SIGNAL (close_current_tab_signal (
bool)),
74 p->parent (), SLOT (request_close_file (
bool)));
76 this->setTabBar (bar);
78 setTabsClosable (
true);
79 setUsesScrollButtons (
true);
80 #if defined (HAVE_QTABWIDGET_SETMOVABLE)
87 return qobject_cast<tab_bar *> (tabBar ());
90 std::list<file_editor_tab *>
93 std::list<file_editor_tab *>
retval;
94 for (
int i = 0; i < count (); i++)
107 m_ced = QDir::currentPath ();
127 setAcceptDrops (
true);
128 setFocusPolicy (Qt::StrongFocus);
145 QDockWidget::focusInEvent (e);
153 QAction *open_action = shared_actions.at (
OPEN_ACTION);
157 m_fileMenu->insertAction (open_action, new_fcn_action);
158 m_fileMenu->insertAction (new_fcn_action, new_action);
160 m_tool_bar->insertAction (open_action, new_action);
192 if (sc_run == sc_cont)
260 real_visible = isVisible ();
262 real_visible = visible;
267 if (startup && ! isFloating ())
274 while ((i < tab_list.count ()) && (! in_tab))
276 QTabBar *tab = tab_list.at (i);
280 while ((j < tab->count ()) && (! in_tab))
283 if (tab->tabText (j) == windowTitle ())
287 int top = tab->currentIndex ();
288 if (! (top > -1 && tab->tabText (top) == windowTitle ()))
306 QStringList sessionFileNames
309 QStringList session_encodings
312 QStringList session_index
315 QStringList session_lines
321 bool do_encoding = (session_encodings.count () == sessionFileNames.count ());
322 bool do_index = (session_index.count () == sessionFileNames.count ());
323 bool do_lines = (session_lines.count () == sessionFileNames.count ());
325 for (
int n = 0;
n < sessionFileNames.count (); ++
n)
327 QFileInfo file = QFileInfo (sessionFileNames.at (
n));
328 if (! file.exists ())
332 QString (), QString ()};
334 item.
line = session_lines.at (
n).toInt ();
336 item.
index = session_index.at (
n).toInt ();
338 item.
encoding = session_encodings.at (
n);
343 std::sort (s_data.begin (), s_data.end ());
346 for (
int n = 0;
n < s_data.count (); ++
n)
382 QHash<QMenu*, QStringList>::const_iterator i =
m_hash_menu_text.constBegin ();
386 i.key ()->setTitle (i.value ().at (! enable));
417 QStringList fetFileNames;
418 QStringList fet_encodings;
419 QStringList fet_index;
420 QStringList fet_lines;
424 for (
auto editor_tab : editor_tab_lst)
426 QString file_name = editor_tab->file_name ();
430 if (! file_name.isEmpty ())
432 fetFileNames.append (file_name);
433 fet_encodings.append (editor_tab->encoding ());
436 fet_index.append (index.setNum (
m_tab_widget->indexOf (editor_tab)));
439 editor_tab->qsci_edit_area ()->getCursorPosition (&l, &c);
440 fet_lines.append (index.setNum (l + 1));
467 for (
auto fe_tab : fe_tab_lst)
471 connect (fe_tab, SIGNAL (tab_ready_to_close (
void)),
473 Qt::UniqueConnection);
478 for (
auto fe_tab : fe_tab_lst)
485 if (fe_tab->check_file_modified (
false) == QMessageBox::Cancel)
491 for (
auto fet : fe_tab_lst)
492 disconnect (fet, SIGNAL (tab_ready_to_close (
void)), 0, 0 );
521 bool vis = isVisible ();
524 for (
auto editor_tab : editor_tab_lst)
561 for (
int index =
m_tab_widget->count ()-1; index >= 0; index--)
574 for (
int index =
m_tab_widget->count ()-1; index >= 0; index--)
591 action->data ().toStringList ().at (1));
603 QsciScintillaBase::SCI_REDO);
609 QsciScintillaBase::SCI_CUT);
718 QsciScintillaBase::SCI_DELWORDLEFT);
724 QsciScintillaBase::SCI_DELWORDRIGHT);
730 QsciScintillaBase::SCI_DELLINELEFT);
736 QsciScintillaBase::SCI_DELLINERIGHT);
742 QsciScintillaBase::SCI_LINEDELETE);
748 QsciScintillaBase::SCI_LINECOPY);
754 QsciScintillaBase::SCI_LINECUT);
760 QsciScintillaBase::SCI_SELECTIONDUPLICATE);
766 QsciScintillaBase::SCI_LINETRANSPOSE);
788 QsciScintillaBase::SCI_UPPERCASE);
794 QsciScintillaBase::SCI_LOWERCASE);
815 QsciScintilla::EolWindows);
821 QsciScintilla::EolUnix);
827 QsciScintilla::EolMac);
870 int xp =
x () + frameGeometry ().width ();
871 int yp = y () + frameGeometry ().height ();
917 QObject *fileEditorTab = sender ();
947 QObject *fileEditorTab = sender ();
958 delete fileEditorTab;
995 const QString& encoding)
998 while ((index =
m_mru_files.indexOf (file_name)) >= 0)
1011 bool remove_on_success)
1027 =
new QMessageBox (QMessageBox::Critical, tr (
"Octave Editor"),
1028 tr (
"File not saved! A file with the selected name\n%1\n"
1029 "is already open in the editor").
1031 QMessageBox::Ok,
nullptr);
1033 msgBox->setWindowModality (Qt::NonModal);
1034 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1040 QObject *saveFileObject = sender ();
1041 QWidget *saveFileWidget =
nullptr;
1051 if (! saveFileWidget)
1055 =
new QMessageBox (QMessageBox::Critical, tr (
"Octave Editor"),
1056 tr (
"The associated file editor tab has disappeared."),
1057 QMessageBox::Ok,
nullptr);
1059 msgBox->setWindowModality (Qt::NonModal);
1060 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1067 emit
fetab_save_file (saveFileWidget, saveFileName, remove_on_success);
1079 if (! file.isEmpty ())
1097 const QString& file,
1099 const QString& cond)
1112 const QString& new_name)
1119 QString old_name_clean = old_name.trimmed ();
1120 int s = old_name_clean.size ();
1122 if (old_name_clean.at (0) == QChar (
'\"')
1123 && old_name_clean.at (s - 1) == QChar (
'\"'))
1124 old_name_clean = old_name_clean.mid (1, s - 2);
1126 QStringList old_names = old_name_clean.split (
"\" \"");
1129 QFileInfo newf (new_name);
1130 bool new_is_dir = newf.isDir ();
1133 for (
int i = 0; i < old_names.count (); i++)
1136 QFileInfo old (old_names.at (i));
1156 f_data.
line = l + 1;
1168 std::string ndir = new_name.toStdString ();
1169 std::string ofile = old.fileName ().toStdString ();
1199 false,
false,
true,
"",
1207 false,
false,
true,
"",
1222 size_idx = (size_idx > 0) - (size_idx < 0) + 1;
1224 QStyle *st = style ();
1226 m_tool_bar->setIconSize (QSize (icon_size, icon_size));
1229 QTabWidget::TabPosition pos
1235 QString width_str (
"width");
1236 QString height_str (
"height");
1237 if (pos == QTabWidget::West || pos == QTabWidget::East)
1239 width_str = QString (
"height");
1240 height_str = QString (
"width");
1250 int height = 1.5*QFontMetrics (
m_tab_widget->font ()).height ();
1256 QString style_sheet = QString (
"QTabBar::tab {max-" + height_str +
": %1px;}")
1262 style_sheet = QString (
"QTabBar::tab "
1263 " {max-" + height_str +
": %1px;"
1264 " min-" + width_str +
": %2px;"
1265 " max-" + width_str +
": %3px;}")
1266 .arg (height).arg (tab_width_min).arg (tab_width_max);
1274 #if defined (Q_OS_MAC)
1277 QString close_button_css
1278 (
"QTabBar::close-button"
1279 " { width: 6px; image: url(:/actions/icons/widget-close.png);}\n"
1280 "QTabBar::close-button:hover"
1281 " { background-color: #cccccc; }");
1283 style_sheet = style_sheet + close_button_css;
1425 if (visible && ! isFloating ())
1454 QsciScintillaBase::SCI_COPY);
1461 QsciScintillaBase::SCI_PASTE);
1468 QsciScintillaBase::SCI_SELECTALL);
1475 QsciScintillaBase::SCI_UNDO);
1481 const QString& encoding,
1482 int line,
bool debug_pointer,
1483 bool breakpoint_marker,
bool insert,
1484 const QString& cond,
int index)
1494 if (openFileName.isEmpty ())
1517 if (breakpoint_marker)
1521 if (show_dbg_file && ! ((breakpoint_marker || debug_pointer)
1530 if (! show_dbg_file && (breakpoint_marker || debug_pointer))
1533 if (breakpoint_marker && ! insert)
1538 bool reusing =
false;
1542 fileEditorTab = tab;
1544 fileEditorTab =
nullptr;
1550 if (! fileEditorTab)
1554 QString result = fileEditorTab->
load_file (openFileName);
1563 QFileInfo
file_info = QFileInfo (openFileName);
1575 if (breakpoint_marker)
1582 delete fileEditorTab;
1583 fileEditorTab =
nullptr;
1585 if (QFile::exists (openFileName))
1591 tr (
"Octave Editor"),
1592 tr (
"Could not open file\n%1\nfor read: %2.").
1593 arg (openFileName).arg (result),
1594 QMessageBox::Ok,
this);
1596 msgBox->setWindowModality (Qt::NonModal);
1597 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1603 bool create_file =
true;
1609 tr (
"Octave Editor"),
1610 tr (
"File\n%1\ndoes not exist. "
1611 "Do you want to create it?").arg (openFileName),
1612 QMessageBox::NoButton,
nullptr);
1614 msgBox->addButton (tr (
"Create"), QMessageBox::YesRole);
1615 msgBox->addButton (tr (
"Cancel"), QMessageBox::RejectRole);
1616 msgBox->setDefaultButton (create_button);
1619 QAbstractButton *clicked_button = msgBox->clickedButton ();
1620 if (clicked_button != create_button)
1621 create_file =
false;
1629 QFile file (openFileName);
1630 if (! file.open (QIODevice::WriteOnly))
1634 tr (
"Octave Editor"),
1635 tr (
"Could not open file\n%1\nfor write: %2.").
1636 arg (openFileName).arg (file.errorString ()),
1637 QMessageBox::Ok,
this);
1639 msgBox->setWindowModality (Qt::NonModal);
1640 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1735 for (
auto *a : all_actions)
1736 menu->removeAction (a);
1742 menu->addSeparator ();
1744 menu->addSeparator ();
1749 menu->addSeparator ();
1753 menu->addSeparator ();
1793 if (e->mimeData ()->hasUrls ())
1795 e->acceptProposedAction ();
1801 if (e->mimeData ()->hasUrls ())
1803 for (
const auto& url : e->mimeData ()->urls ())
1813 static_cast<QDockWidget *
> (
w->get_dock_widget_list ().at (0));
1815 for (
int i = 0; i < w_list.count (); i++)
1817 if (w_list.at (i) == console)
1880 tr (
"&Edit Function"),
1891 tr (
"Save File &As..."),
1906 tr (
"Close Other Files"),
1933 tr (
"&Find and Replace..."), SLOT (
request_find (
bool)));
2035 tr (
"Convert Line Endings to &Windows (CRLF)"),
2044 tr (
"Convert Line Endings to Legacy &Mac (CR)"),
2085 tr (
"&Preferences..."),
2090 tr (
"&Styles Preferences..."),
2141 view_menu->addSeparator ();
2148 =
add_action (view_menu, rmgr.
icon (
"zoom-out"), tr (
"Zoom &Out"),
2154 view_menu->addSeparator ();
2157 =
add_action (view_menu, tr (
"&Sort Tabs Alphabetically"),
2158 SLOT (sort_tabs_alph (
void)),
2169 tr (
"Toggle &Breakpoint"),
2174 tr (
"&Next Breakpoint"),
2179 tr (
"Pre&vious Breakpoint"),
2184 tr (
"&Remove All Breakpoints"),
2197 rmgr.
icon (
"system-run"),
2198 tr (
"Save File and Run / Continue"),
2203 tr (
"Run &Selection"),
2213 tr (
"&Help on Keyword"),
2218 tr (
"&Documentation on Keyword"),
2224 =
add_action (
nullptr,
"", SLOT (switch_left_tab (
void)),
2228 =
add_action (
nullptr,
"", SLOT (switch_right_tab (
void)),
2232 =
add_action (
nullptr,
"", SLOT (move_tab_left (
void)),
2236 =
add_action (
nullptr,
"", SLOT (move_tab_right (
void)),
2243 popdown_button->setToolTip (tr (
"Recent Files"));
2245 popdown_button->setPopupMode (QToolButton::InstantPopup);
2246 popdown_button->setArrowType (Qt::DownArrow);
2247 popdown_button->setToolButtonStyle (Qt::ToolButtonTextOnly);
2273 QVBoxLayout *vbox_layout =
new QVBoxLayout ();
2277 vbox_layout->setMargin (0);
2278 vbox_layout->setSpacing (0);
2279 editor_widget->setLayout (vbox_layout);
2280 setWidget (editor_widget);
2288 ctx_men->addSeparator ();
2294 SLOT (process_settings_dialog_request (
const QString&)));
2297 main_win (), SLOT (debug_continue (
void)));
2304 connect (
m_tab_widget, SIGNAL (tabCloseRequested (
int)),
2311 setWindowIcon (QIcon (
":/actions/icons/logo.png"));
2331 qsci->getCursorPosition (&
line, &col);
2332 int l1 = qsci->lineLength (
line);
2335 qsci->SendScintilla (QsciScintillaBase::SCI_AUTOCCOMPLETE);
2338 if (qsci->text (
line).length () - l1)
2357 connect (
f->qsci_edit_area (), SIGNAL (status_update (
bool,
bool)),
2360 connect (
f->qsci_edit_area (), SIGNAL (show_doc_signal (
const QString&)),
2361 main_win (), SLOT (handle_show_doc (
const QString&)));
2363 connect (
f->qsci_edit_area (), SIGNAL (create_context_menu_signal (
QMenu *)),
2366 connect (
f->qsci_edit_area (),
2367 SIGNAL (execute_command_in_terminal_signal (
const QString&)),
2368 main_win (), SLOT (execute_command_in_terminal (
const QString&)));
2370 connect (
f->qsci_edit_area (),
2371 SIGNAL (focus_console_after_command_signal (
void)),
2372 main_win (), SLOT (focus_console_after_command (
void)));
2374 connect (
f->qsci_edit_area (),
2375 SIGNAL (SCN_AUTOCCOMPLETED (
const char*,
int,
int,
int)),
2378 connect (
f->qsci_edit_area (), SIGNAL (SCN_AUTOCCANCELLED (
void)),
2382 connect (
f, SIGNAL (autoc_closed (
void)),
2385 connect (
f, SIGNAL (file_name_changed (
const QString&,
const QString&,
bool)),
2387 const QString&,
bool)));
2389 connect (
f, SIGNAL (editor_state_changed (
bool,
bool)),
2392 connect (
f, SIGNAL (tab_remove_request ()),
2395 connect (
f, SIGNAL (editor_check_conflict_save (
const QString&,
bool)),
2398 connect (
f, SIGNAL (mru_add_file (
const QString&,
const QString&)),
2401 connect (
f, SIGNAL (run_file_signal (
const QFileInfo&)),
2402 main_win (), SLOT (run_file_in_terminal (
const QFileInfo&)));
2407 connect (
f, SIGNAL (edit_mfile_request (
const QString&,
const QString&,
2408 const QString&,
int)),
2409 main_win (), SLOT (handle_edit_mfile_request (
const QString&,
2411 const QString&,
int)));
2416 connect (
f, SIGNAL (set_focus_editor_signal (
QWidget*)),
2424 f, SLOT (change_editor_state (
const QWidget*)));
2428 f, SLOT (save_file (
const QWidget*,
const QString&,
bool)));
2432 f, SLOT (recover_from_exit (
void)));
2435 f, SLOT (set_current_directory (
const QString&)));
2445 f, SLOT (context_help (
const QWidget*,
bool)));
2448 f, SLOT (context_edit (
const QWidget*)));
2451 f, SLOT (save_file (
const QWidget*)));
2454 f, SLOT (save_file_as (
const QWidget*)));
2457 f, SLOT (print_file (
const QWidget*)));
2460 f, SLOT (run_file (
const QWidget*,
bool)));
2463 f, SLOT (context_run (
const QWidget*)));
2466 f, SLOT (toggle_bookmark (
const QWidget*)));
2469 f, SLOT (next_bookmark (
const QWidget*)));
2472 f, SLOT (previous_bookmark (
const QWidget*)));
2475 f, SLOT (remove_bookmark (
const QWidget*)));
2478 f, SLOT (toggle_breakpoint (
const QWidget*)));
2481 f, SLOT (next_breakpoint (
const QWidget*)));
2484 f, SLOT (previous_breakpoint (
const QWidget*)));
2487 f, SLOT (remove_all_breakpoints (
const QWidget*)));
2491 f, SLOT (scintilla_command (
const QWidget *,
unsigned int)));
2494 f, SLOT (comment_selected_text (
const QWidget*,
bool)));
2497 f, SLOT (uncomment_selected_text (
const QWidget*)));
2500 f, SLOT (indent_selected_text (
const QWidget*)));
2503 f, SLOT (unindent_selected_text (
const QWidget*)));
2506 f, SLOT (smart_indent_line_or_selected_text (
const QWidget*)));
2510 f, SLOT (convert_eol (
const QWidget*, QsciScintilla::EolMode)));
2513 f, SLOT (goto_line (
const QWidget*,
int)));
2516 f, SLOT (move_match_brace (
const QWidget*,
bool)));
2519 f, SLOT (show_auto_completion (
const QWidget*)));
2525 f, SLOT (insert_debugger_pointer (
const QWidget*,
int)));
2528 f, SLOT (delete_debugger_pointer (
const QWidget*,
int)));
2530 connect (
f, SIGNAL (debug_quit_signal (
void)),
2531 main_win (), SLOT (debug_quit (
void)));
2534 int,
const QString&)),
2535 f, SLOT (do_breakpoint_marker (
bool,
const QWidget*,
int,
2568 for (
int i = 0; i < num_files; ++i)
2570 QString
text = QString (
"&%1 %2").
2574 QStringList action_data;
2613 if (
line < 0 && ! file_name.isEmpty ())
2628 bool old =
settings->value (preference).toBool ();
2635 const QString& new_name)
2637 QDir old_dir (old_name);
2642 for (
auto editor_tab : editor_tab_lst)
2644 QString file_name = editor_tab->file_name ();
2646 if (file_name.isEmpty ())
2650 QString rel_path_to_file = old_dir.relativeFilePath (file_name);
2651 QString abs_path_to_file = old_dir.absoluteFilePath (file_name);
2661 if ((rel_path_to_file != abs_path_to_file)
2662 && (rel_path_to_file.left (3) != QString (
"../")))
2672 editor_tab->qsci_edit_area ()->getCursorPosition (&l, &c);
2673 f_data.
line = l + 1;
2676 editor_tab->file_has_changed (QString (),
true);
2685 if (! new_name.isEmpty ())
2687 QDir new_dir (new_name);
2688 QString append_to_new_dir;
2689 if (new_dir.exists ())
2696 = old_dir.dirName () +
"/" + rel_path_to_file;
2699 append_to_new_dir = rel_path_to_file;
2702 = new_dir.absoluteFilePath (append_to_new_dir);
2707 f_data.
encoding = editor_tab->encoding ();
2718 if (foc_w && foc_w->inherits (
"octave::octave_qscintilla"))
2726 std::string std_file = file.toStdString ();
2730 for (
auto fe_tab : fe_tab_lst)
2732 QString tab_file = fe_tab->file_name ();
2740 if (
same_file (std_file, tab_file.toStdString ()) || file == tab_file)
2755 const QString&
text,
const char *member,
2761 if (receiver !=
nullptr)
2765 a = menu->addAction (icon,
text,
r, member);
2768 a =
new QAction (
this);
2769 connect (a, SIGNAL (triggered ()),
r, member);
2773 a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
2782 QString base_name =
name;
2784 base_name.replace (
"&&",
"___octave_amp_replacement___");
2786 base_name.remove (
"&");
2788 base_name.replace (
"___octave_amp_replacement___",
"&&");
Base class for Octave interfaces that use Qt.
resource_manager & get_resource_manager(void)
shortcut_manager & get_shortcut_manager(void)
void set_encoding(const QString &new_encoding)
void update_breakpoints()
QString load_file(const QString &fileName)
void update_window_title(bool modified)
bool conditional_close(void)
void file_has_changed(const QString &path, bool do_close=false)
QString encoding(void) const
octave_qscintilla * qsci_edit_area(void)
void new_file(const QString &commands=QString())
QAction * m_delete_start_word_action
void request_find_previous(bool)
void handle_editor_state_changed(bool enableCopy, bool is_octave_file)
QAction * m_move_tab_left_action
void request_close_other_files(bool)
void fetab_next_bookmark(const QWidget *ID)
QAction * m_upper_case_action
QAction * m_previous_breakpoint_action
void empty_script(bool startup, bool visible)
bool m_copy_action_enabled
QAction * m_conv_eol_windows_action
QAction * m_sel_to_matching_brace
QAction * m_show_indguide_action
void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)
void fetab_zoom_out(const QWidget *ID)
void request_find_next(bool)
void handle_tab_close_request(int index)
QAction * m_switch_right_tab_action
void fetab_previous_bookmark(const QWidget *ID)
void request_styles_preferences(bool)
QAction * m_transpose_line_action
void request_step_into_file()
QAction * m_indent_selection_action
QAction * m_completion_action
void request_mru_open_file(QAction *action)
void fetab_zoom_in(const QWidget *ID)
QAction * m_close_others_action
QAction * m_smart_indent_line_or_selection_action
QPointer< find_dialog > m_find_dialog
void request_open_file(const QString &fileName, const QString &encoding=QString(), int line=-1, bool debug_pointer=false, bool breakpoint_marker=false, bool insert=true, const QString &cond="", int index=-1)
QAction * m_lower_case_action
QAction * m_conv_eol_mac_action
file_editor(QWidget *p, base_qobject &oct_qobj)
void fetab_remove_bookmark(const QWidget *ID)
void request_close_file(bool)
void request_delete_end_line(bool)
void handle_file_remove(const QString &, const QString &)
void request_move_match_brace(bool)
QAction * m_context_doc_action
QList< session_data > m_tmp_closed_files
void toggle_preference(const gui_pref &preference)
void fetab_set_directory(const QString &dir)
QAction * m_preferences_action
file_editor_tab_widget * m_tab_widget
void request_next_breakpoint(bool)
void fetab_context_help(const QWidget *ID, bool)
QAction * m_remove_all_breakpoints_action
void enable_menu_shortcuts(bool)
void edit_area_changed(octave_qscintilla *edit_area)
void request_conv_eol_unix(bool)
QAction * m_move_to_matching_brace
QAction * m_unindent_selection_action
void request_open_file_external(const QString &file_name, int line)
QAction * m_selectall_action
void fetab_context_run(const QWidget *ID)
QAction * m_cut_line_action
void request_upper_case(bool)
bool call_custom_editor(const QString &file_name=QString(), int line=-1)
QAction * m_next_breakpoint_action
void handle_exit_debug_mode(void)
QAction * m_show_statusbar_action
QAction * m_edit_function_action
void fetab_delete_debugger_pointer(const QWidget *ID, int line=-1)
void show_hscrollbar(bool)
void request_next_bookmark(bool)
void insert_global_actions(QList< QAction * >)
void fetab_previous_breakpoint(const QWidget *ID)
void closeEvent(QCloseEvent *event)
void request_delete_start_line(bool)
void handle_delete_debugger_pointer_request(const QString &file, int line)
QAction * m_run_selection_action
void fetab_unindent_selected_text(const QWidget *ID)
bool is_editor_console_tabbed(void)
void request_new_file(const QString &commands)
void handle_file_renamed(bool load_new=true)
QMenu * add_menu(QMenuBar *p, QString text)
void request_remove_breakpoint(bool)
void set_focus(QWidget *fet)
QAction * m_delete_end_line_action
QAction * m_uncomment_selection_action
QAction * m_find_files_action
QAction * m_duplicate_selection_action
void request_unindent_selected_text(bool)
QAction * m_delete_end_word_action
void request_lower_case(bool)
void request_context_run(bool)
void request_save_file_as(bool)
bool editor_tab_has_focus(void)
void fetab_context_edit(const QWidget *ID)
QAction * m_remove_bookmark_action
QAction * m_copy_line_action
void show_eol_chars(bool)
void handle_insert_debugger_pointer_request(const QString &file, int line)
void active_tab_changed(int index)
void fetab_scintilla_command(const QWidget *ID, unsigned int sci_msg)
QAction * m_find_next_action
QAction * m_conv_eol_unix_action
void edit_status_update(bool, bool)
void update_octave_directory(const QString &dir)
void dropEvent(QDropEvent *event)
void fetab_do_breakpoint_marker(bool insert, const QWidget *ID, int line=-1, const QString &="")
QAction * m_show_longline_action
void show_long_line(bool)
QAction * m_next_bookmark_action
void request_previous_breakpoint(bool)
QAction * add_action(QMenu *menu, const QString &text, const char *member, QWidget *receiver=nullptr)
void request_toggle_breakpoint(bool)
QAction * m_comment_selection_action
QAction * m_popdown_mru_action
void request_delete_end_word(bool)
QAction * m_previous_bookmark_action
void request_conv_eol_windows(bool)
QAction * m_move_tab_right_action
void request_dbcont_signal(void)
void fetab_move_match_brace(const QWidget *ID, bool select)
void request_settings_dialog(const QString &)
void request_conv_eol_mac(bool)
void request_cut_line(bool)
void fetab_smart_indent_line_or_selected_text(const QWidget *ID)
void handle_tab_ready_to_close(void)
void request_save_file(bool)
void request_comment_selected_text(bool)
void fetab_toggle_bookmark(const QWidget *ID)
QAction * m_mru_file_actions[MaxMRUFiles]
void fetab_insert_debugger_pointer(const QWidget *ID, int line=-1)
void create_context_menu(QMenu *)
void add_file_editor_tab(file_editor_tab *f, const QString &fn, int index=-1)
void dragEnterEvent(QDragEnterEvent *event)
void fetab_save_file(const QWidget *ID, const QString &fileName, bool remove_on_success)
QAction * m_switch_left_tab_action
void request_delete_start_word(bool)
void request_run_file(bool)
QStringList m_mru_files_encodings
void request_close_all_files(bool)
void show_indent_guides(bool)
void request_context_doc(bool)
QAction * m_delete_start_line_action
void handle_mru_add_file(const QString &file_name, const QString &encoding)
void fetab_uncomment_selected_text(const QWidget *ID)
void request_comment_var_selected_text(bool)
void fetab_goto_line(const QWidget *ID, int line=-1)
QAction * m_goto_line_action
void request_completion(bool)
void handle_dir_remove(const QString &old_name, const QString &new_name)
void request_delete_line(bool)
void show_statusbar(bool)
void request_toggle_bookmark(bool)
QAction * m_save_as_action
void file_loaded_signal(void)
void check_conflict_save(const QString &fileName, bool remove_on_success)
void fetab_zoom_normal(const QWidget *ID)
void fetab_settings_changed(const gui_settings *settings)
bool m_undo_action_enabled
void mru_menu_update(void)
void restore_session(gui_settings *settings)
void handle_autoc_cancelled(void)
QAction * m_show_whitespace_action
void handle_edit_file_request(const QString &file)
QAction * m_show_hscrollbar_action
file_editor_tab * make_file_editor_tab(const QString &directory="")
void request_context_edit(bool)
QAction * m_show_toolbar_action
QAction * m_context_help_action
void fetab_save_file_as(const QWidget *ID)
void focusInEvent(QFocusEvent *e)
void notice_settings(const gui_settings *settings)
void fetab_print_file(const QWidget *ID)
void pasteClipboard(void)
void request_duplicate_selection(bool)
QAction * m_close_all_action
void show_white_space(bool)
void fetab_convert_eol(const QWidget *ID, QsciScintilla::EolMode eol_mode)
QAction * m_zoom_in_action
void request_sel_match_brace(bool)
QAction * m_zoom_out_action
void handle_visibility(bool visible)
void request_smart_indent_line_or_selected_text(void)
QAction * m_zoom_normal_action
void fetab_next_breakpoint(const QWidget *ID)
void request_transpose_line(bool)
QAction * m_find_previous_action
void fetab_run_file(const QWidget *ID, bool step_into=false)
QAction * m_toggle_breakpoint_action
QAction * m_toggle_bookmark_action
void request_context_help(bool)
void request_copy_line(bool)
void editor_tabs_changed_signal(bool)
void request_remove_bookmark(bool)
file_editor_tab * reset_focus(void)
void show_line_numbers(bool)
QAction * m_delete_line_action
void request_preferences(bool)
QAction * m_show_eol_action
QAction * m_show_linenum_action
void fetab_completion(const QWidget *)
void fetab_change_request(const QWidget *ID)
void fetab_recover_from_exit(void)
QHash< QMenu *, QStringList > m_hash_menu_text
void fetab_remove_all_breakpoints(const QWidget *ID)
void fetab_comment_selected_text(const QWidget *ID, bool)
QAction * m_sort_tabs_action
void request_indent_selected_text(bool)
void fetab_set_focus(const QWidget *ID)
void handle_file_name_changed(const QString &fileName, const QString &toolTip, bool modified)
QAction * m_comment_var_selection_action
void request_print_file(bool)
file_editor_tab * find_tab_widget(const QString &openFileName)
QAction * m_styles_preferences_action
void request_previous_bookmark(bool)
void request_uncomment_selected_text(bool)
void handle_tab_remove_request(void)
void handle_enter_debug_mode(void)
QMenu * m_view_editor_menu
void fetab_toggle_breakpoint(const QWidget *ID)
void toplevel_change(bool toplevel)
void fetab_indent_selected_text(const QWidget *ID)
void request_goto_line(bool)
tree_evaluator & get_evaluator(void)
Represents the main window.
gui_settings * get_settings(void) const
QIcon icon(const QString &icon_name, bool fallback=true)
void set_shortcut(QAction *action, const sc_pref &scpref)
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
QMenu * get_context_menu(void)
bool in_debug_repl(void) const
const gui_pref ed_show_hscroll_bar("editor/show_hscroll_bar", QVariant(true))
const gui_pref ed_show_toolbar("editor/show_toolbar", QVariant(true))
const gui_pref ed_long_window_title("editor/longWindowTitle", QVariant(false))
const gui_pref ed_show_white_space("editor/show_white_space", QVariant(false))
const gui_pref ed_create_new_file("editor/create_new_file", QVariant(false))
const gui_pref ed_mru_file_encodings("editor/mru_file_encodings", QVariant())
const gui_pref ed_session_names("editor/savedSessionTabs", QVariant(QStringList()))
const gui_pref ed_notebook_tab_width_min("editor/notebook_tab_width_min", QVariant(160))
const gui_pref ed_long_line_marker("editor/long_line_marker", QVariant(true))
const gui_pref ed_tab_position("editor/tab_position", QVariant(QTabWidget::North))
const gui_pref ed_show_edit_status_bar("editor/show_edit_status_bar", QVariant(true))
const gui_pref ed_restore_session("editor/restoreSession", QVariant(true))
const gui_pref ed_mru_file_list("editor/mru_file_list", QVariant())
const gui_pref ed_show_dbg_file("editor/show_dbg_file", QVariant(true))
const gui_pref ed_session_ind("editor/saved_session_tab_index", QVariant(QStringList()))
const gui_pref ed_show_line_numbers("editor/showLineNumbers", QVariant(true))
const gui_pref ed_notebook_tab_width_max("editor/notebook_tab_width_max", QVariant(300))
const gui_pref ed_show_eol_chars("editor/show_eol_chars", QVariant(false))
const gui_pref ed_session_lines("editor/saved_session_lines", QVariant(QStringList()))
const gui_pref ed_show_indent_guides("editor/show_indent_guides", QVariant(false))
const gui_pref ed_hiding_closes_files("editor/hiding_closes_files", QVariant(false))
const gui_pref ed_session_enc("editor/saved_session_encodings", QVariant(QStringList()))
const QStyle::PixelMetric global_icon_sizes[3]
const gui_pref global_use_custom_editor("useCustomFileEditor", QVariant(false))
const gui_pref global_icon_size("toolbar_icon_size", QVariant(0))
const sc_pref sc_edit_view_show_long_line(sc_edit_view+":show_long_line", QKeySequence::UnknownKey)
const sc_pref sc_edit_file_close(sc_edit_file_cl, QKeySequence::Close)
const sc_pref sc_edit_edit_completion_list(sc_edit_edit+":completion_list", CTRL+Qt::Key_Space)
const sc_pref sc_edit_debug_next_breakpoint(sc_edit_debug+":next_breakpoint", QKeySequence::UnknownKey)
const sc_pref sc_edit_debug_previous_breakpoint(sc_edit_debug+":previous_breakpoint", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_delete_line(sc_edit_edit+":delete_line", CTRL_SHIFT+Qt::Key_L)
const sc_pref sc_edit_edit_move_to_brace(sc_edit_edit+":move_to_brace", CTRL+Qt::Key_M)
const sc_pref sc_edit_edit_toggle_bookmark(sc_edit_edit+":toggle_bookmark", PRE+Qt::Key_F7)
const sc_pref sc_edit_edit_delete_start_line(sc_edit_edit+":delete_start_line", CTRL_SHIFT+Qt::Key_Backspace)
const sc_pref sc_edit_edit_uncomment_selection(sc_edit_edit+":uncomment_selection", CTRL_SHIFT+Qt::Key_R)
const sc_pref sc_edit_edit_cut_line(sc_edit_edit+":cut_line", CTRL_SHIFT+Qt::Key_X)
const sc_pref sc_edit_view_show_hscrollbar(sc_edit_view+":show_hscrollbar", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_remove_bookmark(sc_edit_edit+":remove_bookmark", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_upper_case(sc_edit_edit+":upper_case", CTRL+Qt::Key_U)
const sc_pref sc_edit_file_save(sc_edit_file+":save", QKeySequence::Save)
const sc_pref sc_edit_edit_styles_preferences(sc_edit_edit+":styles_preferences", QKeySequence::UnknownKey)
const sc_pref sc_edit_file_print(sc_edit_file+":print", QKeySequence::Print)
const sc_pref sc_edit_edit_goto_line(sc_edit_edit+":goto_line", CTRL+Qt::Key_L)
const sc_pref sc_edit_edit_smart_indent_line_or_selection(sc_edit_edit+":smart_indent_line_or_selection", QKeySequence::UnknownKey)
const sc_pref sc_main_debug_continue(sc_main_debug+":continue", PRE+Qt::Key_F5)
const sc_pref sc_edit_view_show_statusbar(sc_edit_view+":show_statusbar", QKeySequence::UnknownKey)
const sc_pref sc_edit_view_show_eol_chars(sc_edit_view+":show_eol_chars", QKeySequence::UnknownKey)
const sc_pref sc_edit_file_edit_function(sc_edit_file+":edit_function", CTRL+Qt::Key_E)
const sc_pref sc_edit_edit_comment_selection(sc_edit_edit+":comment_selection", CTRL+Qt::Key_R)
const sc_pref sc_edit_edit_comment_var_selection(sc_edit_edit+":comment_var_selection", CTRL_ALT+Qt::Key_R)
const sc_pref sc_edit_run_run_file(sc_edit_run+":run_file", PRE+Qt::Key_F5)
const sc_pref sc_edit_file_save_as(sc_edit_file+":save_as", QKeySequence::SaveAs)
const sc_pref sc_edit_view_zoom_normal(sc_edit_view_zoom+"_normal", CTRL+Qt::Key_Period)
const sc_pref sc_edit_edit_find_replace(sc_edit_edit_find+"_replace", QKeySequence::Find)
const sc_pref sc_edit_view_show_ind_guides(sc_edit_view+":show_ind_guides", QKeySequence::UnknownKey)
const sc_pref sc_edit_file_close_other(sc_edit_file_cl+"_other", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_copy_line(sc_edit_edit+":copy_line", CTRL_SHIFT+Qt::Key_C)
const sc_pref sc_edit_edit_transpose_line(sc_edit_edit+":transpose_line", CTRL+Qt::Key_T)
const sc_pref sc_edit_edit_find_next(sc_edit_edit_find+"_next", QKeySequence::FindNext)
const sc_pref sc_edit_help_help_keyword(sc_edit_help+":help_keyword", QKeySequence::HelpContents)
const sc_pref sc_edit_edit_duplicate_selection(sc_edit_edit+":duplicate_selection", CTRL+Qt::Key_D)
const sc_pref sc_edit_view_show_toolbar(sc_edit_view+":show_toolbar", QKeySequence::UnknownKey)
const sc_pref sc_edit_help_doc_keyword(sc_edit_help+":doc_keyword", Qt::SHIFT+Qt::Key_F1)
const sc_pref sc_edit_edit_delete_end_line(sc_edit_edit+":delete_end_line", CTRL_SHIFT+Qt::Key_Delete)
const sc_pref sc_edit_tabs_move_tab_right(sc_edit_tabs+":move_tab_right", Qt::AltModifier+Qt::Key_PageDown)
const sc_pref sc_edit_edit_cut(sc_edit_edit+":cut", QKeySequence::Cut)
const sc_pref sc_edit_debug_remove_breakpoints(sc_edit_debug+":remove_breakpoints", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_unindent_selection(sc_edit_edit+":unindent_selection", CTRL_SHIFT+Qt::Key_Tab)
const sc_pref sc_edit_edit_next_bookmark(sc_edit_edit+":next_bookmark", PRE+Qt::Key_F2)
const sc_pref sc_edit_run_run_selection(sc_edit_run+":run_selection", PRE+Qt::Key_F9)
const sc_pref sc_edit_edit_find_previous(sc_edit_edit_find+"_previous", QKeySequence::FindPrevious)
const sc_pref sc_edit_view_show_white_spaces(sc_edit_view+":show_white_spaces", QKeySequence::UnknownKey)
const sc_pref sc_edit_file_close_all(sc_edit_file_cl+"_all", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_select_to_brace(sc_edit_edit+":select_to_brace", CTRL_SHIFT+Qt::Key_M)
const sc_pref sc_edit_debug_toggle_breakpoint(sc_edit_debug+":toggle_breakpoint", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_lower_case(sc_edit_edit+":lower_case", CTRL_ALT+Qt::Key_U)
const sc_pref sc_edit_edit_indent_selection(sc_edit_edit+":indent_selection", CTRL+Qt::Key_Tab)
const sc_pref sc_edit_view_zoom_in(sc_edit_view_zoom+"_in", QKeySequence::ZoomIn)
const sc_pref sc_edit_tabs_move_tab_left(sc_edit_tabs+":move_tab_left", Qt::AltModifier+Qt::Key_PageUp)
const sc_pref sc_edit_edit_delete_end_word(sc_edit_edit+":delete_end_word", QKeySequence::DeleteEndOfWord)
const sc_pref sc_edit_edit_preferences(sc_edit_edit+":preferences", QKeySequence::UnknownKey)
const sc_pref sc_edit_tabs_switch_right_tab(sc_edit_tabs+":switch_right_tab", CTRL+Qt::Key_PageDown)
const sc_pref sc_edit_edit_redo(sc_edit_edit+":redo", QKeySequence::Redo)
const sc_pref sc_edit_edit_conv_eol_unix(sc_edit_edit+":conv_eol_unix", QKeySequence::UnknownKey)
const sc_pref sc_edit_view_sort_tabs(sc_edit_view+":sort_tabs", QKeySequence::UnknownKey)
const sc_pref sc_edit_tabs_switch_left_tab(sc_edit_tabs+":switch_left_tab", CTRL+Qt::Key_PageUp)
const sc_pref sc_edit_view_show_line_numbers(sc_edit_view+":show_line_numbers", QKeySequence::UnknownKey)
const sc_pref sc_edit_view_zoom_out(sc_edit_view_zoom+"_out", QKeySequence::ZoomOut)
const sc_pref sc_edit_edit_conv_eol_mac(sc_edit_edit+":conv_eol_mac", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_conv_eol_winows(sc_edit_edit+":conv_eol_winows", QKeySequence::UnknownKey)
const sc_pref sc_edit_edit_previous_bookmark(sc_edit_edit+":previous_bookmark", PRE+Qt::SHIFT+Qt::Key_F2)
const sc_pref sc_edit_edit_delete_start_word(sc_edit_edit+":delete_start_word", QKeySequence::DeleteStartOfWord)
F77_RET_T const F77_DBLE * x
std::complex< double > w(std::complex< double > z, double relerr=0)
QString fromStdString(const std::string &s)
std::function< void(octave::interpreter &)> meth_callback
static double f(double k, double l_nu, double c_pm)
std::function< void(void)> fcn_callback
bool same_file(const std::string &f, const std::string &g)
octave_value::octave_value(const Array< char > &chm, char type) return retval