• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • kde-4.14
  • applications
  • konsole
  • src
Pty.h
Go to the documentation of this file.
1 /*
2  This file is part of Konsole, KDE's terminal emulator.
3 
4  Copyright 2007-2008 by Robert Knight <robertknight@gmail.com>
5  Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
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 2 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, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  02110-1301 USA.
21 */
22 
23 #ifndef PTY_H
24 #define PTY_H
25 
26 // Qt
27 #include <QtCore/QSize>
28 
29 // KDE
30 #include <KPtyProcess>
31 
32 // Konsole
33 #include "konsole_export.h"
34 
35 class QStringList;
36 
37 namespace Konsole
38 {
52 class KONSOLEPRIVATE_EXPORT Pty: public KPtyProcess
53 {
54  Q_OBJECT
55 
56 public:
66  explicit Pty(QObject* parent = 0);
67 
72  explicit Pty(int ptyMasterFd, QObject* parent = 0);
73 
74  ~Pty();
75 
88  int start(const QString& program,
89  const QStringList& arguments,
90  const QStringList& environment
91  );
92 
94  void setWriteable(bool writeable);
95 
101  void setFlowControlEnabled(bool on);
102 
104  bool flowControlEnabled() const;
105 
110  void setWindowSize(int columns, int lines);
111 
113  QSize windowSize() const;
114 
119  void setEraseChar(char eraseChar);
120 
122  char eraseChar() const;
123 
127  void setInitialWorkingDirectory(const QString& dir);
128 
137  int foregroundProcessGroup() const;
138 
142  void closePty();
143 
144 public slots:
148  void setUtf8Mode(bool on);
149 
157  void sendData(const char* buffer, int length);
158 
159 signals:
167  void receivedData(const char* buffer, int length);
168 
169 protected:
170  void setupChildProcess();
171 
172 private slots:
173  // called when data is received from the terminal process
174  void dataReceived();
175 
176 private:
177  void init();
178 
179  // takes a list of key=value pairs and adds them
180  // to the environment for the process
181  void addEnvironmentVariables(const QStringList& environment);
182 
183  int _windowColumns;
184  int _windowLines;
185  char _eraseChar;
186  bool _xonXoff;
187  bool _utf8;
188 };
189 }
190 
191 #endif // PTY_H
konsole_export.h
Konsole::Pty
The Pty class is used to start the terminal process, send data to it, receive data from it and manipu...
Definition: Pty.h:52
QObject
QString
QStringList
QSize
KONSOLEPRIVATE_EXPORT
#define KONSOLEPRIVATE_EXPORT
Definition: konsole_export.h:33
KPtyProcess
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal