kwave
18.07.70
|
#include <Selection.h>
Signals | |
void | changed (sample_index_t offset, sample_index_t length) |
Public Member Functions | |
Selection (sample_index_t offset, sample_index_t length) | |
Selection (const Selection &other) | |
virtual | ~Selection () |
void | select (sample_index_t offset, sample_index_t length) |
void | clear () |
sample_index_t | offset () const |
sample_index_t | length () const |
sample_index_t | first () const |
sample_index_t | last () const |
bool | operator== (const Selection &other) const |
Selection & | operator= (const Selection &source) |
Private Attributes | |
sample_index_t | m_offset |
sample_index_t | m_length |
Definition at line 31 of file Selection.h.
Kwave::Selection::Selection | ( | sample_index_t | offset, |
sample_index_t | length | ||
) |
constructor.
offset | index of the first item |
length | number of items |
Definition at line 21 of file Selection.cpp.
Kwave::Selection::Selection | ( | const Selection & | other | ) |
|
virtual |
|
signal |
Emits a change in the selected range.
offset | index of the first selected items |
length | number of selected items |
Referenced by select().
|
inline |
Clears the selection (0 samples at offset 0)
Definition at line 56 of file Selection.h.
Referenced by Kwave::SignalManager::close().
|
inline |
Equal to offset().
Definition at line 71 of file Selection.h.
Referenced by Kwave::SignalView::dragMoveEvent(), Kwave::SignalManager::executeCommand(), Kwave::MainWidget::executeCommand(), Kwave::TrackView::findItem(), Kwave::SignalView::mousePressEvent(), Kwave::MultiTrackWriter::MultiTrackWriter(), Kwave::TrackView::paintEvent(), Kwave::SelectionBorderItem::SelectionBorderItem(), Kwave::SignalView::selectionPosition(), Kwave::PluginManager::selectionStart(), Kwave::PlaybackController::startDevicePlayBack(), and Kwave::SelectionItem::startDragging().
|
inline |
Returns the index of the last selected item.
Definition at line 76 of file Selection.h.
Referenced by Kwave::SignalView::dragMoveEvent(), Kwave::SignalManager::executeCommand(), Kwave::MainWidget::executeCommand(), Kwave::TrackView::findItem(), Kwave::SignalView::mousePressEvent(), Kwave::MultiTrackWriter::MultiTrackWriter(), Kwave::TrackView::paintEvent(), Kwave::SelectionBorderItem::SelectionBorderItem(), Kwave::PluginManager::selectionEnd(), Kwave::SignalView::selectionPosition(), Kwave::PlaybackController::startDevicePlayBack(), and Kwave::SelectionItem::startDragging().
|
inline |
Returns the number of selected items.
Definition at line 66 of file Selection.h.
Referenced by Kwave::SignalWidget::contextMenuEvent(), Kwave::SignalManager::executeCommand(), Kwave::MainWidget::executeCommand(), Kwave::TrackView::findItem(), operator=(), operator==(), Kwave::SignalManager::save(), select(), Kwave::SelectionItem::startDragging(), Kwave::UndoSelection::store(), Kwave::UndoSelection::undo(), Kwave::SignalManager::undo(), Kwave::ZoomToolBar::updateToolbar(), Kwave::TopWidget::updateToolbar(), and Kwave::MainWidget::zoomSelection().
|
inline |
Returns the index of the first selected item.
Definition at line 61 of file Selection.h.
Referenced by Kwave::SignalManager::executeCommand(), operator=(), operator==(), Kwave::SignalManager::save(), select(), Kwave::UndoSelection::store(), Kwave::UndoSelection::undo(), Kwave::SignalManager::undo(), and Kwave::MainWidget::zoomSelection().
Assignment operator
Definition at line 87 of file Selection.h.
References length(), and offset().
|
inline |
compare operator
Definition at line 81 of file Selection.h.
References length(), and offset().
void Kwave::Selection::select | ( | sample_index_t | offset, |
sample_index_t | length | ||
) |
Sets a new offset and length.
offset | index of the first item |
length | number of items |
Definition at line 38 of file Selection.cpp.
References changed(), length(), m_length, m_offset, and offset().
Referenced by Kwave::SignalManager::selectRange().
|
private |
|
private |
index of the first selected item
Definition at line 104 of file Selection.h.
Referenced by select().