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
QWinTerminalImpl.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011, 2013 Michael Goffioul.
4 
5 This file is part of QConsole.
6 
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program. If not,
19 see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef __QConsole_h__
24 #define __QConsole_h__ 1
25 
26 #include <QWidget>
27 #include "QTerminal.h"
28 class QFocusEvent;
29 class QKeyEvent;
30 class QPainter;
31 class QPaintEvent;
32 class QResizeEvent;
33 class QWheelEvent;
34 class QPoint;
35 class QDragEnterEvent;
36 class QDropEvent;
37 
38 class QConsolePrivate;
39 class QConsoleThread;
40 class QConsoleView;
41 
42 //////////////////////////////////////////////////////////////////////////////
43 
45 {
46  Q_OBJECT
47  friend class QConsolePrivate;
48  friend class QConsoleThread;
49  friend class QConsoleView;
50 
51 public:
52  QWinTerminalImpl (QWidget* parent = 0);
53  QWinTerminalImpl (const QString& cmd, QWidget* parent = 0);
54  ~QWinTerminalImpl (void);
55 
56  void setTerminalFont (const QFont& font);
57  void setSize (int columns, int lines);
58  void sendText (const QString& s);
59  void setCursorType (CursorType type, bool blinking);
60 
61  void setBackgroundColor (const QColor& color);
62  void setForegroundColor (const QColor& color);
63  void setSelectionColor (const QColor& color);
64  void setCursorColor (bool useForegoundColor, const QColor& color);
65  void setScrollBufferSize(int value);
66 
67  QString selectedText ();
68 
69  void has_extra_interrupt (bool);
70 
71 public slots:
72  void copyClipboard (void);
73  void pasteClipboard (void);
74  void selectAll (void);
75  void blinkCursorEvent (void);
76  void init_terminal_size (void);
77 
78 signals:
79  void terminated (void);
80  void titleChanged (const QString&);
81  void set_global_shortcuts_signal (bool);
82  void set_screen_size_signal (int, int);
83 
84 protected:
85  void viewPaintEvent (QConsoleView*, QPaintEvent*);
86  void setBlinkingCursor (bool blink);
87  void setBlinkingCursorState (bool blink);
88  void viewResizeEvent (QConsoleView*, QResizeEvent*);
89  void wheelEvent (QWheelEvent*);
90  void focusInEvent (QFocusEvent*);
91  void focusOutEvent (QFocusEvent*);
92  void keyPressEvent (QKeyEvent*);
93  virtual void start (void);
94  void mouseMoveEvent (QMouseEvent *event);
95  void mousePressEvent (QMouseEvent *event);
96  void mouseReleaseEvent (QMouseEvent *event);
97  void mouseDoubleClickEvent (QMouseEvent* event);
98  void mouseTripleClickEvent (QMouseEvent* event);
99 
100  bool eventFilter(QObject *obj, QEvent *ev);
101 
102  void dragEnterEvent(QDragEnterEvent *event);
103  void dropEvent(QDropEvent *event);
104 
105 private slots:
106  void horizontalScrollValueChanged (int value);
107  void verticalScrollValueChanged (int value);
108  void monitorConsole (void);
109  void updateSelection (void);
110  void tripleClickTimeout (void);
111 
112 private:
116 };
117 
118 //////////////////////////////////////////////////////////////////////////////
119 
120 #endif // __QConsole_h__
void horizontalScrollValueChanged(int value)
void setBlinkingCursor(bool blink)
void focusOutEvent(QFocusEvent *)
void setCursorType(CursorType type, bool blinking)
void tripleClickTimeout(void)
void set_global_shortcuts_signal(bool)
void titleChanged(const QString &)
void terminated(void)
void init_terminal_size(void)
void setCursorColor(bool useForegoundColor, const QColor &color)
void setSelectionColor(const QColor &color)
void verticalScrollValueChanged(int value)
void setForegroundColor(const QColor &color)
void mouseReleaseEvent(QMouseEvent *event)
void keyPressEvent(QKeyEvent *)
void setScrollBufferSize(int value)
void sendText(const QString &s)
virtual void start(void)
void mouseTripleClickEvent(QMouseEvent *event)
void focusInEvent(QFocusEvent *)
void set_screen_size_signal(int, int)
void setSize(int columns, int lines)
QConsolePrivate * d
void setBackgroundColor(const QColor &color)
void has_extra_interrupt(bool)
void setBlinkingCursorState(bool blink)
void viewPaintEvent(QConsoleView *, QPaintEvent *)
void dropEvent(QDropEvent *event)
void setTerminalFont(const QFont &font)
void viewResizeEvent(QConsoleView *, QResizeEvent *)
bool eventFilter(QObject *obj, QEvent *ev)
QWinTerminalImpl(QWidget *parent=0)
void dragEnterEvent(QDragEnterEvent *event)
void mouseMoveEvent(QMouseEvent *event)
void mouseDoubleClickEvent(QMouseEvent *event)
void mousePressEvent(QMouseEvent *event)
void wheelEvent(QWheelEvent *)