Add support for invert and super pixel

This commit is contained in:
2022-04-09 11:10:07 +02:00
parent 68fbcfbb59
commit 46a4715ce5
11 changed files with 150 additions and 126 deletions
+17 -4
View File
@@ -21,22 +21,35 @@ StretchPanel::StretchPanel(QWidget *parent) : QWidget(parent)
setLayout(layout);
m_stfSlider = new STFSlider(this);
layout->addWidget(m_stfSlider, 0, 0);
layout->addWidget(m_stfSlider);
connect(m_stfSlider, SIGNAL(paramChanged(float, float, float)), this, SIGNAL(paramChanged(float,float,float)));
QToolButton *autoStretchButton = new QToolButton(this);
autoStretchButton->setIcon(QIcon(":/nuke.svg"));
autoStretchButton->setIcon(QIcon(":/nuke.png"));
autoStretchButton->setToolTip(tr("Auto Stretch F12"));
autoStretchButton->setShortcut(Qt::Key_F12);
layout->addWidget(autoStretchButton);
connect(autoStretchButton, SIGNAL(pressed()), this, SIGNAL(autoStretch()));
QToolButton *resetButton = new QToolButton(this);
resetButton->setIcon(style()->standardIcon(QStyle::SP_DialogResetButton));
resetButton->setToolTip(tr("Reset Screen Transfer Function F11"));
resetButton->setShortcut(Qt::Key_F11);
connect(resetButton, &QToolButton::pressed, this, &StretchPanel::resetMTF);
QToolButton *invertButton = new QToolButton(this);
invertButton->setIcon(QIcon(":/invert.png"));
invertButton->setCheckable(true);
connect(invertButton, SIGNAL(toggled(bool)), this, SIGNAL(invert(bool)));
QToolButton *superPixelButton = new QToolButton(this);
superPixelButton->setIcon(QIcon(":/bayer.svg"));
superPixelButton->setCheckable(true);
connect(superPixelButton, SIGNAL(toggled(bool)), this, SIGNAL(superPixel(bool)));
layout->addWidget(autoStretchButton);
layout->addWidget(resetButton);
connect(resetButton, SIGNAL(pressed()), this, SLOT(resetMTF()));
layout->addWidget(invertButton);
layout->addWidget(superPixelButton);
}
void StretchPanel::stretchImage(Image *img)