kwave  18.07.70
Kwave::SelectionTracker Class Reference

#include <SelectionTracker.h>

Inheritance diagram for Kwave::SelectionTracker:
Inheritance graph
Collaboration diagram for Kwave::SelectionTracker:
Collaboration graph

Classes

class  Undo
 

Signals

void sigTrackInserted (const QUuid &uuid)
 
void sigTrackDeleted (const QUuid &uuid)
 
void sigOffsetChanged (sample_index_t offset)
 
void sigLengthChanged (sample_index_t length)
 
void sigInvalidated (const QUuid *track, sample_index_t first, sample_index_t last)
 

Public Member Functions

 SelectionTracker (Kwave::SignalManager *signal, sample_index_t offset, sample_index_t length, const QList< unsigned int > *tracks)
 
virtual ~SelectionTracker () Q_DECL_OVERRIDE
 
QList< QUuid > allTracks ()
 
void selectRange (QList< QUuid > tracks, sample_index_t offset, sample_index_t length)
 
sample_index_t offset () const
 
sample_index_t length () const
 
sample_index_t first () const
 
sample_index_t last () const
 

Protected Member Functions

virtual bool saveUndoData (Kwave::UndoTransaction &undo) Q_DECL_OVERRIDE
 

Private Slots

void slotTrackInserted (unsigned int index, Kwave::Track *track)
 
void slotTrackDeleted (unsigned int index, Kwave::Track *track)
 
void slotSamplesInserted (unsigned int track, sample_index_t offset, sample_index_t length)
 
void slotSamplesDeleted (unsigned int track, sample_index_t offset, sample_index_t length)
 
void slotSamplesModified (unsigned int track, sample_index_t offset, sample_index_t length)
 

Private Attributes

QPointer< Kwave::SignalManagerm_signal
 
sample_index_t m_offset
 
sample_index_t m_length
 
QList< QUuid > m_tracks
 
bool m_selection_only
 
QMutex m_lock
 

Additional Inherited Members

- Private Member Functions inherited from Kwave::UndoHandler
 UndoHandler ()
 
virtual ~UndoHandler ()
 

Detailed Description

Definition at line 40 of file SelectionTracker.h.

Constructor & Destructor Documentation

◆ SelectionTracker()

Kwave::SelectionTracker::SelectionTracker ( Kwave::SignalManager signal,
sample_index_t  offset,
sample_index_t  length,
const QList< unsigned int > *  tracks 
)

Constructor

Parameters
signalthe signal manager to track
offsetindex of the first selected sample
lengthnumber of selected samples
trackslist of selected tracks or null pointer for "all"

Definition at line 28 of file SelectionTracker.cpp.

References Kwave::connect(), m_selection_only, m_signal, m_tracks, Kwave::UndoManager::registerHandler(), sigTrackDeleted(), sigTrackInserted(), slotSamplesDeleted(), slotSamplesInserted(), slotSamplesModified(), slotTrackDeleted(), slotTrackInserted(), and Kwave::SignalManager::undoManager().

