26 #if defined (Q_OS_WIN32) 35 #if defined (Q_OS_WIN32) 47 if (colors.isEmpty ())
49 colors << QColor(0,0,0)
50 << QColor(255,255,255)
51 << QColor(192,192,192)
52 << QColor(128,128,128);
61 static QStringList names;
65 names << QObject::tr (
"foreground")
66 << QObject::tr (
"background")
67 << QObject::tr (
"selection")
68 << QObject::tr (
"cursor");
86 QKeySequence (Qt::ControlModifier | Qt::Key_C));
88 QKeySequence (Qt::ControlModifier | Qt::Key_D));
96 QClipboard * cb = QApplication::clipboard ();
98 bool has_selected_text = ! selected_text.isEmpty ();
102 #if defined (Q_OS_WIN32) 105 if (has_selected_text)
107 QRegExp
file (
"(?:[ \\t]+)(\\S+) at line (\\d+) column (?:\\d+)");
109 int pos =
file.indexIn (selected_text);
113 QString file_name =
file.cap (1);
121 data << file_name <<
line;
132 if (actions.length ())
134 for (
int i = 0;
i < actions.length ();
i++)
141 for (
int i = 0;
i < actions.length ();
i++)
161 QFont term_font = QFont ();
162 term_font.setStyleHint (QFont::TypeWriter);
164 (settings->value (
"terminal/fontName",
"Courier New").toString ());
165 term_font.setPointSize (settings->value (
"terminal/fontSize", 10).toInt ());
169 = settings->value (
"terminal/cursorType",
"ibeam").toString ();
172 if (settings->contains (
"cursor_blinking"))
173 cursorBlinking = settings->value (
"cursor_blinking",
true).toBool ();
175 cursorBlinking = settings->value (
"terminal/cursorBlinking",
true).toBool ();
177 if (cursorType ==
"ibeam")
179 else if (cursorType ==
"block")
181 else if (cursorType ==
"underline")
184 bool cursorUseForegroundColor
185 = settings->value (
"terminal/cursorUseForegroundColor",
true).toBool ();
190 (settings->value (
"terminal/color_f",
191 QVariant (colors.at (0))).value<QColor> ());
194 (settings->value (
"terminal/color_b",
195 QVariant (colors.at (1))).value<QColor> ());
198 (settings->value (
"terminal/color_s",
199 QVariant (colors.at (2))).value<QColor> ());
202 (cursorUseForegroundColor,
203 settings->value (
"terminal/color_c",
204 QVariant (colors.at (3))).value<QColor> ());
209 sc = QKeySequence (settings->value (
"shortcuts/main_edit:copy").toString ());
213 sc = QKeySequence::Copy;
216 bool extra_ir_action = (
sc != QKeySequence (Qt::ControlModifier | Qt::Key_C));
221 bool ctrld = settings->value (
"shortcuts/main_ctrld",
false).toBool ();
void edit_mfile_request(const QString &, int)
For example cd octave end example noindent changes the current working directory to an error message is printed and the working directory is not changed sc
For example cd octave end example noindent changes the current working directory to file
virtual void setScrollBufferSize(int value=1000)=0
virtual void setForegroundColor(const QColor &color)=0
static QTerminal * create(QWidget *xparent=nullptr)
QAction * _interrupt_action
virtual void setSelectionColor(const QColor &color)=0
virtual void has_extra_interrupt(bool extra)=0
virtual QString selectedText()=0
void set_global_shortcuts(bool focus_out)
virtual QList< QAction * > get_hotspot_actions(const QPoint &)
virtual void setCursorColor(bool useForegroundColor, const QColor &color)=0
OCTAVE_EXPORT octave_value_list at
void notice_settings(const QSettings *settings)
static QStringList color_names(void)
virtual void setTerminalFont(const QFont &font)=0
static QList< QColor > default_colors(void)
virtual void setBackgroundColor(const QColor &color)=0
virtual void setCursorType(CursorType type, bool blinking)
virtual void handleCustomContextMenuRequested(const QPoint &at)