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
Selection.h
Go to the documentation of this file.
1
/***************************************************************************
2
Selection.h - Simple class for a selection
3
-------------------
4
begin : Sun May 06 2001
5
copyright : (C) 2000 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 SELECTION_H
19
#define SELECTION_H
20
21
#include "config.h"
22
23
#include <QtGlobal>
24
#include <QObject>
25
26
#include "
libkwave/Sample.h
"
27
28
namespace
Kwave
29
{
30
31
class
Q_DECL_EXPORT
Selection
:
public
QObject
32
{
33
Q_OBJECT
34
public
:
40
Selection
(
sample_index_t
offset,
sample_index_t
length);
41
43
Selection
(
const
Selection
&other);
44
46
virtual
~
Selection
();
47
53
void
select(
sample_index_t
offset,
sample_index_t
length);
54
56
inline
void
clear
() {
57
select(0, 0);
58
}
59
61
inline
sample_index_t
offset
()
const
{
62
return
m_offset;
63
}
64
66
inline
sample_index_t
length
()
const
{
67
return
m_length;
68
}
69
71
inline
sample_index_t
first
()
const
{
72
return
offset();
73
}
74
76
inline
sample_index_t
last
()
const
{
77
return
m_offset + (m_length ? (m_length-1) : 0);
78
}
79
81
bool
operator == (
const
Selection
&other)
const
{
82
return
((m_offset == other.
offset
()) &&
83
(m_length == other.
length
()));
84
}
85
87
Selection
& operator = (
const
Selection
&source) {
88
m_offset = source.
offset
();
89
m_length = source.
length
();
90
return
*
this
;
91
}
92
93
signals:
94
100
void
changed(
sample_index_t
offset,
sample_index_t
length);
101
102
private
:
104
sample_index_t
m_offset
;
105
107
sample_index_t
m_length
;
108
};
109
}
110
111
#endif
/* SELECTION_H */
112
113
//***************************************************************************
114
//***************************************************************************
Kwave::Selection::clear
void clear()
Definition:
Selection.h:56
Kwave::Selection::first
sample_index_t first() const
Definition:
Selection.h:71
Kwave
Definition:
App.h:33
Kwave::Selection
Definition:
Selection.h:31
Kwave::Selection::last
sample_index_t last() const
Definition:
Selection.h:76
Kwave::Selection::m_offset
sample_index_t m_offset
Definition:
Selection.h:104
sample_index_t
quint64 sample_index_t
Definition:
Sample.h:28
Kwave::Selection::length
sample_index_t length() const
Definition:
Selection.h:66
Sample.h
Kwave::Selection::m_length
sample_index_t m_length
Definition:
Selection.h:107
Kwave::Selection::offset
sample_index_t offset() const
Definition:
Selection.h:61
libkwave
Selection.h
Generated on Sat Mar 24 2018 09:10:25 for kwave by
1.8.13