CmdSymbolInstanceEdit::~CmdSymbolInstanceEdit() noexcept
{
    if (!wasEverExecuted()) {
        mSymbol.setPosition(mOldPos);
        mSymbol.setRotation(mOldRotation);
    }
}
Exemplo n.º 2
0
CmdFootprintPadEdit::~CmdFootprintPadEdit() noexcept {
  if (!wasEverExecuted()) {
    try {
      performUndo();
    } catch (...) {
      qCritical() << "Undo failed!";
    }
  }
}
Exemplo n.º 3
0
void CmdFootprintPadEdit::rotate(const Angle& angle, const Point& center,
                                 bool immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPos.rotate(angle, center);
  mNewRotation += angle;
  if (immediate) {
    mPad.setPosition(mNewPos);
    mPad.setRotation(mNewRotation);
  }
}
void CmdSymbolInstanceEdit::rotate(const Angle& angle, const Point& center, bool immediate) noexcept
{
    Q_ASSERT(!wasEverExecuted());
    mNewPos.rotate(angle, center);
    mNewRotation += angle;
    if (immediate)
    {
        mSymbol.setPosition(mNewPos);
        mSymbol.setRotation(mNewRotation);
    }
}
void CmdSchematicNetPointEdit::setPosition(const Point& pos,
                                           bool         immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPos = pos;
  if (immediate) mNetPoint.setPosition(mNewPos);
}
Exemplo n.º 6
0
void CmdFootprintPadEdit::setShape(FootprintPad::Shape shape,
                                   bool                immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewShape = shape;
  if (immediate) mPad.setShape(mNewShape);
}
Exemplo n.º 7
0
void CmdFootprintPadEdit::setPackagePadUuid(const Uuid& pad,
                                            bool        immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPackagePadUuid = pad;
  if (immediate) mPad.setPackagePadUuid(mNewPackagePadUuid);
}
Exemplo n.º 8
0
void CmdFootprintPadEdit::translate(const Point& deltaPos,
                                    bool         immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPos += deltaPos;
  if (immediate) mPad.setPosition(mNewPos);
}
Exemplo n.º 9
0
void CmdFootprintPadEdit::setDrillDiameter(const UnsignedLength& dia,
                                           bool immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewDrillDiameter = dia;
  if (immediate) mPad.setDrillDiameter(mNewDrillDiameter);
}
Exemplo n.º 10
0
void CmdPackagePadEdit::setName(const CircuitIdentifier& name) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewName = name;
}
Exemplo n.º 11
0
void CmdSymbolInstanceEdit::setRotation(const Angle& angle, bool immediate) noexcept
{
    Q_ASSERT(!wasEverExecuted());
    mNewRotation = angle;
    if (immediate) mSymbol.setRotation(mNewRotation);
}
Exemplo n.º 12
0
void CmdSymbolInstanceEdit::setDeltaToStartPos(Point& deltaPos, bool immediate) noexcept
{
    Q_ASSERT(!wasEverExecuted());
    mNewPos = mOldPos + deltaPos;
    if (immediate) mSymbol.setPosition(mNewPos);
}
Exemplo n.º 13
0
void CmdSymbolInstanceEdit::setPosition(Point& pos, bool immediate) noexcept
{
    Q_ASSERT(!wasEverExecuted());
    mNewPos = pos;
    if (immediate) mSymbol.setPosition(mNewPos);
}
Exemplo n.º 14
0
void CmdSchematicNetPointEdit::translate(const Point& deltaPos,
                                         bool         immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPos += deltaPos;
  if (immediate) mNetPoint.setPosition(mNewPos);
}
Exemplo n.º 15
0
void CmdLibraryBaseElementEdit::setKeywords(
    const LocalizedKeywordsMap& keywords) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewKeywords = keywords;
}
Exemplo n.º 16
0
void CmdLibraryBaseElementEdit::setVersion(const Version& version) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewVersion = version;
}
Exemplo n.º 17
0
void CmdLibraryBaseElementEdit::setAuthor(const QString& author) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewAuthor = author;
}
Exemplo n.º 18
0
void CmdFootprintPadEdit::setHeight(const PositiveLength& height,
                                    bool                  immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewHeight = height;
  if (immediate) mPad.setHeight(mNewHeight);
}
Exemplo n.º 19
0
void CmdLibraryBaseElementEdit::setDeprecated(bool deprecated) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewDeprecated = deprecated;
}
Exemplo n.º 20
0
void CmdFootprintPadEdit::setPosition(const Point& pos,
                                      bool         immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewPos = pos;
  if (immediate) mPad.setPosition(mNewPos);
}
Exemplo n.º 21
0
void CmdLibraryBaseElementEdit::setName(const QString&     locale,
                                        const ElementName& name) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewNames.insert(locale, name);
}
Exemplo n.º 22
0
void CmdFootprintPadEdit::setRotation(const Angle& angle,
                                      bool         immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewRotation = angle;
  if (immediate) mPad.setRotation(mNewRotation);
}
Exemplo n.º 23
0
void CmdLibraryBaseElementEdit::setNames(
    const LocalizedNameMap& names) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewNames = names;
}
Exemplo n.º 24
0
void CmdLibraryBaseElementEdit::setDescription(const QString& locale,
                                               const QString& desc) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewDescriptions.insert(locale, desc);
}
Exemplo n.º 25
0
void CmdLibraryBaseElementEdit::setDescriptions(
    const LocalizedDescriptionMap& descriptions) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewDescriptions = descriptions;
}
Exemplo n.º 26
0
void CmdFootprintPadEdit::setBoardSide(FootprintPad::BoardSide side,
                                       bool immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewBoardSide = side;
  if (immediate) mPad.setBoardSide(mNewBoardSide);
}
Exemplo n.º 27
0
void CmdLibraryBaseElementEdit::setKeywords(const QString& locale,
                                            const QString& keywords) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewKeywords.insert(locale, keywords);
}
Exemplo n.º 28
0
void CmdFootprintPadEdit::setWidth(const PositiveLength& width,
                                   bool                  immediate) noexcept {
  Q_ASSERT(!wasEverExecuted());
  mNewWidth = width;
  if (immediate) mPad.setWidth(mNewWidth);
}
Exemplo n.º 29
0
CmdSchematicNetPointEdit::~CmdSchematicNetPointEdit() noexcept {
  if (!wasEverExecuted()) {
    mNetPoint.setPosition(mOldPos);
  }
}