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

textstream_imp.h

00001 // -*- c++ -*-
00002 
00003 /*
00004  *  Copyright (C) 2003, Richard J. Moore <rich@kde.org>
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Library General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Library General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Library General Public License
00017  *  along with this library; see the file COPYING.LIB.  If not, write to
00018  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019  *  Boston, MA 02111-1307, USA.
00020  */
00021 
00022 #ifndef KJSEMBED_TEXTSTREAM_IMP_H
00023 #define KJSEMBED_TEXTSTREAM_IMP_H
00024 
00025 #include <qobject.h>
00026 
00027 class QTextStream;
00028 
00029 namespace KJSEmbed {
00030 namespace Bindings {
00031 
00035 class TextStream : public QObject
00036 {
00037     Q_OBJECT
00038     Q_PROPERTY( bool writable READ isReadable )
00039     Q_PROPERTY( bool readable READ isWritable )
00040     Q_PROPERTY( QString current READ current )
00041 
00042 public:
00043     TextStream( QObject *parent, const char *name, QTextStream *ts );
00044     virtual ~TextStream();
00045 
00046 public slots:
00047     bool isReadable() const;
00048     bool isWritable() const;
00049 
00050     QString current() const;
00051     void print( const QString &msg );
00052     void println( const QString &msg );
00053     QString readLine();
00054 
00055 private:
00056     QTextStream *ts;
00057     QString line;
00058     bool autodel;
00059 };
00060 
00061 } // namespace Bindings
00062 } // namespace KJSEmbed
00063 
00064 #endif // KJSEMBED_TEXTSTREAM_IMP_H

Generated at Sat Feb 1 03:23:35 2003 for KJSEmbed by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001