26 #if defined (HAVE_CONFIG_H)
33 #include <QApplication>
37 #include <QDesktopServices>
38 #include <QFileDialog>
40 #include <QInputDialog>
41 #include <QKeySequence>
45 #include <QMessageBox>
48 #include <QStyleFactory>
49 #include <QTextBrowser>
50 #include <QTextStream>
59 #if defined (HAVE_QSCINTILLA)
85 #include "builtin-defun-decls.h"
97 m_status_bar (
nullptr),
98 m_command_window (
nullptr),
99 m_history_window (
nullptr),
100 m_file_browser_window (
nullptr),
101 m_editor_window (
nullptr),
102 m_workspace_window (
nullptr),
104 m_active_editor (m_external_editor), m_settings_dlg (
nullptr),
105 m_find_files_dlg (
nullptr), m_set_path_dlg (
nullptr),
107 m_prevent_readline_conflicts (true),
108 m_prevent_readline_conflicts_menu (false),
109 m_suppress_dbg_location (true),
110 m_closing (false), m_file_encoding (QString ())
121 if (welcomeWizard.exec () == QDialog::Rejected)
133 m_octave_qobj.config_translators ();
145 #if defined (OCTAVE_USE_WINDOWS_API)
146 sys::env::putenv (
"TERM",
"cygwin");
148 sys::env::putenv (
"TERM",
"xterm");
158 construct_central_widget ();
160 m_status_bar =
new QStatusBar (
this);
163 m_status_bar->addPermanentWidget (text);
164 m_status_bar->addPermanentWidget (m_profiler_status_indicator);
166 adopt_dock_widgets ();
168 #if defined (HAVE_QGUIAPPLICATION_SETDESKTOPFILENAME)
169 QGuiApplication::setDesktopFileName (
"org.octave.Octave.desktop");
174 m_default_style = qapp->style ()->objectName ();
175 m_default_palette = qapp->palette ();
179 bool connect_to_web =
true;
180 QDateTime last_checked;
182 m_active_dock =
nullptr;
196 QDateTime current = QDateTime::currentDateTime ();
197 QDateTime one_day_ago = current.addDays (-1);
200 && (! last_checked.isValid () || one_day_ago > last_checked))
201 emit show_community_news_signal (serial);
203 construct_octave_qt_link ();
212 init_terminal_size ();
214 emit init_window_menu ();
216 focus_command_window ();
356 #if defined (HAVE_QSCINTILLA)
450 connect (qt_link, SIGNAL (edit_file_signal (
const QString&)),
476 connect (qApp, &QApplication::aboutToQuit,
497 if (win_name ==
"command")
499 else if (win_name ==
"history")
501 else if (win_name ==
"workspace")
503 else if (win_name ==
"filebrowser")
509 bool closenow =
true;
517 int ans = QMessageBox::question (
this, tr (
"Octave"),
518 tr (
"Are you sure you want to exit Octave?"),
520 | QMessageBox::Cancel),
523 if (ans != QMessageBox::Ok)
527 #if defined (HAVE_QSCINTILLA)
542 || (new_widget == menuBar ())
562 for (
auto w : w_list)
564 if (
w->isAncestorOf (w_new))
573 w_new = qobject_cast<QWidget *> (w_new->previousInFocusChain ());
603 if (edit_dock_widget == dock)
615 int cmd_involved = 0;
616 if (cmd_dock_widget == dock)
625 command = cmd_involved;
629 if (editor || command)
631 int sum = editor + command;
670 opts = QFileDialog::DontUseNativeDialog;
673 = QFileDialog::getSaveFileName (
this, tr (
"Save Workspace As"),
".",
674 nullptr,
nullptr, QFileDialog::Option (opts));
676 if (! file.isEmpty ())
683 Fsave (interp,
ovl (file.toStdString ()));
695 opts = QFileDialog::DontUseNativeDialog;
697 QString file = file_arg;
700 file = QFileDialog::getOpenFileName (
this, tr (
"Load Workspace"),
".",
701 nullptr,
nullptr, QFileDialog::Option (opts));
703 if (! file.isEmpty ())
710 Fload (interp,
ovl (file.toStdString ()));
723 if (! file_arg.isEmpty ())
725 std::string file = file_arg.toStdString ();
799 bool rm,
bool subdirs)
840 #if defined (HAVE_QSCINTILLA)
843 octave_unused_parameter (o);
844 octave_unused_parameter (
n);
854 QDesktopServices::openUrl
855 (QUrl (
"https://octave.org/doc/interpreter/index.html"));
860 QDesktopServices::openUrl (QUrl (
"https://octave.org/bugs.html"));
865 QDesktopServices::openUrl (QUrl (
"https://packages.octave.org/index.html"));
870 QDesktopServices::openUrl (QUrl (
"https://octave.org/contribute.html"));
875 QDesktopServices::openUrl (QUrl (
"https://octave.org/donate.html"));
883 if (! desired_tab.isEmpty ())
903 QMessageBox::about (
this, tr (
"About Octave"),
908 bool update_by_worker)
924 QStyle *new_style = QStyleFactory::create (QStringLiteral(
"Fusion"));
926 qapp->setStyle (new_style);
928 qapp->setStyleSheet (
"QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }");
932 QStyle *new_style = QStyleFactory::create (preferred_style);
936 qapp->setStyle (new_style);
946 QString name = widget->objectName ();
947 if (! name.isEmpty ())
951 if (icon_set !=
"NONE")
952 icon += name +
".png";
953 widget->setWindowIcon (QIcon (icon));
958 size_idx = (size_idx > 0) - (size_idx < 0) + 1;
960 QStyle *st = style ();
985 bool do_disable_main_menu_shortcuts
993 QString new_default_encoding
1004 bool cursor_blinking;
1011 if (cursor_blinking)
1012 QApplication::setCursorFlashTime (1000);
1014 QApplication::setCursorFlashTime (0);
1020 QPalette darkPalette;
1021 darkPalette.setColor(QPalette::Window, QColor(53, 53, 53));
1022 darkPalette.setColor(QPalette::WindowText, Qt::white);
1023 darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor(127, 127, 127));
1024 darkPalette.setColor(QPalette::Base, QColor(42, 42, 42));
1025 darkPalette.setColor(QPalette::AlternateBase, QColor(66, 66, 66));
1026 darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
1027 darkPalette.setColor(QPalette::ToolTipText, Qt::white);
1028 darkPalette.setColor(QPalette::Text, Qt::white);
1029 darkPalette.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127));
1030 darkPalette.setColor(QPalette::Dark, QColor(35, 35, 35));
1031 darkPalette.setColor(QPalette::Shadow, QColor(20, 20, 20));
1032 darkPalette.setColor(QPalette::Button, QColor(53, 53, 53));
1033 darkPalette.setColor(QPalette::ButtonText, Qt::white);
1034 darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(127, 127, 127));
1035 darkPalette.setColor(QPalette::BrightText, Qt::red);
1036 darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
1037 darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218));
1038 darkPalette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(80, 80, 80));
1039 darkPalette.setColor(QPalette::HighlightedText, Qt::white);
1040 darkPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, QColor(127, 127, 127));
1086 int opts = QFileDialog::ShowDirsOnly;
1090 opts = QFileDialog::DontUseNativeDialog;
1093 = QFileDialog::getExistingDirectory (
this, tr (
"Browse directories"),
nullptr,
1094 QFileDialog::Option (opts));
1108 QString xdir = (dir.isEmpty () ?
"." : dir);
1110 QFileInfo fileInfo (xdir);
1112 if (fileInfo.exists () && fileInfo.isDir ())
1119 interp.
chdir (xdir.toStdString ());
1180 QString function_name = info.fileName ();
1181 function_name.chop (info.suffix ().length () + 1);
1182 std::string file_path = info.absoluteFilePath ().toStdString ();
1191 load_path& lp = interp.get_load_path ();
1193 std::string path = info.absolutePath ().toStdString ();
1195 if (lp.contains_file_in_dir (file_path, path))
1196 command_editor::replace_line (function_name.toStdString ());
1203 interp.source_file (file_path);
1205 command_editor::replace_line (
"");
1231 setWindowTitle (
"Octave (Debugging)");
1242 setWindowTitle (
"Octave");
1353 fileDialog->setNameFilter (tr (
"Octave Files (*.m);;All Files (*)"));
1355 fileDialog->setAcceptMode (QFileDialog::AcceptOpen);
1356 fileDialog->setViewMode (QFileDialog::Detail);
1357 fileDialog->setFileMode (QFileDialog::ExistingFiles);
1362 fileDialog->setOption(QFileDialog::DontUseNativeDialog);
1364 connect (fileDialog, &QFileDialog::filesSelected,
1367 fileDialog->setWindowModality (Qt::NonModal);
1368 fileDialog->setAttribute (Qt::WA_DeleteOnClose);
1369 fileDialog->show ();
1391 QString new_name = QInputDialog::getText (p, tr (
"New Function"),
1392 tr (
"New function name:\n"), QLineEdit::Normal,
"", &ok);
1394 if (ok && new_name.length () > 0)
1397 if (new_name.rightRef (2) !=
".m")
1398 new_name.append (
".m");
1413 const QString& ffile,
1414 const QString& curr_dir,
1421 QPointer<main_window> this_mw (
this);
1431 if (this_mw.isNull ())
1435 QStringList fcn_list = fname.split (
'>');
1436 QString fcn_name = fcn_list.at (0) +
".m";
1444 int type = fct (0).int_value ();
1447 QString filename = QString ();
1454 message = tr (
"%1 is a built-in, compiled or inline\n"
1455 "function and can not be edited.");
1462 if (file_path.
length () > 0)
1467 if (filename.isEmpty () &&
message.isEmpty ())
1473 if (ffile.isEmpty ())
1475 if (curr_dir.isEmpty ())
1478 dir = QDir (curr_dir);
1481 dir = QDir (QFileInfo (ffile).canonicalPath ());
1483 QFileInfo file = QFileInfo (dir, fcn_name);
1485 filename = file.canonicalFilePath ();
1489 file = QFileInfo (ffile);
1490 file = QFileInfo (QDir (file.canonicalPath () +
"/private"),
1493 filename = file.canonicalFilePath ();
1495 message = tr (
"Can not find function %1");
1505 if (! filename.endsWith (
".m"))
1506 filename.append (
".m");
1516 tr (
"Octave Editor"),
1517 message, QMessageBox::Ok,
this);
1518 msgBox->setWindowModality (Qt::NonModal);
1519 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1546 const QString& file,
1548 const QString& cond)
1565 qDebug (
"Error: gui_settings pointer from resource manager is NULL.");
1573 for (
int i=0; i < curr_dirs.size (); i++)
1611 QScreen *s = windowHandle ()->screen ();
1612 QRect av_geom = s->availableGeometry ();
1613 setGeometry (av_geom);
1616 setWindowFlags(Qt::WindowTitleHint
1617 | Qt::WindowMinMaxButtonsHint
1618 | Qt::WindowSystemMenuHint
1619 | Qt::WindowCloseButtonHint);
1635 if (widget->adopted ())
1638 QString name = widget->objectName ();
1640 if (! name.isEmpty ())
1642 bool floating =
false;
1643 bool visible =
true;
1653 widget->make_window ();
1659 widget->showMinimized ();
1661 widget->setVisible (
true);
1664 widget->setVisible (
false);
1668 if (! widget->parent ())
1669 widget->make_widget (
false);
1671 widget->make_widget ();
1672 widget->setVisible (visible);
1686 qDebug (
"Error: gui_settings pointer from resource manager is NULL.");
1693 QStringList curr_dirs;
1707 if (edit && edit->hasSelectedText ())
1709 QClipboard *clipboard = QApplication::clipboard ();
1710 clipboard->setText (edit->selectedText ());
1722 QClipboard *clipboard = QApplication::clipboard ();
1723 QString str = clipboard->text ();
1724 if (edit && str.length () > 0)
1748 const QString& status)
1753 if (! feature.compare (
"profiler"))
1755 if (! status.compare (
"on", Qt::CaseInsensitive))
1757 else if (! status.compare (
"off", Qt::CaseInsensitive))
1768 QDir startup_dir = QDir ();
1775 QStringList curr_dirs
1777 if (curr_dirs.length () > 0)
1778 startup_dir = QDir (curr_dirs.at (0));
1790 if (! startup_dir.exists ())
1793 startup_dir = QDir ();
1800 #if defined (HAVE_QSCINTILLA)
1821 input_sys.
PS1 (
">> ");
1822 std::string prompt = input_sys.
PS1 ();
1930 QHash<QMenu *, QStringList>::const_iterator i =
m_hash_menu_text.constBegin ();
1934 i.key ()->setTitle (i.value ().at (disable));
1959 for (
int i = 0; i < open_file_names.count (); i++)
1981 Ffeval (interp,
ovl (
"profile",
"resume"));
2042 interp.
quit (0,
false,
false);
2057 dummyWidget->setObjectName (
"CentralDummyWidget");
2058 dummyWidget->resize (10, 10);
2059 dummyWidget->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
2060 dummyWidget->hide ();
2061 setCentralWidget (dummyWidget);
2080 connect (qApp, &QApplication::aboutToQuit,
2083 connect (qApp, &QApplication::focusChanged,
2095 setWindowTitle (
"Octave");
2156 const QString& text,
const char *member,
2162 a = menu->addAction (icon, text, receiver, member);
2164 a = menu->addAction (icon, text,
this, member);
2167 a->setShortcutContext (Qt::ApplicationShortcut);
2173 QMenu *menu = p->addMenu (name);
2175 QString base_name = name;
2177 base_name.replace (
"&&",
"___octave_amp_replacement___");
2179 base_name.remove (
"&");
2181 base_name.replace (
"___octave_amp_replacement___",
"&&");
2207 #if defined (HAVE_QSCINTILLA)
2233 file_menu, rmgr.
icon (
"document-open"), tr (
"Open..."),
2235 m_open_action->setToolTip (tr (
"Open an existing file in editor"));
2237 #if defined (HAVE_QSCINTILLA)
2241 file_menu->addSeparator ();
2244 file_menu, QIcon (), tr (
"Load Workspace..."),
2248 file_menu, QIcon (), tr (
"Save Workspace As..."),
2251 file_menu->addSeparator ();
2254 file_menu, QIcon (), tr (
"Exit"),
2255 SLOT (close (
void)),
this);
2273 QMenu *new_menu = p->addMenu (tr (
"New"));
2278 new_menu, rmgr.
icon (
"document-new"), tr (
"New Script"),
2282 new_menu, QIcon (), tr (
"New Function..."),
2286 new_menu, QIcon (), tr (
"New Figure"),
2294 QKeySequence ctrl_shift = Qt::ControlModifier + Qt::ShiftModifier;
2298 = edit_menu->addAction (rmgr.
icon (
"edit-undo"), tr (
"Undo"));
2299 m_undo_action->setShortcutContext (Qt::ApplicationShortcut);
2301 edit_menu->addSeparator ();
2304 = edit_menu->addAction (rmgr.
icon (
"edit-copy"), tr (
"Copy"),
this,
2306 m_copy_action->setShortcutContext (Qt::ApplicationShortcut);
2309 = edit_menu->addAction (rmgr.
icon (
"edit-paste"), tr (
"Paste"),
this,
2314 = edit_menu->addAction (tr (
"Select All"),
this,
2319 = edit_menu->addAction (tr (
"Clear Clipboard"),
this,
2322 edit_menu->addSeparator ();
2325 = edit_menu->addAction (rmgr.
icon (
"edit-find"), tr (
"Find Files..."));
2327 edit_menu->addSeparator ();
2330 = edit_menu->addAction (tr (
"Clear Command Window"));
2333 = edit_menu->addAction (tr (
"Clear Command History"));
2336 = edit_menu->addAction (tr (
"Clear Workspace"));
2338 edit_menu->addSeparator ();
2341 = edit_menu->addAction (tr (
"Set Path"));
2344 = edit_menu->addAction (rmgr.
icon (
"preferences-system"),
2345 tr (
"Preferences..."));
2362 #if defined (Q_OS_WIN32)
2379 const QString& item,
2386 action->setEnabled (
false);
2388 #if defined (HAVE_QSCINTILLA)
2417 #if defined (HAVE_QSCINTILLA)
2453 const QString& item,
2457 QAction *action = p->addAction (QIcon (), item);
2460 action->setCheckable (checkable);
2461 action->setShortcutContext (Qt::ApplicationShortcut);
2468 connect (action, SIGNAL (toggled (
bool)),
2469 widget, SLOT (setVisible (
bool)));
2471 connect (widget, SIGNAL (active_changed (
bool)),
2472 action, SLOT (setChecked (
bool)));
2477 connect (action, SIGNAL (triggered (
void)),
2478 widget, SLOT (activate (
void)));
2483 action->setEnabled (
false);
2514 window_menu->addSeparator ();
2537 window_menu->addSeparator ();
2542 window_menu->addSeparator ();
2545 tr (
"Reset Default Window Layout"), SLOT (
reset_windows (
void)));
2554 help_menu->addSeparator ();
2568 help_menu->addSeparator ();
2576 QMenu *doc_menu = p->addMenu (tr (
"Documentation"));
2590 = news_menu->addAction (QIcon (), tr (
"Release Notes"),
2598 = news_menu->addAction (QIcon (), tr (
"Community News"),
2632 QSizePolicy sizePol (QSizePolicy::Preferred, QSizePolicy::Preferred);
2640 QAction *current_dir_up
2642 tr (
"One directory up"));
2643 QAction *current_dir_search
2645 tr (
"Browse directories"));
2651 &QLineEdit::returnPressed,
2654 connect (current_dir_search, &QAction::triggered,
2657 connect (current_dir_up, &QAction::triggered,
2754 #if defined (HAVE_QSCINTILLA)
2767 mfile_encoding =
"SYSTEM";
2774 F__mfile_encoding__ (interp,
ovl (mfile_encoding));
2780 #if defined (HAVE_QMAINWINDOW_RESIZEDOCKS)
2783 resizeDocks ({dw}, {width}, Qt::Horizontal);
2785 resizeDocks ({dw}, {height}, Qt::Vertical);
2789 QSize s = dw->widget ()->size ();
2793 s.setHeight (height);
2794 dw->widget ()->resize (s);
2806 resize (2*win_x/3, 7*win_y/8);
2826 QTimer::singleShot (250,
this, [=] () {
do_reset_windows (
true,
true,
true); });
2837 int win_x = geometry ().width ();
2845 #if (QT_VERSION < 0x050601) || (QT_VERSION >= 0x050701)
2846 setDockOptions (QMainWindow::AnimatedDocks
2847 | QMainWindow::AllowNestedDocks
2848 | QMainWindow::AllowTabbedDocks);
2850 setDockNestingEnabled (
true);
2895 #if defined (HAVE_QSCINTILLA)
void report_status_message(const QString &)
virtual void pasteClipboard(void)=0
void set_screen_size_signal(int, int)
virtual void init_terminal_size(void)
void edit_mfile_request(const QString &, int)
void request_edit_mfile_signal(const QString &, int)
void request_open_file_signal(const QString &, const QString &, int)
virtual void copyClipboard(void)=0
void clear_command_window_request(void)
void execute_command_in_terminal_signal(const QString &)
virtual void selectAll(void)=0
Base class for Octave interfaces that use Qt.
QPointer< history_dock_widget > history_widget(main_window *mw=nullptr)
QPointer< files_dock_widget > file_browser_widget(main_window *mw=nullptr)
void connect_interpreter_events(T *widget)
bool is_gui_app(void) const
QApplication * qapplication(void)
bool experimental_terminal_widget(void) const
interpreter_qobject * interpreter_qobj(void)
resource_manager & get_resource_manager(void)
QPointer< variable_editor > variable_editor_widget(main_window *mw=nullptr)
void interpreter_event(const fcn_callback &fcn)
shortcut_manager & get_shortcut_manager(void)
QPointer< terminal_dock_widget > terminal_widget(main_window *mw=nullptr)
QPointer< workspace_view > workspace_widget(main_window *mw=nullptr)
QPointer< documentation_dock_widget > documentation_widget(main_window *mw=nullptr)
static void replace_line(const std::string &text, bool clear_undo=true)
static void redisplay(void)
static std::string get_current_line(void)
static bool interrupt(bool=true)
static void clear_screen(bool skip_redisplay=false)
static void set_initial_input(const std::string &text)
static void set_screen_size(int ht, int wd)
static void accept_line(void)
static std::string decode_prompt_string(const std::string &s)
static void interrupt_event_loop(bool flag=true)
static void kill_full_line(void)
Provides threadsafe access to octave.
OCTINTERP_API void set_workspace(void)
void update_prompt(const std::string &prompt)
void request_settings_dialog(const QString &)
bool call_custom_editor(const QString &file=QString(), int line=-1)
void handle_insert_debugger_pointer_request(const QString &file, int line)
void handle_exit_debug_mode(void)
void request_open_file_external(const QString &file_name, int line)
void enable_menu_shortcuts(bool)
void handle_file_remove(const QString &, const QString &)
void focus_console_after_command_signal(void)
void update_octave_directory(const QString &dir)
void handle_delete_debugger_pointer_request(const QString &file, int line)
void request_step_into_file()
void request_dbcont_signal(void)
void update_gui_lexer_signal(bool)
void run_file_signal(const QFileInfo &)
void handle_file_renamed(bool load_new=true)
void execute_command_in_terminal_signal(const QString &)
void edit_mfile_request(const QString &, const QString &, const QString &, int)
void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)
void request_settings_dialog(const QString &)
void debug_quit_signal(void)
void handle_enter_debug_mode(void)
void editor_tabs_changed_signal(bool, bool)
void set_search_dir(const QString &dir)
void file_selected(const QString &fileName)
void dir_selected(const QString &fileName)
void command_double_clicked(const QString &command)
Signal emitted whenever the user double-clicks a command in the history.
void command_create_script(const QString &commands)
Signal emitted whenever the user selects commands and chooses "Create script" from the popup menu.
string_vector do_history(const octave_value_list &args=octave_value_list(), int nargout=0)
qt_interpreter_events * qt_link(void)
event_manager & get_event_manager(void)
void quit(int exit_status, bool force=false, bool confirm=true)
history_system & get_history_system(void)
tree_evaluator & get_evaluator(void)
int chdir(const std::string &dir)
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.
input_system & get_input_system(void)
void set_state(led_state state)
Represents the main window.
void pasteClipboard_signal(void)
void open_contribute_page(void)
void profiler_session_resume(void)
bool m_editor_is_octave_file
Some class global flags.
void new_file_signal(const QString &)
QAction * m_debug_step_into
QHash< QMenu *, QStringList > m_hash_menu_text
void set_default_geometry(void)
find_files_dialog * m_find_files_dlg
Find files dialog.
QAction * m_clear_workspace_action
void request_new_script(const QString &commands=QString())
QPointer< history_dock_widget > m_history_window
Dock widgets.
void open_donate_page(void)
void file_remove_proxy(const QString &o, const QString &n)
void browse_for_directory(void)
static const int current_directory_max_count
For Toolbars.
QPointer< settings_dialog > m_settings_dlg
Settings dialog as guarded pointer (set to 0 when deleted).
QAction * m_select_all_action
bool m_suppress_dbg_location
Some class global flags.
void request_new_function(bool triggered=true)
void profiler_session(void)
void adopt_documentation_widget(void)
base_qobject & m_octave_qobj
QAction * m_show_history_action
QList< octave_dock_widget * > dock_widget_list(void)
void run_file_in_terminal(const QFileInfo &info)
void pasteClipboard(void)
void settings_changed(const gui_settings *)
QString m_default_encoding
octave_dock_widget * m_previous_dock
void focus_window(const QString &win_name)
void set_window_layout(gui_settings *settings)
QAction * m_octave_packages_action
QAction * m_editor_action
void update_gui_lexer_signal(bool)
void construct_window_menu(QMenuBar *p)
QAction * m_clear_clipboard_action
octave_dock_widget * m_active_dock
void handle_delete_debugger_pointer_request(const QString &file, int line)
void report_status_message(const QString &statusMessage)
QPalette getFusionDarkPalette()
void open_bug_tracker_page(void)
void close_gui_signal(void)
void show_about_octave(void)
void set_current_working_directory(const QString &dir)
void process_settings_dialog_request(const QString &desired_tab=QString())
void debug_step_out(void)
QAction * m_debug_continue
void copyClipboard_signal(void)
QAction * m_save_workspace_action
void step_into_file_signal(void)
void construct_tool_bar(void)
void closeEvent(QCloseEvent *closeEvent)
QAction * m_workspace_action
QWidget * m_active_editor
QAction * m_ondisk_doc_action
QAction * m_new_figure_action
QPointer< file_editor_interface > m_editor_window
Dock widgets.
void handle_profiler_status_update(bool)
void insert_debugger_pointer_signal(const QString &file, int line)
void edit_mfile(const QString &, int)
void warning_function_not_found(const QString &message)
void focus_console_after_command(void)
void construct_debug_menu(QMenuBar *p)
void handle_clear_command_window_request(void)
void handle_edit_mfile_request(const QString &name, const QString &file, const QString &curr_dir, int line)
QAction * m_history_action
void change_directory_up(void)
void clear_clipboard()
Handling the clipboard.
void handle_undo_request(void)
void adopt_history_widget(void)
void construct_central_widget(void)
void active_dock_changed(octave_dock_widget *, octave_dock_widget *)
QAction * m_documentation_action
void handle_load_workspace_request(const QString &file=QString())
void adopt_dock_widgets(void)
bool m_editor_has_tabs
Some class global flags.
QAction * m_contribute_action
void handle_set_path_dialog_request(void)
QAction * m_show_editor_action
void warning_function_not_found_signal(const QString &message)
void debug_step_into(void)
void restore_create_file_setting(void)
QPointer< documentation_dock_widget > m_doc_browser_window
Dock widgets.
QStatusBar * m_status_bar
Toolbar.
void adopt_editor_widget(void)
QAction * construct_window_menu_item(QMenu *p, const QString &item, bool checkable, QWidget *)
QAction * m_new_function_action
void construct_documentation_menu(QMenu *p)
QAction * m_reset_windows_action
void adopt_terminal_widget(void)
void execute_command_signal(const QString &command)
void delete_debugger_pointer_signal(const QString &file, int line)
void notice_settings(const gui_settings *settings, bool update_by_worker=false)
void handle_clear_workspace_request(void)
void write_settings(void)
void update_breakpoint_marker_signal(bool insert, const QString &file, int line, const QString &cond)
void editor_focus_changed(bool)
void editor_tabs_changed(bool, bool)
void handle_insert_debugger_pointer_request(const QString &file, int line)
void disable_menu_shortcuts(bool disable)
QAction * m_find_files_action
void adopt_variable_editor_widget(void)
void construct_menu_bar(void)
QAction * m_new_script_action
void construct_edit_menu(QMenuBar *p)
QPalette m_default_palette
void handle_open_any_request(const QString &file=QString())
void selectAll_signal(void)
QPointer< variable_editor > m_variable_editor_window
Dock widgets.
QAction * m_debug_step_over
void make_dock_widget_connections(octave_dock_widget *dw)
bool m_prevent_readline_conflicts_menu
Some class global flags.
QPointer< set_path_dialog > m_set_path_dlg
Set path dialog.
void handle_clear_history_request(void)
void show_community_news_signal(int serial)
void modify_path(const QStringList &dir_list, bool rm, bool subdirs)
void find_files(const QString &startdir=QDir::currentPath())
Find files dialog.
QAction * m_profiler_resume
void go_to_previous_widget(void)
QAction * m_previous_dock_action
void handle_new_figure_request(void)
QAction * m_profiler_show
QAction * m_current_news_action
void accept_directory_line_edit(void)
QMenu * m_add_menu(QMenuBar *p, QString text)
QAction * m_command_window_action
QAction * m_release_notes_action
void debug_step_over(void)
void focus_command_window(void)
void interpreter_event(const fcn_callback &fcn)
QAction * m_variable_editor_action
QAction * m_clear_command_window_action
void prepare_to_exit(void)
external_editor_interface * m_external_editor
void request_reload_settings(void)
void configure_shortcuts(void)
QAction * construct_debug_menu_item(const char *icon, const QString &item, const char *member)
bool confirm_shutdown(void)
void construct_news_menu(QMenuBar *p)
static const int current_directory_max_visible
For Toolbars.
QAction * m_preferences_action
QAction * m_show_variable_editor_action
void request_open_file(void)
void clipboard_has_changed(void)
Handling the clipboard.
QAction * m_show_documentation_action
void handle_enter_debugger(void)
void init_terminal_size_signal(void)
QAction * m_about_octave_action
void handle_save_workspace_request(void)
QComboBox * m_current_directory_combo_box
For Toolbars.
QAction * add_action(QMenu *menu, const QIcon &icon, const QString &text, const char *member, const QWidget *receiver=nullptr)
void adopt_file_browser_widget(void)
void construct_octave_qt_link(void)
bool m_prevent_readline_conflicts
Some class global flags.
QAction * m_debug_step_out
void find_files_finished(int)
Find files dialog.
void init_window_menu(void)
void construct_new_menu(QMenu *p)
QAction * m_profiler_start
QPointer< terminal_dock_widget > m_command_window
Dock widgets.
QAction * m_developer_action
QAction * m_show_workspace_action
void open_octave_packages_page(void)
void construct_file_menu(QMenuBar *p)
led_indicator * m_profiler_status_indicator
void execute_command_in_terminal(const QString &dir)
void init_terminal_size(void)
void set_file_encoding(const QString &new_encoding)
bool command_window_has_focus(void) const
void handle_update_breakpoint_marker_request(bool insert, const QString &file, int line, const QString &cond)
void do_reset_windows(bool show=true, bool save=true, bool force_all=false)
QAction * m_show_command_window_action
QAction * m_load_workspace_action
void resize_dock(QDockWidget *dw, int width, int height)
void handle_gui_status_update(const QString &feature, const QString &status)
QAction * m_clear_command_history_action
void open_online_documentation_page(void)
void focus_changed(QWidget *w_old, QWidget *w_new)
QAction * m_profiler_stop
void show_release_notes_signal(void)
QAction * m_show_file_browser_action
void open_file_signal(const QString &)
void update_default_encoding(const QString &default_encoding)
void set_screen_size(int ht, int wd)
void construct_help_menu(QMenuBar *p)
void adopt_workspace_widget(void)
void request_open_files(const QStringList &open_file_names)
QPointer< files_dock_widget > m_file_browser_window
Dock widgets.
QAction * m_report_bug_action
QToolBar * m_main_tool_bar
void handle_exit_debugger(void)
void update_octave_directory(const QString &dir)
QMenuBar * m_editor_menubar
void handle_octave_ready()
QAction * m_file_browser_action
QPointer< workspace_view > m_workspace_window
Dock widgets.
void construct_tools_menu(QMenuBar *p)
QAction * m_set_path_action
QAction * m_online_doc_action
void debug_continue(void)
octave_value_list & append(const octave_value &val)
octave_idx_type length(void) const
void enter_debugger_signal(void)
void update_breakpoint_marker_signal(bool insert, const QString &file, int line, const QString &cond)
void insert_debugger_pointer_signal(const QString &, int)
void directory_changed_signal(const QString &dir)
void file_remove_signal(const QString &old_name, const QString &new_name)
void apply_new_settings(void)
void execute_command_in_terminal_signal(const QString &command)
void settings_changed(const gui_settings *, bool)
void file_renamed_signal(bool load_new)
void show_preferences_signal(void)
void exit_debugger_signal(void)
void gui_status_update_signal(const QString &feature, const QString &status)
void delete_debugger_pointer_signal(const QString &, int)
void update_gui_lexer_signal(bool update_apis_only)
void update_path_dialog_signal(void)
void update_network_settings(void)
gui_settings * get_settings(void) const
void config_translators(QTranslator *qt_tr, QTranslator *qsci_tr, QTranslator *gui_tr)
void config_icon_theme(void)
QIcon icon(const QString &icon_name, bool octave_only=false, const QString &icon_alt_name=QString())
bool is_first_run(void) const
void reload_settings(void)
void interpreter_event(const fcn_callback &fcn)
void modify_path_signal(const QStringList &dir_list, bool rm, bool subdirs)
Emitted, when the path has to be modified.
void apply_new_settings(void)
void set_shortcut(QAction *action, const sc_pref &scpref, bool enable=true)
symbol_info_list get_symbol_info(void)
void command_requested(const QString &cmd)
Signal that user had requested a command on a variable.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
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 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 QHash< QString, QString > dw_icon_set_names
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("UTF-8"))
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 QString gui_obj_name_main_window
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 gui_pref global_use_custom_editor("useCustomFileEditor", QVariant(false))
@ EXTRA_STYLE_FUSION_DARK
const gui_pref global_ov_startup_dir("octave_startup_dir", QVariant(QString()))
const QStringList global_extra_styles
const QString global_toolbar_style("QToolBar {" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "border-top: 0px;" "border-bottom: 0px;" "}")
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 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 gui_pref sc_prevent_rl_conflicts("shortcuts/prevent_readline_conflicts", QVariant(false))
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 gui_pref sc_prevent_rl_conflicts_menu("shortcuts/prevent_readline_conflicts_menu", QVariant(false))
const sc_pref sc_main_edit_preferences(sc_main_edit+":preferences", QKeySequence::UnknownKey)
const sc_pref sc_main_tools_show_profiler(sc_main_tools+":show_profiler", Qt::AltModifier+Qt::ShiftModifier+Qt::Key_P)
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_tools_resume_profiler(sc_main_tools+":resume_profiler", QKeySequence::UnknownKey)
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_tools_start_profiler(sc_main_tools+":start_profiler", CTRL_SHIFT+Qt::Key_P)
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)
OCTGUI_API void get_screen_geometry(int &width, int &height)
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)
std::string toStdString(const QString &s)
QString fromStdString(const std::string &s)
OCTAVE_EXPORT octave_value_list Fbuiltin(octave::interpreter &interp, const octave_value_list &args, int nargout)
OCTAVE_EXPORT octave_value_list Ffeval(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.
static uint32_t state[624]
bool valid_identifier(const char *s)
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)