kwave  18.07.70
Kwave::OverViewWidget Class Reference

#include <OverViewWidget.h>

Inheritance diagram for Kwave::OverViewWidget:
Inheritance graph
Collaboration diagram for Kwave::OverViewWidget:
Collaboration graph

Classes

class  WorkerThread
 

Public Slots

void setRange (sample_index_t offset, sample_index_t viewport, sample_index_t total)
 
void setSelection (sample_index_t offset, sample_index_t length)
 
void metaDataChanged (Kwave::MetaDataList meta)
 
void showCursor (sample_index_t pos=SAMPLE_INDEX_MAX)
 
- Public Slots inherited from Kwave::ImageView
void setImage (QImage image)
 
void setHorizOffset (int offset)
 
void setVertOffset (int offset)
 

Signals

void valueChanged (sample_index_t new_value)
 
void sigCommand (const QString &command)
 
void newImage (QImage image)
 
- Signals inherited from Kwave::ImageView
void viewInfo (int, int, int)
 
void sigCursorPos (const QPoint pos)
 

Public Member Functions

 OverViewWidget (Kwave::SignalManager &signal, QWidget *parent=Q_NULLPTR)
 
virtual ~OverViewWidget () Q_DECL_OVERRIDE
 
virtual QSize minimumSize () const
 
virtual QSize sizeHint () const Q_DECL_OVERRIDE
 
- Public Member Functions inherited from Kwave::ImageView
 ImageView (QWidget *parent=Q_NULLPTR, bool fit_width=true, bool fit_height=true)
 
virtual ~ImageView () Q_DECL_OVERRIDE
 
QRect imageRect ()
 

Protected Slots

void refreshBitmap ()
 
void overviewChanged ()
 

Protected Member Functions

virtual void resizeEvent (QResizeEvent *) Q_DECL_OVERRIDE
 
virtual void mouseMoveEvent (QMouseEvent *) Q_DECL_OVERRIDE
 
virtual void mousePressEvent (QMouseEvent *) Q_DECL_OVERRIDE
 
virtual void mouseDoubleClickEvent (QMouseEvent *e) Q_DECL_OVERRIDE
 
sample_index_t pixels2offset (int pixels)
 
void drawMark (QPainter &p, int x, int height, QColor color)
 
- Protected Member Functions inherited from Kwave::ImageView
virtual void paintEvent (QPaintEvent *) Q_DECL_OVERRIDE
 

Private Member Functions

void calculateBitmap ()
 

Private Attributes

sample_index_t m_view_offset
 
sample_index_t m_view_width
 
sample_index_t m_signal_length
 
sample_index_t m_selection_start
 
sample_index_t m_selection_length
 
sample_index_t m_cursor_position
 
sample_index_t m_last_offset
 
Kwave::OverViewCache m_cache
 
QTimer m_repaint_timer
 
Kwave::LabelList m_labels
 
WorkerThread m_worker_thread
 

Detailed Description

Definition at line 47 of file OverViewWidget.h.

Constructor & Destructor Documentation

◆ OverViewWidget()

Kwave::OverViewWidget::OverViewWidget ( Kwave::SignalManager signal,
QWidget *  parent = Q_NULLPTR 
)
explicit

Constructor

Definition at line 75 of file OverViewWidget.cpp.

References Kwave::connect(), m_cache, m_repaint_timer, metaDataChanged(), newImage(), overviewChanged(), refreshBitmap(), Kwave::SignalManager::selection(), Kwave::ImageView::setImage(), and setSelection().

80  m_cache(signal, 0, 0, Q_NULLPTR), m_repaint_timer(), m_labels(),
81  m_worker_thread(this)
82 {
83  // check: start() must be called from the GUI thread only!
84  Q_ASSERT(this->thread() == QThread::currentThread());
85  Q_ASSERT(this->thread() == qApp->thread());
86 
87  // update the bitmap if the cache has changed
88  connect(&m_cache, SIGNAL(changed()),
89  this, SLOT(overviewChanged()));
90 
91  // connect repaint timer
92  connect(&m_repaint_timer, SIGNAL(timeout()),
93  this, SLOT(refreshBitmap()));
94 
95  // get informed about selection changes
96  connect(&(signal.selection()),
97  SIGNAL(changed(sample_index_t,sample_index_t)),
98  this,
100 
101  // get informed about meta data changes
102  connect(&signal, SIGNAL(sigMetaDataChanged(Kwave::MetaDataList)),
103  this, SLOT(metaDataChanged(Kwave::MetaDataList)));
104 
105  // transport the image calculated in a background thread
106  // through the signal/slot mechanism
107  connect(this, SIGNAL(newImage(QImage)),
108  this, SLOT(setImage(QImage)),
109  Qt::AutoConnection);
110 
111  setMouseTracking(true);
112 }
void newImage(QImage image)
Kwave::Selection & selection()
sample_index_t m_cursor_position
quint64 sample_index_t
Definition: Sample.h:28
Kwave::OverViewCache m_cache
bool connect(Kwave::StreamObject &source, const char *output, Kwave::StreamObject &sink, const char *input)
Definition: Connect.cpp:48
sample_index_t m_view_width
Kwave::LabelList m_labels
sample_index_t m_last_offset
void metaDataChanged(Kwave::MetaDataList meta)
sample_index_t m_selection_length
sample_index_t m_view_offset
sample_index_t m_selection_start
WorkerThread m_worker_thread
sample_index_t m_signal_length
void setImage(QImage image)
Definition: ImageView.cpp:75
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
void setSelection(sample_index_t offset, sample_index_t length)
Here is the call graph for this function:

◆ ~OverViewWidget()

Kwave::OverViewWidget::~OverViewWidget ( )
virtual

Destructor

Definition at line 115 of file OverViewWidget.cpp.

References m_repaint_timer, and m_worker_thread.

116 {
117  // check: start() must be called from the GUI thread only!
118  Q_ASSERT(this->thread() == QThread::currentThread());
119  Q_ASSERT(this->thread() == qApp->thread());
120 
121  m_repaint_timer.stop();
122  m_worker_thread.wait(/* 100 * REPAINT_INTERVAL */);
123 }
WorkerThread m_worker_thread

Member Function Documentation

◆ calculateBitmap()

void Kwave::OverViewWidget::calculateBitmap ( )
private

does the calculation of the new bitmap in background

Definition at line 351 of file OverViewWidget.cpp.

References BAR_BACKGROUND, BAR_FOREGROUND, drawMark(), Kwave::OverViewCache::getOverView(), m_cache, m_cursor_position, m_labels, m_selection_length, m_selection_start, m_signal_length, m_view_offset, m_view_width, newImage(), Kwave::Label::pos(), rect(), SAMPLE_INDEX_MAX, and Kwave::toInt().

Referenced by Kwave::OverViewWidget::WorkerThread::run().

352 {
355  // showing deleted space after signal
356  length = m_view_offset + m_view_width;
357  }
358 
359  int width = this->width();
360  int height = this->height();
361  if (!width || !height || !m_view_width || !length)
362  return;
363 
364  const double scale = static_cast<double>(width) /
365  static_cast<double>(length);
366  const int bitmap_width = Kwave::toInt(m_signal_length * scale);
367 
368  // let the bitmap be updated from the cache
369  QImage bitmap = m_cache.getOverView(bitmap_width, height,
371 
372  // draw the bitmap (converted to QImage)
373  QImage image(width, height, QImage::Format_ARGB32_Premultiplied);
374  QPainter p;
375  p.begin(&image);
376  p.fillRect(rect(), BAR_BACKGROUND);
377  p.drawImage(0, 0, bitmap);
378 
379  // highlight the selection
380  if ((m_selection_length > 1) && m_signal_length)
381  {
382  int first = Kwave::toInt(
383  static_cast<double>(m_selection_start) * scale);
384  int len = Kwave::toInt(
385  static_cast<double>(m_selection_length) * scale);
386  if (len < 1) len = 1;
387 
388  // draw the selection as rectangle
389  QBrush hilight(Qt::yellow);
390  hilight.setStyle(Qt::SolidPattern);
391  p.setBrush(hilight);
392  p.setPen(QPen(Qt::yellow));
393  p.setCompositionMode(QPainter::CompositionMode_Exclusion);
394  p.drawRect(first, 0, len, height);
395 
396  // marks at start and end of selection
397  drawMark(p, first, height, Qt::blue);
398  drawMark(p, first + len, height, Qt::blue);
399  }
400 
401  // draw labels
402  int last_label_pos = width + 1;
403  foreach (const Kwave::Label &label, m_labels) {
404  sample_index_t pos = label.pos();
405  int x = Kwave::toInt(static_cast<double>(pos) * scale);
406 
407  // position must differ from the last one, otherwise we
408  // would wipe out the last one with XOR mode
409  if (x == last_label_pos) continue;
410 
411  // draw a line for each label
412  p.setPen(QPen(Qt::cyan));
413  p.setCompositionMode(QPainter::CompositionMode_Exclusion);
414  p.drawLine(x, 0, x, height);
415  drawMark(p, x, height, Qt::cyan);
416 
417  last_label_pos = x;
418  }
419 
420  // draw playback position
422  const sample_index_t pos = m_cursor_position;
423  int x = Kwave::toInt(static_cast<double>(pos) * scale);
424 
425  // draw a line for the playback position
426  QPen pen(Qt::yellow);
427  pen.setWidth(5);
428  p.setPen(pen);
429  p.setCompositionMode(QPainter::CompositionMode_Exclusion);
430  p.drawLine(x, 0, x, height);
431  drawMark(p, x, height, Qt::cyan);
432  }
433 
434  // dim the currently invisible parts
436  {
437  QColor color = BAR_BACKGROUND;
438  color.setAlpha(128);
439  QBrush out_of_view(color);
440  out_of_view.setStyle(Qt::SolidPattern);
441  p.setBrush(out_of_view);
442  p.setPen(QPen(color));
443  p.setCompositionMode(QPainter::CompositionMode_SourceOver);
444 
445  if (m_view_offset > 0) {
446  int x = Kwave::toInt(static_cast<double>(m_view_offset) * scale);
447  p.drawRect(0, 0, x, height);
448  }
449 
451  int x = Kwave::toInt(
452  static_cast<double>(m_view_offset + m_view_width) * scale);
453  p.drawRect(x, 0, width - x, height);
454  }
455  }
456 
457  p.end();
458 
459  // update the widget with the overview
460  emit newImage(image);
461 }
virtual QImage getOverView(int width, int height, const QColor &fg, const QColor &bg, double gain=1.0)
void newImage(QImage image)
virtual sample_index_t pos() const
Definition: Label.cpp:56
sample_index_t m_cursor_position
quint64 sample_index_t
Definition: Sample.h:28
Kwave::OverViewCache m_cache
void drawMark(QPainter &p, int x, int height, QColor color)
sample_index_t m_view_width
Kwave::LabelList m_labels
#define BAR_BACKGROUND
int toInt(T x)
Definition: Utils.h:127
sample_index_t m_selection_length
sample_index_t m_view_offset
sample_index_t m_selection_start
sample_index_t m_signal_length
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
static double rect(double param)
Definition: Functions.cpp:29
#define BAR_FOREGROUND
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawMark()

