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())); }
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); }
/*! * \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); }
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); }
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); }
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())); }
BitmapAnnotation::BitmapAnnotation(QString shape, Component *pParent) : ShapeAnnotation(pParent), mpComponent(pParent) { initializeFields(); parseShapeAnnotation(shape, mpComponent->mpOMCProxy); }