32  :m_signal(signal),
34  m_length((length || !signal) ? length : signal->length()),
35  m_tracks(),
36  m_selection_only((length != 0)),
37  m_lock(QMutex::Recursive)
38 {
39  Q_ASSERT(signal);
40  if (!signal) return;
41 
43  signal, SIGNAL(sigTrackInserted(uint,Kwave::Track*)),
44  this, SLOT(slotTrackInserted(uint,Kwave::Track*)));
45  connect(signal, SIGNAL(sigTrackDeleted(uint,Kwave::Track*)),
46  this, SLOT(slotTrackDeleted(uint,Kwave::Track*)));
47  connect(
48  signal,
49  SIGNAL(sigSamplesDeleted(uint,sample_index_t,sample_index_t)),
50  this,
52  );
53  connect(
54  signal,
55  SIGNAL(sigSamplesInserted(uint,sample_index_t,sample_index_t)),
56  this,
58  );
59  connect(
60  signal,
61  SIGNAL(sigSamplesModified(uint,sample_index_t,sample_index_t)),
62  this,
64  );
65 
66  // register us at the undo manager
67  Kwave::UndoManager &undo = signal->undoManager();
68  undo.registerHandler(this);
69 
70  if (tracks && !tracks->isEmpty()) {
71  // having a list of selected tracks
72  foreach (unsigned int track, *tracks) {
73  slotTrackInserted(track, Q_NULLPTR);
74  if (m_selection_only)
75  m_tracks.append(m_signal->uuidOfTrack(track));
76  }
77  } else {
78  // take over all tracks from the signal manager
79  foreach (unsigned int track, m_signal->allTracks()) {
80  slotTrackInserted(track, Q_NULLPTR);
81  if (m_selection_only)
82  m_tracks.append(m_signal->uuidOfTrack(track));
83  }
84  }
85 }
void sigTrackInserted(const QUuid &uuid)
sample_index_t offset() const
Kwave::UndoManager & undoManager()
bool registerHandler(Kwave::UndoHandler *handler)
Definition: UndoManager.cpp:36
void slotSamplesDeleted(unsigned int track, sample_index_t offset, sample_index_t length)
void slotSamplesModified(unsigned int track, sample_index_t offset, sample_index_t length)
quint64 sample_index_t
Definition: Sample.h:28
QPointer< Kwave::SignalManager > m_signal
void sigTrackDeleted(const QUuid &uuid)
bool connect(Kwave::StreamObject &source, const char *output, Kwave::StreamObject &sink, const char *input)
Definition: Connect.cpp:48
sample_index_t length()
void slotTrackDeleted(unsigned int index, Kwave::Track *track)
void slotTrackInserted(unsigned int index, Kwave::Track *track)
void slotSamplesInserted(unsigned int track, sample_index_t offset, sample_index_t length)
sample_index_t length() const
Here is the call graph for this function:

◆ ~SelectionTracker()

Kwave::SelectionTracker::~SelectionTracker ( )
virtual

Destructor

Definition at line 88 of file SelectionTracker.cpp.

References m_signal, and Kwave::UndoManager::unregisterHandler().

89 {
90  // unregister us from the undo manager (if it still exists)
91  if (m_signal) {
92  Kwave::UndoManager &undo = m_signal->undoManager();
93  undo.unregisterHandler(this);
94  }
95 }
QPointer< Kwave::SignalManager > m_signal
bool unregisterHandler(Kwave::UndoHandler *handler)
Definition: UndoManager.cpp:45
Here is the call graph for this function:

Member Function Documentation

◆ allTracks()

QList< QUuid > Kwave::SelectionTracker::allTracks ( )

Returns all currently selected tracks

Definition at line 98 of file SelectionTracker.cpp.

References m_tracks.

Referenced by Kwave::OverViewCache::getMinMax(), Kwave::SonagramPlugin::makeAllValid(), and Kwave::OverViewCache::OverViewCache().

99 {
100  return m_tracks;
101 }
Here is the caller graph for this function:

◆ first()

sample_index_t Kwave::SelectionTracker::first ( ) const
inline

Returns the start of the selected range

See also
offset()
Returns
the first sample index

Definition at line 92 of file SelectionTracker.h.

Referenced by Kwave::SonagramPlugin::makeAllValid().

92 { return m_offset; }
Here is the caller graph for this function:

◆ last()

sample_index_t Kwave::SelectionTracker::last ( ) const
inline

Returns the end of the selected range

Returns
the last sample index

Definition at line 98 of file SelectionTracker.h.

Referenced by Kwave::OverViewCache::getMinMax(), and Kwave::SonagramPlugin::makeAllValid().

98  {
99  return m_offset + ((m_length) ? (m_length - 1) : 0);
100  }
Here is the caller graph for this function:

◆ length()

sample_index_t Kwave::SelectionTracker::length ( ) const
inline

Returns the length of the selected range

Returns
number of selected samples

Definition at line 85 of file SelectionTracker.h.

Referenced by Kwave::OverViewCache::getMinMax(), Kwave::SonagramPlugin::makeAllValid(), Kwave::OverViewCache::scaleDown(), Kwave::OverViewCache::scaleUp(), selectRange(), slotSamplesDeleted(), slotSamplesInserted(), and Kwave::OverViewCache::slotTrackInserted().

85 { return m_length; }
Here is the caller graph for this function:

◆ offset()

sample_index_t Kwave::SelectionTracker::offset ( ) const
inline

Returns the start of the selected range

Returns
the first sample index

Definition at line 79 of file SelectionTracker.h.

Referenced by Kwave::OverViewCache::getMinMax(), selectRange(), Kwave::OverViewCache::slotInvalidated(), Kwave::SonagramPlugin::slotInvalidated(), slotSamplesDeleted(), and slotSamplesModified().

