开放色调曲线
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;
|
||||
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)
|
||||
{
|
||||
std::string n(""), val("");
|
||||
std::string n("");
|
||||
char* buf = nullptr;
|
||||
SANE_Int info = 0;
|
||||
|
||||
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)
|
||||
{
|
||||
continue;
|
||||
// QWidget* widget_cbtn_pbtn = new QWidget(scrollArea);
|
||||
// widget_cbtn_pbtn->setMaximumWidth(200);
|
||||
// btn_gamma_ = new QPushButton(widget_cbtn_pbtn);
|
||||
// btn_gamma_->setText(tr("custom tone curve"));
|
||||
// btn_gamma_->setFixedWidth(150);
|
||||
//continue;
|
||||
QWidget* widget_cbtn_pbtn = new QWidget(scrollArea);
|
||||
widget_cbtn_pbtn->setMaximumWidth(200);
|
||||
btn_gamma_ = new QPushButton(widget_cbtn_pbtn);
|
||||
btn_gamma_->setText(tr("custom tone curve"));
|
||||
btn_gamma_->setFixedWidth(150);
|
||||
|
||||
// QHBoxLayout *hLayout = new QHBoxLayout;
|
||||
// hLayout->addWidget(checkBoxCreation);
|
||||
// hLayout->addWidget(btn_gamma_);
|
||||
// widget_cbtn_pbtn->setLayout(hLayout);
|
||||
QHBoxLayout *hLayout = new QHBoxLayout;
|
||||
hLayout->addWidget(checkBoxCreation);
|
||||
hLayout->addWidget(btn_gamma_);
|
||||
widget_cbtn_pbtn->setLayout(hLayout);
|
||||
|
||||
// reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_cbtn_pbtn);
|
||||
// connect(btn_gamma_, SIGNAL(clicked(bool)), this, SLOT(slot_gammaButtonClicked()));
|
||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_cbtn_pbtn);
|
||||
connect(btn_gamma_, SIGNAL(clicked(bool)), this, SLOT(slot_gammaButtonClicked()));
|
||||
}
|
||||
else
|
||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), checkBoxCreation);
|
||||
|
@ -1137,21 +1139,21 @@ void hg_settingdialog::updateUIStatus()
|
|||
|
||||
refresh_control_value(id);
|
||||
|
||||
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_GAMMA) == 0 ||
|
||||
strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
||||
{
|
||||
if (w_label)
|
||||
w_label->show();
|
||||
widget->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//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_GAMMA) == 0 ||
|
||||
// strcmp(opt->name, SANE_STD_OPT_NAME_IS_CUSTOM_GAMMA) == 0)
|
||||
//{
|
||||
// if (w_label)
|
||||
// w_label->show();
|
||||
// widget->setVisible(true);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
if(w_label)
|
||||
hide ? w_label->hide() : w_label->show();
|
||||
widget->setVisible(!hide);
|
||||
}
|
||||
//}
|
||||
|
||||
if(strcmp(opt->name, SANE_STD_OPT_NAME_CUSTOM_AREA) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue