26 #if defined (HAVE_CONFIG_H)
30 #if defined (HAVE_QSCINTILLA)
34 #include <QApplication>
37 #include <QFileDialog>
39 #include <QMessageBox>
42 #include <QPushButton>
45 #include <QTextStream>
46 #include <QVBoxLayout>
47 #include <Qsci/qscicommandset.h>
78 this->setTabBar (bar);
80 setTabsClosable (
true);
81 setUsesScrollButtons (
true);
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++)
106 m_ced = QDir::currentPath ();
128 setAcceptDrops (
true);
129 setFocusPolicy (Qt::StrongFocus);
141 QDockWidget::focusInEvent (e);
149 QAction *open_action = shared_actions.at (
OPEN_ACTION);
153 m_fileMenu->insertAction (open_action, new_fcn_action);
154 m_fileMenu->insertAction (new_fcn_action, new_action);
156 m_tool_bar->insertAction (open_action, new_action);
188 if (sc_run == sc_cont)
276 real_visible = isVisible ();
278 real_visible = visible;
283 if (startup && ! isFloating ())
286 QWidget *parent = parentWidget ();
294 while ((i < tab_list.count ()) && (! in_tab))
296 QTabBar *tab = tab_list.at (i);
300 while ((j < tab->count ()) && (! in_tab))
303 if (tab->tabText (j) == windowTitle ())
307 int top = tab->currentIndex ();
308 if (! (top > -1 && tab->tabText (top) == windowTitle ()))
327 QStringList sessionFileNames
330 QStringList session_encodings
333 QStringList session_index
336 QStringList session_lines
339 QStringList session_bookmarks
345 bool do_encoding = (session_encodings.count () == sessionFileNames.count ());
346 bool do_index = (session_index.count () == sessionFileNames.count ());
347 bool do_lines = (session_lines.count () == sessionFileNames.count ());
348 bool do_bookmarks = (session_bookmarks.count () == sessionFileNames.count ());
350 for (
int n = 0;
n < sessionFileNames.count (); ++
n)
352 QFileInfo file = QFileInfo (sessionFileNames.at (
n));
353 if (! file.exists ())
357 QString (), QString (), QString ()};
359 item.
line = session_lines.at (
n).toInt ();
361 item.
index = session_index.at (
n).toInt ();
363 item.
encoding = session_encodings.at (
n);
370 std::sort (s_data.begin (), s_data.end ());
373 for (
int n = 0;
n < s_data.count (); ++
n)
375 s_data.at (
n).line,
false,
false,
true,
"", -1,
376 s_data.at (
n).bookmarks);
410 QHash<QMenu *, QStringList>::const_iterator i =
m_hash_menu_text.constBegin ();
414 i.key ()->setTitle (i.value ().at (! enable));
445 QStringList fetFileNames;
446 QStringList fet_encodings;
447 QStringList fet_index;
448 QStringList fet_lines;
449 QStringList fet_bookmarks;
453 for (
auto editor_tab : editor_tab_lst)
455 QString file_name = editor_tab->file_name ();
459 if (! file_name.isEmpty ())
461 fetFileNames.append (file_name);
462 fet_encodings.append (editor_tab->encoding ());
465 fet_index.append (index.setNum (
m_tab_widget->indexOf (editor_tab)));
468 editor_tab->qsci_edit_area ()->getCursorPosition (&l, &c);
469 fet_lines.append (index.setNum (l + 1));
471 fet_bookmarks.append (editor_tab->get_all_bookmarks ());
499 for (
auto fe_tab : fe_tab_lst)
505 Qt::UniqueConnection);
510 for (
auto fe_tab : fe_tab_lst)
517 if (fe_tab->check_file_modified (
false) == QMessageBox::Cancel)
523 for (
auto fet : fe_tab_lst)
557 bool vis = isVisible ();
560 for (
auto editor_tab : editor_tab_lst)
561 editor_tab->deleteLater ();
597 for (
int index =
m_tab_widget->count ()-1; index >= 0; index--)
610 for (
int index =
m_tab_widget->count ()-1; index >= 0; index--)
627 QGuiApplication::clipboard ()->setText (editor_tab->
file_name ());
636 action->data ().toStringList ().at (1));
648 QsciScintillaBase::SCI_REDO);
654 QsciScintillaBase::SCI_CUT);
688 QPointer<file_editor> this_fe (
this);
700 if (this_fe.isNull ())
710 if (tw.in_debug_repl ())
782 QsciScintillaBase::SCI_DELWORDLEFT);
788 QsciScintillaBase::SCI_DELWORDRIGHT);
794 QsciScintillaBase::SCI_DELLINELEFT);
800 QsciScintillaBase::SCI_DELLINERIGHT);
806 QsciScintillaBase::SCI_LINEDELETE);
812 QsciScintillaBase::SCI_LINECOPY);
818 QsciScintillaBase::SCI_LINECUT);
824 QsciScintillaBase::SCI_SELECTIONDUPLICATE);
830 QsciScintillaBase::SCI_LINETRANSPOSE);
852 QsciScintillaBase::SCI_UPPERCASE);
858 QsciScintillaBase::SCI_LOWERCASE);
879 QsciScintilla::EolWindows);
885 QsciScintilla::EolUnix);
891 QsciScintilla::EolMac);
934 int xp =
x () + frameGeometry ().width ();
935 int yp = y () + frameGeometry ().height ();
941 QWidget *parent = parentWidget ();
945 xp = xp + parent->x ();
946 yp = yp + parent->y ();
987 QObject *fileEditorTab = sender ();
1021 QObject *fileEditorTab = sender ();
1032 fileEditorTab->deleteLater ();
1051 bool is_octave_file,
1078 const QString& encoding)
1081 while ((index =
m_mru_files.indexOf (file_name)) >= 0)
1094 bool remove_on_success)
1110 =
new QMessageBox (QMessageBox::Critical, tr (
"Octave Editor"),
1111 tr (
"File not saved! A file with the selected name\n%1\n"
1112 "is already open in the editor").
1114 QMessageBox::Ok,
nullptr);
1116 msgBox->setWindowModality (Qt::NonModal);
1117 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1123 QObject *saveFileObject = sender ();
1124 QWidget *saveFileWidget =
nullptr;
1134 if (! saveFileWidget)
1138 =
new QMessageBox (QMessageBox::Critical, tr (
"Octave Editor"),
1139 tr (
"The associated file editor tab has disappeared."),
1140 QMessageBox::Ok,
nullptr);
1142 msgBox->setWindowModality (Qt::NonModal);
1143 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1150 emit
fetab_save_file (saveFileWidget, saveFileName, remove_on_success);
1162 if (! file.isEmpty ())
1180 const QString& file,
1182 const QString& cond)
1195 const QString& new_name)
1202 QString old_name_clean = old_name.trimmed ();
1203 int s = old_name_clean.size ();
1205 if (s > 1 && old_name_clean.at (0) == QChar (
'\"')
1206 && old_name_clean.at (s - 1) == QChar (
'\"'))
1207 old_name_clean = old_name_clean.mid (1, s - 2);
1209 QStringList old_names = old_name_clean.split (
"\" \"");
1212 QFileInfo newf (new_name);
1213 bool new_is_dir = newf.isDir ();
1216 for (
int i = 0; i < old_names.count (); i++)
1219 QFileInfo old (old_names.at (i));
1241 std::string ndir = new_name.toStdString ();
1242 std::string ofile = old.fileName ().toStdString ();
1292 size_idx = (size_idx > 0) - (size_idx < 0) + 1;
1294 QStyle *st = style ();
1296 m_tool_bar->setIconSize (QSize (icon_size, icon_size));
1299 QTabWidget::TabPosition pos
1310 int rotation = rotated;
1311 if (pos == QTabWidget::West)
1312 rotation = -rotation;
1318 int height = 1.5*QFontMetrics (
m_tab_widget->font ()).height ();
1327 width = chars * QFontMetrics (
m_tab_widget->font ()).averageCharWidth ();
1330 QString width_str (
"width");
1331 QString height_str (
"height");
1332 if ((pos == QTabWidget::West) || (pos == QTabWidget::East))
1334 width_str = QString (
"height");
1335 height_str = QString (
"width");
1339 = QString (
"QTabBar::tab {max-" + height_str +
": %1px;\n"
1340 "max-" + width_str +
": %2px; }")
1341 .arg (height).arg (width);
1343 #if defined (Q_OS_MAC)
1350 QString close_button_css_mac (
1351 "QTabBar::close-button"
1352 " { image: url(" + icon +
");"
1354 " subcontrol-position: bottom; }\n"
1355 "QTabBar::close-button:hover"
1356 " { background-color: #cccccc; }");
1358 style_sheet = style_sheet + close_button_css_mac;
1532 QsciScintillaBase::SCI_COPY);
1539 QsciScintillaBase::SCI_PASTE);
1546 QsciScintillaBase::SCI_SELECTALL);
1553 QsciScintillaBase::SCI_UNDO);
1559 const QString& encoding,
1560 int line,
bool debug_pointer,
1561 bool breakpoint_marker,
bool insert,
1562 const QString& cond,
int index,
1563 const QString& bookmarks)
1571 if (debug_pointer || breakpoint_marker)
1581 if (openFileName.isEmpty ())
1604 if (breakpoint_marker)
1608 if (show_dbg_file && ! ((breakpoint_marker || debug_pointer)
1617 if (! show_dbg_file && (breakpoint_marker || debug_pointer))
1620 if (breakpoint_marker && ! insert)
1625 bool reusing =
false;
1629 fileEditorTab = tab;
1631 fileEditorTab =
nullptr;
1637 if (! fileEditorTab)
1641 QString result = fileEditorTab->
load_file (openFileName);
1650 QFileInfo
file_info = QFileInfo (openFileName);
1662 if (breakpoint_marker)
1671 delete fileEditorTab;
1672 fileEditorTab =
nullptr;
1675 if (QFile::exists (openFileName))
1681 tr (
"Octave Editor"),
1682 tr (
"Could not open file\n%1\nfor read: %2.").
1683 arg (openFileName).arg (result),
1684 QMessageBox::Ok,
this);
1686 msgBox->setWindowModality (Qt::NonModal);
1687 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1693 bool create_file =
true;
1699 tr (
"Octave Editor"),
1700 tr (
"File\n%1\ndoes not exist. "
1701 "Do you want to create it?").arg (openFileName),
1702 QMessageBox::NoButton,
nullptr);
1704 msgBox->addButton (tr (
"Create"), QMessageBox::YesRole);
1705 msgBox->addButton (tr (
"Cancel"), QMessageBox::RejectRole);
1706 msgBox->setDefaultButton (create_button);
1709 QAbstractButton *clicked_button = msgBox->clickedButton ();
1710 if (clicked_button != create_button)
1711 create_file =
false;
1719 QFile file (openFileName);
1720 if (! file.open (QIODevice::WriteOnly))
1724 tr (
"Octave Editor"),
1725 tr (
"Could not open file\n%1\nfor write: %2.").
1726 arg (openFileName).arg (file.errorString ()),
1727 QMessageBox::Ok,
this);
1729 msgBox->setWindowModality (Qt::NonModal);
1730 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1742 if (! bookmarks.isEmpty ())
1745 for (
const auto& bms : bookmarks.split (
','))
1747 int bm = bms.toInt ();
1836 for (
auto *a : all_actions)
1837 menu->removeAction (a);
1843 menu->addSeparator ();
1845 menu->addSeparator ();
1850 menu->addSeparator ();
1854 menu->addSeparator ();
1894 if (e->mimeData ()->hasUrls ())
1896 e->acceptProposedAction ();
1902 if (e->mimeData ()->hasUrls ())
1904 for (
const auto& url : e->mimeData ()->urls ())
1920 static_cast<QDockWidget *
> (
w->get_dock_widget_list ().at (0));
1922 for (
int i = 0; i < w_list.count (); i++)
1988 tr (
"&Edit Function"),
1999 tr (
"Save File &As..."),
2014 tr (
"Close Other Files"),
2041 tr (
"&Find and Replace..."), SLOT (
request_find (
bool)));
2143 tr (
"Convert Line Endings to &Windows (CRLF)"),
2152 tr (
"Convert Line Endings to Legacy &Mac (CR)"),
2193 tr (
"&Preferences..."),
2198 tr (
"&Styles Preferences..."),
2249 view_menu->addSeparator ();
2252 =
add_action (view_menu, rmgr.
icon (
"view-zoom-in"), tr (
"Zoom &In"),
2256 =
add_action (view_menu, rmgr.
icon (
"view-zoom-out"), tr (
"Zoom &Out"),
2260 =
add_action (view_menu, rmgr.
icon (
"view-zoom-original"), tr (
"&Normal Size"),
2263 view_menu->addSeparator ();
2266 =
add_action (view_menu, tr (
"&Sort Tabs Alphabetically"),
2267 SLOT (sort_tabs_alph (
void)),
2278 tr (
"Toggle &Breakpoint"),
2283 tr (
"&Next Breakpoint"),
2288 tr (
"Pre&vious Breakpoint"),
2293 tr (
"&Remove All Breakpoints"),
2306 rmgr.
icon (
"system-run"),
2307 tr (
"Save File and Run / Continue"),
2312 tr (
"Run &Selection"),
2322 tr (
"&Help on Keyword"),
2327 tr (
"&Documentation on Keyword"),
2333 =
add_action (
nullptr,
"", SLOT (switch_left_tab (
void)),
2337 =
add_action (
nullptr,
"", SLOT (switch_right_tab (
void)),
2341 =
add_action (
nullptr,
"", SLOT (move_tab_left (
void)),
2345 =
add_action (
nullptr,
"", SLOT (move_tab_right (
void)),
2352 popdown_button->setToolTip (tr (
"Recent Files"));
2354 popdown_button->setPopupMode (QToolButton::InstantPopup);
2355 popdown_button->setArrowType (Qt::DownArrow);
2356 popdown_button->setToolButtonStyle (Qt::ToolButtonTextOnly);
2382 QVBoxLayout *vbox_layout =
new QVBoxLayout ();
2386 vbox_layout->setMargin (0);
2387 vbox_layout->setSpacing (0);
2388 editor_widget->setLayout (vbox_layout);
2389 setWidget (editor_widget);
2395 ctx_men->addSeparator ();
2399 ctx_men->addSeparator ();
2401 add_action (ctx_men, tr (
"Copy Full File &Path"),
2410 connect (
m_tab_widget, &file_editor_tab_widget::tabCloseRequested,
2413 connect (
m_tab_widget, &file_editor_tab_widget::currentChanged,
2436 qsci->getCursorPosition (&line, &col);
2437 int l1 = qsci->lineLength (line);
2440 qsci->SendScintilla (QsciScintillaBase::SCI_AUTOCCOMPLETE);
2443 if (qsci->text (line).length () - l1)
2468 connect (
f->qsci_edit_area (),
2469 SIGNAL (SCN_AUTOCCOMPLETED (
const char *,
int,
int,
int)),
2472 connect (
f->qsci_edit_area (), SIGNAL (SCN_AUTOCCANCELLED (
void)),
2502 this, [=] (
const QString& fname,
const QString& encoding) {
request_open_file (fname, encoding); });
2671 for (
int i = 0; i < num_files; ++i)
2673 QString text = QString (
"&%1 %2").
2677 QStringList action_data;
2716 if (line < 0 && ! file_name.isEmpty ())
2731 bool old =
settings->value (preference).toBool ();
2738 const QString& new_name)
2740 QDir old_dir (old_name);
2745 for (
auto editor_tab : editor_tab_lst)
2747 QString file_name = editor_tab->file_name ();
2749 if (file_name.isEmpty ())
2753 QString rel_path_to_file = old_dir.relativeFilePath (file_name);
2754 QString abs_path_to_file = old_dir.absoluteFilePath (file_name);
2764 if ((rel_path_to_file != abs_path_to_file)
2765 && (rel_path_to_file.left (3) != QString (
"../")))
2771 editor_tab->enable_file_watcher (
false);
2776 if (! new_name.isEmpty ())
2778 QDir new_dir (new_name);
2779 QString append_to_new_dir;
2780 if (new_dir.exists ())
2787 = old_dir.dirName () +
"/" + rel_path_to_file;
2790 append_to_new_dir = rel_path_to_file;
2793 = new_dir.absoluteFilePath (append_to_new_dir);
2808 if (foc_w && foc_w->inherits (
"octave::octave_qscintilla"))
2816 std::string std_file = file.toStdString ();
2820 for (
auto fe_tab : fe_tab_lst)
2822 QString tab_file = fe_tab->file_name ();
2830 if (
same_file (std_file, tab_file.toStdString ()) || file == tab_file)
2841 return add_action (menu, QIcon (), text, member, receiver);
2845 const QString& text,
const char *member,
2851 if (receiver !=
nullptr)
2855 a = menu->addAction (icon, text,
r, member);
2858 a =
new QAction (
this);
2859 connect (a, SIGNAL (triggered ()),
r, member);
2863 a->setShortcutContext (Qt::WidgetWithChildrenShortcut);
2870 QMenu *menu = p->addMenu (name);
2872 QString base_name = name;
2874 base_name.replace (
"&&",
"___octave_amp_replacement___");
2876 base_name.remove (
"&");
2878 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 interpreter_event(const fcn_callback &fcn)
void next_breakpoint(const QWidget *ID)
void smart_indent_line_or_selected_text(const QWidget *ID)
void run_file_signal(const QFileInfo &info)
void move_match_brace(const QWidget *ID, bool select)
void previous_breakpoint(const QWidget *ID)
void save_file_as(const QWidget *ID)
void set_focus(const QWidget *ID)
void set_focus_editor_signal(QWidget *)
void run_file(const QWidget *ID, bool step_into=false)
void update_breakpoints()
void unindent_selected_text(const QWidget *ID)
void comment_selected_text(const QWidget *ID, bool input_str)
void do_breakpoint_marker(bool insert, const QWidget *ID, int line=-1, const QString &cond="")
QString load_file(const QString &fileName)
void indent_selected_text(const QWidget *ID)
void context_run(const QWidget *ID)
void next_bookmark(const QWidget *ID)
void debug_quit_signal(void)
void convert_eol(const QWidget *ID, QsciScintilla::EolMode)
void interpreter_event(const fcn_callback &fcn)
void recover_from_exit(void)
void new_file(const QString &commands=QString())
void tab_remove_request(void)
void previous_bookmark(const QWidget *ID)
void remove_bookmark(const QWidget *ID)
void enable_file_watcher(bool do_enable)
void editor_check_conflict_save(const QString &saveFileName, bool remove_on_success)
bool conditional_close(void)
void mru_add_file(const QString &file_name, const QString &encoding)
void remove_all_breakpoints(const QWidget *ID)
void save_file(const QWidget *ID)
void context_help(const QWidget *ID, bool)
void delete_debugger_pointer(const QWidget *ID, int line=-1)
void update_lexer_settings(bool update_apis_only=false)
void editor_state_changed(bool copy_available, bool is_octave_file, bool is_modified)
void set_current_directory(const QString &dir)
void set_encoding(const QString &new_encoding)
void zoom_in(const QWidget *ID)
void scintilla_command(const QWidget *, unsigned int)
void toggle_bookmark(const QWidget *ID)
void change_editor_state(const QWidget *ID)
void edit_mfile_request(const QString &, const QString &, const QString &, int)
QString file_name(void) const
void show_auto_completion(const QWidget *ID)
octave_qscintilla * qsci_edit_area(void)
void insert_debugger_pointer(const QWidget *ID, int line=-1)
void request_open_file(const QString &, const QString &=QString())
void zoom_normal(const QWidget *ID)
void tab_ready_to_close(void)
void uncomment_selected_text(const QWidget *ID)
void print_file(const QWidget *ID)
void file_name_changed(const QString &fileName, const QString &toolTip, bool modified)
void context_edit(const QWidget *ID)
void goto_line(const QWidget *ID, int line=-1)
void toggle_breakpoint(const QWidget *ID)
void update_window_title(bool modified)
void edit_area_changed(octave_qscintilla *edit_area)
void zoom_out(const QWidget *ID)
QAction * m_find_next_action
void request_new_file(const QString &commands)
void toplevel_change(bool toplevel)
void handle_insert_debugger_pointer_request(const QString &file, int line)
void handle_exit_debug_mode(void)
void request_remove_breakpoint(bool)
void fetab_smart_indent_line_or_selected_text(const QWidget *ID)
void request_preferences(bool)
void fetab_zoom_out(const QWidget *ID)
QAction * m_zoom_out_action
void request_copy_line(bool)
void fetab_toggle_breakpoint(const QWidget *ID)
QAction * m_close_others_action
QAction * m_zoom_normal_action
bool m_copy_action_enabled
void request_open_file_external(const QString &file_name, int line)
QAction * m_conv_eol_mac_action
QAction * m_context_help_action
void fetab_remove_bookmark(const QWidget *ID)
void request_conv_eol_windows(bool)
QAction * m_show_statusbar_action
void fetab_recover_from_exit(void)
QAction * m_unindent_selection_action
void request_comment_selected_text(bool)
QAction * m_conv_eol_unix_action
QAction * m_transpose_line_action
void handle_tab_close_request(int index)
void fetab_context_edit(const QWidget *ID)
void request_smart_indent_line_or_selected_text(void)
QAction * m_comment_selection_action
void request_close_other_files(bool)
void request_delete_end_word(bool)
void enable_menu_shortcuts(bool)
QAction * m_previous_breakpoint_action
void request_find_next(bool)
bool call_custom_editor(const QString &file_name=QString(), int line=-1)
void request_delete_line(bool)
void handle_tab_remove_request(void)
QAction * m_popdown_mru_action
void empty_script(bool startup, bool visible)
QAction * m_find_previous_action
void request_close_file(bool)
QAction * m_close_all_action
QAction * m_preferences_action
void show_line_numbers(bool)
void fetab_next_bookmark(const QWidget *ID)
QMenu * m_view_editor_menu
void fetab_comment_selected_text(const QWidget *ID, bool)
void request_context_help(bool)
void request_toggle_breakpoint(bool)
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, const QString &bookmarks=QString())
QAction * m_move_tab_right_action
void request_move_match_brace(bool)
file_editor(QWidget *p, base_qobject &oct_qobj)
QMenu * add_menu(QMenuBar *p, QString text)
void fetab_zoom_normal(const QWidget *ID)
void fetab_context_help(const QWidget *ID, bool)
void check_conflict_save(const QString &fileName, bool remove_on_success)
bool editor_tab_has_focus(void)
QAction * m_find_files_action
void show_long_line(bool)
QAction * m_show_whitespace_action
void handle_file_name_changed(const QString &fileName, const QString &toolTip, bool modified)
void request_delete_start_line(bool)
void request_upper_case(bool)
void handle_mru_add_file(const QString &file_name, const QString &encoding)
QAction * m_completion_action
QAction * add_action(QMenu *menu, const QString &text, const char *member, QWidget *receiver=nullptr)
void request_context_run(bool)
void fetab_zoom_in(const QWidget *ID)
QAction * m_conv_eol_windows_action
void request_conv_eol_mac(bool)
void insert_global_actions(QList< QAction * >)
void show_white_space(bool)
QAction * m_goto_line_action
QAction * m_toggle_bookmark_action
QAction * m_show_eol_action
void request_close_all_files(bool)
void add_file_editor_tab(file_editor_tab *f, const QString &fn, int index=-1)
void edit_status_update(bool, bool)
void closeEvent(QCloseEvent *event)
QHash< QMenu *, QStringList > m_hash_menu_text
void fetab_previous_breakpoint(const QWidget *ID)
QAction * m_styles_preferences_action
void handle_edit_file_request(const QString &file)
void fetab_goto_line(const QWidget *ID, int line=-1)
QAction * m_show_hscrollbar_action
void handle_autoc_cancelled(void)
void handle_editor_state_changed(bool enableCopy, bool is_octave_file, bool is_modified)
QAction * m_delete_line_action
void handle_file_remove(const QString &, const QString &)
bool is_editor_console_tabbed(void)
void pasteClipboard(void)
void request_save_file(bool)
QAction * m_delete_start_line_action
QAction * m_delete_end_word_action
void request_next_breakpoint(bool)
void request_find_previous(bool)
void show_eol_chars(bool)
void focus_console_after_command_signal(void)
void request_next_bookmark(bool)
void handle_tab_ready_to_close(void)
void handle_visibility(bool visible)
void request_context_edit(bool)
void fetab_set_directory(const QString &dir)
QAction * m_zoom_in_action
void update_octave_directory(const QString &dir)
QAction * m_save_as_action
void handle_delete_debugger_pointer_request(const QString &file, int line)
QAction * m_edit_function_action
void dragEnterEvent(QDragEnterEvent *event)
QAction * m_toggle_breakpoint_action
void fetab_save_file(const QWidget *ID, const QString &fileName, bool remove_on_success)
void edit_area_changed(octave_qscintilla *edit_area)
void request_conv_eol_unix(bool)
void fetab_previous_bookmark(const QWidget *ID)
void fetab_next_breakpoint(const QWidget *ID)
void fetab_run_file(const QWidget *ID, bool step_into=false)
QStringList m_mru_files_encodings
void request_step_into_file()
void request_dbcont_signal(void)
QAction * m_remove_bookmark_action
file_editor_tab * make_file_editor_tab(const QString &directory="")
QAction * m_context_doc_action
void fetab_do_breakpoint_marker(bool insert, const QWidget *ID, int line=-1, const QString &="")
QAction * m_show_toolbar_action
void toggle_preference(const gui_pref &preference)
QAction * m_next_breakpoint_action
void request_run_file(bool)
void fetab_convert_eol(const QWidget *ID, QsciScintilla::EolMode eol_mode)
file_editor_tab_widget * m_tab_widget
void notice_settings(const gui_settings *settings)
void request_toggle_bookmark(bool)
void mru_menu_update(void)
QAction * m_cut_line_action
void request_previous_bookmark(bool)
void update_gui_lexer_signal(bool)
void run_file_signal(const QFileInfo &)
void fetab_save_file_as(const QWidget *ID)
void request_save_file_as(bool)
void show_hscrollbar(bool)
QAction * m_run_selection_action
QAction * m_switch_left_tab_action
void request_print_file(bool)
void request_indent_selected_text(bool)
QAction * m_move_tab_left_action
void request_completion(bool)
void request_goto_line(bool)
void request_duplicate_selection(bool)
bool m_current_tab_modified
void fetab_uncomment_selected_text(const QWidget *ID)
QAction * m_switch_right_tab_action
void fetab_change_request(const QWidget *ID)
void request_unindent_selected_text(bool)
void handle_file_renamed(bool load_new=true)
QAction * m_next_bookmark_action
void request_delete_start_word(bool)
void exit_debug_mode_signal(void)
void request_uncomment_selected_text(bool)
QAction * m_comment_var_selection_action
QAction * m_duplicate_selection_action
void execute_command_in_terminal_signal(const QString &)
void request_transpose_line(bool)
QAction * m_sel_to_matching_brace
QAction * m_indent_selection_action
QAction * m_smart_indent_line_or_selection_action
void fetab_print_file(const QWidget *ID)
void request_delete_end_line(bool)
QAction * m_show_indguide_action
void request_context_doc(bool)
QList< removed_file_data > m_tmp_closed_files
file_editor_tab * reset_focus(void)
QAction * m_show_longline_action
void show_indent_guides(bool)
void fetab_settings_changed(const gui_settings *settings)
file_editor_tab * find_tab_widget(const QString &openFileName)
void fetab_scintilla_command(const QWidget *ID, unsigned int sci_msg)
QAction * m_sort_tabs_action
void request_lower_case(bool)
void edit_mfile_request(const QString &, const QString &, const QString &, int)
QAction * m_upper_case_action
QAction * m_move_to_matching_brace
void fetab_remove_all_breakpoints(const QWidget *ID)
QAction * m_remove_all_breakpoints_action
void set_focus(QWidget *fet)
void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)
void request_cut_line(bool)
QAction * m_previous_bookmark_action
void request_comment_var_selected_text(bool)
void fetab_toggle_bookmark(const QWidget *ID)
void request_settings_dialog(const QString &)
QPointer< find_dialog > m_find_dialog
QAction * m_show_linenum_action
void fetab_unindent_selected_text(const QWidget *ID)
void copy_full_file_path(bool)
QAction * m_selectall_action
void request_previous_breakpoint(bool)
void debug_quit_signal(void)
bool m_undo_action_enabled
QAction * m_uncomment_selection_action
void fetab_indent_selected_text(const QWidget *ID)
QAction * m_lower_case_action
void handle_enter_debug_mode(void)
void fetab_context_run(const QWidget *ID)
void focusInEvent(QFocusEvent *e)
void request_styles_preferences(bool)
void fetab_set_focus(const QWidget *ID)
void request_remove_bookmark(bool)
void create_context_menu(QMenu *)
void dropEvent(QDropEvent *event)
void fetab_completion(const QWidget *)
void file_loaded_signal(void)
void editor_tabs_changed_signal(bool, bool)
QAction * m_delete_end_line_action
void fetab_move_match_brace(const QWidget *ID, bool select)
void request_mru_open_file(QAction *action)
QAction * m_copy_line_action
void enter_debug_mode_signal(void)
QAction * m_mru_file_actions[MaxMRUFiles]
void active_tab_changed(int index)
void handle_dir_remove(const QString &old_name, const QString &new_name)
QAction * m_delete_start_word_action
void fetab_insert_debugger_pointer(const QWidget *ID, int line=-1)
void show_statusbar(bool)
void restore_session(gui_settings *settings)
void request_sel_match_brace(bool)
void fetab_delete_debugger_pointer(const QWidget *ID, int line=-1)
tree_evaluator & get_evaluator(void)
Represents the main window.
void focus_console_after_command_signal(void)
void status_update(bool, bool)
void execute_command_in_terminal_signal(const QString &)
void handle_exit_debug_mode(void)
void handle_enter_debug_mode(void)
void create_context_menu_signal(QMenu *)
gui_settings * get_settings(void) const
QIcon icon(const QString &icon_name, bool octave_only=false, const QString &icon_alt_name=QString())
void set_shortcut(QAction *action, const sc_pref &scpref, bool enable=true)
void close_current_tab_signal(bool)
void set_rotated(int rotated)
QMenu * get_context_menu(void)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
const gui_pref ed_tabs_rotated("editor/tabs_rotated", QVariant(false))
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_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_tabs_max_width("editor/tabs_max_width", QVariant(0))
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_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_bookmarks("editor/saved_session_bookmarks", QVariant(QStringList()))
const gui_pref ed_session_enc("editor/saved_session_encodings", QVariant(QStringList()))
const QStyle::PixelMetric global_icon_sizes[3]
const QStringList global_icon_paths
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
F77_RET_T const F77_DBLE const F77_DBLE * f
std::complex< double > w(std::complex< double > z, double relerr=0)
QString fromStdString(const std::string &s)
file_editor_tab * editor_tab
static string_vector make_absolute(const string_vector &sv)
bool same_file(const std::string &f, const std::string &g)