79 { return m_offset; }
Here is the caller graph for this function:

◆ saveUndoData()

bool Kwave::SelectionTracker::saveUndoData ( Kwave::UndoTransaction undo)
protectedvirtual

Called by an undo manager to notify us that it is time to save data for undo.

Parameters
undoan undo transaction to append some undo data
Return values
trueif successful
falseif saving undo data failed, e.g. out of memory or aborted

Implements Kwave::UndoHandler.

Definition at line 104 of file SelectionTracker.cpp.

References m_selection_only, m_signal, and Kwave::UndoAction::store().

105 {
106  // shortcut: we only have to do something when we are in
107  // "selection only" mode
108  if (!m_selection_only)
109  return true;
110 
111  Q_ASSERT(!m_signal.isNull());
112  if (m_signal.isNull())
113  return false; // should never happen
114 
115  Kwave::UndoAction *action =
116  new(std::nothrow) Kwave::SelectionTracker::Undo(this);
117  Q_ASSERT(action);
118  if (!action) return false;
119 
120  if (action->store(*m_signal)) {
121  undo.append(action);
122  } else {
123  // out of memory
124  delete action;
125  return false;
126  }
127 
128  return true;
129 }
QPointer< Kwave::SignalManager > m_signal
virtual bool store(Kwave::SignalManager &manager)=0
Here is the call graph for this function:

◆ selectRange()

void Kwave::SelectionTracker::selectRange ( QList< QUuid >  tracks,
sample_index_t  offset,
sample_index_t  length 
)

changes the selected range covered by the cache

used during undo/redo

Parameters
trackslist of selected tracks
offsetindex of the first selected sample
lengthnumber of selected samples

Definition at line 321 of file SelectionTracker.cpp.

References length(), m_length, m_lock, m_offset, m_selection_only, m_signal, m_tracks, offset(), SAMPLE_INDEX_MAX, sigInvalidated(), sigLengthChanged(), sigOffsetChanged(), sigTrackDeleted(), and sigTrackInserted().

324 {
325  QMutexLocker lock(&m_lock);
326 
327  // remove deleted tracks
328  foreach (const QUuid &uuid, m_tracks) {
329  if (!tracks.contains(uuid)) {
330  m_tracks.removeAll(uuid);
331  emit sigTrackDeleted(uuid);
332  }
333  }
334 
335  // add new tracks
336  foreach (const QUuid &uuid, tracks) {
337  if (!m_tracks.contains(uuid)) {
338  m_tracks.append(uuid);
339  emit sigTrackInserted(uuid);
340  }
341  }
342 
343  // track signal length changes when tracks were inserted
344  if (!m_selection_only) {
345  sample_index_t new_len = m_signal->length();
346  if (m_length != new_len) {
347  m_length = new_len;
349  }
350 
351  return; // nothing more to do in this mode
352  }
353 
354  if ((offset == m_offset) && (length == m_length))
355  return; // no change, nothing to do
356 
357  if (!length)
358  return; // makes no sense
359 
360  // remember the old settings
361  const sample_index_t old_ofs = m_offset;
362  const sample_index_t old_len = m_length;
363 
364  // take over the new selection
365  if (m_length != length) {
366  m_length = length;
368  }
369  if (offset != old_ofs) {
370  // offset has changed -> invalidate all
371  m_offset = offset;
373  emit sigInvalidated(Q_NULLPTR, m_offset, SAMPLE_INDEX_MAX);
374  } else if (length > old_len) {
375  // length has changed and increased -> invalidate new area
376  emit sigInvalidated(Q_NULLPTR, m_offset + old_len - 1, SAMPLE_INDEX_MAX);
377  } else if (length < old_len) {
378  // length was reduced -> invalidate shrinked area at end
379  emit sigInvalidated(Q_NULLPTR, m_offset + length - 1, SAMPLE_INDEX_MAX);
380  }
381 }
void sigTrackInserted(const QUuid &uuid)
sample_index_t offset() const
quint64 sample_index_t
Definition: Sample.h:28
void sigInvalidated(const QUuid *track, sample_index_t first, sample_index_t last)
void sigOffsetChanged(sample_index_t offset)
QPointer< Kwave::SignalManager > m_signal
void sigTrackDeleted(const QUuid &uuid)
void sigLengthChanged(sample_index_t length)
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
sample_index_t length() const
Here is the call graph for this function:

