• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

Pty.h

Go to the documentation of this file.
00001 /*
00002     This file is part of Konsole, KDE's terminal emulator. 
00003     
00004     Copyright 2007-2008 by Robert Knight <robertknight@gmail.com>
00005     Copyright 1997,1998 by Lars Doelle <lars.doelle@on-line.de>
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020     02110-1301  USA.
00021 */
00022 
00023 #ifndef PTY_H
00024 #define PTY_H
00025 
00026 // Qt
00027 #include <QtCore/QStringList>
00028 #include <QtCore/QVector>
00029 #include <QtCore/QList>
00030 #include <QtCore/QSize>
00031 
00032 // KDE
00033 #include <KPtyProcess>
00034 #include <kdemacros.h>
00035 
00036 namespace Konsole
00037 {
00038 
00052 class KDE_EXPORT Pty: public KPtyProcess
00053 {
00054 Q_OBJECT
00055 
00056   public:
00057     
00067     explicit Pty(QObject* parent = 0);
00068 
00073     Pty(int ptyMasterFd, QObject* parent = 0);
00074 
00075     ~Pty();
00076 
00097     int start( const QString& program, 
00098                const QStringList& arguments, 
00099                const QStringList& environment, 
00100                ulong winid, 
00101                bool addToUtmp,
00102                const QString& dbusService,
00103                const QString& dbusSession
00104              );
00105 
00107     void setWriteable(bool writeable);
00108 
00114     void setFlowControlEnabled(bool on);
00115 
00117     bool flowControlEnabled() const;
00118 
00123     void setWindowSize(int lines, int cols);
00124     
00126     QSize windowSize() const;
00127 
00129     void setErase(char erase);
00130 
00132     char erase() const;
00133 
00142     int foregroundProcessGroup() const;
00143    
00144   public slots:
00145 
00149     void setUtf8Mode(bool on);
00150 
00160     void lockPty(bool lock);
00161     
00169     void sendData(const char* buffer, int length);
00170 
00171   signals:
00172 
00180     void receivedData(const char* buffer, int length);
00181    
00182   protected:
00183     void setupChildProcess();
00184 
00185   private slots:
00186     // called when data is received from the terminal process 
00187     void dataReceived(); 
00188     
00189   private:
00190     void init();
00191 
00192     // takes a list of key=value pairs and adds them
00193     // to the environment for the process
00194     void addEnvironmentVariables(const QStringList& environment);
00195 
00196     int  _windowColumns; 
00197     int  _windowLines;
00198     char _eraseChar;
00199     bool _xonXoff;
00200     bool _utf8;
00201 };
00202 
00203 }
00204 
00205 #endif // PTY_H

Konsole

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

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal