Revert Martin pull request for now, and return to last 7e9fd8df9 commit

This commit is contained in:
Laurent Trinques
2020-06-11 13:19:30 +02:00
parent bf2e02273e
commit 3e1740cee0
33 changed files with 473 additions and 1026 deletions

View File

@@ -26,41 +26,31 @@ class QComboBox;
/**
This class provides a widget to edit terminals within the element editor.
The class is capable to change the values of multiple parts of the same time.
The displayed values are from the first selected element
*/
class TerminalEditor : public ElementItemEditor {
Q_OBJECT
// Constructors, destructor
public:
TerminalEditor(QETElementEditor *, QList<PartTerminal *>& terms, QWidget * = nullptr);
TerminalEditor(QETElementEditor *, QWidget * = nullptr);
TerminalEditor(QETElementEditor *, PartTerminal * = nullptr, QWidget * = nullptr);
~TerminalEditor() override;
private:
TerminalEditor(const TerminalEditor &);
void init();
// attributes
private:
QList<PartTerminal *> m_terminals;
PartTerminal *m_part{nullptr};
PartTerminal *part;
QDoubleSpinBox *qle_x, *qle_y;
QComboBox *orientation;
bool m_locked{false};
bool m_locked;
// methods
public:
bool setPart(CustomElementPart *) override;
bool setParts(QList<CustomElementPart *> parts) override;
bool setPart(CustomElementPart *) override;
CustomElementPart *currentPart() const override;
QList<CustomElementPart*> currentParts() const override;
public slots:
void updateTerminalO();
void updateXPos();
void updateYPos();
void updatePos();
void updateForm() override;
private: