parent
126ed1a551
commit
32ed8ebba4
|
@ -56,6 +56,8 @@ FileView::FileView(QWidget* parent)
|
|||
connect(ui_->up, SIGNAL(clicked()), SLOT(FileUp()));
|
||||
connect(ui_->path, SIGNAL(textChanged(QString)),
|
||||
SLOT(ChangeFilePath(QString)));
|
||||
connect(ui_->list, SIGNAL(Back()), undo_stack_, SLOT(undo()));
|
||||
connect(ui_->list, SIGNAL(Forward()), undo_stack_, SLOT(redo()));
|
||||
|
||||
connect(undo_stack_, SIGNAL(canUndoChanged(bool)), ui_->back,
|
||||
SLOT(setEnabled(bool)));
|
||||
|
|
|
@ -132,10 +132,17 @@ void FileViewList::DeleteSlot() { emit Delete(FilenamesFromSelection()); }
|
|||
void FileViewList::EditTagsSlot() { emit EditTags(UrlListFromSelection()); }
|
||||
|
||||
void FileViewList::mousePressEvent(QMouseEvent* e) {
|
||||
switch (e->button()) {
|
||||
case Qt::XButton1:
|
||||
emit Back();
|
||||
break;
|
||||
case Qt::XButton2:
|
||||
emit Forward();
|
||||
break;
|
||||
// enqueue to playlist with middleClick
|
||||
case Qt::MidButton: {
|
||||
QListView::mousePressEvent(e);
|
||||
|
||||
// enqueue to playlist with middleClick
|
||||
if (e->button() == Qt::MidButton) {
|
||||
// we need to update the menu selection
|
||||
menu_selection_ = selectionModel()->selection();
|
||||
|
||||
|
@ -143,6 +150,11 @@ void FileViewList::mousePressEvent(QMouseEvent* e) {
|
|||
data->setUrls(UrlListFromSelection());
|
||||
data->enqueue_now_ = true;
|
||||
emit AddToPlaylist(data);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
QListView::mousePressEvent(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ signals:
|
|||
void CopyToDevice(const QList<QUrl>& urls);
|
||||
void Delete(const QStringList& filenames);
|
||||
void EditTags(const QList<QUrl>& urls);
|
||||
void Back();
|
||||
void Forward();
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent* e);
|
||||
|
|
Loading…
Reference in New Issue