|
kwave
18.07.70
|
#include <ViewItem.h>


Public Types | |
| enum | Flag { None = 0, CanGrabAndMove = 1, CanDragAndDrop = 2 } |
Signals | |
| void | sigCommand (const QString &command) |
Public Member Functions | |
| ViewItem (Kwave::SignalView &view, Kwave::SignalManager &signal_manager) | |
| virtual | ~ViewItem () |
| virtual Kwave::ViewItem::Flags | flags () const |
| virtual QString | toolTip (sample_index_t &ofs) |
| virtual void | appendContextMenu (QMenu *parent) |
| virtual QCursor | mouseCursor () const |
| virtual void | moveTo (const QPoint &mouse_pos) |
| virtual void | startDragging () |
| virtual void | done () |
Protected Attributes | |
| Kwave::SignalView & | m_view |
| Kwave::SignalManager & | m_signal_manager |
Definition at line 41 of file ViewItem.h.
| Enumerator | |
|---|---|
| None | no special capabilities |
| CanGrabAndMove | can be grabbed and moved |
| CanDragAndDrop | can be used for drag and drop |
Definition at line 46 of file ViewItem.h.
| Kwave::ViewItem::ViewItem | ( | Kwave::SignalView & | view, |
| Kwave::SignalManager & | signal_manager | ||
| ) |
Constructor
| view | pointer to the owner (a SignalView) |
| signal_manager | the corresponding SignalManager |
Definition at line 29 of file ViewItem.cpp.
|
virtual |
|
virtual |
Called to append entries to a context menu. The default implementation does nothing.
| parent | context menu to add items |
Reimplemented in Kwave::LabelItem.
Definition at line 54 of file ViewItem.cpp.
|
virtual |
Called when leaving the move or drag mode, when the mouse button has been released or the operation is done.
Reimplemented in Kwave::LabelItem.
Definition at line 77 of file ViewItem.cpp.
|
virtual |
Returns flags describing the possible interactions with this object
Reimplemented in Kwave::LabelItem, Kwave::SelectionBorderItem, and Kwave::SelectionItem.
Definition at line 41 of file ViewItem.cpp.
References None.
|
virtual |
Returns a mouse cursor used when moving the item
Reimplemented in Kwave::LabelItem, and Kwave::SelectionBorderItem.
Definition at line 60 of file ViewItem.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 in Kwave::LabelItem, and Kwave::SelectionBorderItem.
Definition at line 66 of file ViewItem.cpp.
|
signal |
forward a sigCommand to the next layer
Referenced by Kwave::LabelItem::contextMenuLabelDelete(), and Kwave::LabelItem::contextMenuLabelProperties().

|
virtual |
Starts a drag & drop operation.
Reimplemented in Kwave::SelectionItem.
Definition at line 72 of file ViewItem.cpp.
|
virtual |
Can be overwritten to return a tooltip. The default implementation returns an empty string.
| ofs | absolute sample index the tooltip should refer to (can be modified) |
Reimplemented in Kwave::LabelItem, and Kwave::SelectionBorderItem.
Definition at line 47 of file ViewItem.cpp.
|
protected |
the corresponding SignalManager
Definition at line 119 of file ViewItem.h.
Referenced by Kwave::SelectionBorderItem::moveTo(), Kwave::LabelItem::moveTo(), and Kwave::SelectionItem::startDragging().
|
protected |
the owner of this view item (a SignalView)
Definition at line 116 of file ViewItem.h.
Referenced by Kwave::SelectionBorderItem::moveTo(), Kwave::LabelItem::moveTo(), Kwave::SelectionItem::startDragging(), Kwave::SelectionBorderItem::toolTip(), and Kwave::LabelItem::toolTip().