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