Пример #1
0
BitmapAnnotation::BitmapAnnotation(QString shape, GraphicsView *graphicsView, QGraphicsItem *pParent)
  : ShapeAnnotation(graphicsView, pParent)
{
  // initialize all fields with default values
  initializeFields();
  mIsCustomShape = true;
  parseShapeAnnotation(shape, mpGraphicsView->mpParentProjectTab->mpParentProjectTabWidget->mpParentMainWindow->mpOMCProxy);
  setAcceptHoverEvents(true);
  connect(this, SIGNAL(updateShapeAnnotation()), mpGraphicsView, SLOT(addClassAnnotation()));
}
Пример #2
0
BitmapAnnotation::BitmapAnnotation(QString classFileName, QString annotation, Component *pParent)
  : ShapeAnnotation(pParent), mpComponent(pParent)
{
  mClassFileName = classFileName;
  // set the default values
  GraphicItem::setDefaults();
  ShapeAnnotation::setDefaults();
  parseShapeAnnotation(annotation);
  setPos(mOrigin);
  setRotation(mRotation);
}
Пример #3
0
/*!
 * \brief TextAnnotation::TextAnnotation
 * \param annotation - text annotation string.
 * \param pComponent - pointer to Component
 */
TextAnnotation::TextAnnotation(QString annotation, Component *pComponent)
  : ShapeAnnotation(pComponent), mpComponent(pComponent)
{
  // set the default values
  GraphicItem::setDefaults();
  FilledShape::setDefaults();
  ShapeAnnotation::setDefaults();
  parseShapeAnnotation(annotation);
  setPos(mOrigin);
  setRotation(mRotation);
}
Пример #4
0
PolygonAnnotation::PolygonAnnotation(QString annotation, GraphicsView *pGraphicsView)
    : ShapeAnnotation(false, pGraphicsView, 0)
{
    // set the default values
    GraphicItem::setDefaults();
    FilledShape::setDefaults();
    ShapeAnnotation::setDefaults();
    // set users default value by reading the settings file.
    ShapeAnnotation::setUserDefaults();
    parseShapeAnnotation(annotation);
    setShapeFlags(true);
}
Пример #5
0
BitmapAnnotation::BitmapAnnotation(QString classFileName, QString annotation, GraphicsView *pGraphicsView)
  : ShapeAnnotation(false, pGraphicsView, 0)
{
  mpComponent = 0;
  mClassFileName = classFileName;
  // set the default values
  GraphicItem::setDefaults();
  ShapeAnnotation::setDefaults();
  // set users default value by reading the settings file.
  ShapeAnnotation::setUserDefaults();
  parseShapeAnnotation(annotation);
  setShapeFlags(true);
}
Пример #6
0
RectangleAnnotation::RectangleAnnotation(QString annotation, bool inheritedShape, GraphicsView *pGraphicsView)
  : ShapeAnnotation(inheritedShape, pGraphicsView, 0)
{
  // set the default values
  GraphicItem::setDefaults();
  FilledShape::setDefaults();
  ShapeAnnotation::setDefaults();
  // set users default value by reading the settings file.
  ShapeAnnotation::setUserDefaults();
  parseShapeAnnotation(annotation);
  setShapeFlags(true);
  mpGraphicsView->addShapeObject(this);
  mpGraphicsView->scene()->addItem(this);
  connect(this, SIGNAL(updateClassAnnotation()), mpGraphicsView, SLOT(addClassAnnotation()));
}
Пример #7
0
BitmapAnnotation::BitmapAnnotation(QString shape, Component *pParent)
  : ShapeAnnotation(pParent), mpComponent(pParent)
{
  initializeFields();
  parseShapeAnnotation(shape, mpComponent->mpOMCProxy);
}