1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-20 13:39:00 +01:00
Clementine-audio-player-Mac.../src/radioview.cpp
2009-12-29 23:01:07 +00:00

19 lines
424 B
C++

#include "radioview.h"
#include "radiomodel.h"
#include <QContextMenuEvent>
RadioView::RadioView(QWidget *parent)
: QTreeView(parent)
{
}
void RadioView::contextMenuEvent(QContextMenuEvent* e) {
QModelIndex index = indexAt(e->pos());
if (!index.isValid())
return;
RadioModel* radio_model = static_cast<RadioModel*>(model());
radio_model->ShowContextMenu(radio_model->IndexToItem(index), e->globalPos());
}