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 (has_selected_text)
104 QRegExp
file (
"(?:[ \\t]+)(\\S+) at line (\\d+) column (?:\\d+)");
106 int pos = file.indexIn (selected_text);
110 QString file_name = file.cap (1);
111 QString
line = file.cap (2);
115 .
arg (file_name).
arg (line));
118 data << file_name << line;
145 QFont term_font = QFont ();
146 term_font.setStyleHint (QFont::TypeWriter);
148 (settings->value (
"terminal/fontName",
"Courier New").toString ());
149 term_font.setPointSize (settings->value (
"terminal/fontSize", 10).toInt ());
153 = settings->value (
"terminal/cursorType",
"ibeam").toString ();
156 = settings->value (
"terminal/cursorBlinking",
true).toBool ();
158 if (cursorType ==
"ibeam")
160 else if (cursorType ==
"block")
162 else if (cursorType ==
"underline")
165 bool cursorUseForegroundColor
166 = settings->value (
"terminal/cursorUseForegroundColor",
true).toBool ();
171 (settings->value (
"terminal/color_f",
172 QVariant (colors.at (0))).value<QColor> ());
175 (settings->value (
"terminal/color_b",
176 QVariant (colors.at (1))).value<QColor> ());
179 (settings->value (
"terminal/color_s",
180 QVariant (colors.at (2))).value<QColor> ());
183 (cursorUseForegroundColor,
184 settings->value (
"terminal/color_c",
185 QVariant (colors.at (3))).value<QColor> ());
190 sc = QKeySequence (settings->value (
"shortcuts/main_edit:copy").toString ());
194 sc = QKeySequence::Copy;
197 bool extra_ir_action = (sc != QKeySequence (Qt::ControlModifier | Qt::Key_C));
202 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
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 void setCursorColor(bool useForegroundColor, const QColor &color)=0
OCTAVE_EXPORT octave_value_list at
void notice_settings(const QSettings *settings)
static QTerminal * create(QWidget *xparent=0)
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)