mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-28 23:00:53 +01:00
reimplement Priv function, so the ElementEditor gets called automatically
This commit is contained in:
@@ -130,7 +130,7 @@ QList<CustomElementPart*> DynamicTextFieldEditor::currentParts() const
|
||||
return parts;
|
||||
}
|
||||
|
||||
void DynamicTextFieldEditor::updateForm()
|
||||
void DynamicTextFieldEditor::updateFormPriv()
|
||||
{
|
||||
if(m_text_field) {
|
||||
ui -> m_x_sb -> setValue(m_text_field.data() -> x());
|
||||
|
||||
@@ -45,7 +45,7 @@ class DynamicTextFieldEditor : public ElementItemEditor {
|
||||
bool setParts(QList <CustomElementPart *>) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart*> currentParts() const override;
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
|
||||
private:
|
||||
void setupWidget();
|
||||
|
||||
@@ -110,9 +110,9 @@ QList<CustomElementPart *> EllipseEditor::currentParts() const {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief EllipseEditor::updateForm
|
||||
* @brief EllipseEditor::updateFormPriv
|
||||
*/
|
||||
void EllipseEditor::updateForm()
|
||||
void EllipseEditor::updateFormPriv()
|
||||
{
|
||||
if (!m_part) {
|
||||
return;
|
||||
|
||||
@@ -43,7 +43,7 @@ class EllipseEditor : public ElementItemEditor
|
||||
bool setParts(QList<CustomElementPart *> parts) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart*> currentParts() const override;
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
|
||||
private slots:
|
||||
void on_m_x_sb_editingFinished();
|
||||
|
||||
@@ -176,10 +176,10 @@ QList<CustomElementPart *> LineEditor::currentParts() const {
|
||||
}
|
||||
|
||||
/**
|
||||
@brief LineEditor::updateForm
|
||||
@brief LineEditor::updateFormPriv
|
||||
Reimplemented from ElementItemEditor
|
||||
*/
|
||||
void LineEditor::updateForm()
|
||||
void LineEditor::updateFormPriv()
|
||||
{
|
||||
if (!m_part) {
|
||||
return;
|
||||
|
||||
@@ -43,7 +43,7 @@ class LineEditor : public ElementItemEditor
|
||||
bool setParts(QList <CustomElementPart *> parts) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart *> currentParts() const override;
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
|
||||
private:
|
||||
void setUpChangeConnections();
|
||||
|
||||
@@ -130,10 +130,10 @@ QList<CustomElementPart*> PolygonEditor::currentParts() const
|
||||
}
|
||||
|
||||
/**
|
||||
@brief PolygonEditor::updateForm
|
||||
@brief PolygonEditor::updateFormPriv
|
||||
Update the widget
|
||||
*/
|
||||
void PolygonEditor::updateForm()
|
||||
void PolygonEditor::updateFormPriv()
|
||||
{
|
||||
if (!m_part) {
|
||||
return;
|
||||
|
||||
@@ -39,7 +39,7 @@ class PolygonEditor : public ElementItemEditor
|
||||
bool setPart(CustomElementPart *part) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart*> currentParts() const override;
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
QVector<QPointF> pointsFromTree();
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ QPointF RectangleEditor::editedTopLeft() const
|
||||
/**
|
||||
@brief RectangleEditor::updateForm
|
||||
*/
|
||||
void RectangleEditor::updateForm()
|
||||
void RectangleEditor::updateFormPriv()
|
||||
{
|
||||
if (!m_part) {
|
||||
return;
|
||||
|
||||
@@ -48,7 +48,7 @@ class RectangleEditor : public ElementItemEditor
|
||||
QPointF editedTopLeft () const;
|
||||
|
||||
public slots:
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
private:
|
||||
void editingFinished();
|
||||
void activeConnections(bool active);
|
||||
|
||||
@@ -46,11 +46,11 @@ TerminalEditor::~TerminalEditor()
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief TerminalEditor::updateForm
|
||||
* @brief TerminalEditor::updateFormPriv
|
||||
* Reimplemented from ElementItemEditor
|
||||
* Update the content of this widget
|
||||
*/
|
||||
void TerminalEditor::updateForm()
|
||||
void TerminalEditor::updateFormPriv()
|
||||
{
|
||||
if (!m_part) {
|
||||
return;
|
||||
|
||||
@@ -39,7 +39,7 @@ class TerminalEditor : public ElementItemEditor
|
||||
TerminalEditor(QETElementEditor *editor, QWidget *parent = nullptr);
|
||||
~TerminalEditor() override;
|
||||
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
bool setPart(CustomElementPart *new_part) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QList<CustomElementPart *> currentParts() const override {return QList<CustomElementPart *>();}
|
||||
|
||||
@@ -48,7 +48,7 @@ TextEditor::~TextEditor() {}
|
||||
@brief TextEditor::updateForm
|
||||
Update the gui
|
||||
*/
|
||||
void TextEditor::updateForm()
|
||||
void TextEditor::updateFormPriv()
|
||||
{
|
||||
if (m_text.isNull()) {
|
||||
return;
|
||||
|
||||
@@ -38,7 +38,7 @@ class TextEditor : public ElementItemEditor {
|
||||
explicit TextEditor(QETElementEditor *editor, PartText *text = nullptr, QWidget *parent = nullptr);
|
||||
~TextEditor() override;
|
||||
|
||||
void updateForm() override;
|
||||
void updateFormPriv() override;
|
||||
bool setPart(CustomElementPart *part) override;
|
||||
bool setParts(QList <CustomElementPart *>) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
Reference in New Issue
Block a user