Artwork can now be changed by double-click.
This commit is contained in:
parent
6657745daa
commit
c49ce7e530
Binary file not shown.
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 89 KiB |
@ -889,7 +889,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return QMainWindow::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::winEvent(MSG *message, long *result)
|
bool MainWindow::winEvent(MSG *message, long *result)
|
||||||
|
@ -80,6 +80,9 @@ MetaInfoDialog::MetaInfoDialog(QWidget *parent)
|
|||||||
connect(loadArtworkAction, SIGNAL(triggered(bool)), this, SLOT(editButtonClicked()));
|
connect(loadArtworkAction, SIGNAL(triggered(bool)), this, SLOT(editButtonClicked()));
|
||||||
connect(clearArtworkAction, SIGNAL(triggered(bool)), this, SLOT(clearArtworkActionTriggered()));
|
connect(clearArtworkAction, SIGNAL(triggered(bool)), this, SLOT(clearArtworkActionTriggered()));
|
||||||
|
|
||||||
|
//Install event filter
|
||||||
|
labelArtwork->installEventFilter(this);
|
||||||
|
|
||||||
//Translate
|
//Translate
|
||||||
labelHeaderText->setText(QString("<b>%1</b><br>%2").arg(tr("Meta Information"), tr("The following meta information have been extracted from the original file.")));
|
labelHeaderText->setText(QString("<b>%1</b><br>%2").arg(tr("Meta Information"), tr("The following meta information have been extracted from the original file.")));
|
||||||
}
|
}
|
||||||
@ -221,3 +224,14 @@ void MetaInfoDialog::clearArtworkActionTriggered(void)
|
|||||||
labelArtwork->setPixmap(QPixmap::fromImage(QImage(":/images/CD.png")));
|
labelArtwork->setPixmap(QPixmap::fromImage(QImage(":/images/CD.png")));
|
||||||
dynamic_cast<MetaInfoModel*>(tableView->model())->editArtwork(QString());
|
dynamic_cast<MetaInfoModel*>(tableView->model())->editArtwork(QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MetaInfoDialog::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
if((obj == labelArtwork) && (event->type() == QEvent::MouseButtonDblClick))
|
||||||
|
{
|
||||||
|
editButtonClicked();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDialog::eventFilter(obj, event);
|
||||||
|
}
|
||||||
|
@ -46,6 +46,9 @@ private slots:
|
|||||||
void clearMetaInfoActionTriggered(void);
|
void clearMetaInfoActionTriggered(void);
|
||||||
void clearArtworkActionTriggered(void);
|
void clearArtworkActionTriggered(void);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QMenu *m_contextMenuInfo;
|
QMenu *m_contextMenuInfo;
|
||||||
QMenu *m_contextMenuArtwork;
|
QMenu *m_contextMenuArtwork;
|
||||||
|
Loading…
Reference in New Issue
Block a user