Add button to autostrech for each file
This commit is contained in:
@@ -81,6 +81,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
|
||||
connect(m_ringList, SIGNAL(infoLoaded(ImageInfoData)), m_info, SLOT(setInfo(const ImageInfoData&)));
|
||||
connect(m_ringList, SIGNAL(currentImageChanged(int)), m_filesystem, SLOT(selectFile(int)));
|
||||
connect(m_ringList, &ImageRingList::thumbnailLoaded, m_imageGL->imageWidget(), &ImageWidget::thumbnailLoaded);
|
||||
connect(m_ringList, &ImageRingList::pixmapLoaded, m_stretchPanel, &StretchToolbar::imageLoaded);
|
||||
connect(m_imageGL->imageWidget(), &ImageWidget::fileDropped, this, static_cast<void (MainWindow::*)(const QString &)>(&MainWindow::loadFile));
|
||||
|
||||
QMenu *fileMenu = new QMenu(tr("File"), this);
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 454 B |
@@ -10,5 +10,6 @@
|
||||
<file>nuke.png</file>
|
||||
<file>bayer.png</file>
|
||||
<file>org.nou.tenmon.png</file>
|
||||
<file>nuke_a.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,11 +10,13 @@ class StretchToolbar : public QToolBar
|
||||
{
|
||||
Q_OBJECT
|
||||
STFSlider *m_stfSlider;
|
||||
QAction *m_autoStretchOnLoad;
|
||||
public:
|
||||
explicit StretchToolbar(QWidget *parent = nullptr);
|
||||
public slots:
|
||||
void stretchImage(Image *img);
|
||||
void resetMTF();
|
||||
void imageLoaded(Image *img);
|
||||
signals:
|
||||
void paramChanged(float low, float mid, float high);
|
||||
void autoStretch();
|
||||
|
||||
Reference in New Issue
Block a user