Remember auto stretch on load
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
#include <QSettings>
|
||||||
#include "imageringlist.h"
|
#include "imageringlist.h"
|
||||||
|
|
||||||
const float BLACK_POINT_SIGMA = -2.8f;
|
const float BLACK_POINT_SIGMA = -2.8f;
|
||||||
@@ -91,6 +92,14 @@ StretchToolbar::StretchToolbar(QWidget *parent) : QToolBar(tr("Stretch toolbar")
|
|||||||
|
|
||||||
m_autoStretchOnLoad = addAction(QIcon(":/nuke_a.png"), tr("Apply auto stretch on load"));
|
m_autoStretchOnLoad = addAction(QIcon(":/nuke_a.png"), tr("Apply auto stretch on load"));
|
||||||
m_autoStretchOnLoad->setCheckable(true);
|
m_autoStretchOnLoad->setCheckable(true);
|
||||||
|
QSettings settings;
|
||||||
|
m_autoStretchOnLoad->setChecked(settings.value("stretchtoolbar/autostretch", false).toBool());
|
||||||
|
}
|
||||||
|
|
||||||
|
StretchToolbar::~StretchToolbar()
|
||||||
|
{
|
||||||
|
QSettings settings;
|
||||||
|
settings.setValue("stretchtoolbar/autostretch", m_autoStretchOnLoad->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
void StretchToolbar::stretchImage(Image *img)
|
void StretchToolbar::stretchImage(Image *img)
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class StretchToolbar : public QToolBar
|
|||||||
MTFParam m_mtfParam;
|
MTFParam m_mtfParam;
|
||||||
public:
|
public:
|
||||||
explicit StretchToolbar(QWidget *parent = nullptr);
|
explicit StretchToolbar(QWidget *parent = nullptr);
|
||||||
|
~StretchToolbar();
|
||||||
public slots:
|
public slots:
|
||||||
void stretchImage(Image *img);
|
void stretchImage(Image *img);
|
||||||
void resetMTF();
|
void resetMTF();
|
||||||
|
|||||||
Reference in New Issue
Block a user