开放色调曲线
This commit is contained in:
parent
84a8953f8d
commit
c338d36ce8
|
@ -173,12 +173,14 @@ void hg_settingdialog::apply_scheme(SANE_Handle dev, LPSANEAPI api, gb::sane_con
|
||||||
sod.desc = desc;
|
sod.desc = desc;
|
||||||
sods.push_back(sod);
|
sods.push_back(sod);
|
||||||
}
|
}
|
||||||
|
SANE_Int info = 0;
|
||||||
|
std::string val("");
|
||||||
|
api->sane_control_option_api(dev, SANE_OPT_ID_CUSTOM_GAMMA, SANE_ACTION_SET_VALUE, &val[0], &info);
|
||||||
|
|
||||||
if (schm)
|
if (schm)
|
||||||
{
|
{
|
||||||
std::string n(""), val("");
|
std::string n("");
|
||||||
char* buf = nullptr;
|
char* buf = nullptr;
|
||||||
SANE_Int info = 0;
|
|
||||||
|
|
||||||
if (schm->first_config(n, val))
|
if (schm->first_config(n, val))
|
||||||
{
|
{
|
||||||
|
@ -567,20 +569,20 @@ void hg_settingdialog::createUI()
|
||||||
}
|
}
|
||||||
else if (strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
else if (strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
||||||
{
|
{
|
||||||
continue;
|
//continue;
|
||||||
// QWidget* widget_cbtn_pbtn = new QWidget(scrollArea);
|
QWidget* widget_cbtn_pbtn = new QWidget(scrollArea);
|
||||||
// widget_cbtn_pbtn->setMaximumWidth(200);
|
widget_cbtn_pbtn->setMaximumWidth(200);
|
||||||
// btn_gamma_ = new QPushButton(widget_cbtn_pbtn);
|
btn_gamma_ = new QPushButton(widget_cbtn_pbtn);
|
||||||
// btn_gamma_->setText(tr("custom tone curve"));
|
btn_gamma_->setText(tr("custom tone curve"));
|
||||||
// btn_gamma_->setFixedWidth(150);
|
btn_gamma_->setFixedWidth(150);
|
||||||
|
|
||||||
// QHBoxLayout *hLayout = new QHBoxLayout;
|
QHBoxLayout *hLayout = new QHBoxLayout;
|
||||||
// hLayout->addWidget(checkBoxCreation);
|
hLayout->addWidget(checkBoxCreation);
|
||||||
// hLayout->addWidget(btn_gamma_);
|
hLayout->addWidget(btn_gamma_);
|
||||||
// widget_cbtn_pbtn->setLayout(hLayout);
|
widget_cbtn_pbtn->setLayout(hLayout);
|
||||||
|
|
||||||
// reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_cbtn_pbtn);
|
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_cbtn_pbtn);
|
||||||
// connect(btn_gamma_, SIGNAL(clicked(bool)), this, SLOT(slot_gammaButtonClicked()));
|
connect(btn_gamma_, SIGNAL(clicked(bool)), this, SLOT(slot_gammaButtonClicked()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), checkBoxCreation);
|
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), checkBoxCreation);
|
||||||
|
@ -1137,21 +1139,21 @@ void hg_settingdialog::updateUIStatus()
|
||||||
|
|
||||||
refresh_control_value(id);
|
refresh_control_value(id);
|
||||||
|
|
||||||
if (strcmp(opt->name, SANE_STD_OPT_NAME_BRIGHTNESS) == 0 ||
|
//if (strcmp(opt->name, SANE_STD_OPT_NAME_BRIGHTNESS) == 0 ||
|
||||||
strcmp(opt->name, SANE_STD_OPT_NAME_CONTRAST) == 0 ||
|
// strcmp(opt->name, SANE_STD_OPT_NAME_CONTRAST) == 0 ||
|
||||||
strcmp(opt->name, SANE_STD_OPT_NAME_GAMMA) == 0 ||
|
// strcmp(opt->name, SANE_STD_OPT_NAME_GAMMA) == 0 ||
|
||||||
strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
// strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
||||||
{
|
//{
|
||||||
if (w_label)
|
// if (w_label)
|
||||||
w_label->show();
|
// w_label->show();
|
||||||
widget->setVisible(true);
|
// widget->setVisible(true);
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
if(w_label)
|
if(w_label)
|
||||||
hide ? w_label->hide() : w_label->show();
|
hide ? w_label->hide() : w_label->show();
|
||||||
widget->setVisible(!hide);
|
widget->setVisible(!hide);
|
||||||
}
|
//}
|
||||||
|
|
||||||
if(strcmp(opt->name, SANE_STD_OPT_NAME_CUSTOM_AREA) == 0)
|
if(strcmp(opt->name, SANE_STD_OPT_NAME_CUSTOM_AREA) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue