This commit is contained in:
codeboss 2025-08-05 21:03:12 +08:00
parent 050c641734
commit 6279079372
4 changed files with 6 additions and 8 deletions

View File

@ -12,8 +12,7 @@ using namespace configuration_panel;
using namespace size_provider;
StructuralRuleView::StructuralRuleView(
std::shared_ptr<TranslateBasic> base,
ExtractRuleView::ExtractRuleView(std::shared_ptr<TranslateBasic> base,
std::shared_ptr<extract::BytesAsRuleSet> inst_r, QWidget* p /*= nullptr*/)
: QWidget(p), _rule_base(inst_r),
_sequence_view(new RuleSetCustom(base, inst_r, this)),
@ -75,7 +74,7 @@ StructuralRuleView::StructuralRuleView(
});
}
void StructuralRuleView::cacheRefresh(const QModelIndex& curr, ListUnitConfiguration* t)
void ExtractRuleView::cacheRefresh(const QModelIndex& curr, ListUnitConfiguration* t)
{
if (!curr.isValid())
return;

View File

@ -115,7 +115,7 @@ namespace configuration_panel {
};
}
class StructuralRuleView : public QWidget
class ExtractRuleView : public QWidget
{
private:
RuleSetCustom* const _sequence_view;
@ -125,7 +125,7 @@ private:
std::shared_ptr<FieldManagerLayer> _current_fields_cache = nullptr;
public:
StructuralRuleView(std::shared_ptr<TranslateBasic> base,
ExtractRuleView(std::shared_ptr<TranslateBasic> base,
std::shared_ptr<extract::BytesAsRuleSet> inst_r, QWidget* p = nullptr);
void cacheRefresh(const QModelIndex& curr, configuration_panel::ListUnitConfiguration* t);

View File

@ -107,7 +107,7 @@ void ViewManager::open(const QString& rule_name, ViewType v_type, QWidget* p)
assert(u8"指定rule_name必须合法" && _translate_core->customRules().contains(rule_name));
auto appoint = _translate_core->customRules()[rule_name];
auto present = new StructuralRuleView(_translate_core, appoint, p);
auto present = new ExtractRuleView(_translate_core, appoint, p);
content_pages << std::make_tuple(appoint, present, v_type);
emit this->appendRequest(present, rule_name);
emit this->activeRequest(content_pages.size() - 1, rule_name);

View File

@ -62,7 +62,6 @@ public:
void removeCustomRule(const QString &name);
void present_solution_customs(
std::shared_ptr<TranslateBasic> ins, QStandardItemModel* model) const;
void present_solution_customs(std::shared_ptr<TranslateBasic> ins, QStandardItemModel* model) const;
};