Beispiel #1
0
SGI_Symbol::SGI_Symbol(SI_Symbol& symbol) noexcept
  : SGI_Base(), mSymbol(symbol), mLibSymbol(symbol.getLibSymbol()) {
  setZValue(Schematic::ZValue_Symbols);

  mFont = qApp->getDefaultSansSerifFont();

  updateCacheAndRepaint();
}
Beispiel #2
0
SGI_NetLine::SGI_NetLine(SI_NetLine& netline) noexcept :
    SGI_Base(), mNetLine(netline), mLayer(nullptr)
{
    setZValue(Schematic::ZValue_NetLines);

    mLayer = getSchematicLayer(SchematicLayer::Nets);
    Q_ASSERT(mLayer);

    updateCacheAndRepaint();
}
Beispiel #3
0
SGI_Symbol::SGI_Symbol(SI_Symbol& symbol) noexcept :
    SGI_Base(), mSymbol(symbol), mLibSymbol(symbol.getLibSymbol())
{
    setZValue(Schematic::ZValue_Symbols);

    mFont.setStyleStrategy(QFont::StyleStrategy(QFont::OpenGLCompatible | QFont::PreferQuality));
    mFont.setStyleHint(QFont::SansSerif);
    mFont.setFamily("Nimbus Sans L");

    updateCacheAndRepaint();
}
Beispiel #4
0
SGI_SymbolPin::SGI_SymbolPin(SI_SymbolPin& pin) noexcept
  : SGI_Base(), mPin(pin), mLibPin(pin.getLibPin()), mIsVisibleJunction(false) {
  setZValue(Schematic::ZValue_Symbols);
  setToolTip(*mLibPin.getName());

  mJunctionLayer = getLayer(GraphicsLayer::sSchematicNetLines);
  Q_ASSERT(mJunctionLayer);

  mStaticText.setTextFormat(Qt::PlainText);
  mStaticText.setPerformanceHint(QStaticText::AggressiveCaching);

  mFont = qApp->getDefaultSansSerifFont();
  mFont.setPixelSize(5);

  mRadiusPx = Length(600000).toPx();

  updateCacheAndRepaint();
}
Beispiel #5
0
SGI_NetLabel::SGI_NetLabel(SI_NetLabel& netlabel) noexcept :
    SGI_Base(), mNetLabel(netlabel)
{
    setZValue(Schematic::ZValue_NetLabels);

    mStaticText.setTextFormat(Qt::PlainText);
    mStaticText.setPerformanceHint(QStaticText::AggressiveCaching);

    mFont.setStyleStrategy(QFont::StyleStrategy(QFont::OpenGLCompatible | QFont::PreferQuality));
    mFont.setStyleHint(QFont::TypeWriter);
    mFont.setFamily("Monospace");
    mFont.setPixelSize(4);

    if (sOriginCrossLines.isEmpty())
    {
        qreal crossSizePx = Length(400000).toPx();
        sOriginCrossLines.append(QLineF(-crossSizePx, 0, crossSizePx, 0));
        sOriginCrossLines.append(QLineF(0, -crossSizePx, 0, crossSizePx));
    }

    updateCacheAndRepaint();
}
Beispiel #6
0
BGI_AirWire::BGI_AirWire(BI_AirWire& airwire) noexcept
  : BGI_Base(), mAirWire(airwire), mLayer(nullptr) {
  mLayer = getLayer(GraphicsLayer::sBoardAirWires);
  setZValue(Board::ZValue_AirWires);
  updateCacheAndRepaint();
}