◆ sigInvalidated

void Kwave::SelectionTracker::sigInvalidated ( const QUuid *  track,
sample_index_t  first,
sample_index_t  last 
)
signal

signals that a range of samples has become invalid

Parameters
trackUUID of the track or null for "all tracks"
firstindex of the first invalidated sample
lastindex of the last invalidated sample

Referenced by selectRange(), slotSamplesDeleted(), slotSamplesInserted(), and slotSamplesModified().

Here is the caller graph for this function:

◆ sigLengthChanged

void Kwave::SelectionTracker::sigLengthChanged ( sample_index_t  length)
signal

signals that the length of the selection has changed

Parameters
lengthnew length of the selection [samples]

Referenced by selectRange(), slotSamplesDeleted(), slotSamplesInserted(), slotTrackDeleted(), and slotTrackInserted().

Here is the caller graph for this function:

◆ sigOffsetChanged

void Kwave::SelectionTracker::sigOffsetChanged ( sample_index_t  offset)
signal

signals that the offset of the selection has changed

Parameters
offsetnew index of the selected area [samples]

Referenced by selectRange(), slotSamplesDeleted(), and slotSamplesInserted().

Here is the caller graph for this function:

◆ sigTrackDeleted

void Kwave::SelectionTracker::sigTrackDeleted ( const QUuid &  uuid)
signal

Signals that a track has been deleted.

Parameters
uuidunique ID of the track

Referenced by SelectionTracker(), selectRange(), and slotTrackDeleted().

Here is the caller graph for this function:

◆ sigTrackInserted

void Kwave::SelectionTracker::sigTrackInserted ( const QUuid &  uuid)
signal

Signals that a track has been inserted.

Parameters
uuidunique ID of the track

Referenced by SelectionTracker(), selectRange(), and slotTrackInserted().

Here is the caller graph for this function:

◆ slotSamplesDeleted

void Kwave::SelectionTracker::slotSamplesDeleted ( unsigned int  track,
sample_index_t  offset,
sample_index_t  length 
)
privateslot

Connected to the signal's sigSamplesDeleted.

Parameters
trackindex of the source track [0...tracks-1]
offsetposition from which the data was removed
lengthnumber of samples deleted
See also
Signal::sigSamplesDeleted

Definition at line 233 of file SelectionTracker.cpp.

References length(), m_length, m_lock, m_offset, m_signal, m_tracks, offset(), SAMPLE_INDEX_MAX, sigInvalidated(), sigLengthChanged(), and sigOffsetChanged().

Referenced by SelectionTracker().

236 {
237  QMutexLocker lock(&m_lock);
238 
239  Q_ASSERT(!m_signal.isNull());
240  if (m_signal.isNull()) return;
241 
242  const QUuid uuid = m_signal->uuidOfTrack(track);
243  if (!m_tracks.contains(uuid))
244  return; // track not selected
245 
246  if (!length)
247  return; // nothing to do
248 
249  if (offset >= (m_offset + m_length))
250  return; // right of us
251 
252  // NOTE: adjust offsets/lengths only for the first selected track
253  const bool is_first = (uuid == m_tracks.first());
254 
255  if ((offset + length - 1) < m_offset) {
256  // left of us, no overlap
257  if (is_first) {
258  m_offset -= length;
260  }
261  return;
262  }
263 
264  // determine shift and number of deleted samples
265  sample_index_t first_del = offset;
266  sample_index_t last_del = offset + length - 1;
267  sample_index_t shift = (first_del < m_offset) ? (m_offset - first_del) : 0;
268  sample_index_t left = qMax(first_del, m_offset);
269  sample_index_t right = qMin(last_del, m_offset + m_length - 1);
270  sample_index_t deleted_samples = right - left + 1;
271 
272  // adjust the start of the selection
273  if (is_first && shift) {
274  m_offset -= shift;
275  left = m_offset;
277  }
278 
279  // adjust the length of the selection
280  if (is_first && deleted_samples) {
281  m_length -= deleted_samples;
283  }
284 
285  // in our range -> invalidate all samples from offset to end of file
286  emit sigInvalidated(&uuid, left, SAMPLE_INDEX_MAX);
287 }
sample_index_t offset() const
quint64 sample_index_t
Definition: Sample.h:28
void sigInvalidated(const QUuid *track, sample_index_t first, sample_index_t last)
void sigOffsetChanged(sample_index_t offset)
QPointer< Kwave::SignalManager > m_signal
void sigLengthChanged(sample_index_t length)
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
sample_index_t length() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slotSamplesInserted

