增加侧边栏图像处理功能

This commit is contained in:
yangjiaxuan 2023-04-08 16:33:36 +08:00
parent f8939f1198
commit a042ee16d9
10 changed files with 1301 additions and 440 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -82,6 +82,7 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
, m_currDeviceName("")
, m_cacheDirNotify(false)
, m_AquirePathNotify(false)
, m_bSideflag(false)
{
ui->setupUi(this);
@ -333,6 +334,7 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
m_menu_imageInsert->addAction(ui->act_insertFromScanner);
ui->act_consume->setVisible(false);
ui->act_enhanceText->setVisible(false);
connect(this, SIGNAL(sane_dev_arrive(QString, bool)), this, SLOT(on_sane_dev_arrive(QString, bool)), Qt::QueuedConnection);
connect(this, SIGNAL(sane_dev_remove(QString)), this, SLOT(on_sane_dev_remove(QString)), Qt::QueuedConnection);
@ -371,7 +373,6 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
m_dlgFullScreen = nullptr;
m_dialogLog->updateStatus(!dev_que_.opened_scanner_name().empty() && 0 != m_scanType, m_isScanning);
updateActionStatus();
ui->act_autoSave->setChecked(getCfgValue("save", "autoSave", false));
#if defined(OEM_LISICHENG)
@ -389,6 +390,18 @@ MainWindow::MainWindow(const QString& appLang, QWidget *parent)
m_vFwUpgradeAndDevLock.clear();
m_threadFwUpgradeAndDevLock = nullptr;
m_pbtn_push = new QPushButton(this);
m_pbtn_push->setText("<<");
m_pbtn_push->setGeometry(0, 0, 25, 50);
m_widget_sideBar = new Widget_Imgproc_SideBar(this);
connect(m_pbtn_push, SIGNAL(clicked()), this, SLOT(on_m_pbtn_push_clicked()));
connect(m_widget_sideBar, SIGNAL(applyToImage(HGImage,int,int,double)), this, SLOT(on_dialog_sideBar_applyToImage(HGImage,int,int,double)));
connect(m_widget_sideBar, SIGNAL(finish()), this, SLOT(on_dialog_sideBar_finish()));
updateSideBar();
updateActionStatus();
SANE_Int v = 0;
sane_init_ex(&v, sane_ex_callback, this);
}
@ -848,6 +861,16 @@ void MainWindow::on_currItemChanged(int index)
m_modify = false;
}
if (m_widget_sideBar != nullptr)
{
HGImage curImage = nullptr;
m_view->getImage(&curImage);
if (curImage != nullptr)
{
m_widget_sideBar->getCurrentImg(curImage);
}
}
int count = 0;
m_thumb->getItemCount(&count);
m_wndStatusBar->setPageInfo(count, m_currIndex);
@ -1583,6 +1606,61 @@ void MainWindow::on_wrong_image_decide(dialog_wrong_img* dlg, bool save)
delete dlg;
}
void MainWindow::on_m_pbtn_push_clicked()
{
int mainWndWidth = this->rect().width();
int mainWndHeight = this->rect().height();
int sideBarWidth = m_widget_sideBar->getWidth();
int sideBarHeight = m_widget_sideBar->getHeight();
if(!m_bSideflag)
{
m_propertyAnimation->setStartValue(QRect(mainWndWidth, mainWndHeight/2 - sideBarHeight/2, sideBarWidth, sideBarHeight));
m_propertyAnimation->setEndValue(QRect(mainWndWidth - sideBarWidth, mainWndHeight/2 - sideBarHeight/2, sideBarWidth, sideBarHeight));
m_propertyAnimation->start();
m_propertyAnimation2->setStartValue(QRect(mainWndWidth - m_pbtn_push->width(), mainWndHeight/2 - m_pbtn_push->height()/2, m_pbtn_push->width(), m_pbtn_push->height()));
m_propertyAnimation2->setEndValue(QRect(mainWndWidth - m_pbtn_push->width() - sideBarWidth, mainWndHeight/2 - m_pbtn_push->height()/2, m_pbtn_push->width(), m_pbtn_push->height()));
m_propertyAnimation2->start();
m_pbtn_push->setText(">>");
m_bSideflag = !m_bSideflag;
}
else
{
m_propertyAnimation->setStartValue(QRect(mainWndWidth - sideBarWidth, mainWndHeight/2 - sideBarHeight/2,sideBarWidth, sideBarHeight));
m_propertyAnimation->setEndValue(QRect(mainWndWidth, mainWndHeight/2 - sideBarHeight/2, sideBarWidth, sideBarHeight));
m_propertyAnimation->start();
m_propertyAnimation2->setStartValue(QRect(mainWndWidth - m_pbtn_push->width() - sideBarWidth, mainWndHeight/2 - m_pbtn_push->height()/2, m_pbtn_push->width(), m_pbtn_push->height()));
m_propertyAnimation2->setEndValue(QRect(mainWndWidth - m_pbtn_push->width(), mainWndHeight/2 - m_pbtn_push->height()/2, m_pbtn_push->width(), m_pbtn_push->height()));
m_propertyAnimation2->start();
m_pbtn_push->setText("<<");
m_bSideflag = !m_bSideflag;
}
}
void MainWindow::on_dialog_sideBar_applyToImage(HGImage img, int brightness, int contrast, double gamma)
{
assert(nullptr != img);
HGImageInfo imgInfo;
HGBase_GetImageInfo(img, &imgInfo);
HGImage destImg = nullptr;
HGBase_CreateImage(imgInfo.width, imgInfo.height, imgInfo.type, imgInfo.origin, &destImg);
if (nullptr != destImg)
{
HGImgProc_ImageAdjustColors(img, destImg, brightness, contrast, (HGFloat)gamma);
m_view->addImage(destImg);
HGBase_DestroyImage(destImg);
updateStatusBarPixelInfo();
}
}
void MainWindow::on_dialog_sideBar_finish()
{
emit m_pbtn_push->clicked();
m_modify = true;
}
void MainWindow::on_act_thumbnailBar_triggered(bool checked)
{
ui->dockWidget->setVisible(checked);
@ -1847,6 +1925,11 @@ void MainWindow::updateActionStatus()
m_dialogLog->pbtn_export->setEnabled(ui->act_Export->isEnabled());
m_moveToAction->setEnabled(!selectIndexs.empty() && (!dev_que_.is_online() || !m_isScanning));
if (m_pbtn_push != nullptr && m_widget_sideBar!= nullptr)
{
m_pbtn_push->setVisible(nullptr != img);
m_widget_sideBar->setVisible(nullptr != img);
}
}
void MainWindow::startSaveMessageBox(QWidget* parent)
@ -2704,6 +2787,26 @@ void MainWindow::closeEvent(QCloseEvent *e)
m_versionDll->PostUserCloseInfo(HGVERSION_APPNAME_SCANNER, m_oemName);
}
void MainWindow::resizeEvent(QResizeEvent *e)
{
(void)e;
if (m_bSideflag)
{
int mainWndWidth = this->rect().width();
int mainWndHeight = this->rect().height();
int sideBarWidth = m_widget_sideBar->getWidth();
int sideBarHeight = m_widget_sideBar->getHeight();
m_widget_sideBar->move(mainWndWidth - sideBarWidth, mainWndHeight/2 - sideBarHeight/2);
m_pbtn_push->move(mainWndWidth - m_pbtn_push->width() - sideBarWidth, mainWndHeight/2 - m_pbtn_push->height()/2);
}
else
{
updateSideBar();
}
}
int MainWindow::sane_ex_callback(SANE_Handle hdev, int code, void *data, unsigned int* len, void *param)
{
(void)hdev;
@ -4404,6 +4507,23 @@ void MainWindow::initAcquireIntoComboBox()
connect(m_cbtn_acquireIntoCfg, SIGNAL(currentTextChanged(QString)), this, SLOT(on_m_acquireIntoCfg_changed(QString)));
}
void MainWindow::updateSideBar()
{
int mainWndWidth = this->rect().width();
int mainWndHeight = this->rect().height();
int sideBarHeight = m_widget_sideBar->getHeight();
m_widget_sideBar->move(mainWndWidth, mainWndHeight/2 - sideBarHeight/2);
m_pbtn_push->move(mainWndWidth - m_pbtn_push->width(), mainWndHeight/2 - m_pbtn_push->height()/2);
m_propertyAnimation = new QPropertyAnimation(m_widget_sideBar, "geometry");
m_propertyAnimation->setEasingCurve(QEasingCurve::InOutSine);
m_propertyAnimation->setDuration(600);
m_propertyAnimation2 = new QPropertyAnimation(m_pbtn_push, "geometry");
m_propertyAnimation2->setEasingCurve(QEasingCurve::InOutSine);
m_propertyAnimation2->setDuration(600);
}
void MainWindow::on_scanOptions_changed(const QString &device, const QString &option, bool checked_now)
{
QString title(tr("app name"));

View File

@ -6,10 +6,13 @@
#include <QListWidgetItem>
#include <QTranslator>
#include <QtWidgets>
#include <QPropertyAnimation>
#include "HGImgView.h"
#include "HGImgThumb.h"
#include "sane/sane_ex.h"
#include "dialog_aquireinto.h"
#include "widget_imgproc_base.h"
#include "widget_imgproc_sidebar.h"
#include "imgfmt/HGImgFmt.h"
#include "VersionDll.h"
#include "device_menu.h"
@ -155,6 +158,9 @@ private slots:
void on_stopScan();
void on_statusInfoDblClick();
void on_wrong_image_decide(dialog_wrong_img* dlg, bool save);
void on_m_pbtn_push_clicked();
void on_dialog_sideBar_applyToImage(HGImage img, int brightness, int contrast, double gamma);
void on_dialog_sideBar_finish();
void on_act_thumbnailBar_triggered(bool checked);
@ -255,6 +261,7 @@ public slots:
protected:
virtual void closeEvent(QCloseEvent *e) override;
virtual void resizeEvent(QResizeEvent *e) override;
private:
static int sane_ex_callback(SANE_Handle hdev, int code, void *data, unsigned int* len, void *param);
@ -281,6 +288,7 @@ private:
void deleteUpgradePkg(const QString& cfgFilePath);
QString getDevPid();
void initAcquireIntoComboBox();
void updateSideBar();
private:
Ui::MainWindow *ui;
@ -300,6 +308,10 @@ private:
QMenu *m_menu_language;
QAction *m_act_simpCN;
QAction *m_act_English;
QPushButton *m_pbtn_push;
Widget_Imgproc_SideBar *m_widget_sideBar;
QPropertyAnimation *m_propertyAnimation;
QPropertyAnimation *m_propertyAnimation2;
dev_que dev_que_;
@ -352,6 +364,7 @@ private:
const char* m_oemName;
bool m_cacheDirNotify;
bool m_AquirePathNotify;
bool m_bSideflag;
// 固件升级和设备锁定
std::vector<FwUpgradeAndDevLock> m_vFwUpgradeAndDevLock;

View File

@ -0,0 +1,179 @@
#include "widget_imgproc_sidebar.h"
#include "ui_widget_imgproc_sidebar.h"
#include <QPalette>
#include <QPainter>
#include "app_cfg.h"
Widget_Imgproc_SideBar::Widget_Imgproc_SideBar(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget_Imgproc_SideBar)
, m_curImage(NULL)
{
ui->setupUi(this);
updateUiStatus();
connect(ui->slider_brightness, SIGNAL(valueChanged(int)), ui->spin_brightness, SLOT(setValue(int)));
connect(ui->slider_contrast, SIGNAL(valueChanged(int)), ui->spin_contrast, SLOT(setValue(int)));
}
Widget_Imgproc_SideBar::~Widget_Imgproc_SideBar()
{
if (m_curImage != nullptr)
{
HGBase_DestroyImage(m_curImage);
}
delete ui;
}
int Widget_Imgproc_SideBar::getWidth()
{
return this->width();
}
int Widget_Imgproc_SideBar::getHeight()
{
return this->height();
}
void Widget_Imgproc_SideBar::getCurrentImg(HGImage image)
{
HGImageInfo imgInfo;
HGBase_GetImageInfo(image, &imgInfo);
HGBase_CloneImage(image, imgInfo.type, HGBASE_IMGORIGIN_TOP, &m_curImage);
if (NULL == m_curImage)
{
HGBase_DestroyImage(m_curImage);
return;
}
}
void Widget_Imgproc_SideBar::setBrightness(int brightness)
{
ui->spin_brightness->setValue(brightness);
}
void Widget_Imgproc_SideBar::setContrast(int contrast)
{
ui->spin_contrast->setValue(contrast);
}
void Widget_Imgproc_SideBar::setGamma(double gamma)
{
ui->dspin_gamma->setValue(gamma);
}
void Widget_Imgproc_SideBar::paintEvent(QPaintEvent *e)
{
(void)e;
QPainter p(this);
p.fillRect(0, 0, this->width(), this->height(), qRgb(240, 240, 240));
p.setPen(QColor("gray"));
p.drawRect(0, 0, width() -1, height() -1);
}
void Widget_Imgproc_SideBar::updateUiStatus()
{
ui->checkBox_apply->setChecked(getCfgValue("sideBar", "applyImg", true));
ui->checkBox_enhanceText->setChecked(getCfgValue("sideBar", "enhanceText", false));
ui->spin_brightness->setValue(getCfgValue("sideBar", "brightness", 0));
ui->spin_contrast->setValue(getCfgValue("sideBar", "contrast", 0));
QString strGamma = getCfgValue("sideBar", "gamma", QString("1.0"));
double gamma = atof(strGamma.toStdString().c_str());
ui->dspin_gamma->setValue(gamma);
}
void Widget_Imgproc_SideBar::on_spin_brightness_valueChanged(int arg1)
{
ui->slider_brightness->setValue(arg1);
if(ui->checkBox_apply->isChecked())
emit applyToImage(m_curImage, arg1, ui->spin_contrast->value(), ui->dspin_gamma->value());
}
void Widget_Imgproc_SideBar::on_spin_contrast_valueChanged(int arg1)
{
ui->slider_contrast->setValue(arg1);
if(ui->checkBox_apply->isChecked())
emit applyToImage(m_curImage, ui->spin_brightness->value(), arg1, ui->dspin_gamma->value());
}
void Widget_Imgproc_SideBar::on_dspin_gamma_valueChanged(double arg1)
{
ui->slider_gamma->setValue(static_cast<int>(arg1 * 100));
if(ui->checkBox_apply->isChecked())
emit applyToImage(m_curImage, ui->spin_brightness->value(), ui->spin_contrast->value(), arg1);
}
void Widget_Imgproc_SideBar::on_slider_gamma_valueChanged(int value)
{
ui->dspin_gamma->setValue(static_cast<double>(value / 100.0));
}
void Widget_Imgproc_SideBar::on_checkBox_apply_toggled(bool checked)
{
if(checked)
emit applyToImage(m_curImage, ui->spin_brightness->value(), ui->spin_contrast->value(), ui->dspin_gamma->value());
}
void Widget_Imgproc_SideBar::on_pbtn_restoreDefault_clicked()
{
ui->spin_brightness->setValue(0);
ui->spin_contrast->setValue(0);
ui->dspin_gamma->setValue(1.0);
ui->checkBox_apply->setChecked(true);
ui->checkBox_enhanceText->setChecked(false);
if(ui->checkBox_apply->isChecked())
emit applyToImage(m_curImage, ui->spin_brightness->value(), ui->spin_contrast->value(), ui->dspin_gamma->value());
}
void Widget_Imgproc_SideBar::on_pbtn_ok_clicked()
{
saveCfgValue("sideBar", "applyImg", ui->checkBox_apply->isChecked());
saveCfgValue("sideBar", "enhanceText", ui->checkBox_enhanceText->isChecked());
saveCfgValue("sideBar", "brightness", ui->spin_brightness->value());
saveCfgValue("sideBar", "contrast", ui->spin_contrast->value());
char gamma[32];
sprintf(gamma, "%f", ui->dspin_gamma->value());
saveCfgValue("sideBar", "gamma", QString(gamma));
if (ui->checkBox_enhanceText->isChecked())
{
HGUInt xDpi = 0;
HGUInt yDpi = 0;
HGBase_GetImageDpi(m_curImage, &xDpi, &yDpi);
HGImageInfo imgInfo;
HGBase_GetImageInfo(m_curImage, &imgInfo);
HGUInt width = imgInfo.width;
HGUInt height = imgInfo.height;
HGImage destImage = nullptr;
HGBase_CreateImage(width, height, imgInfo.type, HGBASE_IMGORIGIN_TOP, &destImage);
if (NULL == destImage)
{
HGBase_DestroyImage(destImage);
return;
}
HGImgProc_ImageBinarization(m_curImage, destImage, HGIMGPROC_THRESHTYPE_BINARY, 40, 51, 41);
if (nullptr != destImage)
{
HGBase_SetImageDpi(destImage, xDpi, yDpi);
emit applyToImage(destImage, ui->spin_brightness->value(), ui->spin_contrast->value(), ui->dspin_gamma->value());
HGBase_DestroyImage(destImage);
}
}
else
{
emit applyToImage(m_curImage, ui->spin_brightness->value(), ui->spin_contrast->value(), ui->dspin_gamma->value());
}
emit finish();
}
void Widget_Imgproc_SideBar::on_pbtn_cancel_clicked()
{
updateUiStatus();
emit finish();
}

View File

@ -0,0 +1,60 @@
#ifndef WIDGET_IMGPROC_SIDEBAR_H
#define WIDGET_IMGPROC_SIDEBAR_H
#include <QWidget>
#include "imgproc/HGImgProc.h"
namespace Ui {
class Widget_Imgproc_SideBar;
}
class Widget_Imgproc_SideBar : public QWidget
{
Q_OBJECT
public:
explicit Widget_Imgproc_SideBar(QWidget *parent = nullptr);
~Widget_Imgproc_SideBar();
int getWidth();
int getHeight();
void getCurrentImg(HGImage image);
void setBrightness(int brightness);
void setContrast(int contrast);
void setGamma(double gamma);
protected:
void paintEvent(QPaintEvent *e) override;
private:
void updateUiStatus();
signals:
void applyToImage(HGImage img, int brightness, int contrast, double gamma);
void finish();
private slots:
void on_spin_brightness_valueChanged(int arg1);
void on_spin_contrast_valueChanged(int arg1);
void on_dspin_gamma_valueChanged(double arg1);
void on_slider_gamma_valueChanged(int value);
void on_checkBox_apply_toggled(bool checked);
void on_pbtn_restoreDefault_clicked();
void on_pbtn_ok_clicked();
void on_pbtn_cancel_clicked();
private:
Ui::Widget_Imgproc_SideBar *ui;
HGImage m_curImage;
};
#endif // WIDGET_IMGPROC_SIDEBAR_H

View File

@ -0,0 +1,390 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Widget_Imgproc_SideBar</class>
<widget class="QWidget" name="Widget_Imgproc_SideBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>220</width>
<height>427</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QPushButton" name="pbtn_ok">
<property name="geometry">
<rect>
<x>60</x>
<y>380</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Ok</string>
</property>
</widget>
<widget class="QPushButton" name="pbtn_cancel">
<property name="geometry">
<rect>
<x>140</x>
<y>380</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>330</y>
<width>152</width>
<height>25</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="pbtn_restoreDefault">
<property name="text">
<string>Restore defaults</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>250</y>
<width>143</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QCheckBox" name="checkBox_enhanceText">
<property name="text">
<string>Enhance Text</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>290</y>
<width>155</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QCheckBox" name="checkBox_apply">
<property name="text">
<string>Apply to image</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="gbox_brightness">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>201</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>Brightness</string>
</property>
<widget class="QSlider" name="slider_brightness">
<property name="geometry">
<rect>
<x>10</x>
<y>35</y>
<width>121</width>
<height>27</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>121</width>
<height>27</height>
</size>
</property>
<property name="minimum">
<number>-255</number>
</property>
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksAbove</enum>
</property>
<property name="tickInterval">
<number>32</number>
</property>
</widget>
<widget class="QSpinBox" name="spin_brightness">
<property name="geometry">
<rect>
<x>140</x>
<y>40</y>
<width>51</width>
<height>20</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
<property name="minimum">
<number>-255</number>
</property>
<property name="maximum">
<number>255</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="displayIntegerBase">
<number>10</number>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="gbox_gamma">
<property name="geometry">
<rect>
<x>10</x>
<y>170</y>
<width>201</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>Gamma correction</string>
</property>
<widget class="QSlider" name="slider_gamma">
<property name="geometry">
<rect>
<x>10</x>
<y>35</y>
<width>121</width>
<height>27</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>121</width>
<height>27</height>
</size>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksAbove</enum>
</property>
<property name="tickInterval">
<number>25</number>
</property>
</widget>
<widget class="QDoubleSpinBox" name="dspin_gamma">
<property name="geometry">
<rect>
<x>140</x>
<y>40</y>
<width>51</width>
<height>20</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
<property name="minimum">
<double>0.010000000000000</double>
</property>
<property name="maximum">
<double>5.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="gbox_contrast">
<property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<width>201</width>
<height>71</height>
</rect>
</property>
<property name="title">
<string>Contrast</string>
</property>
<widget class="QSlider" name="slider_contrast">
<property name="geometry">
<rect>
<x>10</x>
<y>34</y>
<width>121</width>
<height>27</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>121</width>
<height>27</height>
</size>
</property>
<property name="minimum">
<number>-127</number>
</property>
<property name="maximum">
<number>127</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="invertedControls">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TicksAbove</enum>
</property>
<property name="tickInterval">
<number>16</number>
</property>
</widget>
<widget class="QSpinBox" name="spin_contrast">
<property name="geometry">
<rect>
<x>140</x>
<y>40</y>
<width>51</width>
<height>20</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
<property name="minimum">
<number>-127</number>
</property>
<property name="maximum">
<number>127</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="displayIntegerBase">
<number>10</number>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -246,6 +246,7 @@ SOURCES += \
../../../app/scanner/widget.cpp \
../../../app/scanner/widget_imgproc_base.cpp \
../../../app/scanner/widget_statusbar.cpp \
../../../app/scanner/widget_imgproc_sidebar.cpp \
../../../utility/HGString.cpp
HEADERS += \
@ -297,6 +298,7 @@ HEADERS += \
../../../app/scanner/widget.h \
../../../app/scanner/widget_imgproc_base.h \
../../../app/scanner/widget_statusbar.h \
../../../app/scanner/widget_imgproc_sidebar.h \
../../../utility/HGString.h
FORMS += \
@ -333,7 +335,8 @@ FORMS += \
../../../app/scanner/setpicclrtool.ui \
../../../app/scanner/widget.ui \
../../../app/scanner/widget_imgproc_base.ui \
../../../app/scanner/widget_statusbar.ui
../../../app/scanner/widget_statusbar.ui \
../../../app/scanner/widget_imgproc_sidebar.ui
RESOURCES += \
../../../app/scanner/Scanner_resource.qrc