kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
MimeData.h
Go to the documentation of this file.
1
/***************************************************************************
2
MimeData.h - mime data container for Kwave's audio data
3
-------------------
4
begin : Oct 04 2008
5
copyright : (C) 2008 by Thomas Eschenbacher
6
email : Thomas Eschenbacher <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 MIME_DATA_H
19
#define MIME_DATA_H
20
21
#include "config.h"
22
23
#include <QtGlobal>
24
#include <QByteArray>
25
#include <QMimeData>
26
#include <QObject>
27
28
#include "
libkwave/MemoryManager.h
"
29
#include "
libkwave/Sample.h
"
30
31
class
QWidget;
32
33
namespace
Kwave
34
{
35
36
class
MetaDataList;
37
class
MultiTrackReader;
38
class
SignalManager;
39
40
class
Q_DECL_EXPORT
MimeData
:
public
QMimeData
41
{
42
Q_OBJECT
43
public
:
45
MimeData
();
46
48
virtual
~
MimeData
() Q_DECL_OVERRIDE;
49
60
virtual
bool
encode(QWidget *widget,
61
Kwave::MultiTrackReader
&src,
62
const
Kwave::MetaDataList
&meta_data);
63
73
static
sample_index_t
decode(QWidget *widget,
const
QMimeData *e,
74
Kwave::SignalManager
&sig,
75
sample_index_t
pos);
76
80
virtual
void
clear();
81
82
private
:
89
class
Buffer
:
public
QIODevice
90
{
91
public
:
93
Buffer
();
94
96
virtual
~
Buffer
() Q_DECL_OVERRIDE;
97
99
virtual
qint64
size
() const Q_DECL_OVERRIDE {
return
m_size; }
100
104
bool
mapToByteArray();
105
109
inline
const
QByteArray &
byteArray
()
const
{
return
m_data; }
110
115
virtual
void
close() Q_DECL_OVERRIDE;
116
117
protected
:
125
virtual
qint64 readData(
char
*data, qint64 maxlen)
126
Q_DECL_OVERRIDE;
127
136
virtual
qint64 writeData(
const
char
*data, qint64 len)
137
Q_DECL_OVERRIDE;
138
139
private
:
141
Kwave::Handle
m_block
;
142
144
qint64
m_size
;
145
147
QByteArray
m_data
;
148
};
149
150
private
:
151
153
Kwave::MimeData::Buffer
m_buffer
;
154
155
};
156
}
157
158
#endif
/* MIME_DATA_H */
159
160
//***************************************************************************
161
//***************************************************************************
Kwave
Definition:
App.h:33
Kwave::MimeData::Buffer::m_block
Kwave::Handle m_block
Definition:
MimeData.h:141
Kwave::MimeData::m_buffer
Kwave::MimeData::Buffer m_buffer
Definition:
MimeData.h:153
Kwave::SignalManager
Definition:
SignalManager.h:64
Kwave::MimeData::Buffer::size
virtual qint64 size() const Q_DECL_OVERRIDE
Definition:
MimeData.h:99
sample_index_t
quint64 sample_index_t
Definition:
Sample.h:28
Kwave::MimeData::Buffer
Definition:
MimeData.h:89
Sample.h
Kwave::Handle
int Handle
Definition:
MemoryManager.h:34
Kwave::MimeData::Buffer::m_data
QByteArray m_data
Definition:
MimeData.h:147
MemoryManager.h
Kwave::MimeData
Definition:
MimeData.h:40
Kwave::MimeData::Buffer::byteArray
const QByteArray & byteArray() const
Definition:
MimeData.h:109
Kwave::MimeData::Buffer::m_size
qint64 m_size
Definition:
MimeData.h:144
Kwave::MultiTrackReader
Definition:
MultiTrackReader.h:40
Kwave::MetaDataList
Definition:
MetaDataList.h:36
libkwave
MimeData.h
Generated on Sat Mar 24 2018 09:10:25 for kwave by
1.8.13