26 #if defined (HAVE_CONFIG_H)
33 #include <QApplication>
37 #include <QDesktopServices>
38 #include <QDesktopWidget>
39 #include <QFileDialog>
41 #include <QInputDialog>
42 #include <QKeySequence>
46 #include <QMessageBox>
48 #include <QStyleFactory>
49 #include <QStyleFactory>
50 #include <QTextBrowser>
52 #include <QTextStream>
57 #if defined (HAVE_QSCINTILLA)
81 #include "builtin-defun-decls.h"
97 static file_editor_interface *
100 #if defined (HAVE_QSCINTILLA)
103 octave_unused_parameter (p);
104 octave_unused_parameter (oct_qobj);
112 m_workspace_model (nullptr),
113 m_status_bar (nullptr), m_command_window (nullptr),
114 m_history_window (nullptr), m_file_browser_window (nullptr),
115 m_doc_browser_window (nullptr), m_editor_window (nullptr),
116 m_workspace_window (nullptr), m_variable_editor_window (nullptr),
118 m_active_editor (m_external_editor), m_settings_dlg (nullptr),
119 m_find_files_dlg (nullptr), m_set_path_dlg (nullptr),
120 m_release_notes_window (nullptr), m_community_news_window (nullptr),
122 m_prevent_readline_conflicts (true), m_suppress_dbg_location (true),
123 m_closing (false), m_file_encoding (QString ())
134 if (welcomeWizard.exec () == QDialog::Rejected)
154 #if defined (OCTAVE_USE_WINDOWS_API)
188 #if defined (HAVE_QGUIAPPLICATION_SETDESKTOPFILENAME)
189 QGuiApplication::setDesktopFileName (
"org.octave.Octave.desktop");
198 bool connect_to_web =
true;
199 QDateTime last_checked;
215 QDateTime current = QDateTime::currentDateTime ();
216 QDateTime one_day_ago = current.addDays (-1);
219 && (! last_checked.isValid () || one_day_ago > last_checked))
274 if (win_name ==
"command")
276 else if (win_name ==
"history")
278 else if (win_name ==
"workspace")
280 else if (win_name ==
"filebrowser")
286 bool closenow =
true;
294 int ans = QMessageBox::question (
this, tr (
"Octave"),
295 tr (
"Are you sure you want to exit Octave?"),
297 | QMessageBox::Cancel),
300 if (ans != QMessageBox::Ok)
304 #if defined (HAVE_QSCINTILLA)
331 for (
auto w : w_list)
333 if (
w->isAncestorOf (w_new))
342 w_new = qobject_cast<QWidget *> (w_new->previousInFocusChain ());
367 if (edit_dock_widget == dock)
399 opts = QFileDialog::DontUseNativeDialog;
402 = QFileDialog::getSaveFileName (
this, tr (
"Save Workspace As"),
".",
403 nullptr,
nullptr, QFileDialog::Option (opts));
405 if (! file.isEmpty ())
412 Fsave (interp,
ovl (file.toStdString ()));
424 opts = QFileDialog::DontUseNativeDialog;
426 QString file = file_arg;
429 file = QFileDialog::getOpenFileName (
this, tr (
"Load Workspace"),
".",
430 nullptr,
nullptr, QFileDialog::Option (opts));
432 if (! file.isEmpty ())
439 Fload (interp,
ovl (file.toStdString ()));
452 if (! file_arg.isEmpty ())
454 std::string file = file_arg.toStdString ();
528 const QString& new_name_arg)
531 std::string old_name = old_name_arg.toStdString ();
532 std::string new_name = new_name_arg.toStdString ();
543 scope.
rename (old_name, new_name);
558 bool rm,
bool subdirs)
561 ([dir_list, rm, subdirs,
this] (
interpreter& interp)
611 #if defined (HAVE_QSCINTILLA)
614 octave_unused_parameter (o);
615 octave_unused_parameter (
n);
625 QDesktopServices::openUrl
626 (QUrl (
"https://octave.org/doc/interpreter/index.html"));
638 if (file->open (QFile::ReadOnly))
640 QTextStream *
stream =
new QTextStream (file);
641 news =
stream->readAll ();
642 if (! news.isEmpty ())
645 news.replace (
"<",
"<");
646 news.replace (
">",
">");
648 news.prepend (
"<pre>");
649 news.append (
"</pre>");
652 news = (tr (
"The release notes file '%1' is empty.")
656 news = (tr (
"The release notes file '%1' cannot be read.")
662 browser->setText (news);
664 QVBoxLayout *vlayout =
new QVBoxLayout;
665 vlayout->addWidget (browser);
670 browser->document ()->adjustSize ();
700 QString base_url =
"https://octave.org";
701 QString page =
"community-news.html";
706 serial, connect_to_web);
708 reader->moveToThread (worker_thread);
710 connect (reader, SIGNAL (display_news_signal (
const QString&)),
713 connect (worker_thread, SIGNAL (started (
void)),
714 reader, SLOT (process (
void)));
716 connect (reader, SIGNAL (finished (
void)), worker_thread, SLOT (quit (
void)));
718 connect (reader, SIGNAL (finished (
void)), reader, SLOT (deleteLater (
void)));
720 connect (worker_thread, SIGNAL (finished (
void)),
721 worker_thread, SLOT (deleteLater (
void)));
723 worker_thread->start ();
734 browser->setHtml (news);
735 browser->setObjectName (
"OctaveNews");
736 browser->setOpenExternalLinks (
true);
738 QVBoxLayout *vlayout =
new QVBoxLayout;
740 vlayout->addWidget (browser);
758 #if defined (QOBJECT_FINDCHILDREN_ACCEPTS_FINDCHILDOPTIONS)
759 , Qt::FindDirectChildrenOnly
763 browser->setHtml (news);
780 QDesktopServices::openUrl (QUrl (
"https://octave.org/bugs.html"));
785 QDesktopServices::openUrl (QUrl (
"https://octave.org/packages.html"));
790 QDesktopServices::openUrl (QUrl (
"https://octave.org/contribute.html"));
795 QDesktopServices::openUrl (QUrl (
"https://octave.org/donate.html"));
803 if (! desired_tab.isEmpty ())
823 QMessageBox::about (
this, tr (
"About Octave"),
828 bool update_by_worker)
840 QStyle *new_style = QStyleFactory::create (preferred_style);
845 qapp->setStyle (new_style);
853 int icon_set_found = 0;
861 icon_set_found = count;
870 QString
name = widget->objectName ();
871 if (!
name.isEmpty ())
876 icon +=
name +
".png";
877 widget->setWindowIcon (QIcon (icon));
882 +
"ReleaseWidget.png";
887 size_idx = (size_idx > 0) - (size_idx < 0) + 1;
889 QStyle *st = style ();
915 QString new_default_encoding
926 bool cursor_blinking;
934 QApplication::setCursorFlashTime (1000);
936 QApplication::setCursorFlashTime (0);
977 int opts = QFileDialog::ShowDirsOnly;
981 opts = QFileDialog::DontUseNativeDialog;
984 = QFileDialog::getExistingDirectory (
this, tr (
"Browse directories"),
nullptr,
985 QFileDialog::Option (opts));
999 QString xdir = (dir.isEmpty () ?
"." : dir);
1001 QFileInfo fileInfo (xdir);
1003 if (fileInfo.exists () && fileInfo.isDir ())
1010 interp.
chdir (xdir.toStdString ());
1064 QString function_name = info.fileName ();
1065 function_name.chop (info.suffix ().length () + 1);
1066 std::string file_path = info.absoluteFilePath ().toStdString ();
1075 load_path& lp = interp.get_load_path ();
1077 std::string path = info.absolutePath ().toStdString ();
1079 if (lp.contains_file_in_dir (file_path, path))
1080 command_editor::replace_line (function_name.toStdString ());
1087 interp.source_file (file_path);
1089 command_editor::replace_line (
"");
1115 setWindowTitle (
"Octave (Debugging)");
1123 #if defined (HAVE_QSCINTILLA)
1130 setWindowTitle (
"Octave");
1138 #if defined (HAVE_QSCINTILLA)
1245 fileDialog->setNameFilter (tr (
"Octave Files (*.m);;All Files (*)"));
1247 fileDialog->setAcceptMode (QFileDialog::AcceptOpen);
1248 fileDialog->setViewMode (QFileDialog::Detail);
1249 fileDialog->setFileMode (QFileDialog::ExistingFiles);
1254 fileDialog->setOption(QFileDialog::DontUseNativeDialog);
1256 connect (fileDialog, SIGNAL (filesSelected (
const QStringList&)),
1259 fileDialog->setWindowModality (Qt::NonModal);
1260 fileDialog->setAttribute (Qt::WA_DeleteOnClose);
1261 fileDialog->show ();
1283 QString new_name = QInputDialog::getText (p, tr (
"New Function"),
1284 tr (
"New function name:\n"), QLineEdit::Normal,
"", &ok);
1286 if (ok && new_name.length () > 0)
1289 if (new_name.rightRef (2) !=
".m")
1290 new_name.append (
".m");
1305 const QString& ffile,
1306 const QString& curr_dir,
1315 QStringList fcn_list = fname.split (
'>');
1316 QString fcn_name = fcn_list.at (0) +
".m";
1324 int type = fct (0).int_value ();
1327 QString filename = QString ();
1334 message = tr (
"%1 is a built-in, compiled or inline\n"
1335 "function and can not be edited.");
1342 if (file_path.
length () > 0)
1347 if (filename.isEmpty () &&
message.isEmpty ())
1353 if (ffile.isEmpty ())
1355 if (curr_dir.isEmpty ())
1358 dir = QDir (curr_dir);
1361 dir = QDir (QFileInfo (ffile).canonicalPath ());
1363 QFileInfo file = QFileInfo (dir, fcn_name);
1365 filename = file.canonicalFilePath ();
1369 file = QFileInfo (ffile);
1370 file = QFileInfo (QDir (file.canonicalPath () +
"/private"),
1373 filename = file.canonicalFilePath ();
1375 message = tr (
"Can not find function %1");
1386 if (! filename.endsWith (
".m"))
1387 filename.append (
".m");
1397 tr (
"Octave Editor"),
1398 message, QMessageBox::Ok,
this);
1399 msgBox->setWindowModality (Qt::NonModal);
1400 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1427 const QString& file,
1429 const QString& cond)
1446 qDebug (
"Error: gui_settings pointer from resource manager is NULL.");
1454 for (
int i=0; i < curr_dirs.size (); i++)
1478 setGeometry( QApplication::desktop ()->availableGeometry (
this));
1490 QString
name = widget->objectName ();
1492 if (!
name.isEmpty ())
1494 bool floating =
false;
1495 bool visible =
true;
1505 widget->make_window ();
1511 widget->showMinimized ();
1513 widget->setVisible (
true);
1518 if (! widget->parent ())
1519 widget->make_widget (
false);
1521 widget->make_widget ();
1522 widget->setVisible (visible);
1536 qDebug (
"Error: gui_settings pointer from resource manager is NULL.");
1543 QStringList curr_dirs;
1557 widget->connect_visibility_changed ();
1559 #if defined (HAVE_QSCINTILLA)
1569 if (edit && edit->hasSelectedText ())
1571 QClipboard *clipboard = QApplication::clipboard ();
1572 clipboard->setText (edit->selectedText ());
1584 QClipboard *clipboard = QApplication::clipboard ();
1585 QString str = clipboard->text ();
1586 if (edit && str.length () > 0)
1631 QDir startup_dir = QDir ();
1639 QStringList curr_dirs
1642 = QDir (curr_dirs.at (0));
1656 if (! startup_dir.exists ())
1659 startup_dir = QDir ();
1666 #if defined (HAVE_QSCINTILLA)
1706 connect (qt_link, SIGNAL (update_path_dialog_signal (
void)),
1727 SLOT (set_current_directory (
const QString&)));
1730 this, SLOT (
open_file (
const QString &)));
1762 QKeySequence no_key = QKeySequence ();
1833 QHash<QMenu*, QStringList>::const_iterator i =
m_hash_menu_text.constBegin ();
1837 i.key ()->setTitle (i.value ().at (disable));
1862 for (
int i = 0; i < open_file_names.count (); i++)
1921 interp.
quit (0,
false,
false);
1935 dummyWidget->setObjectName (
"CentralDummyWidget");
1936 dummyWidget->resize (10, 10);
1937 dummyWidget->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
1938 dummyWidget->hide ();
1939 setCentralWidget (dummyWidget);
1946 setWindowIcon (QIcon (
":/actions/icons/logo.png"));
1958 SIGNAL (edit_variable_signal (
const QString&,
1963 connect (qt_link, SIGNAL (refresh_variable_editor_signal (
void)),
1967 SIGNAL (rename_variable_signal (
const QString&,
const QString&)),
1980 connect (qApp, SIGNAL (aboutToQuit (
void)),
1983 connect (qApp, SIGNAL (aboutToQuit (
void)),
1986 connect (qApp, SIGNAL (aboutToQuit (
void)),
1989 connect (qApp, SIGNAL (aboutToQuit (
void)),
1992 connect (qApp, SIGNAL (aboutToQuit (
void)),
1995 connect (qApp, SIGNAL (aboutToQuit (
void)),
1998 connect (qApp, SIGNAL (aboutToQuit (
void)),
2001 connect (qApp, SIGNAL (aboutToQuit (
void)),
2023 SIGNAL (request_open_file_external (
const QString&,
int)),
2025 SLOT (call_custom_editor (
const QString&,
int)));
2028 SIGNAL (request_settings_dialog (
const QString&)),
2046 setWindowTitle (
"Octave");
2050 #if defined (HAVE_QSCINTILLA)
2065 int,
const QString&)),
2074 SIGNAL (file_remove_signal (
const QString&,
const QString&)),
2076 SLOT (handle_file_remove (
const QString&,
const QString&)));
2082 connect (qt_link, SIGNAL (file_renamed_signal (
bool)),
2088 SIGNAL (file_remove_signal (
const QString&,
const QString&)),
2109 connect (qt_link, SIGNAL (apply_new_settings (
void)),
2117 connect (qt_link, SIGNAL (clear_workspace_signal (
void)),
2120 connect (qt_link, SIGNAL (directory_changed_signal (QString)),
2123 connect (qt_link, SIGNAL (directory_changed_signal (QString)),
2126 connect (qt_link, SIGNAL (directory_changed_signal (QString)),
2130 SIGNAL (execute_command_in_terminal_signal (QString)),
2134 SIGNAL (set_history_signal (
const QStringList&)),
2138 SIGNAL (append_history_signal (
const QString&)),
2142 SIGNAL (clear_history_signal (
void)),
2145 connect (qt_link, SIGNAL (enter_debugger_signal (
void)),
2148 connect (qt_link, SIGNAL (exit_debugger_signal (
void)),
2152 SIGNAL (show_preferences_signal (
void)),
2156 SIGNAL (edit_file_signal (
const QString&)),
2158 SLOT (handle_edit_file_request (
const QString&)));
2174 int,
const QString&)),
2177 int,
const QString&)));
2193 const QString&
text,
const char *member,
2199 a = menu->addAction (icon,
text, receiver, member);
2201 a = menu->addAction (icon,
text,
this, member);
2204 a->setShortcutContext (Qt::ApplicationShortcut);
2212 QString base_name =
name;
2214 base_name.replace (
"&&",
"___octave_amp_replacement___");
2216 base_name.remove (
"&");
2218 base_name.replace (
"___octave_amp_replacement___",
"&&");
2242 #if defined (HAVE_QSCINTILLA)
2266 = file_menu->addAction (rmgr.
icon (
"document-open"), tr (
"Open..."));
2267 m_open_action->setShortcutContext (Qt::ApplicationShortcut);
2268 m_open_action->setToolTip (tr (
"Open an existing file in editor"));
2270 #if defined (HAVE_QSCINTILLA)
2274 file_menu->addSeparator ();
2277 = file_menu->addAction (tr (
"Load Workspace..."));
2280 = file_menu->addAction (tr (
"Save Workspace As..."));
2282 file_menu->addSeparator ();
2286 m_exit_action->setShortcutContext (Qt::ApplicationShortcut);
2298 this, SLOT (close (
void)));
2303 QMenu *new_menu = p->addMenu (tr (
"New"));
2307 = new_menu->addAction (rmgr.
icon (
"document-new"), tr (
"New Script"));
2342 QKeySequence ctrl_shift = Qt::ControlModifier + Qt::ShiftModifier;
2346 = edit_menu->addAction (rmgr.
icon (
"edit-undo"), tr (
"Undo"));
2347 m_undo_action->setShortcutContext (Qt::ApplicationShortcut);
2349 edit_menu->addSeparator ();
2352 = edit_menu->addAction (rmgr.
icon (
"edit-copy"), tr (
"Copy"),
this,
2354 m_copy_action->setShortcutContext (Qt::ApplicationShortcut);
2357 = edit_menu->addAction (rmgr.
icon (
"edit-paste"), tr (
"Paste"),
this,
2362 = edit_menu->addAction (tr (
"Select All"),
this, SLOT (
selectAll (
void)));
2366 = edit_menu->addAction (tr (
"Clear Clipboard"),
this,
2369 edit_menu->addSeparator ();
2372 = edit_menu->addAction (rmgr.
icon (
"edit-find"), tr (
"Find Files..."));
2374 edit_menu->addSeparator ();
2377 = edit_menu->addAction (tr (
"Clear Command Window"));
2380 = edit_menu->addAction (tr (
"Clear Command History"));
2383 = edit_menu->addAction (tr (
"Clear Workspace"));
2385 edit_menu->addSeparator ();
2388 = edit_menu->addAction (tr (
"Set Path"));
2391 = edit_menu->addAction (rmgr.
icon (
"preferences-system"),
2392 tr (
"Preferences..."));
2406 connect (
m_clipboard, SIGNAL (dataChanged (
void)),
2409 #if defined (Q_OS_WIN32)
2426 const QString& item,
2433 action->setEnabled (
false);
2435 #if defined (HAVE_QSCINTILLA)
2464 #if defined (HAVE_QSCINTILLA)
2481 const QString& item,
2485 QAction *action = p->addAction (QIcon (), item);
2488 action->setCheckable (checkable);
2489 action->setShortcutContext (Qt::ApplicationShortcut);
2496 connect (action, SIGNAL (toggled (
bool)),
2497 widget, SLOT (setVisible (
bool)));
2499 connect (widget, SIGNAL (active_changed (
bool)),
2500 action, SLOT (setChecked (
bool)));
2505 connect (action, SIGNAL (triggered (
void)), widget, SLOT (activate (
void)));
2510 action->setEnabled (
false);
2541 window_menu->addSeparator ();
2564 window_menu->addSeparator ();
2569 window_menu->addSeparator ();
2572 tr (
"Reset Default Window Layout"), SLOT (
reset_windows (
void)));
2581 help_menu->addSeparator ();
2595 help_menu->addSeparator ();
2603 QMenu *doc_menu = p->addMenu (tr (
"Documentation"));
2649 QSizePolicy sizePol (QSizePolicy::Preferred, QSizePolicy::Preferred);
2657 QAction *current_dir_up
2659 tr (
"One directory up"));
2660 QAction *current_dir_search
2662 tr (
"Browse directories"));
2670 connect (current_dir_search, SIGNAL (triggered (
void)),
2673 connect (current_dir_up, SIGNAL (triggered (
void)),
2760 #if defined (HAVE_QSCINTILLA)
2773 mfile_encoding =
"SYSTEM";
2780 F__mfile_encoding__ (interp,
ovl (mfile_encoding));
2787 QRect screen_geometry
2788 = QApplication::desktop ()->availableGeometry (
this);
2790 *width = screen_geometry.width ();
2791 *height = screen_geometry.height ();
2796 #if defined (HAVE_QMAINWINDOW_RESIZEDOCKS)
2799 resizeDocks ({dw},{width},Qt::Horizontal);
2801 resizeDocks ({dw},{height},Qt::Vertical);
2805 QSize s = dw->widget ()->size ();
2809 s.setHeight (height);
2810 dw->widget ()->resize (s);
2822 resize (2*win_x/3, 7*win_y/8);
2844 int win_x = geometry ().width ();
2850 #if (QT_VERSION < 0x050601) || (QT_VERSION >= 0x050701)
2851 setDockOptions (QMainWindow::AnimatedDocks
2852 | QMainWindow::AllowNestedDocks
2853 | QMainWindow::AllowTabbedDocks);
2855 setDockNestingEnabled (
true);
2871 #if defined (HAVE_QSCINTILLA)
Base class for Octave interfaces that use Qt.
interpreter_qobject * interpreter_qobj(void)
resource_manager & get_resource_manager(void)
QApplication * qapplication(void)
shortcut_manager & get_shortcut_manager(void)
void config_translators(void)
static bool interrupt(bool=true)
static void clear_screen(bool skip_redisplay=false)
static void replace_line(const std::string &text, bool clear_undo=true)
static void set_screen_size(int ht, int wd)
static void set_initial_input(const std::string &text)
static void kill_full_line(void)
static std::string get_current_line(void)
static void accept_line(void)
static void interrupt_event_loop(bool flag=true)
static void redisplay(void)
Provides threadsafe access to octave.
virtual QMenu * debug_menu(void)=0
virtual bool check_closing(void)=0
virtual QToolBar * toolbar(void)=0
virtual void enable_menu_shortcuts(bool enable)=0
virtual void empty_script(bool, bool)=0
virtual void handle_enter_debug_mode(void)=0
virtual QMenu * get_mru_menu(void)=0
virtual void restore_session(gui_settings *)=0
virtual void handle_file_remove(const QString &o, const QString &n)=0
virtual void insert_global_actions(QList< QAction * >)=0
virtual void handle_exit_debug_mode(void)=0
void set_search_dir(const QString &dir)
string_vector do_history(const octave_value_list &args=octave_value_list(), int nargout=0)
qt_interpreter_events * qt_link(void)
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
history_system & get_history_system(void)
int chdir(const std::string &dir)
symbol_scope get_current_scope(void) const
void quit(int exit_status, bool force=false, bool confirm=true)
event_manager & get_event_manager(void)
tree_evaluator & get_evaluator(void)
void debug_step_over(void)
QAction * m_reset_windows_action
bool command_window_has_focus(void) const
void construct_edit_menu(QMenuBar *p)
void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)
QAction * m_save_workspace_action
void construct_window_menu(QMenuBar *p)
void change_directory_up(void)
void warning_function_not_found(const QString &message)
QAction * m_new_function_action
void file_remove_proxy(const QString &o, const QString &n)
octave_dock_widget * m_previous_dock
QAction * m_ondisk_doc_action
bool m_prevent_readline_conflicts
Some class global flags.
static const int current_directory_max_count
For Toolbars.
external_editor_interface * m_external_editor
QAction * m_release_notes_action
QAction * m_show_workspace_action
QAction * m_documentation_action
void construct_help_menu(QMenuBar *p)
QAction * m_octave_packages_action
void handle_exit_debugger(void)
QAction * m_clear_clipboard_action
void report_status_message(const QString &statusMessage)
QAction * m_show_variable_editor_action
void settings_changed(const gui_settings *)
QStatusBar * m_status_bar
Toolbar.
void notice_settings(const gui_settings *settings, bool update_by_worker=false)
octave_dock_widget * m_active_dock
QAction * m_show_file_browser_action
void set_window_layout(gui_settings *settings)
QAction * m_about_octave_action
void do_reset_windows(bool show_it=true)
QPointer< set_path_dialog > m_set_path_dlg
Set path dialog.
void handle_clear_command_window_request(void)
QAction * m_previous_dock_action
QPointer< settings_dialog > m_settings_dlg
Settings dialog as guarded pointer (set to 0 when deleted).
QAction * m_editor_action
void handle_save_workspace_request(void)
void handle_clear_workspace_request(void)
void set_current_working_directory(const QString &dir)
QString m_release_notes_icon
bool m_suppress_dbg_location
Some class global flags.
find_files_dialog * m_find_files_dlg
Find files dialog.
history_dock_widget * m_history_window
Dock widgets.
void construct_tool_bar(void)
void find_files_finished(int)
Find files dialog.
void construct_documentation_menu(QMenu *p)
void new_file(const QString &commands=QString())
void handle_open_any_request(const QString &file=QString())
QAction * m_history_action
void clear_clipboard()
Handling the clipboard.
void focus_command_window(void)
QAction * m_developer_action
static const int current_directory_max_visible
For Toolbars.
QAction * m_select_all_action
QAction * m_command_window_action
void construct_debug_menu(QMenuBar *p)
void load_and_display_community_news(int serial=-1)
void init_terminal_size(void)
void handle_clear_history_request(void)
void show_doc_signal(const QString &)
void handle_show_doc(const QString &file)
QAction * m_preferences_action
workspace_model * m_workspace_model
void run_file_in_terminal(const QFileInfo &info)
void handle_rename_variable_request(const QString &old_name, const QString &new_name)
void accept_directory_line_edit(void)
void handle_set_path_dialog_request(void)
void focus_console_after_command(void)
terminal_dock_widget * m_command_window
Dock widgets.
QAction * m_find_files_action
void modify_path(const octave_value_list &dir_list, bool rm, bool subdirs)
QAction * m_debug_step_out
void focus_changed(QWidget *w_old, QWidget *w_new)
void write_settings(void)
void construct_central_widget(void)
void request_open_file(void)
workspace_view * m_workspace_window
Dock widgets.
void editor_focus_changed(bool)
QToolBar * m_main_tool_bar
void interpreter_event(const fcn_callback &fcn)
void warning_function_not_found_signal(const QString &message)
void request_new_function(bool triggered=true)
documentation_dock_widget * m_doc_browser_window
Dock widgets.
QAction * m_show_documentation_action
void open_bug_tracker_page(void)
void request_new_script(const QString &commands=QString())
QAction * m_clear_command_window_action
void new_file_signal(const QString &)
void handle_octave_ready()
QAction * m_contribute_action
void set_default_geometry(void)
void disable_menu_shortcuts(bool disable)
void handle_edit_mfile_request(const QString &name, const QString &file, const QString &curr_dir, int line)
bool confirm_shutdown(void)
main_window(base_qobject &oct_qobj)
QAction * m_show_history_action
QAction * m_show_command_window_action
void handle_insert_debugger_pointer_request(const QString &file, int line)
void handle_unregister_doc(const QString &file)
QComboBox * m_current_directory_combo_box
For Toolbars.
void refresh_variable_editor(void)
void display_release_notes(void)
QAction * m_online_doc_action
void editor_tabs_changed(bool)
void active_dock_changed(octave_dock_widget *, octave_dock_widget *)
file_editor_interface * m_editor_window
Dock widgets.
QAction * construct_debug_menu_item(const char *icon, const QString &item, const char *member)
void handle_register_doc(const QString &file)
void browse_for_directory(void)
void update_default_encoding(const QString &default_encoding)
QAction * m_variable_editor_action
QAction * m_clear_workspace_action
QHash< QMenu *, QStringList > m_hash_menu_text
void handle_new_figure_request(void)
void construct_file_menu(QMenuBar *p)
void open_octave_packages_page(void)
QAction * m_file_browser_action
void open_file(const QString &file_name=QString(), int line=-1)
void open_contribute_page(void)
void pasteClipboard(void)
void construct_news_menu(QMenuBar *p)
void focus_window(const QString &win_name)
QAction * m_debug_step_over
void update_breakpoint_marker_signal(bool insert, const QString &file, int line, const QString &cond)
QList< octave_dock_widget * > dock_widget_list(void)
QAction * m_load_workspace_action
variable_editor * m_variable_editor_window
Dock widgets.
void debug_step_into(void)
void edit_mfile(const QString &, int)
QString m_default_encoding
void step_into_file_signal(void)
QAction * m_clear_command_history_action
void handle_enter_debugger(void)
void register_doc_signal(const QString &)
void set_file_encoding(const QString &new_encoding)
QAction * m_new_figure_action
QAction * m_report_bug_action
QWidget * m_release_notes_window
Release notes window.
void construct_new_menu(QMenu *p)
void handle_variable_editor_update(void)
QAction * m_debug_continue
void configure_shortcuts(void)
void clipboard_has_changed(void)
Handling the clipboard.
void debug_continue(void)
base_qobject & m_octave_qobj
void pasteClipboard_signal(void)
QAction * add_action(QMenu *menu, const QIcon &icon, const QString &text, const char *member, const QWidget *receiver=nullptr)
QAction * m_current_news_action
files_dock_widget * m_file_browser_window
Dock widgets.
QAction * m_set_path_action
void execute_command_in_terminal(const QString &dir)
void display_community_news(const QString &news)
void handle_delete_debugger_pointer_request(const QString &file, int line)
void find_files(const QString &startdir=QDir::currentPath())
Find files dialog.
QAction * m_show_editor_action
void get_screen_geometry(int *width, int *height)
void resize_dock(QDockWidget *dw, int width, int height)
QWidget * m_active_editor
QWidget * m_community_news_window
void connect_visibility_changed(void)
void selectAll_signal(void)
QAction * m_new_script_action
void insert_debugger_pointer_signal(const QString &file, int line)
void show_about_octave(void)
void handle_load_workspace_request(const QString &file=QString())
void request_reload_settings(void)
void restore_create_file_setting(void)
void construct_octave_qt_link(void)
void open_donate_page(void)
void update_octave_directory(const QString &dir)
void handle_undo_request(void)
bool m_editor_has_tabs
Some class global flags.
void request_open_files(const QStringList &open_file_names)
void closeEvent(QCloseEvent *closeEvent)
void set_screen_size(int ht, int wd)
void process_settings_dialog_request(const QString &desired_tab=QString())
void open_online_documentation_page(void)
void delete_debugger_pointer_signal(const QString &file, int line)
void copyClipboard_signal(void)
void debug_step_out(void)
void edit_variable(const QString &name, const octave_value &)
Opens the variable editor for name.
void unregister_doc_signal(const QString &)
void prepare_to_exit(void)
void construct_menu_bar(void)
void go_to_previous_widget(void)
void set_global_shortcuts(bool enable)
Setting global shortcuts.
void init_terminal_size_signal(void)
void open_file_signal(const QString &)
QAction * m_debug_step_into
QAction * m_workspace_action
QMenu * m_add_menu(QMenuBar *p, QString text)
QAction * construct_window_menu_item(QMenu *p, const QString &item, bool checkable, QWidget *)
gui_settings * get_settings(void) const
bool is_first_run(void) const
void update_network_settings(void)
QIcon icon(const QString &icon_name, bool fallback=true)
void reload_settings(void)
void set_shortcut(QAction *action, const sc_pref &scpref)
void rename(const std::string &old_name, const std::string &new_name)
static void putenv(const std::string &name, const std::string &value)
symbol_info_list get_symbol_info(void)
void edit_variable(const QString &name, const octave_value &val)
void setModel(workspace_model *model)
octave_value_list & append(const octave_value &val)
octave_idx_type length(void) const
OCTAVE_EXPORT octave_value_list Fdbstep(octave::interpreter &interp, const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fdbcont(octave::interpreter &interp, const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list F__db_next_breakpoint_quiet__(octave::interpreter &interp, const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fdbquit(octave::interpreter &interp, const octave_value_list &args, int)
void message(const char *name, const char *fmt,...)
OCTAVE_EXPORT octave_value_list Fdrawnow(octave::interpreter &interp, const octave_value_list &args, int)
const gui_pref cs_focus_cmd("terminal/focus_after_command", QVariant(false))
const gui_pref cs_dbg_location("terminal/print_debug_location", QVariant(false))
const gui_pref cs_cursor_blinking("terminal/cursorBlinking", QVariant(true))
const struct @24 dw_icon_set_names[]
const gui_pref dw_is_floating("DockWidgets/%1Floating", QVariant(false))
const gui_pref dw_is_visible("DockWidgets/%1Visible", QVariant(true))
const gui_pref dw_is_minimized("DockWidgets/%1_minimized", QVariant(false))
const gui_pref dw_icon_set("DockWidgets/widget_icon_set", QVariant("NONE"))
const gui_pref ed_create_new_file("editor/create_new_file", QVariant(false))
const gui_pref ed_default_enc("editor/default_encoding", QVariant(QString("SYSTEM (")+QString(octave_locale_charset_wrapper()).toUpper()+QString(")")))
const gui_pref global_restore_ov_dir("restore_octave_dir", QVariant(false))
const gui_pref global_status_bar("show_status_bar", QVariant(true))
const QStyle::PixelMetric global_icon_sizes[3]
const gui_pref global_prompt_to_exit("prompt_to_exit", QVariant(false))
const gui_pref global_use_native_dialogs("use_native_file_dialogs", QVariant(true))
const QString global_toolbar_style("QToolBar {" "spacing-top: 0px;" "spacing-bottom: 0px;" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "border-top: 0px;" "border-bottom: 0px;" "}")
const gui_pref global_use_custom_editor("useCustomFileEditor", QVariant(false))
const gui_pref global_ov_startup_dir("octave_startup_dir", QVariant(QString()))
const gui_pref global_icon_size("toolbar_icon_size", QVariant(0))
const gui_pref global_cursor_blinking("cursor_blinking", QVariant(true))
const gui_pref global_style("style", QVariant("default"))
const gui_pref mw_dir_list("MainWindow/current_directory_list", QVariant(QStringList()))
const gui_pref mw_geometry("MainWindow/geometry", QVariant(QByteArray()))
const gui_pref mw_state("MainWindow/windowState", QVariant(QByteArray()))
const gui_pref nr_allow_connection("news/allow_web_connection", QVariant(false))
const gui_pref nr_last_news("news/last_news_item", QVariant(0))
const gui_pref nr_last_time("news/last_time_checked", QVariant(QDateTime()))
const sc_pref sc_main_help_online_doc(sc_main_help+":online_doc", QKeySequence::UnknownKey)
const sc_pref sc_main_file_exit(sc_main_file+":exit", QKeySequence::Quit)
const sc_pref sc_main_file_new_file(sc_main_file+":new_file", QKeySequence::New)
const sc_pref sc_main_news_release_notes(sc_main_news+":release_notes", QKeySequence::UnknownKey)
const sc_pref sc_main_window_workspace(sc_main_window+":workspace", PRE+CTRL+Qt::Key_3)
const sc_pref sc_main_file_new_figure(sc_main_file+":new_figure", QKeySequence::UnknownKey)
const sc_pref sc_main_window_doc(sc_main_window+":doc", PRE+CTRL+Qt::Key_5)
const sc_pref sc_main_debug_step_over(sc_main_debug+":step_over", PRE+Qt::Key_F10)
const sc_pref sc_main_window_show_editor(sc_main_window+":show_editor", PRE+CTRL_SHIFT+Qt::Key_4)
const sc_pref sc_main_edit_set_path(sc_main_edit+":set_path", QKeySequence::UnknownKey)
const gui_pref sc_prevent_rl_conflicts("shortcuts/prevent_readline_conflicts", QVariant(true))
const sc_pref sc_main_window_file_browser(sc_main_window+":file_browser", PRE+CTRL+Qt::Key_2)
const sc_pref sc_main_debug_continue(sc_main_debug+":continue", PRE+Qt::Key_F5)
const sc_pref sc_main_edit_clear_clipboard(sc_main_edit+":clear_clipboard", QKeySequence::UnknownKey)
const sc_pref sc_main_window_show_history(sc_main_window+":show_history", PRE+CTRL_SHIFT+Qt::Key_1)
const sc_pref sc_main_window_show_workspace(sc_main_window+":show_workspace", PRE+CTRL_SHIFT+Qt::Key_3)
const sc_pref sc_main_edit_clear_workspace(sc_main_edit+":clear_workspace", QKeySequence::UnknownKey)
const sc_pref sc_main_file_open_file(sc_main_file+":open_file", QKeySequence::Open)
const sc_pref sc_main_window_show_doc(sc_main_window+":show_doc", PRE+CTRL_SHIFT+Qt::Key_5)
const sc_pref sc_main_file_new_function(sc_main_file+":new_function", CTRL_SHIFT+Qt::Key_N)
const sc_pref sc_main_debug_step_into(sc_main_debug+":step_into", PRE+Qt::Key_F11)
const sc_pref sc_main_help_about(sc_main_help+":about", QKeySequence::UnknownKey)
const sc_pref sc_main_window_show_variable_editor(sc_main_window+":show_variable_editor", PRE+CTRL_SHIFT+Qt::Key_6)
const sc_pref sc_main_window_show_command(sc_main_window+":show_command", PRE+CTRL_SHIFT+Qt::Key_0)
const sc_pref sc_main_window_editor(sc_main_window+":editor", PRE+CTRL+Qt::Key_4)
const sc_pref sc_main_window_variable_editor(sc_main_window+":variable_editor", PRE+CTRL+Qt::Key_6)
const sc_pref sc_main_window_command(sc_main_window+":command", PRE+CTRL+Qt::Key_0)
const sc_pref sc_main_debug_quit(sc_main_debug+":quit", PRE+Qt::ShiftModifier+Qt::Key_F5)
const sc_pref sc_main_edit_copy(sc_main_edit+":copy", QKeySequence::Copy)
const sc_pref sc_main_help_ondisk_doc(sc_main_help+":ondisk_doc", QKeySequence::UnknownKey)
const sc_pref sc_main_help_developer(sc_main_help+":developer", QKeySequence::UnknownKey)
const sc_pref sc_main_edit_undo(sc_main_edit+":undo", QKeySequence::Undo)
const sc_pref sc_main_edit_clear_command_window(sc_main_edit+":clear_command_window", QKeySequence::UnknownKey)
const sc_pref sc_main_window_reset(sc_main_window+":reset", QKeySequence::UnknownKey)
const sc_pref sc_main_window_previous_dock(sc_main_window+":previous_widget", PRE+CTRL_ALT+Qt::Key_P)
const sc_pref sc_main_help_contribute(sc_main_help+":contribute", QKeySequence::UnknownKey)
const sc_pref sc_main_window_history(sc_main_window+":history", PRE+CTRL+Qt::Key_1)
const sc_pref sc_main_edit_preferences(sc_main_edit+":preferences", QKeySequence::UnknownKey)
const sc_pref sc_main_help_packages(sc_main_help+":packages", QKeySequence::UnknownKey)
const sc_pref sc_main_file_save_workspace(sc_main_file+":save_workspace", QKeySequence::UnknownKey)
const sc_pref sc_main_edit_paste(sc_main_edit+":paste", QKeySequence::Paste)
const sc_pref sc_main_edit_find_in_files(sc_main_edit+":find_in_files", CTRL_SHIFT+Qt::Key_F)
const sc_pref sc_main_edit_select_all(sc_main_edit+":select_all", QKeySequence::SelectAll)
const sc_pref sc_main_window_show_file_browser(sc_main_window+":show_file_browser", PRE+CTRL_SHIFT+Qt::Key_2)
const sc_pref sc_main_edit_clear_history(sc_main_edit+":clear_history", QKeySequence::UnknownKey)
const sc_pref sc_main_debug_step_out(sc_main_debug+":step_out", PRE+Qt::ShiftModifier+Qt::Key_F11)
const sc_pref sc_main_news_community_news(sc_main_news+":community_news", QKeySequence::UnknownKey)
const sc_pref sc_main_help_report_bug(sc_main_help+":report_bug", QKeySequence::UnknownKey)
const sc_pref sc_main_file_load_workspace(sc_main_file+":load_workspace", QKeySequence::UnknownKey)
OCTAVE_EXPORT octave_value_list Fgenpath(const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Faddpath(octave::interpreter &interp, const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Frmpath(octave::interpreter &interp, const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fsave(octave::interpreter &interp, const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Fload(octave::interpreter &interp, const octave_value_list &args, int nargout)
std::complex< double > w(std::complex< double > z, double relerr=0)
QString fromStdString(const std::string &s)
std::string oct_etc_dir(void)
bool valid_identifier(const char *s)
std::function< void(octave::interpreter &)> meth_callback
std::function< void(void)> fcn_callback
static file_editor_interface * create_default_editor(QWidget *p, base_qobject &oct_qobj)
OCTAVE_EXPORT octave_value_list Fbuiltin(octave::interpreter &interp, const octave_value_list &args, int nargout)
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
OCTAVE_EXPORT octave_value_list Ffile_in_loadpath(octave::interpreter &interp, const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fexist(octave::interpreter &interp, const octave_value_list &args, int)
OCTAVE_EXPORT octave_value_list Fclear(octave::interpreter &interp, const octave_value_list &args, int)
std::string octave_name_version_copyright_copying_warranty_and_bugs(bool html, const std::string &extra_info)