| 87 | // disabled mouseMoveEvent in the parent class |
| 88 | } |
| 89 | void YACReaderTableView::mousePressEvent(QMouseEvent *event) |
| 90 | { |
| 91 | QTableView::mousePressEvent(event); |
| 92 | QModelIndex mi = indexAt(event->pos()); |
| 93 | if (mi.isValid()) { |
| 94 | QList<QModelIndex> selectedIndexes = this->selectedIndexes(); |
| 95 | if (selectedIndexes.contains(mi)) { |
| 96 | if (mi.column() == ComicModel::Rating) { |
| 97 | if (!editing) { |
| 98 | editing = true; |
| 99 | currentIndexEditing = mi; |
| 100 | edit(mi); |
| 101 | myeditor = indexWidget(mi); |
| 102 | } |
| 103 | return; |
| 104 | } |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | // this could be the origin of a new drag acction |
| 109 | if (event->button() == Qt::LeftButton) { |
| 110 | startDragPos = event->pos(); |
| 111 | } |
| 112 | } |
| 113 | void YACReaderTableView::leaveEvent(QEvent *event) |
| 114 | { |
| 115 | closeRatingEditor(); |
nothing calls this directly
no test coverage detected