微调设置界面,立思辰默认勾选自动保存
This commit is contained in:
parent
3c08bcb739
commit
e8899df941
|
@ -154,6 +154,8 @@ void GraphicsScene::setItemFlag(int flag)
|
||||||
|
|
||||||
void GraphicsScene::unDo()
|
void GraphicsScene::unDo()
|
||||||
{
|
{
|
||||||
|
m_activeItem = nullptr;
|
||||||
|
|
||||||
QList<QGraphicsItem*> items = this->items();
|
QList<QGraphicsItem*> items = this->items();
|
||||||
if (items.count() < 2)
|
if (items.count() < 2)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -314,44 +314,51 @@ void hg_settingdialog::createUI()
|
||||||
{
|
{
|
||||||
case SANE_TYPE_BOOL:
|
case SANE_TYPE_BOOL:
|
||||||
{
|
{
|
||||||
QCheckBox *checkBoxCreation = new QCheckBox(scrollArea);
|
QCheckBox *checkBoxCreation = new QCheckBox;
|
||||||
|
|
||||||
if (strcmp(opt->name, SANE_STD_OPT_NAME_CUSTOM_AREA) == 0)
|
if (strcmp(opt->name, SANE_STD_OPT_NAME_CUSTOM_AREA) == 0)
|
||||||
{
|
{
|
||||||
QLabel *title = new QLabel(scrollArea);
|
QWidget* widget_cbtn_pbtn = new QWidget;
|
||||||
h = new QHBoxLayout();
|
widget_cbtn_pbtn->setMaximumWidth(150);
|
||||||
title->setText(QString::fromStdString(opt->title) + QString(" : "));
|
|
||||||
h->addWidget(title);
|
|
||||||
h->addWidget(checkBoxCreation);
|
|
||||||
|
|
||||||
btn_cut_area_ = new QPushButton(this);
|
QLabel *label = new QLabel;
|
||||||
|
label->setText(QString::fromStdString(opt->title) + QString(" : "));
|
||||||
|
|
||||||
|
btn_cut_area_ = new QPushButton;
|
||||||
btn_cut_area_->setText(tr("regional crop"));
|
btn_cut_area_->setText(tr("regional crop"));
|
||||||
btn_cut_area_->setFixedWidth(120);
|
btn_cut_area_->setFixedWidth(120);
|
||||||
h->addWidget(btn_cut_area_);
|
|
||||||
|
|
||||||
custom_area_lable_ = title;
|
QHBoxLayout *hLayout = new QHBoxLayout;
|
||||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(h);
|
hLayout->addWidget(checkBoxCreation);
|
||||||
|
hLayout->addWidget(btn_cut_area_);
|
||||||
|
widget_cbtn_pbtn->setLayout(hLayout);
|
||||||
|
|
||||||
|
custom_area_lable_ = label;
|
||||||
|
|
||||||
|
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(label, widget_cbtn_pbtn);
|
||||||
|
|
||||||
connect(btn_cut_area_, SIGNAL(clicked(bool)), this, SLOT(slot_cutButtonClicked()));
|
connect(btn_cut_area_, SIGNAL(clicked(bool)), this, SLOT(slot_cutButtonClicked()));
|
||||||
}
|
}
|
||||||
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)
|
||||||
{
|
{
|
||||||
QLabel *title = new QLabel(scrollArea);
|
QWidget* widget_cbtn_pbtn = new QWidget(scrollArea);
|
||||||
h = new QHBoxLayout();
|
widget_cbtn_pbtn->setMaximumWidth(150);
|
||||||
title->setText(QString::fromStdString(opt->title) + QString(" : "));
|
btn_gamma_ = new QPushButton(widget_cbtn_pbtn);
|
||||||
h->addWidget(title);
|
|
||||||
h->addWidget(checkBoxCreation);
|
|
||||||
|
|
||||||
btn_gamma_ = new QPushButton(this);
|
|
||||||
btn_gamma_->setText(tr("custom tone curve"));
|
btn_gamma_->setText(tr("custom tone curve"));
|
||||||
btn_gamma_->setFixedWidth(120);
|
btn_gamma_->setFixedWidth(120);
|
||||||
h->addWidget(btn_gamma_);
|
|
||||||
|
|
||||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(h);
|
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()));
|
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);
|
||||||
checkBoxCreation->setToolTip(opt->desc);
|
|
||||||
|
|
||||||
|
checkBoxCreation->setToolTip(opt->desc);
|
||||||
int id = i + 1;
|
int id = i + 1;
|
||||||
bool enable = *(bool*)&cur_val[0];
|
bool enable = *(bool*)&cur_val[0];
|
||||||
checkBoxCreation->setProperty("controls_id", id);
|
checkBoxCreation->setProperty("controls_id", id);
|
||||||
|
@ -364,7 +371,6 @@ void hg_settingdialog::createUI()
|
||||||
m_list_widgets.append(checkBoxCreation);
|
m_list_widgets.append(checkBoxCreation);
|
||||||
|
|
||||||
m_list_getOpt.append(QPair<int, const void*>(id, opt));
|
m_list_getOpt.append(QPair<int, const void*>(id, opt));
|
||||||
iniRead(md5(opt->title), id, checkBoxCreation);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,7 +403,7 @@ void hg_settingdialog::createUI()
|
||||||
case SANE_CONSTRAINT_RANGE:
|
case SANE_CONSTRAINT_RANGE:
|
||||||
{
|
{
|
||||||
QWidget* widget_slider_spin = new QWidget(scrollArea);
|
QWidget* widget_slider_spin = new QWidget(scrollArea);
|
||||||
widget_slider_spin->setMinimumWidth(200);
|
//widget_slider_spin->setMinimumWidth(250);
|
||||||
|
|
||||||
QSlider* sliderCreation = new QSlider(widget_slider_spin);
|
QSlider* sliderCreation = new QSlider(widget_slider_spin);
|
||||||
sliderCreation->setOrientation(Qt::Horizontal);
|
sliderCreation->setOrientation(Qt::Horizontal);
|
||||||
|
@ -408,7 +414,7 @@ void hg_settingdialog::createUI()
|
||||||
sliderCreation->setValue(m_list_defaultOptions.at(i).second.toInt());
|
sliderCreation->setValue(m_list_defaultOptions.at(i).second.toInt());
|
||||||
|
|
||||||
QSpinBox* spinBox = new QSpinBox(widget_slider_spin);
|
QSpinBox* spinBox = new QSpinBox(widget_slider_spin);
|
||||||
spinBox->setMinimumWidth(150);
|
spinBox->setMinimumWidth(100);
|
||||||
spinBox->setToolTip(opt->desc);
|
spinBox->setToolTip(opt->desc);
|
||||||
spinBox->setRange(opt->constraint.range->min, opt->constraint.range->max);
|
spinBox->setRange(opt->constraint.range->min, opt->constraint.range->max);
|
||||||
|
|
||||||
|
@ -421,7 +427,7 @@ void hg_settingdialog::createUI()
|
||||||
QHBoxLayout* hLayout = new QHBoxLayout;
|
QHBoxLayout* hLayout = new QHBoxLayout;
|
||||||
hLayout->addWidget(sliderCreation);
|
hLayout->addWidget(sliderCreation);
|
||||||
hLayout->addWidget(spinBox);
|
hLayout->addWidget(spinBox);
|
||||||
hLayout->addStretch();
|
// hLayout->addStretch();
|
||||||
widget_slider_spin->setLayout(hLayout);
|
widget_slider_spin->setLayout(hLayout);
|
||||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_slider_spin);
|
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_slider_spin);
|
||||||
|
|
||||||
|
@ -475,7 +481,7 @@ void hg_settingdialog::createUI()
|
||||||
case SANE_TYPE_FIXED:
|
case SANE_TYPE_FIXED:
|
||||||
{
|
{
|
||||||
QWidget* widget_slider_spin = new QWidget(scrollArea);
|
QWidget* widget_slider_spin = new QWidget(scrollArea);
|
||||||
widget_slider_spin->setMinimumWidth(200);
|
// widget_slider_spin->setMinimumWidth(250);
|
||||||
QSlider* sliderCreation = new QSlider(widget_slider_spin);
|
QSlider* sliderCreation = new QSlider(widget_slider_spin);
|
||||||
sliderCreation->setOrientation(Qt::Horizontal);
|
sliderCreation->setOrientation(Qt::Horizontal);
|
||||||
sliderCreation->setMinimumWidth(120);
|
sliderCreation->setMinimumWidth(120);
|
||||||
|
@ -486,7 +492,7 @@ void hg_settingdialog::createUI()
|
||||||
sliderCreation->setValue(SANE_UNFIX(m_list_defaultOptions.at(i).second.toDouble()) * 100);
|
sliderCreation->setValue(SANE_UNFIX(m_list_defaultOptions.at(i).second.toDouble()) * 100);
|
||||||
|
|
||||||
QDoubleSpinBox* spinBox = new QDoubleSpinBox(widget_slider_spin);
|
QDoubleSpinBox* spinBox = new QDoubleSpinBox(widget_slider_spin);
|
||||||
spinBox->setMinimumWidth(150);
|
spinBox->setMinimumWidth(100);
|
||||||
spinBox->setToolTip(opt->desc);
|
spinBox->setToolTip(opt->desc);
|
||||||
spinBox->setDecimals(2);
|
spinBox->setDecimals(2);
|
||||||
spinBox->setSingleStep(0.01);
|
spinBox->setSingleStep(0.01);
|
||||||
|
@ -499,7 +505,7 @@ void hg_settingdialog::createUI()
|
||||||
QHBoxLayout* hLayout = new QHBoxLayout;
|
QHBoxLayout* hLayout = new QHBoxLayout;
|
||||||
hLayout->addWidget(sliderCreation);
|
hLayout->addWidget(sliderCreation);
|
||||||
hLayout->addWidget(spinBox);
|
hLayout->addWidget(spinBox);
|
||||||
hLayout->addStretch();
|
// hLayout->addStretch();
|
||||||
widget_slider_spin->setLayout(hLayout);
|
widget_slider_spin->setLayout(hLayout);
|
||||||
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_slider_spin);
|
reinterpret_cast<QFormLayout*>(widget->layout())->addRow(opt->title + QString(" : "), widget_slider_spin);
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
#elif defined(OEM_LISICHENG)
|
#elif defined(OEM_LISICHENG)
|
||||||
this->setWindowIcon(QIcon(":images/image_rsc/logo/Lanxum_logo.ico"));
|
this->setWindowIcon(QIcon(":images/image_rsc/logo/Lanxum_logo.ico"));
|
||||||
this->setWindowTitle(tr("LanxumScan"));
|
this->setWindowTitle(tr("LanxumScan"));
|
||||||
auto_save_changes_ = true;
|
|
||||||
#elif defined(OEM_CANGTIAN)
|
#elif defined(OEM_CANGTIAN)
|
||||||
this->setWindowIcon(QIcon(":images/image_rsc/logo/Cumtenn_logo.ico"));
|
this->setWindowIcon(QIcon(":images/image_rsc/logo/Cumtenn_logo.ico"));
|
||||||
this->setWindowTitle(tr("CumtennScan"));
|
this->setWindowTitle(tr("CumtennScan"));
|
||||||
|
@ -318,6 +317,11 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
m_dialogLog->updateStatus(!dev_que_.opened_scanner_name().empty() && 0 != m_scanType, m_isScanning);
|
m_dialogLog->updateStatus(!dev_que_.opened_scanner_name().empty() && 0 != m_scanType, m_isScanning);
|
||||||
updateActionStatus();
|
updateActionStatus();
|
||||||
ui->act_autoSave->setChecked(getCfgValue("save", "autoSave", false));
|
ui->act_autoSave->setChecked(getCfgValue("save", "autoSave", false));
|
||||||
|
|
||||||
|
#if defined(OEM_LISICHENG)
|
||||||
|
ui->act_autoSave->setChecked(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
auto_save_changes_ = ui->act_autoSave->isChecked();
|
auto_save_changes_ = ui->act_autoSave->isChecked();
|
||||||
ui->act_autoSave->setText(tr("auto save"));
|
ui->act_autoSave->setText(tr("auto save"));
|
||||||
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
ui->act_autoSave->setToolTip(tr("when switching pictures, save the edited pictures directly without reminding"));
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>menu_file</string>
|
<string>menu_file</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTipsVisible">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<addaction name="act_open"/>
|
<addaction name="act_open"/>
|
||||||
<addaction name="act_insert"/>
|
<addaction name="act_insert"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
|
|
Loading…
Reference in New Issue