Refactoring.

This commit is contained in:
Roman Telezhynskyi 2024-02-17 20:22:56 +02:00
parent ad0d3c1612
commit a3448cde76
6 changed files with 21 additions and 29 deletions

View file

@ -103,20 +103,12 @@ void VPE::VPropertyFormView::setPropertySet(VPropertySet *property_set)
void VPE::VPropertyFormView::rowsRemoved(const QModelIndex &parent, int start, int end)
{
// todo: Only rebuild the neccessary parts
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
updatePropertyList();
rowsChanged(parent, start, end);
}
void VPE::VPropertyFormView::rowsInserted(const QModelIndex &parent, int start, int end) //-V524
{
// todo: Only rebuild the neccessary parts
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
updatePropertyList();
rowsChanged(parent, start, end);
}
void VPE::VPropertyFormView::modelReset()
@ -219,3 +211,12 @@ void VPE::VPropertyFormView::connectPropertyFormWidget(VPropertyFormWidget *widg
connectPropertyFormWidget(tmpEditorWidget);
}
}
void VPE::VPropertyFormView::rowsChanged(const QModelIndex &parent, int start, int end)
{
// todo: Only rebuild the neccessary parts
Q_UNUSED(parent)
Q_UNUSED(start)
Q_UNUSED(end)
updatePropertyList();
}

View file

@ -103,6 +103,8 @@ protected:
private:
Q_DISABLE_COPY_MOVE(VPropertyFormView) // NOLINT
void rowsChanged(const QModelIndex &parent, int start, int end);
};
QT_WARNING_POP

View file

@ -1620,17 +1620,7 @@ void DialogSeamAllowance::CSAEndPointChanged(int index)
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::MirrorLineStartPointChanged(int index)
{
Q_UNUSED(index)
flagMirrorLineIsValid = MirrorLineIsValid();
uiTabPaths->checkBoxShowFullPiece->setEnabled(flagMirrorLineIsValid);
CheckState();
}
//---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::MirrorLineEndPointChanged(int index)
void DialogSeamAllowance::MirrorLinePointChanged(int index)
{
Q_UNUSED(index)
@ -3827,9 +3817,9 @@ void DialogSeamAllowance::InitMainPathTab()
});
connect(uiTabPaths->comboBoxMLStartPoint, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
&DialogSeamAllowance::MirrorLineStartPointChanged);
&DialogSeamAllowance::MirrorLinePointChanged);
connect(uiTabPaths->comboBoxMLEndPoint, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
&DialogSeamAllowance::MirrorLineEndPointChanged);
&DialogSeamAllowance::MirrorLinePointChanged);
}
//---------------------------------------------------------------------------------------------------------------------

View file

@ -96,8 +96,7 @@ private slots:
void PassmarkChanged(int index);
void CSAStartPointChanged(int index);
void CSAEndPointChanged(int index);
void MirrorLineStartPointChanged(int index);
void MirrorLineEndPointChanged(int index);
void MirrorLinePointChanged(int index);
void CSAIncludeTypeChanged(int index);
void NodeAngleChanged(int index);
void ReturnDefBefore();

View file

@ -1224,7 +1224,7 @@ void ColorPickerButton::focusInEvent(QFocusEvent *e)
{
setFrameShadow(Raised);
update();
QFrame::focusOutEvent(e);
QFrame::focusInEvent(e);
}
/*!

View file

@ -64,9 +64,9 @@ class QtColorPicker : public QPushButton
Q_PROPERTY(bool colorDialog READ colorDialogEnabled WRITE setColorDialogEnabled)
public:
QtColorPicker(QWidget *parent = 0, int columns = -1, bool enableColorDialog = true);
explicit QtColorPicker(QWidget *parent = 0, int columns = -1, bool enableColorDialog = true);
~QtColorPicker();
~QtColorPicker() override;
void insertColor(const QColor &color, const QString &text = QString(), int index = -1);
@ -90,7 +90,7 @@ Q_SIGNALS:
void colorChanged(const QColor &);
protected:
void paintEvent(QPaintEvent *e);
void paintEvent(QPaintEvent *e) override;
private Q_SLOTS:
void buttonPressed(bool toggled);