Mercurial > octave-nkf
view gui/src/terminal/TerminalEmulation.h @ 13640:bad5cb3cfe20
Cleanly separated terminal emulation code with an interface for platform-dependent terminals.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 22 Aug 2011 23:49:25 +0200 |
parents | |
children | 68c50b393f1d |
line wrap: on
line source
#ifndef TERMINALEMULATION_H #define TERMINALEMULATION_H #include <QObject> #include <QKeyEvent> #include <QTextCursor> class Terminal { public: virtual QTextCursor textCursor () = 0; virtual void setTextCursor (const QTextCursor& cursor) = 0; virtual void bell () = 0; }; class TerminalEmulation : public QObject { Q_OBJECT public: static TerminalEmulation *newTerminalEmulation (Terminal *terminal); TerminalEmulation (); virtual ~TerminalEmulation () {} virtual void processKeyEvent (QKeyEvent *keyEvent) = 0; virtual void transmitText (const QString& text) = 0; protected: Terminal *m_terminal; }; #endif // TERMINALEMULATION_H