Skip to content

Commit

Permalink
Notify the user when the image is too large for the filter
Browse files Browse the repository at this point in the history
Use the message box to tell the user what to do in order to apply the filter
to an image larger than 512x512, and the info banner to notify him if he
still taps on the image.
  • Loading branch information
Simon Pena committed Mar 29, 2012
1 parent b7e4292 commit 057d8a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gallerytiltshiftplugin/gallerytiltshiftplugin.cpp
Expand Up @@ -129,6 +129,8 @@ bool GalleryTiltShiftPlugin::receiveMouseEvent(QGraphicsSceneMouseEvent* event)
d->m_focusPosition.setY(event->pos().toPoint().y());
performEditOperation();
return true;
} else {
showInfoBanner("Plugin disabled for this image size");
}
}
return false;
Expand Down Expand Up @@ -176,6 +178,14 @@ void GalleryTiltShiftPlugin::activate()
if (d->m_validImage) {
showInfoBanner("Tap on an area to keep it focused");
} else {
showMessageBox("Tilt Shift plugin limitations",
"Gallery Tilt Shift plugin is currently limited to small images (512x512)<br />"
"For a given image:"
"<ol>"
"<li>Scale it or crop it</li>"
"<li>Save it with a different name</li>"
"<li>Apply the filter to the new one</li>"
"</ol>");
GalleryTiltShiftWidget* widget = static_cast<GalleryTiltShiftWidget*>(toolBarWidget());
widget->setEnabled(d->m_validImage);
}
Expand Down

0 comments on commit 057d8a3

Please sign in to comment.