Add button to autostrech for each file

This commit is contained in:
2022-04-19 10:10:47 +02:00
parent e0d473c8c8
commit da1843e48c
5 changed files with 14 additions and 0 deletions
+10
View File
@@ -37,6 +37,9 @@ StretchToolbar::StretchToolbar(QWidget *parent) : QToolBar(tr("Stretch toolbar")
QAction *superPixelButton = addAction(QIcon(":/bayer.png"), tr("Superpixel CFA draw 2x2 pixel as one"));
superPixelButton->setCheckable(true);
connect(superPixelButton, SIGNAL(toggled(bool)), this, SIGNAL(superPixel(bool)));
m_autoStretchOnLoad = addAction(QIcon(":/nuke_a.png"), tr("Auto stretch"));
m_autoStretchOnLoad->setCheckable(true);
}
void StretchToolbar::stretchImage(Image *img)
@@ -63,3 +66,10 @@ void StretchToolbar::resetMTF()
emit paramChanged(0, 0.5, 1);
}
void StretchToolbar::imageLoaded(Image *img)
{
if(m_autoStretchOnLoad->isChecked())
stretchImage(img);
}