00001 /**************************************************************************** 00002 ** $Id: aexttext.h,v 1.3 2006/08/20 11:28:32 leader Exp $ 00003 ** 00004 ** Extension object header file of 00005 ** Ananas application library 00006 ** 00007 ** Created : 20031201 00008 ** 00009 ** Copyright (C) 2003-2004 Leader InfoTech. All rights reserved. 00010 ** Copyright (C) 2003-2005 Grigory Panov, Yoshkar-Ola. 00011 ** 00012 ** This file is part of the Designer application of the Ananas 00013 ** automation accounting system. 00014 ** 00015 ** This file may be distributed and/or modified under the terms of the 00016 ** GNU General Public License version 2 as published by the Free Software 00017 ** Foundation and appearing in the file LICENSE.GPL included in the 00018 ** packaging of this file. 00019 ** 00020 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00021 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00022 ** 00023 ** See http://www.leaderit.ru/page=ananas or email sales@leaderit.ru 00024 ** See http://www.leaderit.ru/gpl/ for GPL licensing information. 00025 ** 00026 ** Contact org@leaderit.ru if any conditions of this licensing are 00027 ** not clear to you. 00028 ** 00029 **********************************************************************/ 00030 00031 #ifndef AEXTTEXT_H 00032 #define AEXTTEXT_H 00033 00034 #include "aextension.h" 00035 #include <qfile.h> 00036 00037 00045 class ANANAS_EXPORT AExtText : public AExtension 00046 { 00047 Q_OBJECT 00048 Q_PROPERTY( QString codec READ getCodec WRITE setCodec ) 00049 00050 public: 00051 00052 AExtText(); 00053 ~AExtText(); 00054 public: 00055 00056 QString getCodec() const ; 00057 void setCodec( const QString &codecname ); 00058 00059 public slots: 00060 int open( const QString &filename, const QString &mode ); 00061 void close(); 00062 bool atEnd(); 00063 00064 QString readLine(); 00065 void writeLine( const QString &l ); 00066 00067 private: 00068 QFile file; 00069 QTextStream *text; 00070 }; 00071 00072 #endif //AEXTTEXT_H