28 #ifdef HAVE_QSCINTILLA
30 #if defined (HAVE_QSCI_QSCILEXEROCTAVE_H)
31 #define HAVE_LEXER_OCTAVE
32 #include <Qsci/qscilexeroctave.h>
33 #elif defined (HAVE_QSCI_QSCILEXERMATLAB_H)
34 #define HAVE_LEXER_MATLAB
35 #include <Qsci/qscilexermatlab.h>
37 #include <Qsci/qscilexercpp.h>
38 #include <Qsci/qscilexerbash.h>
39 #include <Qsci/qscilexerperl.h>
40 #include <Qsci/qscilexerbatch.h>
41 #include <Qsci/qscilexerdiff.h>
42 #include <Qsci/qsciprinter.h>
44 #include <QApplication>
45 #include <QFileDialog>
46 #include <QMessageBox>
47 #include <QTextStream>
48 #include <QVBoxLayout>
49 #include <QInputDialog>
50 #include <QPrintDialog>
82 connect (
_edit_area, SIGNAL (cursorPositionChanged (
int,
int)),
85 connect (
_edit_area, SIGNAL (context_menu_edit_signal (
const QString&)),
92 QLabel *eol_label =
new QLabel (tr (
"eol:"),
this);
94 QFontMetrics fm = eol_label->fontMetrics ();
102 QLabel *row_label =
new QLabel (tr (
"line:"),
this);
105 QLabel *col_label =
new QLabel (tr (
"col:"),
this);
116 _edit_area->setMarginType (1, QsciScintilla::SymbolMargin);
125 connect (
_edit_area, SIGNAL (marginClicked (
int,
int,
126 Qt::KeyboardModifiers)),
128 Qt::KeyboardModifiers)));
131 _edit_area->setMarginsForegroundColor (QColor (96, 96, 96));
132 _edit_area->setMarginsBackgroundColor (QColor (232, 232, 220));
133 _edit_area->setMarginType (2, QsciScintilla::TextMargin);
136 _edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch);
144 _edit_area->SendScintilla (QsciScintillaBase::SCI_AUTOCSETCANCELATSTART,
false);
146 QVBoxLayout *edit_area_layout =
new QVBoxLayout ();
149 edit_area_layout->setMargin (0);
150 setLayout (edit_area_layout);
153 connect (
_edit_area, SIGNAL (modificationChanged (
bool)),
156 connect (
_edit_area, SIGNAL (copyAvailable (
bool)),
215 QRegExp rxfun1 (
"^[\t ]*function[^=]+=[\t ]*"
216 + word_at_cursor +
"[\t ]*\\([^\\)]*\\)[\t ]*$");
217 QRegExp rxfun2 (
"^[\t ]*function[\t ]+"
218 + word_at_cursor +
"[\t ]*\\([^\\)]*\\)[\t ]*$");
219 QRegExp rxfun3 (
"^[\t ]*function[\t ]+"
220 + word_at_cursor +
"[\t ]*$");
221 QRegExp rxfun4 (
"^[\t ]*function[^=]+=[\t ]*"
222 + word_at_cursor +
"[\t ]*$");
225 QStringList lines =
_edit_area->text ().split (
"\n");
228 for (line = 0; line < lines.count (); line++)
230 if ((pos_fct = rxfun1.indexIn (lines.at (line))) != -1)
232 if ((pos_fct = rxfun2.indexIn (lines.at (line))) != -1)
234 if ((pos_fct = rxfun3.indexIn (lines.at (line))) != -1)
236 if ((pos_fct = rxfun4.indexIn (lines.at (line))) != -1)
242 _edit_area->setCursorPosition (line, pos_fct);
257 QString filename = QString ();
259 if (type == QString(
"built-in function"))
261 message = tr (
"%1 is a built-in function");
263 else if (type.isEmpty ())
271 dir = QDir (QFileInfo (
_file_name).canonicalPath ());
274 QFileInfo file = QFileInfo (dir, word_at_cursor +
".m");
278 filename = file.canonicalFilePath ();
283 file = QFileInfo (QDir (file.canonicalPath () +
"/private"),
284 word_at_cursor +
".m");
288 filename = file.canonicalFilePath ();
292 message = tr (
"Can not find function %1");
297 if (! message.isEmpty ())
301 tr (
"Octave Editor"),
303 QMessageBox::Ok,
this);
305 msgBox->setWindowModality (Qt::NonModal);
306 msgBox->setAttribute (Qt::WA_DeleteOnClose);
311 if ( filename.isEmpty ())
315 if (! filename.endsWith (
".m"))
316 filename.append (
".m");
326 if (!trackedFiles.isEmpty ())
328 if (!fileName.isEmpty ())
360 Qt::KeyboardModifiers
state)
364 unsigned int markers_mask =
_edit_area->markersAtLine (line);
366 if (state & Qt::ControlModifier)
368 if (markers_mask && (1 <<
bookmark))
398 #if defined (HAVE_LEXER_OCTAVE)
399 lexer =
new QsciLexerOctave ();
400 #elif defined (HAVE_LEXER_MATLAB)
401 lexer =
new QsciLexerMatlab ();
420 lexer =
new QsciLexerCPP ();
424 lexer =
new QsciLexerPerl ();
428 lexer =
new QsciLexerBatch ();
432 lexer =
new QsciLexerDiff ();
436 lexer =
new QsciLexerBash ();
441 #if defined (HAVE_LEXER_OCTAVE)
442 lexer =
new QsciLexerOctave ();
444 #elif defined (HAVE_LEXER_MATLAB)
445 lexer =
new QsciLexerMatlab ();
465 bool update_apis_file =
false;
468 QDesktopServices desktopServices;
469 QString prep_apis_path
470 = desktopServices.storageLocation (QDesktopServices::HomeLocation)
474 bool octave_builtins = settings->value (
475 "editor/codeCompletion_octave_builtins",
true).toBool ();
476 bool octave_functions = settings->value (
477 "editor/codeCompletion_octave_functions",
true).toBool ();
487 if (octave_functions)
494 update_apis_file = ! apis_file.exists ();
497 if (! update_apis_file && octave_functions)
500 QDateTime apis_date = apis_file.lastModified ();
504 QFileInfo local_pkg_list = QFileInfo (
505 desktopServices.storageLocation (QDesktopServices::HomeLocation)
506 +
"/.octave_packages");
507 if (local_pkg_list.exists ()
508 & (apis_date < local_pkg_list.lastModified ()) )
509 update_apis_file =
true;
513 QFileInfo global_pkg_list = QFileInfo (
515 +
"/share/octave/octave_packages");
516 if (global_pkg_list.exists ()
517 && (apis_date < global_pkg_list.lastModified ()) )
518 update_apis_file =
true;
532 QStringList keyword_list;
546 if (octave_functions)
557 keyword = QString(lexer->keywords (i));
558 keyword_list = keyword.split (QRegExp (
"\\s+"));
559 for (j = 0; j < keyword_list.size (); j++)
565 disconnect (
_lexer_apis, SIGNAL (apiPreparationFinished ()), 0, 0);
567 if (QDir(
"/").mkpath (prep_apis_path))
570 connect (
_lexer_apis, SIGNAL (apiPreparationFinished ()),
577 lexer->readSettings (*settings);
580 _edit_area->setCaretForegroundColor (lexer->color (0));
581 _edit_area->setIndentationGuidesForegroundColor (lexer->color (0));
584 if (settings->value (
"editor/showLineNumbers",
true).toBool ())
598 for (
int idx = 0; idx < key_list.
numel (); idx++)
611 if (lexer ==
"octave" || lexer ==
"matlab")
613 else if (lexer ==
"perl" || lexer ==
"bash" || lexer ==
"diff")
615 else if (lexer ==
"cpp")
617 else if (lexer ==
"batch")
671 bool remove_on_success)
694 QsciPrinter *printer =
new QsciPrinter (QPrinter::HighResolution);
696 QPrintDialog printDlg (printer,
this);
698 if (printDlg.exec () == QDialog::Accepted)
792 line_info[0] = info.line;
802 line_info[0] = info.line;
818 QFileInfo file_info (fname);
820 QString q_dir = file_info.absolutePath ();
821 QString q_function_name = file_info.fileName ();
824 q_function_name.chop (file_info.suffix ().length () + 1);
826 dir = q_dir.toStdString ();
827 function_name = q_function_name.toStdString ();
834 if (pos != std::string::npos && pos < dir.length () - 1)
836 if (dir[pos+1] ==
'@')
840 dir = dir.substr (0, pos);
901 int line, cur, prevline;
1036 qobject_cast<QWidget *> (sender ()));
1066 _edit_area->getCursorPosition (&line, &index);
1067 line = QInputDialog::getInt (
_edit_area, tr (
"Goto line"),
1068 tr (
"Line number"), line+1, 1,
1098 QsciScintilla::AutoCompletionSource s =
_edit_area->autoCompletionSource ();
1101 case QsciScintilla::AcsAll:
1105 case QsciScintilla::AcsAPIs:
1109 case QsciScintilla::AcsDocument:
1113 case QsciScintilla::AcsNone:
1126 int lineFrom, lineTo, colFrom, colTo;
1127 _edit_area->getSelection (&lineFrom, &colFrom, &lineTo, &colTo);
1132 for (
int i = lineFrom; i <= lineTo; i++)
1140 _edit_area->setSelection (lineFrom, 0, lineTo,
1146 _edit_area->getCursorPosition (&cpline, &col);
1164 int lineFrom, lineTo, colFrom, colTo;
1165 _edit_area->getSelection (&lineFrom, &colFrom, &lineTo, &colTo);
1170 for (
int i = lineFrom; i <= lineTo; i++)
1177 if (line.startsWith (comment_str))
1179 _edit_area->setSelection (i, 0, i, comment_str.length ());
1185 _edit_area->setSelection (lineFrom, 0, lineTo,
1191 _edit_area->getCursorPosition (&cpline, &col);
1193 _edit_area->insertAt (comment_str, cpline, 0);
1197 if (line.startsWith (comment_str))
1199 _edit_area->setSelection (cpline, 0, cpline, comment_str.length ());
1211 QString tooltip (
"");
1214 title = tr (
"<unnamed>");
1222 title = file.fileName ();
1244 dlg->setAttribute (Qt::WA_DeleteOnClose);
1249 dlg->setWindowModality (Qt::NonModal);
1257 int decision = QMessageBox::Yes;
1263 QMessageBox::StandardButtons buttons = QMessageBox::Save |
1264 QMessageBox::Discard |
1265 QMessageBox::Cancel;
1270 QString available_actions =
1271 tr (
"Do you want to cancel closing, save or discard the changes?");
1277 file = tr (
"<unnamed>");
1280 =
new QMessageBox (QMessageBox::Warning, tr (
"Octave Editor"),
1283 "is about to be closed but has been modified. "
1285 arg (file).
arg (available_actions),
1286 buttons, qobject_cast<QWidget *> (parent ()));
1288 msgBox->setDefaultButton (QMessageBox::Save);
1290 connect (msgBox, SIGNAL (finished (
int)),
1296 return QMessageBox::Cancel;
1312 if (decision == QMessageBox::Save)
1317 else if (decision == QMessageBox::Discard)
1339 QFileInfo file_info = QFileInfo (fileName);
1340 QString file_to_load;
1341 if (file_info.exists ())
1342 file_to_load = file_info.canonicalFilePath ();
1344 file_to_load = fileName;
1345 QFile file (file_to_load);
1346 if (!file.open (QFile::ReadOnly))
1347 return file.errorString ();
1349 QTextStream in (&file);
1350 in.setCodec(
"UTF-8");
1351 QApplication::setOverrideCursor (Qt::WaitCursor);
1354 QApplication::restoreOverrideCursor ();
1366 QsciScintilla::EolMode
1371 QByteArray eol_lf = QByteArray (1,0x0a);
1372 QByteArray eol_cr = QByteArray (1,0x0d);
1373 QByteArray eol_crlf = eol_cr;
1374 eol_crlf.append (eol_lf);
1376 int count_crlf = text.count (eol_crlf);
1377 int count_lf = text.count (eol_lf) - count_crlf;
1378 int count_cr = text.count (eol_cr) - count_crlf;
1381 #if defined (Q_OS_WIN32)
1382 int os_eol_mode = QsciScintilla::EolWindows;
1383 #elif defined (Q_OS_MAC)
1384 int os_eol_mode = QsciScintilla::EolMac;
1386 int os_eol_mode = QsciScintilla::EolUnix;
1389 QsciScintilla::EolMode eol_mode =
static_cast<QsciScintilla::EolMode
> (
1390 settings->value(
"editor/default_eol_mode",os_eol_mode).toInt ());
1394 if (count_crlf > count_max)
1396 eol_mode = QsciScintilla::EolWindows;
1397 count_max = count_crlf;
1399 if (count_lf > count_max)
1401 eol_mode = QsciScintilla::EolUnix;
1402 count_max = count_lf;
1404 if (count_cr > count_max)
1406 eol_mode = QsciScintilla::EolMac;
1407 count_max = count_cr;
1418 case QsciScintilla::EolWindows:
1421 case QsciScintilla::EolMac:
1424 case QsciScintilla::EolUnix:
1439 #if defined (Q_OS_WIN32)
1440 int eol_mode = QsciScintilla::EolWindows;
1441 #elif defined (Q_OS_MAC)
1442 int eol_mode = QsciScintilla::EolMac;
1444 int eol_mode = QsciScintilla::EolUnix;
1447 static_cast<QsciScintilla::EolMode> (
1448 settings->value(
"editor/default_eol_mode",eol_mode).toInt ()));
1469 QFileInfo file_info = QFileInfo (saveFileName);
1470 QString file_to_save;
1471 if (file_info.exists ())
1472 file_to_save = file_info.canonicalFilePath ();
1474 file_to_save = saveFileName;
1475 QFile file (file_to_save);
1479 if (trackedFiles.contains (file_to_save))
1483 if (!file.open (QIODevice::WriteOnly))
1487 if (trackedFiles.contains (file_to_save))
1493 tr (
"Octave Editor"),
1494 tr (
"Could not open file %1 for write:\n%2.").
1495 arg (file_to_save).
arg (file.errorString ()),
1496 QMessageBox::Ok, 0);
1503 QTextStream out (&file);
1504 out.setCodec(
"UTF-8");
1505 QApplication::setOverrideCursor (Qt::WaitCursor);
1508 QApplication::restoreOverrideCursor ();
1513 file_info = QFileInfo (file);
1514 file_to_save = file_info.canonicalFilePath ();
1525 if (remove_on_success)
1541 if (remove_on_success)
1554 fileDialog->setOption(QFileDialog::DontUseNativeDialog,
true);
1557 QGridLayout *dialog_layout =
dynamic_cast<QGridLayout*
> (fileDialog->layout ());
1558 int rows = dialog_layout->rowCount ();
1561 QGridLayout *extra =
new QGridLayout (fileDialog);
1562 QSpacerItem *spacer =
new QSpacerItem (1,1,QSizePolicy::Expanding,
1563 QSizePolicy::Fixed);
1564 QFrame *separator =
new QFrame (fileDialog);
1565 separator->setFrameShape (QFrame::HLine);
1566 separator->setFrameStyle (QFrame::Sunken);
1569 QLabel *label_eol =
new QLabel (tr (
"Line Endings:"));
1570 QComboBox *combo_eol =
new QComboBox ();
1571 combo_eol->addItem (
"Windows (CRLF)");
1572 combo_eol->addItem (
"Mac (CR)");
1573 combo_eol->addItem (
"Unix (LF)");
1578 connect (combo_eol, SIGNAL (currentIndexChanged (
int)),
1582 extra->addWidget (separator,0,0,1,3);
1583 extra->addWidget (label_eol,1,0);
1584 extra->addWidget (combo_eol,1,1);
1585 extra->addItem (spacer, 1,2);
1588 dialog_layout->addLayout (extra,rows,0,1,dialog_layout->columnCount ());
1591 QStringList filters;
1592 filters << tr (
"Octave Files (*.m)")
1593 << tr (
"All Files (*)");
1594 fileDialog->setNameFilters (filters);
1595 fileDialog->setDefaultSuffix (
"m");
1601 if (file_info.suffix () !=
"m")
1603 fileDialog->selectNameFilter (filters.at (1));
1604 fileDialog->setDefaultSuffix (
"");
1609 fileDialog->selectFile (
"");
1610 fileDialog->setDirectory (
_ced);
1614 if (! fname.isEmpty ())
1615 fileDialog->selectFile (fname +
".m");
1618 fileDialog->setAcceptMode (QFileDialog::AcceptSave);
1619 fileDialog->setViewMode (QFileDialog::Detail);
1621 connect (fileDialog, SIGNAL (filterSelected (
const QString&)),
1624 if (remove_on_success)
1626 connect (fileDialog, SIGNAL (fileSelected (
const QString&)),
1629 connect (fileDialog, SIGNAL (rejected ()),
1634 connect (fileDialog, SIGNAL (fileSelected (
const QString&)),
1652 QRegExp rx (
"\\*\\.([^ ^\\)]*)[ \\)]");
1653 int index = rx.indexIn (filter,0);
1656 file_dialog->setDefaultSuffix (rx.cap (1));
1658 file_dialog->setDefaultSuffix (
"");
1664 QFileInfo file = QFileInfo (file_name);
1665 QString base_name = file.baseName ();
1667 if ((file.suffix () ==
"m")
1670 int ans = QMessageBox::question (0, tr (
"Octave Editor"),
1672 "is not a valid identifier.\n\n"
1673 "If you keep this file name, you will not be able to\n"
1674 "call your script using its name as an Octave command.\n\n"
1675 "Do you want to choose another name?").
arg (base_name),
1676 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
1678 if (ans == QMessageBox::Yes)
1740 if (!trackedFiles.isEmpty ())
1755 tr (
"Octave Editor"),
1756 tr (
"It seems that \'%1\' has been modified by another application. Do you want to reload it?").
1758 QMessageBox::Yes | QMessageBox::No,
this);
1760 connect (msgBox, SIGNAL (finished (
int)),
1763 msgBox->setWindowModality (Qt::WindowModal);
1764 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1770 QString modified =
"";
1772 modified = tr (
"\n\nWarning: The contents in the editor is modified!");
1778 =
new QMessageBox (QMessageBox::Warning, tr (
"Octave Editor"),
1779 tr (
"It seems that the file\n"
1781 "has been deleted or renamed. Do you want to save it now?%2").
1783 QMessageBox::Save | QMessageBox::Close, 0);
1787 connect (msgBox, SIGNAL (finished (
int)),
1790 msgBox->setWindowModality (Qt::WindowModal);
1791 msgBox->setAttribute (Qt::WA_DeleteOnClose);
1805 if (settings->value (
"editor/code_folding",
true).toBool ())
1807 _edit_area->setMarginType (3, QsciScintilla::SymbolMargin);
1808 _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3);
1812 _edit_area->setFolding (QsciScintilla::NoFoldStyle, 3);
1816 if (settings->value (
"editor/show_edit_status_bar",
true).toBool ())
1822 QVariant default_var = QColor (240, 240, 240);
1823 QColor setting_color = settings->value (
"editor/highlight_current_line_color",
1824 default_var).value<QColor> ();
1825 _edit_area->setCaretLineBackgroundColor (setting_color);
1827 (settings->value (
"editor/highlightCurrentLine",
true).toBool ());
1829 bool match_keywords = settings->value
1830 (
"editor/codeCompletion_keywords",
true).toBool ();
1831 bool match_document = settings->value
1832 (
"editor/codeCompletion_document",
true).toBool ();
1834 QsciScintilla::AutoCompletionSource source = QsciScintilla::AcsNone;
1837 source = QsciScintilla::AcsAll;
1839 source = QsciScintilla::AcsAPIs;
1840 else if (match_document)
1841 source = QsciScintilla::AcsDocument;
1842 _edit_area->setAutoCompletionSource (source);
1845 (settings->value (
"editor/codeCompletion_replace",
false).toBool ());
1847 (settings->value (
"editor/codeCompletion_case",
true).toBool ());
1849 if (settings->value (
"editor/codeCompletion",
true).toBool ())
1851 (settings->value (
"editor/codeCompletion_threshold",2).toInt ());
1855 if (settings->value (
"editor/show_white_space",
false).toBool ())
1856 if (settings->value (
"editor/show_white_space_indent",
false).toBool ())
1857 _edit_area->setWhitespaceVisibility (QsciScintilla::WsVisibleAfterIndent);
1859 _edit_area->setWhitespaceVisibility (QsciScintilla::WsVisible);
1861 _edit_area->setWhitespaceVisibility (QsciScintilla::WsInvisible);
1864 settings->value(
"editor/show_eol_chars",
false).toBool ());
1866 if (settings->value (
"editor/showLineNumbers",
true).toBool ())
1870 connect (
_edit_area, SIGNAL (linesChanged ()),
1876 disconnect (
_edit_area, SIGNAL (linesChanged ()), 0, 0);
1880 (settings->value (
"editor/auto_indent",
true).toBool ());
1882 (settings->value (
"editor/tab_indents_line",
false).toBool ());
1884 (settings->value (
"editor/backspace_unindents_line",
false).toBool ());
1886 (settings->value (
"editor/show_indent_guides",
false).toBool ());
1888 (settings->value (
"editor/indent_uses_tabs",
false).toBool ());
1890 (settings->value (
"editor/indent_width",2).toInt ());
1893 (settings->value (
"editor/tab_width",2).toInt ());
1895 _edit_area->SendScintilla (QsciScintillaBase::SCI_SETHSCROLLBAR,
1896 settings->value (
"editor/show_hscroll_bar",
true).toBool ());
1897 _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTH,-1);
1898 _edit_area->SendScintilla (QsciScintillaBase::SCI_SETSCROLLWIDTHTRACKING,
true);
1900 _long_title = settings->value (
"editor/longWindowTitle",
false).toBool ();
1904 settings->value (
"editor/long_line_column",80).toInt ());
1905 if (settings->value (
"editor/long_line_marker",
true).toBool ())
1906 _edit_area->setEdgeMode (QsciScintilla::EdgeLine);
1908 _edit_area->setEdgeMode (QsciScintilla::EdgeNone);
1912 settings->value (
"editor/always_reload_changed_files",
false).toBool ();
1965 if (ID !=
this && ID != 0)
1976 if (decision == QMessageBox::Yes)
1992 if (decision == QMessageBox::Save)
2011 if (ID !=
this || ID == 0)
2024 if (ID !=
this || ID == 0)
2034 if (ID !=
this || ID == 0)
2050 long int visible_lines
2051 =
_edit_area->SendScintilla (QsciScintillaBase::SCI_LINESONSCREEN);
2053 if (visible_lines > 2)
2056 _edit_area->getCursorPosition (&line, &index);
2058 int first_line =
_edit_area->firstVisibleLine ();
2059 first_line = first_line + (line - first_line - (visible_lines-1)/2);
2068 if (
_edit_area->SendScintilla (QsciScintillaBase::SCI_AUTOCACTIVE))
2078 QRegExp rxfun1 (
"^[\t ]*function[^=]+=([^\\(]+)\\([^\\)]*\\)[\t ]*$");
2079 QRegExp rxfun2 (
"^[\t ]*function[\t ]+([^\\(]+)\\([^\\)]*\\)[\t ]*$");
2080 QRegExp rxfun3 (
"^[\t ]*function[^=]+=[\t ]*([^\\s]+)[\t ]*$");
2081 QRegExp rxfun4 (
"^[\t ]*function[\t ]+([^\\s]+)[\t ]*$");
2083 QStringList lines =
_edit_area->text ().split (
"\n");
2085 for (
int i = 0; i < lines.count (); i++)
2087 if (rxfun1.indexIn (lines.at (i)) != -1)
2088 return rxfun1.cap (1).remove (QRegExp(
"[ \t]*"));
2089 else if (rxfun2.indexIn (lines.at (i)) != -1)
2090 return rxfun2.cap (1).remove (QRegExp(
"[ \t]*"));
2091 else if (rxfun3.indexIn (lines.at (i)) != -1)
2092 return rxfun3.cap (1).remove (QRegExp(
"[ \t]*"));
2093 else if (rxfun4.indexIn (lines.at (i)) != -1)
2094 return rxfun4.cap (1).remove (QRegExp(
"[ \t]*"));
void handle_file_resave_answer(int decision)
void file_has_changed(const QString &fileName)
const Cell & contents(const_iterator p) const
OCTINTERP_API octave_value_list F__keywords__(const octave_value_list &=octave_value_list(), int=0)
void closeEvent(QCloseEvent *event)
void update_window_title(bool modified)
void remove_breakpoint_callback(const bp_info &info)
void convert_eol(const QWidget *ID, QsciScintilla::EolMode)
void previous_bookmark(const QWidget *ID)
bool _find_dialog_is_visible
void indent_selected_text(const QWidget *ID)
void context_help(const QWidget *ID, bool)
void add_filename_to_list(const QString &, QWidget *)
void set_file_name(const QString &fileName)
bp_info(const QString &fname, int l=0)
void find(const QWidget *ID)
static uint32_t state[624]
find_dialog * _find_dialog
QFileSystemWatcher _file_system_watcher
octave_idx_type numel(void) const
Number of elements in the array.
void handle_save_file_as_answer_close(const QString &fileName)
void zoom_normal(const QWidget *ID)
void handle_combo_eol_current_index(int index)
void zoom_out(const QWidget *ID)
void file_name_query(const QWidget *ID)
void toggle_breakpoint(const QWidget *ID)
void add_breakpoint_callback(const bp_info &info)
QString fromStdString(const std::string &s)
void handle_copy_available(bool enableCopy)
void request_add_breakpoint(int line)
void do_breakpoint_marker(bool insert, const QWidget *ID, int line=-1)
void remove_all_breakpoints(const QWidget *ID)
T & elem(octave_idx_type n)
void handle_cursor_moved(int line, int col)
OCTINTERP_API octave_value_list F__builtins__(const octave_value_list &=octave_value_list(), int=0)
void update_eol_indicator()
void handle_find_dialog_finished(int decision)
void check_modified_file(void)
void save_file_as(const QWidget *ID)
Cell cell_value(void) const
void context_help_doc(bool)
static std::string concat(const std::string &, const std::string &)
void message(const char *name, const char *fmt,...)
void set_focus(const QWidget *ID)
void file_name_changed(const QString &fileName, const QString &toolTip)
bool valid_identifier(const char *s)
void insert_debugger_pointer(const QWidget *ID, int line=-1)
std::string string_value(bool force=false) const
void notice_settings(const QSettings *settings, bool init=false)
void print_file(const QWidget *ID)
MArray< double > filter(MArray< double > &, MArray< double > &, MArray< double > &, int dim)
std::map< int, int > intmap
void change_editor_state(const QWidget *ID)
void center_current_line()
void goto_line(const QWidget *ID, int line=-1)
const T * data(void) const
void do_comment_selected_text(bool comment)
void request_remove_breakpoint(int line)
void handle_margin_clicked(int line, int margin, Qt::KeyboardModifiers state)
void next_bookmark(const QWidget *ID)
static void post_event(T *obj, void(T::*method)(void))
void save_file(const QWidget *ID)
void move_match_brace(const QWidget *ID, bool select)
void context_run(const QWidget *ID)
void remove_bookmark(const QWidget *ID)
void unindent_selected_text(const QWidget *ID)
static intmap remove_all_breakpoints_in_file(const std::string &fname, bool silent=false)
void set_current_directory(const QString &dir)
void handle_file_modified_answer(int decision)
static QSettings * get_settings(void)
void handle_context_menu_edit(const QString &)
void handle_file_reload_answer(int decision)
void delete_debugger_pointer(const QWidget *ID, int line=-1)
QString get_function_name()
octave_qscintilla * _edit_area
void show_dialog(QDialog *dlg, bool modal)
void toggle_bookmark(const QWidget *ID)
bool check_valid_identifier(QString file_name)
void handle_save_file_as_answer(const QString &fileName)
void context_edit(const QWidget *ID)
static std::string dir_sep_chars(void)
void do_indent_selected_text(bool indent)
octave_value_list ovl(const octave_value &a0)
void remove_all_breakpoints_callback(const bp_info &info)
void next_breakpoint(const QWidget *ID)
bool _always_reload_changed_files
QString comment_string(const QString &)
void handle_save_as_filter_selected(const QString &filter)
void mru_add_file(const QString &file_name)
QRect _find_dialog_geometry
void previous_breakpoint(const QWidget *ID)
QsciScintilla::EolMode detect_eol_mode()
int check_file_modified()
void uncomment_selected_text(const QWidget *ID)
void add_octave_apis(octave_value_list key_ovl)
void handle_save_file_as_answer_cancel()
static int remove_breakpoint(const std::string &fname="", const intmap &lines=intmap())
OCTINTERP_API octave_value_list F__which__(const octave_value_list &=octave_value_list(), int=0)
bool conditional_close(void)
static bool file_in_path(const std::string &file, const std::string &dir)
void editor_check_conflict_save(const QString &saveFileName, bool remove_on_success)
static intmap add_breakpoint(const std::string &fname="", const intmap &lines=intmap())
QString load_file(const QString &fileName)
QsciScintilla::EolMode _save_as_desired_eol
void show_auto_completion(const QWidget *ID)
void scintilla_command(const QWidget *, unsigned int)
void zoom_in(const QWidget *ID)
void run_file(const QWidget *ID)
void comment_selected_text(const QWidget *ID)
std::string toStdString(const QString &s)
void set_modified(bool modified=true)
void tab_remove_request()
void new_file(const QString &commands=QString())
void run_file_signal(const QFileInfo &info)
void editor_state_changed(bool copy_available, bool is_octave_file)
void request_open_file(const QString &)
bool valid_file_name(const QString &file=QString())
OCTINTERP_API octave_value_list F__list_functions__(const octave_value_list &=octave_value_list(), int=0)
file_editor_tab(const QString &directory="")