GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QUnixTerminalImpl.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 e_k (e_k@users.sourceforge.net)
2  Copyright (C) 2012-2015 Jacob Dawid <jacob.dawid@cybercatalyst.com>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 
21 #ifndef Q_UNIXTERMINALIMPL
22 #define Q_UNIXTERMINALIMPL
23 
24 #include <QtGui>
25 #include "unix/kpty.h"
26 #include "unix/TerminalModel.h"
27 #include "unix/TerminalView.h"
28 #include "QTerminal.h"
29 
31 {
32  Q_OBJECT
33 
34  int fdstderr;
35 
36 public:
37  QUnixTerminalImpl(QWidget *parent = 0);
38  virtual ~QUnixTerminalImpl();
39 
40  void setTerminalFont(const QFont &font);
41  void setSize(int h, int v);
42  void sendText(const QString& text);
43 
44  void setCursorType(CursorType type, bool blinking);
45 
46  void setBackgroundColor (const QColor& color);
47  void setForegroundColor (const QColor& color);
48  void setSelectionColor (const QColor& color);
49  void setCursorColor (bool useForegroundColor, const QColor& color);
50  void setScrollBufferSize(int value);
51  QString selectedText();
52  void has_extra_interrupt (bool extra_interrupt);
53 
54 public slots:
55  void copyClipboard();
56  void pasteClipboard();
57  void selectAll();
58 
59 protected:
60  void showEvent(QShowEvent *);
61  virtual void resizeEvent(QResizeEvent *);
62 
63 private:
64  void initialize();
65  void connectToPty();
66 
71 };
72 
73 #endif // Q_UNIXTERMINALIMPL
void setSize(int h, int v)
Represents a terminal session consisting of a pseudo-teletype and a terminal emulation.
Definition: TerminalModel.h:57
void setCursorType(CursorType type, bool blinking)
TerminalView * m_terminalView
TerminalModel * m_terminalModel
void has_extra_interrupt(bool extra_interrupt)
void setCursorColor(bool useForegroundColor, const QColor &color)
void setForegroundColor(const QColor &color)
void setTerminalFont(const QFont &font)
virtual void resizeEvent(QResizeEvent *)
void showEvent(QShowEvent *)
void sendText(const QString &text)
QUnixTerminalImpl(QWidget *parent=0)
void setScrollBufferSize(int value)
void setBackgroundColor(const QColor &color)
A widget which displays output from a terminal emulation and sends input keypresses and mouse activit...
Definition: TerminalView.h:63
Provides primitives for opening & closing a pseudo TTY pair, assigning the controlling TTY...
Definition: kpty.h:35
void setSelectionColor(const QColor &color)