void Kwave::OverViewWidget::drawMark ( QPainter &  p,
int  x,
int  height,
QColor  color 
)
protected

draws a little mark at the top and bottom of a line in the overview image

Parameters
pa QPainter used for painting, will be modified
xoffset from the left [pixel]
heightthe height of the image [pixel]
colorbase color for the marker

Definition at line 313 of file OverViewWidget.cpp.

Referenced by calculateBitmap().

315 {
316  QPolygon mark;
317  const int w = 5;
318  const int y = (height - 1);
319 
320  p.setCompositionMode(QPainter::CompositionMode_SourceOver);
321  color.setAlpha(100);
322  p.setBrush(QBrush(color));
323  p.setPen(QPen(Qt::black));
324 
325  mark.setPoints(3, x - w, 0, x + w, 0, x, w); // upper
326  p.drawPolygon(mark);
327  mark.setPoints(3, x - w, y, x + w, y, x, y - w); // lower
328  p.drawPolygon(mark);
329 }
Here is the caller graph for this function:

◆ metaDataChanged

void Kwave::OverViewWidget::metaDataChanged ( Kwave::MetaDataList  meta)
slot

should be called when meta data has changed

Parameters
metathe list of new meta data

Definition at line 256 of file OverViewWidget.cpp.

References m_labels, m_repaint_timer, and REPAINT_INTERVAL.

Referenced by Kwave::MainWidget::MainWidget(), and OverViewWidget().

257 {
258  // check: start() must be called from the GUI thread only!
259  Q_ASSERT(this->thread() == QThread::currentThread());
260  Q_ASSERT(this->thread() == qApp->thread());
261 
262  m_labels = Kwave::LabelList(meta);
263 
264  // only re-start the repaint timer, this hides some GUI update artifacts
265  if (!m_repaint_timer.isActive()) {
266  m_repaint_timer.stop();
267  m_repaint_timer.setSingleShot(true);
269  }
270 }
#define REPAINT_INTERVAL
Kwave::LabelList m_labels
Here is the caller graph for this function:

◆ minimumSize()

QSize Kwave::OverViewWidget::minimumSize ( ) const
virtual

minimum size of the widget,

See also
QWidget::minimumSize()

Definition at line 223 of file OverViewWidget.cpp.

Referenced by sizeHint().

224 {
225  return QSize(30, 30);
226 }
Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void Kwave::OverViewWidget::mouseDoubleClickEvent ( QMouseEvent *  e)
protectedvirtual

On double click with the left mouse button, without shift: move the current viewport center to the clicked position, like on a single-click, but also zoom in (by sending "view:zoom_in()").

When double clicked with the left mouse button with shift: The same as above, but zoom out instead of in (by sending "view:zoom_out()").

Definition at line 153 of file OverViewWidget.cpp.

References _, m_last_offset, pixels2offset(), sigCommand(), and valueChanged().

154 {
155  Q_ASSERT(e);
156  if (!e) return;
157  if (e->button() != Qt::LeftButton) {
158  e->ignore();
159  return;
160  }
161 
162  // move the clicked position to the center of the viewport
163  sample_index_t offset = pixels2offset(e->x());
164  if (offset != m_last_offset) {
165  m_last_offset = offset;
166  emit valueChanged(offset);
167  }
168 
169  if (e->modifiers() == Qt::NoModifier) {
170  // double click without shift => zoom in
171  emit sigCommand(_("view:zoom_in()"));
172  } else if (e->modifiers() == Qt::ShiftModifier) {
173  // double click with shift => zoom out
174  emit sigCommand(_("view:zoom_out()"));
175  }
176 
177  e->accept();
178 }
void valueChanged(sample_index_t new_value)
quint64 sample_index_t
Definition: Sample.h:28
sample_index_t pixels2offset(int pixels)
sample_index_t m_last_offset
void sigCommand(const QString &command)
#define _(m)
Definition: memcpy.c:66
Here is the call graph for this function:

◆ mouseMoveEvent()

void Kwave::OverViewWidget::mouseMoveEvent ( QMouseEvent *  e)
protectedvirtual

On mouse move: move the current viewport center to the clicked position.

Reimplemented from Kwave::ImageView.

Definition at line 126 of file OverViewWidget.cpp.

References mousePressEvent().

127 {
128  mousePressEvent(e);
129 }
virtual void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE
Here is the call graph for this function:

◆ mousePressEvent()

void Kwave::OverViewWidget::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

On single-click with the left mouse button: move the current viewport center to the clicked position.

Reimplemented from Kwave::ImageView.

Definition at line 132 of file OverViewWidget.cpp.

References m_last_offset, m_view_width, pixels2offset(), and valueChanged().

Referenced by mouseMoveEvent().

133 {
134  Q_ASSERT(e);
135  if (!e) return;
136  if (e->buttons() != Qt::LeftButton) {
137  e->ignore();
138  return;
139  }
140 
141  // move the clicked position to the center of the viewport
142  sample_index_t offset = pixels2offset(e->x());
143  if (offset != m_last_offset) {
144  sample_index_t half = (m_view_width / 2);
145  offset = (offset > half) ? (offset - half) : 0;
146  m_last_offset = offset;
147  emit valueChanged(offset);
148  }
149  e->accept();
150 }
void valueChanged(sample_index_t new_value)
quint64 sample_index_t
Definition: Sample.h:28
sample_index_t m_view_width
sample_index_t pixels2offset(int pixels)
sample_index_t m_last_offset
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newImage

void Kwave::OverViewWidget::newImage ( QImage  image)
signal

emitted when the background calculation of the image is done

Referenced by calculateBitmap(), and OverViewWidget().

Here is the caller graph for this function:

◆ overviewChanged

void Kwave::OverViewWidget::overviewChanged ( )
protectedslot

connected to the m_repaint_timer, called when it has elapsed and the signal has to be repainted

Definition at line 235 of file OverViewWidget.cpp.

References m_repaint_timer, refreshBitmap(), and REPAINT_INTERVAL.

Referenced by OverViewWidget(), setRange(), and setSelection().

236 {
237  // check: start() must be called from the GUI thread only!
238  Q_ASSERT(this->thread() == QThread::currentThread());
239  Q_ASSERT(this->thread() == qApp->thread());
240 
241  if (m_repaint_timer.isActive()) {
242  // repainting is inhibited -> wait until the
243  // repaint timer is elapsed
244  return;
245  } else {
246  // repaint once and once later...
247  refreshBitmap();
248 
249  // start the repaint timer
250  m_repaint_timer.setSingleShot(true);
252  }
253 }
#define REPAINT_INTERVAL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pixels2offset()

sample_index_t Kwave::OverViewWidget::pixels2offset ( int  pixels)
protected

Converts a pixel offset within the overview's drawing area into the user's coordinate system.

Parameters
pixelsthe pixel coordinate [0...width-1]
Returns
an offset [0..length-1]

Definition at line 181 of file OverViewWidget.cpp.

References m_signal_length.

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

182 {
183  int width = this->width();
184  if (!width) return 0;
185 
186  if (pixels < 0) pixels = 0;
187  double zoom = static_cast<double>(m_signal_length - 1) /
188  static_cast<double>(width - 1);
189  sample_index_t offset = static_cast<sample_index_t>(rint(
190  static_cast<double>(pixels) * zoom));
191  return offset;
192 }
quint64 sample_index_t
Definition: Sample.h:28
sample_index_t m_signal_length
Here is the caller graph for this function:

◆ refreshBitmap

void Kwave::OverViewWidget::refreshBitmap ( )
protectedslot

refreshes all modified parts of the bitmap

Definition at line 332 of file OverViewWidget.cpp.

References m_repaint_timer, m_worker_thread, and REPAINT_INTERVAL.

Referenced by overviewChanged(), OverViewWidget(), and resizeEvent().

333 {
334  // check: start() must be called from the GUI thread only!
335  Q_ASSERT(this->thread() == QThread::currentThread());
336  Q_ASSERT(this->thread() == qApp->thread());
337 
338  if (m_worker_thread.isRunning()) {
339  // (re)start the repaint timer if the worker thread is still
340  // running, try again later...
341  m_repaint_timer.stop();
342  m_repaint_timer.setSingleShot(true);
344  } else {
345  // start the calculation in a background thread
346  m_worker_thread.start(QThread::IdlePriority);
347  }
348 }
#define REPAINT_INTERVAL
WorkerThread m_worker_thread
Here is the caller graph for this function:

◆ resizeEvent()

void Kwave::OverViewWidget::resizeEvent ( QResizeEvent *  )
protectedvirtual

refreshes the bitmap when resized

Definition at line 217 of file OverViewWidget.cpp.

References refreshBitmap().

218 {
219  refreshBitmap();
220 }
Here is the call graph for this function:

◆ setRange

void Kwave::OverViewWidget::setRange ( sample_index_t  offset,
sample_index_t  viewport,
sample_index_t  total 
)
slot

Sets new range parameters of the slider, using a scale that is calculated out of the slider's maximum position. All parameters are given in the user's coordinates/units (e.g. samples).

Parameters
offsetindex of the first visible sample
viewportwidth of the visible area
totalwidth of the whole signal

Definition at line 195 of file OverViewWidget.cpp.

References m_signal_length, m_view_offset, m_view_width, and overviewChanged().

Referenced by Kwave::MainWidget::updateViewRange().

198 {
199  m_view_offset = offset;
200  m_view_width = viewport;
201  m_signal_length = total;
202 
203  overviewChanged();
204 }
sample_index_t m_view_width
sample_index_t m_view_offset
sample_index_t m_signal_length
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelection

void Kwave::OverViewWidget::setSelection ( sample_index_t  offset,
sample_index_t  length 
)
slot

called when the selected time has changed

Parameters
offsetindex of the first selected sample
lengthnumber of selected samples

Definition at line 207 of file OverViewWidget.cpp.

References m_selection_length, m_selection_start, and overviewChanged().

Referenced by OverViewWidget().

209 {
210  m_selection_start = offset;
211  m_selection_length = length;
212 
213  overviewChanged();
214 }
sample_index_t m_selection_length
sample_index_t m_selection_start
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showCursor

void Kwave::OverViewWidget::showCursor ( sample_index_t  pos = SAMPLE_INDEX_MAX)
slot

shows the cursor at a given position

Parameters
poscurrent position of the cursor

Definition at line 273 of file OverViewWidget.cpp.

References m_cursor_position, m_repaint_timer, m_signal_length, m_view_offset, m_view_width, REPAINT_INTERVAL_FAST, SAMPLE_INDEX_MAX, and Kwave::toInt().

274 {
275  // check: start() must be called from the GUI thread only!
276  Q_ASSERT(this->thread() == QThread::currentThread());
277  Q_ASSERT(this->thread() == qApp->thread());
278 
279  const sample_index_t old_pos = m_cursor_position;
280  const sample_index_t new_pos = pos;
281 
282  if (new_pos == old_pos) return; // no change
283  m_cursor_position = new_pos;
284 
285  if (qMax(old_pos, new_pos) != SAMPLE_INDEX_MAX) {
286  // check for change in pixel units
289  // showing deleted space after signal
290  length = m_view_offset + m_view_width;
291  }
292  if (!length) return;
293  const double scale = static_cast<double>(width()) /
294  static_cast<double>(length);
295  const int old_pixel_pos = Kwave::toInt(
296  static_cast<double>(old_pos) * scale);
297  const int new_pixel_pos = Kwave::toInt(
298  static_cast<double>(new_pos) * scale);
299  if (old_pixel_pos == new_pixel_pos) return;
300  }
301 
302  // some update is required, start the repaint timer in quick mode
303  if (!m_repaint_timer.isActive() ||
304  (m_repaint_timer.interval() != REPAINT_INTERVAL_FAST))
305  {
306  m_repaint_timer.stop();
307  m_repaint_timer.setSingleShot(true);
309  }
310 }
#define REPAINT_INTERVAL_FAST
sample_index_t m_cursor_position
quint64 sample_index_t
Definition: Sample.h:28
sample_index_t m_view_width
int toInt(T x)
Definition: Utils.h:127
sample_index_t m_view_offset
sample_index_t m_signal_length
#define SAMPLE_INDEX_MAX
Definition: Sample.h:31
Here is the call graph for this function:

◆ sigCommand

void Kwave::OverViewWidget::sigCommand ( const QString &  command)
signal

emitted for zooming in and out via command

Referenced by mouseDoubleClickEvent().

Here is the caller graph for this function:

◆ sizeHint()

QSize Kwave::OverViewWidget::sizeHint ( ) const
virtual

optimal size for the widget,

See also
QWidget::sizeHint()

Definition at line 229 of file OverViewWidget.cpp.

References minimumSize().

Referenced by Kwave::MainWidget::MainWidget().

230 {
231  return minimumSize();
232 }
virtual QSize minimumSize() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueChanged

void Kwave::OverViewWidget::valueChanged ( sample_index_t  new_value)
signal

Will be emitted if the slider position has changed. The value is in user's units (e.g. samples).

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

Here is the caller graph for this function:

Member Data Documentation

◆ m_cache

Kwave::OverViewCache Kwave::OverViewWidget::m_cache
private

cache with overview data

Definition at line 219 of file OverViewWidget.h.

Referenced by calculateBitmap(), and OverViewWidget().

◆ m_cursor_position

sample_index_t Kwave::OverViewWidget::m_cursor_position
private

last cursor position

Definition at line 213 of file OverViewWidget.h.

Referenced by calculateBitmap(), and showCursor().

◆ m_labels

Kwave::LabelList Kwave::OverViewWidget::m_labels
private

list of labels

Definition at line 225 of file OverViewWidget.h.

Referenced by calculateBitmap(), and metaDataChanged().

◆ m_last_offset

sample_index_t Kwave::OverViewWidget::m_last_offset
private

last emitted offset (for avoiding duplicate events)

Definition at line 216 of file OverViewWidget.h.

Referenced by mouseDoubleClickEvent(), and mousePressEvent().

◆ m_repaint_timer

QTimer Kwave::OverViewWidget::m_repaint_timer
private

timer for limiting the number of repaints per second

Definition at line 222 of file OverViewWidget.h.

Referenced by metaDataChanged(), overviewChanged(), OverViewWidget(), refreshBitmap(), showCursor(), and ~OverViewWidget().

◆ m_selection_length

sample_index_t Kwave::OverViewWidget::m_selection_length
private

length of the selection [samples]

Definition at line 210 of file OverViewWidget.h.

Referenced by calculateBitmap(), and setSelection().

◆ m_selection_start

sample_index_t Kwave::OverViewWidget::m_selection_start
private

start of the selection [samples]

Definition at line 207 of file OverViewWidget.h.

Referenced by calculateBitmap(), and setSelection().

◆ m_signal_length

sample_index_t Kwave::OverViewWidget::m_signal_length
private

length of the whole area [samples]

Definition at line 204 of file OverViewWidget.h.

Referenced by calculateBitmap(), pixels2offset(), setRange(), and showCursor().

◆ m_view_offset

sample_index_t Kwave::OverViewWidget::m_view_offset
private

index of the first visible sample

Definition at line 198 of file OverViewWidget.h.

Referenced by calculateBitmap(), setRange(), and showCursor().

◆ m_view_width

sample_index_t Kwave::OverViewWidget::m_view_width
private

width of the visible area [samples]

Definition at line 201 of file OverViewWidget.h.

Referenced by calculateBitmap(), mousePressEvent(), setRange(), and showCursor().

◆ m_worker_thread

WorkerThread Kwave::OverViewWidget::m_worker_thread
private

worker thread for updates in background

Definition at line 228 of file OverViewWidget.h.

Referenced by refreshBitmap(), and ~OverViewWidget().


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