void Kwave::SelectionTracker::slotSamplesInserted ( unsigned int  track,
sample_index_t  offset,
sample_index_t  length 
)
privateslot

Connected to the signal's sigSamplesInserted.

Parameters
trackindex of the source track [0...tracks-1]
offsetposition from which the data was inserted
lengthnumber of samples inserted
See also
Signal::sigSamplesInserted

Definition at line 189 of file SelectionTracker.cpp.

References length(), m_length, m_lock, m_offset, m_selection_only, m_signal, m_tracks, SAMPLE_INDEX_MAX, sigInvalidated(), sigLengthChanged(), and sigOffsetChanged().

Referenced by SelectionTracker().

192 {
193  QMutexLocker lock(&m_lock);
194 
195  Q_ASSERT(!m_signal.isNull());
196  if (m_signal.isNull()) return;
197 
198  const QUuid uuid = m_signal->uuidOfTrack(track);
199  if (!m_tracks.contains(uuid))
200  return; // track not selected
201 
202  if (!length)
203  return; // nothing to do
204 
205  // NOTE: adjust offsets/lengths only for the first selected track
206  const bool is_first = (uuid == m_tracks.first());
207 
208  if (m_selection_only) {
209  if (offset >= (m_offset + m_length))
210  return; // right of us
211 
212  if (offset < m_offset) {
213  // left of us, no overlap
214  if (is_first) {
215  m_offset += length;
217  }
218  return;
219  }
220  }
221 
222  // in our range -> increase length and invalidate all
223  // samples from offset to end of file
224  if (is_first) {
225  m_length += length;
227  }
228 
229  emit sigInvalidated(&uuid, offset, SAMPLE_INDEX_MAX);
230 }
sample_index_t offset() const
void sigInvalidated(const QUuid *track, sample_index_t first, sample_index_t last)
void sigOffsetChanged(sample_index_t offset)
QPointer< Kwave::SignalManager > m_signal
void sigLengthChanged(sample_index_t length)
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
sample_index_t length() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slotSamplesModified

void Kwave::SelectionTracker::slotSamplesModified ( unsigned int  track,
sample_index_t  offset,
sample_index_t  length 
)
privateslot

Connected to the signal's sigSamplesModified

Parameters
trackindex of the source track [0...tracks-1]
offsetposition from which the data was modified
lengthnumber of samples modified
See also
Signal::sigSamplesModified

Definition at line 290 of file SelectionTracker.cpp.

References m_length, m_lock, m_offset, m_signal, m_tracks, offset(), and sigInvalidated().

Referenced by SelectionTracker().

293 {
294  QMutexLocker lock(&m_lock);
295 
296  if (!length) return; // nothing to do
297 
298  Q_ASSERT(!m_signal.isNull());
299  if (m_signal.isNull()) return;
300 
301  const QUuid uuid = m_signal->uuidOfTrack(track);
302  if (!m_tracks.contains(uuid))
303  return; // track not selected
304 
305  if (offset >= (m_offset + m_length))
306  return; // right out of our range -> out of interest
307 
308  if (offset + length < m_offset)
309  return; // completely left from us -> out of interest
310 
311  // overlapping
312  sample_index_t first_mod = offset;
313  sample_index_t last_mod = offset + length - 1;
314  sample_index_t left = qMax(first_mod, m_offset);
315  sample_index_t right = qMin(last_mod, m_offset + m_length - 1);
316 
317  emit sigInvalidated(&uuid, left, right);
318 }
sample_index_t offset() const
quint64 sample_index_t
Definition: Sample.h:28
void sigInvalidated(const QUuid *track, sample_index_t first, sample_index_t last)
QPointer< Kwave::SignalManager > m_signal
sample_index_t length() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slotTrackDeleted

void Kwave::SelectionTracker::slotTrackDeleted ( unsigned int  index,
Kwave::Track track 
)
privateslot

Connected to the signal's sigTrackInserted.

Parameters
indexthe index of the inserted track
trackpointer to the track instance
See also
Signal::sigTrackDeleted

