[Qt] Implements "Previews"
This commit is contained in:
parent
cab8dcaf98
commit
7a7c573f98
|
@ -78,6 +78,7 @@ void SelectDialog::driverChange(QTreeWidgetItem *item, QTreeWidgetItem *prev)
|
|||
nBurnDrvActive = driver->driverNo();
|
||||
ui->leGameInfo->setText(BurnDrvGetText(flags | DRV_FULLNAME));
|
||||
updateTitleScreen();
|
||||
updatePreview();
|
||||
{
|
||||
QString manufacturer = BurnDrvGetTextA(DRV_MANUFACTURER) ?
|
||||
BurnDrvGetText(flags | DRV_MANUFACTURER) : tr("Unknown");
|
||||
|
@ -192,6 +193,19 @@ void SelectDialog::updateTitleScreen()
|
|||
}
|
||||
}
|
||||
|
||||
void SelectDialog::updatePreview()
|
||||
{
|
||||
QString drv = BurnDrvGetTextA(DRV_NAME);
|
||||
QString path = QString(szAppPreviewsPath);
|
||||
path += QString("%0.png").arg(drv);
|
||||
if (QFile(path).exists()) {
|
||||
QPixmap p(path);
|
||||
ui->imgPreview->setPixmap(p);
|
||||
} else {
|
||||
ui->imgPreview->setPixmap(m_defaultImage);
|
||||
}
|
||||
}
|
||||
|
||||
void SelectDialog::updateLabelCounter()
|
||||
{
|
||||
QString text(tr("Showing %0 of %1 sets").
|
||||
|
|
|
@ -66,6 +66,8 @@ signals:
|
|||
private:
|
||||
int m_selectedDriver;
|
||||
void updateTitleScreen();
|
||||
void updatePreview();
|
||||
|
||||
void updateLabelCounter();
|
||||
void buildDriverTree();
|
||||
bool isFiltered(TreeDriverItem *driver);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue