Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

cuteshell.h

00001 /***************************************************************************
00002                           cuteshell.h  -  description
00003                              -------------------
00004     begin                : Sam Aug 10 2:5:49 CEST 2002
00005     copyright            : (C) 2003 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __CUTESHELL_H__
00019 #define __CUTESHELL_H__
00020 
00021 #include <qtextedit.h>
00022 #include <qprocess.h>
00023 #include <qpopupmenu.h>
00024 #include <qstringlist.h>
00025 
00026 class CUTEShell : public QTextEdit
00027 {
00028     Q_OBJECT
00029 public:
00030     CUTEShell( QWidget *parent = 0, const char *name = 0 );
00031 protected:
00032     QPopupMenu *createPopupMenu( const QPoint & pos );
00034     void keyPressEvent( QKeyEvent *e );
00035 protected slots:
00036     void readStdout();
00037     void readStderr();
00038     void processExited();
00040     void runCommand();
00042     void setCursorPos();
00043 private:
00045     QProcess *proc;
00047     QPopupMenu *contextMenu;
00049     QStringList history;
00051     QStringList::iterator curr_cmd;
00053     QString prompt;
00054 };
00055 
00056 #endif
00057 

Generated on Sun May 2 20:02:57 2004 by doxygen 1.3.2