kwave  18.07.70
MultiWriter.h
Go to the documentation of this file.
1 /***************************************************************************
2  MultiWriter.h - writer for multi-track processing
3  -------------------
4  begin : Sun Aug 23 2009
5  copyright : (C) 2009 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <thomas.eschenbacher@gmx.de>
7 
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef MULTI_WRITER_H
20 #define MULTI_WRITER_H
21 
22 #include "config.h"
23 
24 #include <QtGlobal>
25 #include <QList>
26 #include <QObject>
27 
29 #include "libkwave/Writer.h"
30 
31 namespace Kwave
32 {
33 
38  class Q_DECL_EXPORT MultiWriter
39  :public Kwave::MultiTrackSink<Kwave::Writer, false>
40  {
41  Q_OBJECT
42  public:
43 
45  MultiWriter();
46 
48  virtual ~MultiWriter() Q_DECL_OVERRIDE;
49 
51  virtual sample_index_t last() const;
52 
54  virtual void flush();
55 
57  virtual void clear() Q_DECL_OVERRIDE;
58 
60  virtual bool insert(unsigned int track, Kwave::Writer *writer)
61  Q_DECL_OVERRIDE;
62 
64  inline bool isCanceled() const { return m_canceled; }
65 
66  signals:
67 
73  void progress(qreal percent);
74 
80  void written(quint64 samples);
81 
82  public slots:
83 
88  void cancel();
89 
90  private slots:
91 
95  void proceeded();
96 
97  protected:
98 
104 
105  };
106 
107 }
108 
109 #endif /* MULTI_WRITER_H */
110 
111 //***************************************************************************
112 //***************************************************************************
Definition: App.h:33
quint64 sample_index_t
Definition: Sample.h:28
bool isCanceled() const
Definition: MultiWriter.h:64
Kwave::Writer & flush(Kwave::Writer &s)
Definition: Writer.cpp:145