void RemoveRedEyesWindow::setBusy(bool busy)
{
    d->busy = busy;

    if (busy)
    {
        // disable connection to make sure that the "test run" and "correct photos"
        // buttons are not enabled again on ImageListChange
        disconnect(d->imageList, SIGNAL(signalImageListChanged()),
                   this, SLOT(imageListChanged()));

        disconnect(this, SIGNAL(myCloseClicked()),
                   this, SLOT(closeClicked()));

        setButtonGuiItem(Close, KStandardGuiItem::cancel());
        enableButton(User1, false); // correction button
        enableButton(User2, false); // testrun button

        connect(this, SIGNAL(myCloseClicked()),
                this, SLOT(cancelCorrection()));

        d->settingsTab->setEnabled(false);
    }
    else
    {
        // enable connection again to make sure that an empty image list will
        // disable the "test run" and "correct photos" buttons
        connect(d->imageList, SIGNAL(signalImageListChanged()),
                this, SLOT(imageListChanged()));

        disconnect(this, SIGNAL(myCloseClicked()),
                   this, SLOT(cancelCorrection()));

        setButtonGuiItem(Close, KStandardGuiItem::close());
        enableButton(User1, true);  // correction button
        enableButton(User2, true);  // testrun button

        connect(this, SIGNAL(myCloseClicked()),
                this, SLOT(closeClicked()));

        d->settingsTab->setEnabled(true);
    }
}
void ImageListModel::setAllowTrimmed(bool allowTrimmed) {
    _allowTrimmed = allowTrimmed;
    ImageMapIterator i = Begin();
    // apply trimmed
    while (i!= End()) {
        if (allowTrimmed) {
            (*i)->trimmed();
        } else {
            (*i)->reset();
        }
        ++i;
    }
    emit imageListChanged();
}
void ImageListModel::endEdit()
{
    if (_imageListChanged) {
        emit imageListChanged();
    }
}