PictureDialog navigating with arrow keys
This commit is contained in:
parent
19ff5b4d7b
commit
e27fb34908
7 changed files with 179 additions and 2 deletions
|
@ -89,6 +89,11 @@ void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture, QString pic
|
|||
ui->labPicture->setPixmap(SnapmaticPixmap);
|
||||
}
|
||||
|
||||
void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture)
|
||||
{
|
||||
setSnapmaticPicture(picture, picture->getPictureFileName());
|
||||
}
|
||||
|
||||
void SnapmaticWidget::on_cmdView_clicked()
|
||||
{
|
||||
PictureDialog *picDialog = new PictureDialog(profileDB, this);
|
||||
|
@ -98,6 +103,8 @@ void SnapmaticWidget::on_cmdView_clicked()
|
|||
|
||||
// be ready for playerName updated
|
||||
QObject::connect(threadDB, SIGNAL(playerNameUpdated()), picDialog, SLOT(playerNameUpdated()));
|
||||
QObject::connect(picDialog, SIGNAL(nextPictureRequested()), this, SLOT(dialogNextPictureRequested()));
|
||||
QObject::connect(picDialog, SIGNAL(previousPictureRequested()), this, SLOT(dialogPreviousPictureRequested()));
|
||||
|
||||
// show picture dialog
|
||||
picDialog->showNormal();
|
||||
|
@ -220,6 +227,16 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev)
|
|||
//ui->SnapmaticFrame->setStyleSheet("");
|
||||
}
|
||||
|
||||
void SnapmaticWidget::dialogNextPictureRequested()
|
||||
{
|
||||
emit nextPictureRequested((QWidget*)sender());
|
||||
}
|
||||
|
||||
void SnapmaticWidget::dialogPreviousPictureRequested()
|
||||
{
|
||||
emit previousPictureRequested((QWidget*)sender());
|
||||
}
|
||||
|
||||
void SnapmaticWidget::on_cbSelected_stateChanged(int arg1)
|
||||
{
|
||||
if (arg1 == Qt::Checked)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue