kwave  18.07.70
AsciiDecoder.h
Go to the documentation of this file.
1 /*************************************************************************
2  AsciiDecoder.h - decoder for ASCII data
3  -------------------
4  begin : Sun Nov 26 2006
5  copyright : (C) 2006 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef ASCII_DECODER_H
19 #define ASCII_DECODER_H
20 
21 #include "config.h"
22 
23 #include <QQueue>
24 #include <QString>
25 #include <QTextStream>
26 
27 #include "libkwave/Decoder.h"
28 #include "libkwave/FileInfo.h"
29 
30 class QIODevice;
31 class QWidget;
32 
33 namespace Kwave
34 {
36  {
37  public:
39  AsciiDecoder();
40 
42  virtual ~AsciiDecoder() Q_DECL_OVERRIDE;
43 
45  virtual Kwave::Decoder *instance() Q_DECL_OVERRIDE;
46 
54  virtual bool open(QWidget *widget, QIODevice &source) Q_DECL_OVERRIDE;
55 
63  virtual bool decode(QWidget *widget, Kwave::MultiWriter &dst)
64  Q_DECL_OVERRIDE;
65 
69  virtual void close() Q_DECL_OVERRIDE;
70 
71  private:
72 
79  bool readNextLine();
80 
81  private:
82 
84  QTextStream m_source;
85 
88 
90  QQueue<QString> m_queue_input;
91 
93  quint64 m_line_nr;
94 
95  };
96 }
97 
98 #endif /* ASCII_DECODER_H */
99 
100 //***************************************************************************
101 //***************************************************************************
virtual bool decode(QWidget *widget, Kwave::MultiWriter &dst) Q_DECL_OVERRIDE
Definition: App.h:33
virtual ~AsciiDecoder() Q_DECL_OVERRIDE
virtual void close() Q_DECL_OVERRIDE
QQueue< QString > m_queue_input
Definition: AsciiDecoder.h:90
virtual bool open(QWidget *widget, QIODevice &source) Q_DECL_OVERRIDE
QTextStream m_source
Definition: AsciiDecoder.h:84
Kwave::MultiWriter * m_dest
Definition: AsciiDecoder.h:87
virtual Kwave::Decoder * instance() Q_DECL_OVERRIDE