Merge branch 'terminal_strip'

* terminal_strip:
  Terminal strip item can saved / loaded to .qet file
  See previous commit...
  Move terminal strip drawer class in is own file
  Fix wrong use of QStringLiteral and QLatin1String
  Double click a TerminalStripItem open the editor
  Minor change about checkable QAction of QetDiagramEditor
  Minor : corrects a minor aesthetic defect when unbridge terminals
  Revamp code
  Add and move terminal strip item are now managed by undo command
  TerminalStripItem : Draw terminal bridge
  Terminal strip item can be added to diagram
  Minor : add QGIUtility namespace
This commit is contained in:
joshua
2023-01-02 19:40:08 +01:00
45 changed files with 1628 additions and 276 deletions

View File

@@ -69,45 +69,6 @@ class CutDiagramCommand : public DeleteQGraphicsItemCommand {
CutDiagramCommand(const CutDiagramCommand &);
};
/**
@brief The MoveElementsCommand class
This command moves some content on a particular diagram.
*/
class MoveElementsCommand : public QUndoCommand {
// constructors, destructor
public:
MoveElementsCommand(Diagram *, const DiagramContent &,
const QPointF &m, QUndoCommand * = nullptr);
~MoveElementsCommand() override;
private:
MoveElementsCommand(const MoveElementsCommand &);
// methods
public:
void undo() override;
void redo() override;
virtual void move(const QPointF &);
private:
void setupAnimation (QObject * target,
const QByteArray &propertyName,
const QVariant& start,
const QVariant& end);
// attributes
private:
/// diagram the movement takes place on.
Diagram *diagram;
/// moved content
DiagramContent content_to_move;
/// applied movement
QPointF movement;
///animation group
QParallelAnimationGroup *m_anim_group;
/// prevent the first call to redo()
bool first_redo;
};
/**
@brief The MoveConductorsTextsCommand class
This command moves text items related to conductors