Esempio n. 1
0
void KivioStencilFormatDlg::slotDefault()
{
  setLineWidth(1.0, m_unit);
  setLineColor(QColor(0, 0, 0));
  setLinePattern(1);
  setFillColor(QColor(255, 255, 255));
  setFillPattern(1);
}
RectangleAnnotation::RectangleAnnotation(Component *pParent)
  : ShapeAnnotation(pParent)
{
  // set the default values
  GraphicItem::setDefaults();
  FilledShape::setDefaults();
  ShapeAnnotation::setDefaults();
  // create a grey rectangle
  setLineColor(QColor(0, 0, 0));
  setFillColor(QColor(240, 240, 240));
  setFillPattern(StringHandler::FillSolid);
  QList<QPointF> extents;
  extents << QPointF(-100, -100) << QPointF(100, 100);
  setExtents(extents);
  setPos(mOrigin);
  setRotation(mRotation);
}
Esempio n. 3
0
/*!
    Sets the background color of the pattern with the given \a color.
*/
void Format::setPatternBackgroundColor(const QColor &color)
{
    if (color.isValid() && !hasProperty(FormatPrivate::P_Fill_Pattern))
        setFillPattern(PatternSolid);
    setProperty(FormatPrivate::P_Fill_BgColor, XlsxColor(color), XlsxColor());
}