update
This commit is contained in:
parent
3551d68cdd
commit
68b3b86fb9
|
@ -37,21 +37,21 @@ void IntDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewIt
|
|||
|
||||
void SequenceRulesView::currentRuleRefresh(const QModelIndex& idx)
|
||||
{
|
||||
auto rule_insv = _view._ruleset->_rules[idx.row()];
|
||||
auto rule_insv = _view._ruleset->_bind[idx.row()];
|
||||
|
||||
auto offset_index = idx.sibling(idx.row(), 1);
|
||||
auto offset_number = offset_index.data(Qt::DisplayRole).toInt();
|
||||
rule_insv.second->setOffsetSpan(offset_number);
|
||||
|
||||
auto count_index = idx.sibling(idx.row(), 3);
|
||||
_view._sequence_model->setData(offset_index, rule_insv.second->offsetSpan(), Qt::EditRole);
|
||||
_view._sequence_model->setData(count_index, rule_insv.second->countWithin(), Qt::EditRole);
|
||||
_view._seqs_model->setData(offset_index, rule_insv.second->offsetSpan(), Qt::EditRole);
|
||||
_view._seqs_model->setData(count_index, rule_insv.second->countWithin(), Qt::EditRole);
|
||||
|
||||
auto param_index = idx.sibling(idx.row(), 4);
|
||||
QJsonObject obj;
|
||||
rule_insv.second->saveTo(obj);
|
||||
auto bytes = QJsonDocument(obj).toJson(QJsonDocument::Compact);
|
||||
_view._sequence_model->setData(param_index, QString::fromUtf8(bytes));
|
||||
_view._seqs_model->setData(param_index, QString::fromUtf8(bytes));
|
||||
|
||||
this->resizeColumnsToContents();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void SequenceRulesView::peersRuleChanged(const QModelIndex& idx)
|
|||
|
||||
auto rule_nm = _view.base->extractUnitList()[rule_name];
|
||||
auto new_inst = std::dynamic_pointer_cast<ExtractUnit>(rule_nm->newDefault());
|
||||
_view._ruleset->_rules.replace(idx.row(), std::make_pair(field_name, new_inst));
|
||||
_view._ruleset->_bind.replace(idx.row(), std::make_pair(field_name, new_inst));
|
||||
|
||||
// ¶ÔListUnitÖ´ÐÐÌØÊâ³õʼ»¯²½Öè
|
||||
if (typeid(*new_inst.get()) == typeid(BytesAsList)) {
|
||||
|
@ -83,16 +83,25 @@ void SequenceRulesView::peersRuleChanged(const QModelIndex& idx)
|
|||
currentRuleRefresh(idx);
|
||||
}
|
||||
|
||||
void SequenceRulesView::showEvent(QShowEvent* e)
|
||||
{
|
||||
QTableView::showEvent(e);
|
||||
|
||||
membersPresent(this->_view._ruleset, this->_view._seqs_model);
|
||||
}
|
||||
|
||||
#include <QItemSelectionModel>
|
||||
SequenceRulesView::SequenceRulesView(std::shared_ptr<extract::BytesAsRuleSet> rule_set, QWidget* p /*= nullptr*/)
|
||||
SequenceRulesView::SequenceRulesView(
|
||||
std::shared_ptr<TranslateBasic> base,
|
||||
std::shared_ptr<extract::BytesAsRuleSet> rule_set, QWidget* p /*= nullptr*/)
|
||||
:QTableView(p)
|
||||
{
|
||||
_view._ruleset = rule_set;
|
||||
_view._sequence_model = new QStandardItemModel();
|
||||
_view._seqs_model = new QStandardItemModel();
|
||||
_view.base = std::make_shared<TranslateBasic>();
|
||||
|
||||
this->setModel(_view._sequence_model);
|
||||
_view._sequence_model->setHorizontalHeaderLabels(QStringList()
|
||||
this->setModel(_view._seqs_model);
|
||||
_view._seqs_model->setHorizontalHeaderLabels(QStringList()
|
||||
<< tr(u8"Field Name") << tr(u8"Bytes Offset") << tr(u8"Translate Rule")
|
||||
<< tr(u8"Bytes Count") << tr(u8"Arguments"));
|
||||
|
||||
|
@ -110,7 +119,7 @@ SequenceRulesView::SequenceRulesView(std::shared_ptr<extract::BytesAsRuleSet> ru
|
|||
if (!curr.isValid())
|
||||
return;
|
||||
|
||||
emit this->currentRuleChanged(_view._ruleset->_rules[curr.row()].second, curr);
|
||||
emit this->currentRuleChanged(_view._ruleset->_bind[curr.row()].second, curr);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -125,31 +134,15 @@ void SequenceRulesView::customTranslateRuleEdit(const QPoint& pos)
|
|||
|
||||
void SequenceRulesView::addTranslateUnit()
|
||||
{
|
||||
auto row_cnt = this->_view._sequence_model->rowCount();
|
||||
|
||||
QList<QStandardItem*> new_row;
|
||||
new_row << new QStandardItem(QString(u8"rule_%1").arg(row_cnt));
|
||||
new_row << new QStandardItem(u8"0");
|
||||
new_row << new QStandardItem(_view.base->defaultExtractUnit()->name());
|
||||
new_row << new QStandardItem(u8"1");
|
||||
new_row.last()->setEditable(false);
|
||||
|
||||
auto curr_rule = _view.base->defaultExtractUnit()->newDefault();
|
||||
this->_view._ruleset->_rules.append(
|
||||
new_row.first()->text(), std::static_pointer_cast<ExtractUnit>(curr_rule));
|
||||
this->_view._ruleset->_bind.append(
|
||||
QString(u8"rule_%1").arg(_view._ruleset->_bind.sub_units.size()),
|
||||
std::static_pointer_cast<ExtractUnit>(curr_rule));
|
||||
|
||||
auto hex_rule = std::static_pointer_cast<BytesAsHex>(curr_rule);
|
||||
hex_rule->setCountWithin(1);
|
||||
|
||||
QJsonObject obj;
|
||||
curr_rule->saveTo(obj);
|
||||
auto bytes = QJsonDocument(obj).toJson(QJsonDocument::Compact);
|
||||
auto json_doc = QString::fromUtf8(bytes);
|
||||
new_row << new QStandardItem(json_doc);
|
||||
new_row.last()->setEditable(false);
|
||||
|
||||
this->_view._sequence_model->appendRow(new_row);
|
||||
this->resizeColumnsToContents();
|
||||
membersPresent(this->_view._ruleset, this->_view._seqs_model);
|
||||
}
|
||||
|
||||
void SequenceRulesView::removeTranslateUnit()
|
||||
|
@ -158,10 +151,37 @@ void SequenceRulesView::removeTranslateUnit()
|
|||
if (!idx_curr.isValid())
|
||||
return;
|
||||
|
||||
_view._ruleset->_rules.removeAt(idx_curr.row());
|
||||
_view._sequence_model->removeRow(idx_curr.row());
|
||||
_view._ruleset->_bind.removeAt(idx_curr.row());
|
||||
_view._seqs_model->removeRow(idx_curr.row());
|
||||
}
|
||||
|
||||
void SequenceRulesView::membersPresent(std::shared_ptr<extract::BytesAsRuleSet> ruleset, QStandardItemModel* model)
|
||||
{
|
||||
model->removeRows(0, model->rowCount());
|
||||
|
||||
auto units = ruleset->_bind.sub_units;
|
||||
for (auto uidx = 0; uidx < units.size(); ++uidx) {
|
||||
auto u_pair = units.at(uidx);
|
||||
|
||||
QList<QStandardItem*> new_row;
|
||||
new_row << new QStandardItem(u_pair.first);
|
||||
new_row << new QStandardItem(QString("%1").arg(u_pair.second->offsetSpan()));
|
||||
new_row << new QStandardItem(_view.base->defaultExtractUnit()->name());
|
||||
new_row << new QStandardItem(QString("%1").arg(u_pair.second->countWithin()));
|
||||
new_row.last()->setEditable(false);
|
||||
|
||||
QJsonObject obj;
|
||||
u_pair.second->saveTo(obj);
|
||||
auto bytes = QJsonDocument(obj).toJson(QJsonDocument::Compact);
|
||||
auto json_doc = QString::fromUtf8(bytes);
|
||||
new_row << new QStandardItem(json_doc);
|
||||
new_row.last()->setEditable(false);
|
||||
|
||||
this->_view._seqs_model->appendRow(new_row);
|
||||
}
|
||||
|
||||
this->resizeColumnsToContents();
|
||||
}
|
||||
|
||||
RuleSelectDelegate::RuleSelectDelegate(std::shared_ptr<TranslateBasic> ins)
|
||||
:_kernel(ins) {
|
||||
|
|
|
@ -57,9 +57,9 @@ public:
|
|||
/// </summary>
|
||||
class SequenceRulesView : public QTableView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
private:
|
||||
struct __Private {
|
||||
QStandardItemModel* _sequence_model;
|
||||
QStandardItemModel* _seqs_model;
|
||||
std::shared_ptr<TranslateBasic> base = nullptr;
|
||||
std::shared_ptr<extract::BytesAsRuleSet> _ruleset = nullptr;
|
||||
} _view;
|
||||
|
@ -71,11 +71,18 @@ public:
|
|||
void currentRuleRefresh(const QModelIndex& idx);
|
||||
void peersRuleChanged(const QModelIndex& idx_rule);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* e) override;
|
||||
|
||||
public:
|
||||
SequenceRulesView(std::shared_ptr<extract::BytesAsRuleSet> rule_set, QWidget* p = nullptr);
|
||||
SequenceRulesView(
|
||||
std::shared_ptr<TranslateBasic> base,
|
||||
std::shared_ptr<extract::BytesAsRuleSet> rule_set, QWidget* p = nullptr);
|
||||
|
||||
void customTranslateRuleEdit(const QPoint& pos);
|
||||
void addTranslateUnit();
|
||||
void removeTranslateUnit();
|
||||
|
||||
void membersPresent(std::shared_ptr<extract::BytesAsRuleSet> _bind, QStandardItemModel* model);
|
||||
};
|
||||
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
#include "TranslateBasic.h"
|
||||
|
||||
StructuralRuleView::StructuralRuleView(
|
||||
std::shared_ptr<TranslateBasic> base,
|
||||
std::shared_ptr<extract::BytesAsRuleSet> inst_r, QWidget* p /*= nullptr*/)
|
||||
: QWidget(p),
|
||||
_sequence_view(new SequenceRulesView(inst_r, this)),
|
||||
: QWidget(p), _rule_base(inst_r),
|
||||
_sequence_view(new SequenceRulesView(base, inst_r, this)),
|
||||
_configs_stack(new QStackedWidget(this))
|
||||
{
|
||||
this->_current_fields_cache = std::make_shared<FieldManagerLayer>("", nullptr);
|
||||
|
@ -30,7 +31,7 @@ StructuralRuleView::StructuralRuleView(
|
|||
_configs_stack->addWidget(encode_config);
|
||||
auto combine_config = new BitCombineConfiguration(this);
|
||||
_configs_stack->addWidget(combine_config);
|
||||
auto list_config = new ListUnitConfiguration(this->_sequence_view->_view.base, this);
|
||||
auto list_config = new ListUnitConfiguration(base, this);
|
||||
_configs_stack->addWidget(list_config);
|
||||
|
||||
connect(count_span, &CountWithinConfiguration::currentRuleChanged,
|
||||
|
@ -76,12 +77,12 @@ void StructuralRuleView::cacheRefresh(const QModelIndex& curr, ListUnitConfigura
|
|||
return;
|
||||
|
||||
this->_current_fields_cache->clear();
|
||||
this->_sequence_view->_view._ruleset->registSubField(this->_current_fields_cache);
|
||||
this->_rule_base->registSubField(this->_current_fields_cache);
|
||||
|
||||
auto field_idx = curr.sibling(curr.row(), 0);
|
||||
this->_current_fields_cache->bindCurrent(field_idx.data(Qt::DisplayRole).toString());
|
||||
|
||||
auto ins = this->_sequence_view->_view._ruleset->_rules[curr.row()];
|
||||
auto ins = this->_rule_base->_bind[curr.row()];
|
||||
auto conv = std::dynamic_pointer_cast<extract::BytesAsList>(ins.second);
|
||||
if (conv) {
|
||||
t->currentRuleAccept(conv, curr, this->_current_fields_cache);
|
||||
|
|
|
@ -119,10 +119,12 @@ private:
|
|||
SequenceRulesView* const _sequence_view;
|
||||
QStackedWidget* const _configs_stack;
|
||||
|
||||
std::shared_ptr<extract::BytesAsRuleSet> _rule_base;
|
||||
std::shared_ptr<FieldManagerLayer> _current_fields_cache = nullptr;
|
||||
|
||||
public:
|
||||
StructuralRuleView(std::shared_ptr<extract::BytesAsRuleSet> inst_r, QWidget* p = nullptr);
|
||||
StructuralRuleView(std::shared_ptr<TranslateBasic> base,
|
||||
std::shared_ptr<extract::BytesAsRuleSet> inst_r, QWidget* p = nullptr);
|
||||
|
||||
void cacheRefresh(const QModelIndex& curr, ListUnitConfiguration* t);
|
||||
};
|
||||
|
|
|
@ -24,8 +24,8 @@ TranslateUI::TranslateUI(QWidget* parent)
|
|||
_ruleset_navi->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(_ruleset_navi, &QWidget::customContextMenuRequested, [=](const QPoint& pos) {
|
||||
QMenu m;
|
||||
m.addAction(u8"添加Rule", this, &TranslateUI::addCustomRule);
|
||||
m.addAction(u8"打开ExtractView", this, &TranslateUI::openExtractView);
|
||||
m.addAction(u8"Add Rule", this, &TranslateUI::addCustomRule);
|
||||
m.addAction(u8"Open ExtractView", this, &TranslateUI::openExtractView);
|
||||
m.exec(this->mapToGlobal(pos));
|
||||
});
|
||||
|
||||
|
@ -37,9 +37,10 @@ TranslateUI::TranslateUI(QWidget* parent)
|
|||
connect(_tab_widget, &QTabWidget::tabCloseRequested, _core._view_mgr, &ViewManager::closeAt);
|
||||
connect(_core._view_mgr, &ViewManager::appendRequest, _tab_widget, QOverload<QWidget*, const QString&>::of(&QTabWidget::addTab));
|
||||
connect(_core._view_mgr, &ViewManager::removeRequest, _tab_widget, &QTabWidget::removeTab);
|
||||
connect(_core._view_mgr, &ViewManager::activeRequest, _tab_widget, &QTabWidget::setTabText);
|
||||
connect(_core._view_mgr, &ViewManager::activeRequest, _tab_widget, &QTabWidget::setCurrentIndex);
|
||||
|
||||
this->present_solution_customs(_core._translate_core, _solution_model);
|
||||
splitter->setStretchFactor(1, 1);
|
||||
}
|
||||
|
||||
TranslateUI::~TranslateUI()
|
||||
|
@ -49,13 +50,13 @@ TranslateUI::~TranslateUI()
|
|||
#include <QMessageBox>
|
||||
void TranslateUI::addCustomRule()
|
||||
{
|
||||
auto name = QInputDialog::getText(this, u8"输入Rule名称", "Rule:");
|
||||
auto name = QInputDialog::getText(this, u8"Please Enter Rule Name", "Rule:");
|
||||
if (name == "")
|
||||
return;
|
||||
|
||||
auto names = this->_core._translate_core->customRules().keys();
|
||||
if (names.contains(name)) {
|
||||
QMessageBox::critical(this, "输入校验", "RuleName不能重复");
|
||||
QMessageBox::critical(this, u8"输入校验", u8"RuleName不能重复");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -98,22 +99,23 @@ void ViewManager::open(const QString& rule_name, ViewType v_type, QWidget* p)
|
|||
{
|
||||
for (auto vidx = 0; vidx < content_pages.size(); vidx++) {
|
||||
auto v = content_pages.at(vidx);
|
||||
if (std::get<0>(v)->name() == rule_name && std::get<2>(v) == v_type) {
|
||||
if (std::get<0>(v)->customName() == rule_name && std::get<2>(v) == v_type) {
|
||||
emit this->activeRequest(vidx, rule_name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
assert("指定rule_name必须合法" && _translate_core->customRules().contains(rule_name));
|
||||
assert(u8"指定rule_name必须合法" && _translate_core->customRules().contains(rule_name));
|
||||
|
||||
auto appoint = _translate_core->customRules()[rule_name];
|
||||
auto present = new StructuralRuleView(appoint, p);
|
||||
auto present = new StructuralRuleView(_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);
|
||||
}
|
||||
|
||||
void ViewManager::closeAt(int index)
|
||||
{
|
||||
assert("index必须有效" && (index < content_pages.size()));
|
||||
assert(u8"index必须有效" && (index < content_pages.size()));
|
||||
emit this->removeRequest(index);
|
||||
|
||||
auto current = this->content_pages.at(index);
|
||||
|
@ -131,7 +133,7 @@ void ViewManager::active(const QString& rule_name, ViewType v_type)
|
|||
}
|
||||
}
|
||||
|
||||
assert("RuleName和V_Type组合必须有效" && 0);
|
||||
assert(u8"RuleName和V_Type组合必须有效" && 0);
|
||||
}
|
||||
|
||||
void ViewManager::purge(const QString& rule_name)
|
||||
|
|
|
@ -559,8 +559,8 @@ void BytesAsUnion::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
|||
|
||||
void BytesAsRuleSet::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
||||
{
|
||||
for (auto rl_key : this->_rules.fieldNames()){
|
||||
auto rlinst = this->_rules[rl_key];
|
||||
for (auto rl_key : this->_bind.fieldNames()){
|
||||
auto rlinst = this->_bind[rl_key];
|
||||
inst->setField(rl_key, rlinst->outType());
|
||||
auto layer = std::make_shared<FieldManagerLayer>(rl_key, inst);
|
||||
rlinst->registSubField(layer);
|
||||
|
@ -570,11 +570,11 @@ void BytesAsRuleSet::registSubField(std::shared_ptr<ScopeFieldsSetter> inst)
|
|||
void BytesAsRuleSet::parse(const QByteArray& bytes, std::shared_ptr<DataAccessContext> out) const
|
||||
{
|
||||
auto bufx = bytes;
|
||||
for (auto keym : this->_rules.fieldNames()) {
|
||||
for (auto keym : this->_bind.fieldNames()) {
|
||||
auto rule_context = std::make_shared<ValueAccess>();
|
||||
rule_context->init(keym, out);
|
||||
|
||||
auto rule = this->_rules[keym];
|
||||
auto rule = this->_bind[keym];
|
||||
bufx = bufx.mid(rule->offsetSpan());
|
||||
auto count = rule->countWithin();
|
||||
auto secx = bufx.mid(0, count);
|
||||
|
@ -595,24 +595,24 @@ DataType BytesAsRuleSet::outType() const
|
|||
|
||||
bool BytesAsRuleSet::setOffsetSpan(int bytes)
|
||||
{
|
||||
this->_rules._byte_offset = bytes;
|
||||
this->_bind._byte_offset = bytes;
|
||||
return true;
|
||||
}
|
||||
|
||||
int BytesAsRuleSet::offsetSpan() const
|
||||
{
|
||||
return this->_rules._byte_offset;
|
||||
return this->_bind._byte_offset;
|
||||
}
|
||||
|
||||
int BytesAsRuleSet::countWithin() const
|
||||
{
|
||||
return this->_rules._byte_count;
|
||||
return this->_bind._byte_count;
|
||||
}
|
||||
|
||||
void BytesAsRuleSet::loadFrom(std::shared_ptr<TranslateBasic> core, const QJsonObject& obj)
|
||||
{
|
||||
INT32_PEAK(_rules._byte_count, obj);
|
||||
INT32_PEAK(_rules._byte_offset, obj);
|
||||
INT32_PEAK(_bind._byte_count, obj);
|
||||
INT32_PEAK(_bind._byte_offset, obj);
|
||||
|
||||
QJsonArray array;
|
||||
ARRAY_SAVE(array, obj);
|
||||
|
@ -627,17 +627,17 @@ void BytesAsRuleSet::loadFrom(std::shared_ptr<TranslateBasic> core, const QJsonO
|
|||
|
||||
auto xdev = core->extractUnitList()[match_name]->newDefault();
|
||||
xdev->loadFrom(core, match_obj);
|
||||
_rules._sub_rules << std::make_pair(key, std::dynamic_pointer_cast<ExtractUnit>(xdev));
|
||||
_bind.sub_units << std::make_pair(key, std::dynamic_pointer_cast<ExtractUnit>(xdev));
|
||||
}
|
||||
}
|
||||
|
||||
void BytesAsRuleSet::saveTo(QJsonObject& obj) const
|
||||
{
|
||||
INT32_SAVE(_rules._byte_count, obj);
|
||||
INT32_SAVE(_rules._byte_offset, obj);
|
||||
INT32_SAVE(_bind._byte_count, obj);
|
||||
INT32_SAVE(_bind._byte_offset, obj);
|
||||
|
||||
QJsonArray array;
|
||||
for (auto pairk : _rules._sub_rules) {
|
||||
for (auto pairk : _bind.sub_units) {
|
||||
QJsonObject rule_obj, match_obj;
|
||||
|
||||
auto key = pairk.first;
|
||||
|
@ -660,29 +660,29 @@ std::shared_ptr<Serializable> BytesAsRuleSet::newDefault() const
|
|||
|
||||
std::pair<QString, std::shared_ptr<ExtractUnit>> BytesAsRuleSet::__Private::operator[](int index) const
|
||||
{
|
||||
return this->_sub_rules[index];
|
||||
return this->sub_units[index];
|
||||
}
|
||||
|
||||
void BytesAsRuleSet::__Private::replace(int index, std::pair<QString, std::shared_ptr<ExtractUnit>> inst)
|
||||
{
|
||||
this->_sub_rules.replace(index, inst);
|
||||
this->sub_units.replace(index, inst);
|
||||
}
|
||||
|
||||
extract::BytesAsRuleSet::__Private& BytesAsRuleSet::__Private::append(const QString& nm, std::shared_ptr<ExtractUnit> u)
|
||||
{
|
||||
this->_sub_rules.append(std::make_pair(nm, u));
|
||||
this->sub_units.append(std::make_pair(nm, u));
|
||||
return *this;
|
||||
}
|
||||
|
||||
void BytesAsRuleSet::__Private::removeAt(int index)
|
||||
{
|
||||
this->_sub_rules.removeAt(index);
|
||||
this->sub_units.removeAt(index);
|
||||
}
|
||||
|
||||
QList<QString> BytesAsRuleSet::__Private::fieldNames() const
|
||||
{
|
||||
QList<QString> fields_store;
|
||||
for (auto fpair : this->_sub_rules) {
|
||||
for (auto fpair : this->sub_units) {
|
||||
fields_store << fpair.first;
|
||||
}
|
||||
return fields_store;;
|
||||
|
@ -690,7 +690,7 @@ QList<QString> BytesAsRuleSet::__Private::fieldNames() const
|
|||
|
||||
std::shared_ptr<ExtractUnit> BytesAsRuleSet::__Private::operator[](const QString& field) const
|
||||
{
|
||||
for (auto pair : this->_sub_rules) {
|
||||
for (auto pair : this->sub_units) {
|
||||
if(pair.first == field)
|
||||
return pair.second;
|
||||
}
|
||||
|
@ -700,10 +700,10 @@ std::shared_ptr<ExtractUnit> BytesAsRuleSet::__Private::operator[](const QString
|
|||
|
||||
void BytesAsRuleSet::setCustomName(const QString& name)
|
||||
{
|
||||
_rules._name_store = name;
|
||||
_bind._name_store = name;
|
||||
}
|
||||
|
||||
QString BytesAsRuleSet::customName() const
|
||||
{
|
||||
return _rules._name_store;
|
||||
return _bind._name_store;
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ namespace extract {
|
|||
struct __Private {
|
||||
int _byte_offset = 0, _byte_count = 1;
|
||||
QString _name_store;
|
||||
QList<std::pair<QString, std::shared_ptr<ExtractUnit>>> _sub_rules;
|
||||
QList<std::pair<QString, std::shared_ptr<ExtractUnit>>> sub_units;
|
||||
|
||||
QList<QString> fieldNames() const;
|
||||
std::shared_ptr<ExtractUnit> operator[](const QString &field) const;
|
||||
|
@ -266,7 +266,7 @@ namespace extract {
|
|||
void replace(int index, std::pair<QString, std::shared_ptr<ExtractUnit>> inst);
|
||||
void removeAt(int index);
|
||||
__Private& append(const QString& nm, std::shared_ptr<ExtractUnit> u);
|
||||
}_rules;
|
||||
}_bind;
|
||||
|
||||
void setCustomName(const QString& name);
|
||||
QString customName() const;
|
||||
|
|
Loading…
Reference in New Issue