68 lines
1.7 KiB
C++
68 lines
1.7 KiB
C++
#pragma once
|
|
#include <QWidget>
|
|
#include <QTableView>
|
|
#include <QStandardItemModel>
|
|
#include <QTreeView>
|
|
#include <QLineEdit>
|
|
#include <QStackedWidget>
|
|
#include <QSpinBox>
|
|
#include <QCheckBox>
|
|
#include "SequenceView.h"
|
|
#include "extract_basic.h"
|
|
|
|
namespace configuration_panel {
|
|
|
|
/// <summary>
|
|
/// Áбí×Ö¶ÎÅäÖÃÃæ°å
|
|
/// </summary>
|
|
class ListUnitConfiguration : public QWidget {
|
|
Q_OBJECT
|
|
private:
|
|
std::shared_ptr<TranslateBasic> _bind_core;
|
|
std::shared_ptr<extract::AsList> _bind_u;
|
|
QModelIndex _bind_index;
|
|
|
|
QComboBox* const _rule_select;
|
|
QComboBox* const _size_layout_select;
|
|
|
|
QStackedWidget* const _configs_stack;
|
|
QSpinBox* const _const_number_input;
|
|
QComboBox* const _prev_field_refer;
|
|
|
|
void elmRuleSet(const QString &typeAlias);
|
|
void sizeProviderSet(const QString &typeAlias);
|
|
void constProviderBind(int value);
|
|
void fieldProviderBind(const QString &typeAlias);
|
|
|
|
public:
|
|
ListUnitConfiguration(std::shared_ptr<TranslateBasic> core, QWidget* p = nullptr);
|
|
|
|
void currentRuleAccept(
|
|
std::shared_ptr<ExtractImpl> u,
|
|
const QModelIndex& i,
|
|
std::shared_ptr<ScopeFieldsGetter> getter);
|
|
void reloadContent(std::shared_ptr<extract::AsList> u,
|
|
std::shared_ptr<ScopeFieldsGetter> getter);
|
|
|
|
signals:
|
|
void currentRuleChanged(const QModelIndex& idx);
|
|
};
|
|
}
|
|
|
|
class ExtractRuleView : public QWidget
|
|
{
|
|
private:
|
|
RuleSetCustom* const _sequence_view;
|
|
QStackedWidget* const _configs_stack;
|
|
|
|
std::shared_ptr<extract::AsRuleSet> _rule_base;
|
|
std::shared_ptr<FieldManagerLayer> _current_fields_cache = nullptr;
|
|
|
|
public:
|
|
ExtractRuleView(std::shared_ptr<TranslateBasic> base,
|
|
std::shared_ptr<extract::AsRuleSet> inst_r, QWidget* p = nullptr);
|
|
|
|
void cacheRefresh(const QModelIndex& curr, configuration_panel::ListUnitConfiguration* t);
|
|
};
|
|
|