refactor
This commit is contained in:
parent
5ca2632039
commit
416701ba0c
|
@ -27,8 +27,6 @@ void IntDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const
|
|||
{
|
||||
auto value = dynamic_cast<QSpinBox*>(editor);
|
||||
model->setData(index, value->value(), Qt::EditRole);
|
||||
|
||||
emit this->valueChanged(index);
|
||||
}
|
||||
|
||||
void IntDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
|
@ -113,7 +111,7 @@ RuleSetCustom::RuleSetCustom(std::shared_ptr<TranslateBasic> base,
|
|||
this->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &QTableView::customContextMenuRequested, this, &RuleSetCustom::customTranslateRuleEdit);
|
||||
connect(rule_delegate, &RuleSelectDelegate::dataChanged, this, &RuleSetCustom::peersRuleChanged);
|
||||
connect(int_delegate, &IntDelegate::valueChanged, this, &RuleSetCustom::targetRuleRefresh);
|
||||
connect(_view._seqs_model, &QAbstractItemModel::dataChanged, this, &RuleSetCustom::targetRuleRefresh);
|
||||
|
||||
connect(this, &QTableView::clicked, [=](const QModelIndex& curr) {
|
||||
if (!curr.isValid())
|
||||
|
|
|
@ -18,9 +18,6 @@ namespace unit_func {
|
|||
private:
|
||||
int _min_value, _max_value;
|
||||
|
||||
signals:
|
||||
void valueChanged(const QModelIndex& idx) const;
|
||||
|
||||
public:
|
||||
IntDelegate(int min, int max);
|
||||
|
||||
|
|
Loading…
Reference in New Issue