Definition at line 159 of file SelectionTracker.cpp.

References m_length, m_lock, m_selection_only, m_signal, m_tracks, sigLengthChanged(), sigTrackDeleted(), and Kwave::Track::uuid().

Referenced by SelectionTracker().

161 {
162  QMutexLocker lock(&m_lock);
163 
164  Q_UNUSED(index);
165 
166  Q_ASSERT(track);
167  if (!track) return;
168 
169  const QUuid &uuid = track->uuid();
170  Q_ASSERT(!uuid.isNull());
171  if (!m_tracks.contains(uuid))
172  return; // track not selected
173 
174  // track signal length changes when tracks were inserted
175  if (!m_selection_only) {
176  sample_index_t new_len = m_signal->length();
177  if (m_length != new_len) {
178  m_length = new_len;
180  }
181  }
182 
183  // one of our selected tracks was deleted
184  m_tracks.removeAll(uuid);
185  emit sigTrackDeleted(uuid);
186 }
const QUuid & uuid() const
Definition: Track.h:143
quint64 sample_index_t
Definition: Sample.h:28
QPointer< Kwave::SignalManager > m_signal
void sigTrackDeleted(const QUuid &uuid)
void sigLengthChanged(sample_index_t length)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slotTrackInserted

void Kwave::SelectionTracker::slotTrackInserted ( unsigned int  index,
Kwave::Track track 
)
privateslot

Connected to the signal's sigTrackInserted.

Parameters
indexthe index [0...tracks()-1] of the inserted track
trackpointer to the track instance
See also
Signal::sigTrackInserted

Definition at line 132 of file SelectionTracker.cpp.

References m_length, m_lock, m_selection_only, m_signal, m_tracks, sigLengthChanged(), sigTrackInserted(), and Kwave::Track::uuid().

Referenced by SelectionTracker().

134 {
135  QMutexLocker lock(&m_lock);
136 
137  if (m_selection_only)
138  return; // in "selection only" mode we are not interested in this
139 
140  Q_ASSERT(track || !m_signal.isNull());
141  if (!track && m_signal.isNull()) return;
142 
143  const QUuid &uuid = (track) ? track->uuid() : m_signal->uuidOfTrack(index);
144  Q_ASSERT(!uuid.isNull());
145 
146  // track signal length changes when tracks were inserted
147  sample_index_t new_len = m_signal->length();
148  if (m_length != new_len) {
149  m_length = new_len;
151  }
152 
153  // a new track has been inserted
154  m_tracks.append(uuid);
155  emit sigTrackInserted(uuid);
156 }
void sigTrackInserted(const QUuid &uuid)
const QUuid & uuid() const
Definition: Track.h:143
quint64 sample_index_t
Definition: Sample.h:28
QPointer< Kwave::SignalManager > m_signal
void sigLengthChanged(sample_index_t length)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_length

sample_index_t Kwave::SelectionTracker::m_length
private

length of the source in samples, or zero for "whole signal"

Definition at line 301 of file SelectionTracker.h.

Referenced by selectRange(), slotSamplesDeleted(), slotSamplesInserted(), slotSamplesModified(), slotTrackDeleted(), and slotTrackInserted().

◆ m_lock

QMutex Kwave::SelectionTracker::m_lock
private

mutex for threadsafe access to the selection

Definition at line 310 of file SelectionTracker.h.

Referenced by selectRange(), slotSamplesDeleted(), slotSamplesInserted(), slotSamplesModified(), slotTrackDeleted(), and slotTrackInserted().

◆ m_offset

sample_index_t Kwave::SelectionTracker::m_offset
private

first sample index in the source

Definition at line 298 of file SelectionTracker.h.

Referenced by selectRange(), slotSamplesDeleted(), slotSamplesInserted(), and slotSamplesModified().

◆ m_selection_only

bool Kwave::SelectionTracker::m_selection_only
private

if true, track the selection only, otherwise the whole signal

Definition at line 307 of file SelectionTracker.h.

Referenced by saveUndoData(), SelectionTracker(), selectRange(), slotSamplesInserted(), slotTrackDeleted(), and slotTrackInserted().

◆ m_signal

QPointer<Kwave::SignalManager> Kwave::SelectionTracker::m_signal
private

◆ m_tracks

QList<QUuid> Kwave::SelectionTracker::m_tracks
private

The documentation for this class was generated from the following files: