TechDrawGui::QGIViewBalloon Class Reference

#include <QGIViewBalloon.h>

Public Types

enum  { Type = QGraphicsItem::UserType + 140 }
 
- Public Types inherited from TechDrawGui::QGIView
enum  { Type = QGraphicsItem::UserType + 101 }
 

Public Slots

void balloonLabelDragFinished (void)
 
void balloonLabelDragged (bool ctrl)
 
void hover (bool state)
 
void select (bool state)
 
void updateBalloon (bool obtuse=false)
 
- Public Slots inherited from TechDrawGui::QGIView
virtual void onSourceChange (TechDraw::DrawView *newParent)
 

Public Member Functions

virtual void drawBorder () override
 
virtual QGIBalloonLabelgetBalloonLabel (void)
 
QString getLabelText (void)
 
virtual QColor getNormalColor (void) override
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
 
void placeBalloon (QPointF pos)
 
int prefDefaultArrow () const
 
bool prefOrthoPyramid () const
 
 QGIViewBalloon ()
 
virtual void setGroupSelection (bool b) override
 
void setPrettyNormal (void)
 
void setPrettyPre (void)
 
void setPrettySel (void)
 
void setViewPartFeature (TechDraw::DrawViewBalloon *obj)
 
int type () const override
 
virtual void updateView (bool update=false) override
 
virtual ~QGIViewBalloon ()=default
 
- Public Member Functions inherited from TechDrawGui::QGIView
virtual void addArbitraryItem (QGraphicsItem *qgi)
 
void alignTo (QGraphicsItem *, const QString &alignment)
 
virtual QRectF boundingRect () const override
 
virtual void draw (void)
 
virtual void drawBorder (void)
 
virtual void drawCaption (void)
 
QGIViewClipgetClipGroup (void)
 
virtual QColor getCurrentColor (void)
 
virtual bool getFrameState (void)
 
MDIViewPagegetMDIViewPage (void) const
 
virtual QColor getNormalColor (void)
 
virtual QColor getPreColor (void)
 
double getScale (void)
 
virtual QColor getSelectColor (void)
 
virtual QColor getSettingColor (void)
 
const char * getViewName () const
 
const std::string getViewNameAsString () const
 
TechDraw::DrawViewgetViewObject () const
 
virtual void isVisible (bool state)
 
virtual bool isVisible (void)
 
void makeMark (Base::Vector3d v, QColor c=Qt::red)
 
void makeMark (double x, double y, QColor c=Qt::red)
 
void makeMark (QPointF p, QColor c=Qt::red)
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr) override
 
 QGIView ()
 
virtual void removeChild (QGIView *child)
 
virtual void rotateView (void)
 
virtual void setGroupSelection (bool b)
 
void setLocked (bool b)
 
virtual void setSettingColor (QColor c)
 
void setViewFeature (TechDraw::DrawView *obj)
 
virtual void toggleCache (bool state)
 
int type () const override
 
virtual void updateView (bool update=false)
 
virtual ~QGIView ()
 
void setPosition (qreal x, qreal y)
 Methods to ensure that Y-Coordinates are orientated correctly. More...
 
qreal getY ()
 
bool isInnerView ()
 
void isInnerView (bool state)
 
double getYInClip (double y)
 

Public Attributes

TechDraw::DrawViewBalloondvBalloon
 
- Public Attributes inherited from TechDrawGui::QGIView
boost::signals2::signal< void(QGIView *, QPointF)> signalSelectPoint
 

Protected Member Functions

void draw () override
 
void drawBalloon (bool dragged=false)
 
QString getPrecision (void)
 
TechDraw::DrawViewgetSourceView () const
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void parentViewMousePressed (QGIView *view, QPointF pos)
 
virtual void setPens (void)
 
virtual void setSvgPens (void)
 
- Protected Member Functions inherited from TechDrawGui::QGIView
virtual QRectF customChildrenBoundingRect (void) const
 
void dumpRect (const char *text, QRectF r)
 
Base::Reference< ParameterGrpgetParmGroupCol (void)
 
QGIViewgetQGIVByName (std::string name)
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 

Protected Attributes

QGIArrowarrow
 
QGIBalloonLabelballoonLabel
 
QGIDimLinesballoonLines
 
QGIDimLinesballoonShape
 
bool hasHover
 
bool m_ctrl
 
bool m_dragInProgress
 
double m_lineWidth
 
bool m_obtuse
 
bool m_originDragged = false
 
Base::Vector3d m_saveOffset
 
QGIViewparent
 
- Protected Attributes inherited from TechDrawGui::QGIView
QHash< QString, QGraphicsItem * > alignHash
 
QGCustomBorderm_border
 
QBrush m_brush
 
QGICaptionm_caption
 
QColor m_colCurrent
 
QColor m_colNormal
 
QColor m_colPre
 
QColor m_colSel
 
QColor m_colSetting
 
QPen m_decorPen
 
int m_dragState
 
QFont m_font
 
bool m_innerView
 
QGCustomLabelm_label
 
QGCustomImagem_lock
 
bool m_locked
 
double m_lockHeight
 
double m_lockWidth
 
QPen m_pen
 
std::string viewName
 
TechDraw::DrawViewviewObj
 

Additional Inherited Members

- Static Public Member Functions inherited from TechDrawGui::QGIView
static int calculateFontPixelSize (double sizeInMillimetres)
 
static int calculateFontPixelWidth (const QFont &font)
 
static double getDimFontSize (void)
 
static QGSPagegetGraphicsScene (TechDraw::DrawView *dv)
 
static QGVPagegetGraphicsView (TechDraw::DrawView *dv)
 
static QString getPrefFont (void)
 
static double getPrefFontSize (void)
 
static Gui::ViewProvidergetViewProvider (App::DocumentObject *obj)
 
- Static Public Attributes inherited from TechDrawGui::QGIView
static const double DefaultFontSizeInMM = 5.0
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ QGIViewBalloon()

◆ ~QGIViewBalloon()

virtual TechDrawGui::QGIViewBalloon::~QGIViewBalloon ( )
virtualdefault

Member Function Documentation

◆ balloonLabelDragFinished

◆ balloonLabelDragged

void QGIViewBalloon::balloonLabelDragged ( bool  ctrl)
slot

◆ draw()

void QGIViewBalloon::draw ( void  )
overrideprotectedvirtual

◆ drawBalloon()

void QGIViewBalloon::drawBalloon ( bool  dragged = false)
protected

References arrow, balloonLabel, balloonLines, balloonShape, TechDrawGui::QGCustomText::boundingRect(), TechDraw::DrawViewBalloon::BubbleShape, Base::Console(), TechDrawGui::QGIArrow::draw(), TechDraw::DrawViewBalloon::EndType, TechDraw::DrawViewBalloon::EndTypeScale, Base::Persistence::getClassTypeId(), TechDrawGui::QGIBalloonLabel::getDimText(), TechDrawGui::QGIArrow::getOverlapAdjust(), TechDrawGui::QGIArrow::getPrefArrowSize(), TechDraw::DrawView::getScale(), App::PropertyEnumeration::getValue(), App::PropertyFloat::getValue(), App::PropertyQuantity::getValue(), App::PropertyEnumeration::getValueAsString(), TechDrawGui::QGIView::getViewObject(), TechDraw::DrawViewBalloon::getViewPart(), TechDrawGui::QGIView::getViewProvider(), TechDrawGui::Rez::guiX(), TechDraw::DrawViewPart::hasGeometry(), hasHover, Base::BaseClass::isDerivedFrom(), TechDraw::DrawView::isLocked(), TechDrawGui::QGIView::isVisible(), TechDraw::DrawViewBalloon::KinkLength, Base::ConsoleSingleton::Log(), m_lineWidth, m_originDragged, m_saveOffset, TechDraw::DrawViewBalloon::OriginX, TechDraw::DrawViewBalloon::OriginY, prefOrthoPyramid(), draftfunctions.scale::scale(), TechDrawGui::QGIBalloonLabel::seps, setPrettyNormal(), setPrettyPre(), setPrettySel(), TechDrawGui::QGIArrow::setSize(), TechDrawGui::QGIArrow::setStyle(), TechDraw::DrawViewBalloon::ShapeScale, TechDrawGui::QGIBalloonLabel::verticalSep, Base::Vector3< _Precision >::x, TechDraw::DrawView::X, TechDrawGui::QGIBalloonLabel::X(), Base::Vector3< _Precision >::y, TechDraw::DrawView::Y, and TechDrawGui::QGIBalloonLabel::Y().

Referenced by balloonLabelDragged(), and draw().

◆ drawBorder()

void QGIViewBalloon::drawBorder ( void  )
overridevirtual

Reimplemented from TechDrawGui::QGIView.

◆ getBalloonLabel()

virtual QGIBalloonLabel * TechDrawGui::QGIViewBalloon::getBalloonLabel ( void  )
virtual

◆ getLabelText()

QString TechDrawGui::QGIViewBalloon::getLabelText ( void  )

◆ getNormalColor()

◆ getPrecision()

QString TechDrawGui::QGIViewBalloon::getPrecision ( void  )
protected

◆ getSourceView()

◆ hover

void QGIViewBalloon::hover ( bool  state)
slot

References draw(), and hasHover.

Referenced by QGIViewBalloon().

◆ itemChange()

QVariant QGIViewBalloon::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotectedvirtual

◆ mouseMoveEvent()

void QGIViewBalloon::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

◆ mousePressEvent()

void QGIViewBalloon::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

◆ mouseReleaseEvent()

void QGIViewBalloon::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotectedvirtual

◆ paint()

void QGIViewBalloon::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget widget = nullptr 
)
overridevirtual

◆ parentViewMousePressed()

void TechDrawGui::QGIViewBalloon::parentViewMousePressed ( QGIView view,
QPointF  pos 
)
protected

◆ placeBalloon()

◆ prefDefaultArrow()

int QGIViewBalloon::prefDefaultArrow ( ) const

Referenced by QGIViewBalloon().

◆ prefOrthoPyramid()

bool QGIViewBalloon::prefOrthoPyramid ( ) const

◆ select

void QGIViewBalloon::select ( bool  state)
slot

References draw().

Referenced by QGIViewBalloon().

◆ setGroupSelection()

void QGIViewBalloon::setGroupSelection ( bool  b)
overridevirtual

Reimplemented from TechDrawGui::QGIView.

References arrow, balloonLabel, and balloonLines.

◆ setPens()

void QGIViewBalloon::setPens ( void  )
protectedvirtual

◆ setPrettyNormal()

void QGIViewBalloon::setPrettyNormal ( void  )

◆ setPrettyPre()

void QGIViewBalloon::setPrettyPre ( void  )

◆ setPrettySel()

void QGIViewBalloon::setPrettySel ( void  )

◆ setSvgPens()

void QGIViewBalloon::setSvgPens ( void  )
protectedvirtual

◆ setViewPartFeature()

◆ type()

int TechDrawGui::QGIViewBalloon::type ( void  ) const
override

◆ updateBalloon

◆ updateView()

Member Data Documentation

◆ arrow

◆ balloonLabel

◆ balloonLines

◆ balloonShape

QGIDimLines* TechDrawGui::QGIViewBalloon::balloonShape
protected

◆ dvBalloon

TechDraw::DrawViewBalloon* TechDrawGui::QGIViewBalloon::dvBalloon

◆ hasHover

bool TechDrawGui::QGIViewBalloon::hasHover
protected

Referenced by drawBalloon(), and hover().

◆ m_ctrl

bool TechDrawGui::QGIViewBalloon::m_ctrl
protected

◆ m_dragInProgress

bool TechDrawGui::QGIViewBalloon::m_dragInProgress
protected

◆ m_lineWidth

double TechDrawGui::QGIViewBalloon::m_lineWidth
protected

Referenced by drawBalloon(), setPens(), and setSvgPens().

◆ m_obtuse

bool TechDrawGui::QGIViewBalloon::m_obtuse
protected

◆ m_originDragged

bool TechDrawGui::QGIViewBalloon::m_originDragged = false
protected

◆ m_saveOffset

Base::Vector3d TechDrawGui::QGIViewBalloon::m_saveOffset
protected

◆ parent


The documentation for this class was generated from the following files: