pro:优化按钮是否可用显示,外置重排序为单独的功能,不能自动备份。
This commit is contained in:
parent
c167e01843
commit
0f65ef220a
@ -49,6 +49,8 @@ MainWidget::MainWidget(QWidget* parent)
|
||||
ui->btnSave->setFixedWidth(100);
|
||||
ui->btnExit->setFixedWidth(100);
|
||||
ui->btnSearch->setFixedWidth(120);
|
||||
ui->btnBackup->setEnabled(false);
|
||||
ui->btnResort->setEnabled(false);
|
||||
|
||||
connect(ui->btnSelectFile, &QPushButton::clicked, this, [&]() {
|
||||
QString file = CUtil::select_file(this, u8"请选择xml文件",
|
||||
@ -129,6 +131,11 @@ MainWidget::MainWidget(QWidget* parent)
|
||||
if (tab_widget_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CUtil::affirm(this, u8"提示", u8"确认重新排序吗?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
sort_by_repeat(vec_);
|
||||
std::vector<Element_t*> nvec{};
|
||||
xml_.copy_and_del(vec_, nvec);
|
||||
@ -382,6 +389,8 @@ bool MainWidget::read(const QString& file_path)
|
||||
ui->btnImport->setEnabled(true);
|
||||
ui->btnExport->setEnabled(true);
|
||||
ui->btnBackup->setEnabled(true);
|
||||
ui->btnBackup->setEnabled(true);
|
||||
ui->btnResort->setEnabled(true);
|
||||
|
||||
ui->cbConfig->setEnabled(false);
|
||||
ui->btnSet->setEnabled(false);
|
||||
|
@ -34,6 +34,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFormat">
|
||||
<property name="text">
|
||||
<string>重排版(单独)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCustomQLineEdit" name="edStatus"/>
|
||||
</item>
|
||||
@ -54,13 +61,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFormat">
|
||||
<property name="text">
|
||||
<string>重排版</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResort">
|
||||
<property name="text">
|
||||
@ -226,7 +226,10 @@
|
||||
<widget class="QComboBox" name="cbUnit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
@ -244,6 +247,9 @@
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
Loading…
x
Reference in New Issue
Block a user