kwave
18.07.70
|
#include <SelectionBorderItem.h>
Public Member Functions | |
SelectionBorderItem (SignalView &view, Kwave::SignalManager &signal_manager, sample_index_t pos) | |
virtual | ~SelectionBorderItem () Q_DECL_OVERRIDE |
virtual Kwave::ViewItem::Flags | flags () const Q_DECL_OVERRIDE |
virtual QString | toolTip (sample_index_t &ofs) Q_DECL_OVERRIDE |
virtual QCursor | mouseCursor () const Q_DECL_OVERRIDE |
virtual void | moveTo (const QPoint &mouse_pos) Q_DECL_OVERRIDE |
![]() | |
ViewItem (Kwave::SignalView &view, Kwave::SignalManager &signal_manager) | |
virtual | ~ViewItem () |
virtual void | appendContextMenu (QMenu *parent) |
virtual void | startDragging () |
virtual void | done () |
Private Attributes | |
Kwave::MouseMark | m_selection |
Additional Inherited Members | |
![]() | |
enum | Flag { None = 0, CanGrabAndMove = 1, CanDragAndDrop = 2 } |
![]() | |
void | sigCommand (const QString &command) |
![]() | |
Kwave::SignalView & | m_view |
Kwave::SignalManager & | m_signal_manager |
Definition at line 39 of file SelectionBorderItem.h.
Kwave::SelectionBorderItem::SelectionBorderItem | ( | Kwave::SignalView & | view, |
Kwave::SignalManager & | signal_manager, | ||
sample_index_t | pos | ||
) |
Constructor
view | the owner (SignalView) |
signal_manager | the corresponding SignalManager |
pos | start position, either left or right border |
Definition at line 28 of file SelectionBorderItem.cpp.
References Kwave::Selection::first(), Kwave::MouseMark::grep(), Kwave::Selection::last(), m_selection, Kwave::SignalManager::selection(), and Kwave::MouseMark::set().
|
virtual |
|
virtual |
Returns flags describing the possible interactions with this object
Reimplemented from Kwave::ViewItem.
Definition at line 49 of file SelectionBorderItem.cpp.
References Kwave::ViewItem::CanGrabAndMove.
|
virtual |
Returns a mouse cursor used when moving the item
Reimplemented from Kwave::ViewItem.
Definition at line 78 of file SelectionBorderItem.cpp.
|
virtual |
handles updates when being moved with the mouse
mouse_pos | position of the mouse, in pixel coordinates relative to the parent widget |
Reimplemented from Kwave::ViewItem.
Definition at line 84 of file SelectionBorderItem.cpp.
References Kwave::MouseMark::left(), Kwave::MouseMark::length(), m_selection, Kwave::ViewItem::m_signal_manager, Kwave::ViewItem::m_view, Kwave::SignalView::offset(), Kwave::SignalView::pixels2samples(), Kwave::SignalManager::selectRange(), and Kwave::MouseMark::update().
|
virtual |
Can be overwritten to return a tooltip. The default implementation returns an empty string.
ofs | sample index the tooltip should refer to (unused) |
Reimplemented from Kwave::ViewItem.
Definition at line 55 of file SelectionBorderItem.cpp.
References _, Kwave::MouseMark::left(), m_selection, Kwave::ViewItem::m_view, Kwave::ms2hms(), Kwave::MouseMark::right(), and Kwave::SignalView::samples2ms().
|
private |
selection handler
Definition at line 85 of file SelectionBorderItem.h.
Referenced by moveTo(), SelectionBorderItem(), and toolTip().