MCPcopy Create free account
hub / github.com/IENT/YUView / getDropTarget

Method getDropTarget

YUViewLib/src/ui/widgets/PlaylistTreeWidget.cpp:171–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171playlistItem *PlaylistTreeWidget::getDropTarget(const QPoint &pos) const
172{
173 auto pItem = dynamic_cast<playlistItem *>(this->itemAt(pos));
174 if (pItem != nullptr)
175 {
176 // check if dropped on or below/above pItem
177 auto rc = this->visualItemRect(pItem);
178 auto rcNew = QRect(rc.left(), rc.top() + 2, rc.width(), rc.height() - 4);
179 if (!rcNew.contains(pos, true))
180 // dropped next to pItem
181 pItem = nullptr;
182 }
183
184 return pItem;
185}
186
187void PlaylistTreeWidget::dragMoveEvent(QDragMoveEvent *event)
188{

Callers 1

dragMoveEventMethod · 0.95

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected