TechDrawGui::QGIView Class Reference

#include <QGIView.h>

Public Types

enum  { Type = QGraphicsItem::UserType + 101 }
 

Public Slots

virtual void onSourceChange (TechDraw::DrawView *newParent)
 

Public Member Functions

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)
 

Static Public Member Functions

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)
 

Public Attributes

boost::signals2::signal< void(QGIView *, QPointF)> signalSelectPoint
 

Static Public Attributes

static const double DefaultFontSizeInMM = 5.0
 

Protected Member Functions

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

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
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ QGIView()

◆ ~QGIView()

QGIView::~QGIView ( )
virtual

References signalSelectPoint.

Member Function Documentation

◆ addArbitraryItem()

void QGIView::addArbitraryItem ( QGraphicsItem *  qgi)
virtual

◆ alignTo()

void QGIView::alignTo ( QGraphicsItem *  item,
const QString &  alignment 
)

References alignHash.

◆ boundingRect()

◆ calculateFontPixelSize()

◆ calculateFontPixelWidth()

int QGIView::calculateFontPixelWidth ( const QFont &  font)
static

◆ customChildrenBoundingRect()

QRectF QGIView::customChildrenBoundingRect ( void  ) const
protectedvirtual

Referenced by drawBorder(), and drawCaption().

◆ draw()

◆ drawBorder()

◆ drawCaption()

◆ dumpRect()

void QGIView::dumpRect ( const char *  text,
QRectF  r 
)
protected

◆ getClipGroup()

QGIViewClip * QGIView::getClipGroup ( void  )

◆ getCurrentColor()

virtual QColor TechDrawGui::QGIView::getCurrentColor ( void  )
virtual

◆ getDimFontSize()

double QGIView::getDimFontSize ( void  )
static

◆ getFrameState()

◆ getGraphicsScene()

◆ getGraphicsView()

◆ getMDIViewPage()

MDIViewPage * QGIView::getMDIViewPage ( void  ) const

◆ getNormalColor()

◆ getParmGroupCol()

Base::Reference< ParameterGrp > QGIView::getParmGroupCol ( void  )
protected

◆ getPreColor()

◆ getPrefFont()

QString QGIView::getPrefFont ( void  )
static

◆ getPrefFontSize()

double QGIView::getPrefFontSize ( void  )
static

◆ getQGIVByName()

QGIView * QGIView::getQGIVByName ( std::string  name)
protected

◆ getScale()

double QGIView::getScale ( void  )

◆ getSelectColor()

◆ getSettingColor()

virtual QColor TechDrawGui::QGIView::getSettingColor ( void  )
virtual

◆ getViewName()

◆ getViewNameAsString()

const std::string QGIView::getViewNameAsString ( ) const

◆ getViewObject()

TechDraw::DrawView * QGIView::getViewObject ( ) const

References viewObj.

Referenced by TechDrawGui::QGIViewDimension::arrowPositionsToFeature(), TechDrawGui::QGIViewBalloon::balloonLabelDragFinished(), TechDrawGui::QGIViewBalloon::balloonLabelDragged(), TechDrawGui::QGIViewDimension::datumLabelDragFinished(), TechDrawGui::QGILeaderLine::draw(), TechDrawGui::QGIViewDimension::draw(), TechDrawGui::QGIViewImage::draw(), draw(), TechDrawGui::QGIViewPart::drawAllSectionLines(), TechDrawGui::QGIViewDimension::drawAngle(), TechDrawGui::QGIViewAnnotation::drawAnnotation(), TechDrawGui::QGIViewBalloon::drawBalloon(), drawBorder(), drawCaption(), TechDrawGui::QGIViewPart::drawCenterLines(), TechDrawGui::QGIViewClip::drawClip(), TechDrawGui::QGIViewDimension::drawDistanceExecutive(), TechDrawGui::QGIViewDimension::drawDistanceOverride(), TechDrawGui::QGIViewPart::drawHighlight(), TechDrawGui::QGIViewImage::drawImage(), TechDrawGui::QGIViewPart::drawMatting(), TechDrawGui::QGIViewPart::drawPainterPath(), TechDrawGui::QGIViewSection::drawSectionFace(), TechDrawGui::QGIViewPart::drawSectionLine(), TechDrawGui::QGIViewSymbol::drawSvg(), TechDrawGui::QGIWeldSymbol::drawTailText(), TechDrawGui::QGIWeldSymbol::drawTile(), TechDrawGui::QGIViewPart::drawViewPart(), TechDrawGui::QGIViewDimension::findIsoExt(), TechDrawGui::QGIViewPart::formatGeomFromCenterLine(), TechDrawGui::QGIViewPart::formatGeomFromCosmetic(), getClipGroup(), TechDrawGui::QGILeaderLine::getFeature(), TechDrawGui::QGIRichAnno::getFeature(), getFrameState(), TechDrawGui::QGILeaderLine::getLineWidth(), TechDrawGui::QGILeaderLine::getNormalColor(), TechDrawGui::QGIViewBalloon::getNormalColor(), getScale(), TechDrawGui::QGIViewBalloon::getSourceView(), isVisible(), itemChange(), TechDrawGui::QGIRichAnno::mouseDoubleClickEvent(), TechDrawGui::QGIViewAnnotation::mouseDoubleClickEvent(), TechDrawGui::QGIBalloonLabel::mouseDoubleClickEvent(), TechDrawGui::QGIDatumLabel::mouseDoubleClickEvent(), TechDrawGui::QGIProjGroup::mouseReleaseEvent(), mouseReleaseEvent(), TechDrawGui::QGIViewBalloon::placeBalloon(), TechDrawGui::QGIViewDimension::prefNormalColor(), TechDrawGui::QGIRichAnno::rectPen(), rotateView(), TechDrawGui::QGIViewAnnotation::rotateView(), TechDrawGui::QGIViewImage::rotateView(), TechDrawGui::QGIViewSymbol::rotateView(), TechDrawGui::QGIDatumLabel::setPosFromCenter(), TechDrawGui::QGIDatumLabel::setToleranceString(), TechDrawGui::MDIViewPage::setTreeToSceneSelect(), TechDrawGui::QGILeaderLine::startPathEdit(), TechDrawGui::QGIViewBalloon::updateBalloon(), TechDrawGui::QGIViewDimension::updateDim(), updateView(), TechDrawGui::QGILeaderLine::updateView(), TechDrawGui::QGIRichAnno::updateView(), TechDrawGui::QGIViewAnnotation::updateView(), TechDrawGui::QGIViewBalloon::updateView(), TechDrawGui::QGIViewClip::updateView(), TechDrawGui::QGIViewDimension::updateView(), TechDrawGui::QGIViewImage::updateView(), TechDrawGui::QGIViewPart::updateView(), TechDrawGui::QGIViewSection::updateView(), TechDrawGui::QGIViewSymbol::updateView(), and TechDrawGui::QGIWeldSymbol::updateView().

◆ getViewProvider()

Gui::ViewProvider * QGIView::getViewProvider ( App::DocumentObject obj)
static

References Gui::Application::getDocument(), Gui::Document::getViewProvider(), and Gui::Application::Instance.

Referenced by TechDrawGui::TaskRichAnno::createAnnoFeature(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), TechDrawGui::QGILeaderLine::draw(), TechDrawGui::QGIRichAnno::draw(), TechDrawGui::QGIViewDimension::draw(), TechDrawGui::QGIViewImage::draw(), TechDrawGui::QGIViewPart::drawAllSectionLines(), TechDrawGui::QGIViewDimension::drawAngle(), TechDrawGui::QGIViewBalloon::drawBalloon(), drawBorder(), drawCaption(), TechDrawGui::QGIViewPart::drawCenterLines(), TechDrawGui::QGIViewDimension::drawDistanceExecutive(), TechDrawGui::QGIViewDimension::drawDistanceOverride(), TechDrawGui::QGIViewPart::drawHighlight(), TechDrawGui::QGIViewSection::drawSectionFace(), TechDrawGui::QGIViewPart::drawSectionLine(), TechDrawGui::QGIWeldSymbol::drawTailText(), TechDrawGui::QGIWeldSymbol::drawTile(), TechDrawGui::QGIViewPart::drawViewPart(), TechDrawGui::TaskLeaderLine::findParentQGIV(), TechDrawGui::TaskCenterLine::getCenterWidth(), TechDrawGui::TaskLineDecor::getDefaults(), getGraphicsScene(), getGraphicsView(), TechDrawGui::QGILeaderLine::getLineWidth(), TechDrawGui::QGILeaderLine::getNormalColor(), TechDrawGui::QGIViewBalloon::getNormalColor(), isVisible(), TechDrawGui::QGIBalloonLabel::mouseDoubleClickEvent(), TechDrawGui::QGIDatumLabel::mouseDoubleClickEvent(), TechDrawGui::QGIViewBalloon::placeBalloon(), TechDrawGui::QGIViewDimension::prefNormalColor(), TechDrawGui::QGIRichAnno::rectPen(), TechDrawGui::QGIViewBalloon::updateBalloon(), TechDrawGui::QGIViewDimension::updateDim(), TechDrawGui::QGILeaderLine::updateView(), TechDrawGui::QGIRichAnno::updateView(), TechDrawGui::QGIViewBalloon::updateView(), TechDrawGui::QGIViewDimension::updateView(), and TechDrawGui::QGIViewPart::updateView().

◆ getY()

qreal TechDrawGui::QGIView::getY ( )

◆ getYInClip()

double QGIView::getYInClip ( double  y)

Referenced by mouseReleaseEvent(), and setPosition().

◆ hoverEnterEvent()

void QGIView::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ hoverLeaveEvent()

void QGIView::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected

◆ isInnerView() [1/2]

bool TechDrawGui::QGIView::isInnerView ( )

◆ isInnerView() [2/2]

void TechDrawGui::QGIView::isInnerView ( bool  state)

◆ isVisible() [1/2]

◆ isVisible() [2/2]

◆ itemChange()

◆ makeMark() [1/3]

void QGIView::makeMark ( Base::Vector3d  v,
QColor  c = Qt::red 
)

References makeMark().

◆ makeMark() [2/3]

◆ makeMark() [3/3]

void QGIView::makeMark ( QPointF  p,
QColor  c = Qt::red 
)

References makeMark().

◆ mouseMoveEvent()

void QGIView::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
override

◆ mousePressEvent()

void QGIView::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
override

◆ mouseReleaseEvent()

◆ onSourceChange

void QGIView::onSourceChange ( TechDraw::DrawView newParent)
virtualslot

◆ paint()

◆ removeChild()

void QGIView::removeChild ( QGIView child)
virtual

◆ rotateView()

◆ setGroupSelection()

void QGIView::setGroupSelection ( bool  b)
virtual

◆ setLocked()

void TechDrawGui::QGIView::setLocked ( bool  b)

◆ setPosition()

void QGIView::setPosition ( qreal  x,
qreal  y 
)

Methods to ensure that Y-Coordinates are orientated correctly.

References TechDraw::DrawUtil::fpCompare(), getYInClip(), and isInnerView().

Referenced by draw(), and TechDrawGui::QGIViewClip::drawClip().

◆ setSettingColor()

virtual void TechDrawGui::QGIView::setSettingColor ( QColor  c)
virtual

◆ setViewFeature()

◆ toggleCache()

void QGIView::toggleCache ( bool  state)
virtual

Reimplemented in TechDrawGui::QGIViewPart.

◆ type()

◆ updateView()

void QGIView::updateView ( bool  update = false)
virtual

Reimplemented in TechDrawGui::QGILeaderLine, TechDrawGui::QGIProjGroup, TechDrawGui::QGIRichAnno, TechDrawGui::QGIViewAnnotation, TechDrawGui::QGIViewBalloon, TechDrawGui::QGIViewClip, TechDrawGui::QGIViewCollection, TechDrawGui::QGIViewDimension, TechDrawGui::QGIViewImage, TechDrawGui::QGIViewPart, TechDrawGui::QGIViewSection, TechDrawGui::QGIViewSymbol, and TechDrawGui::QGIWeldSymbol.

References draw(), TechDraw::DrawUtil::fpCompare(), App::PropertyQuantity::getValue(), getViewObject(), TechDraw::DrawView::isLocked(), rotateView(), and TechDraw::DrawView::Rotation.

Referenced by TechDrawGui::MDIViewPage::clearSceneSelection(), TechDrawGui::ViewProviderBalloon::onChanged(), TechDrawGui::ViewProviderDimension::onChanged(), TechDrawGui::ViewProviderLeader::onChanged(), TechDrawGui::ViewProviderRichAnno::onChanged(), TechDrawGui::ViewProviderWeld::onChanged(), TechDrawGui::ViewProviderImage::onChanged(), TechDrawGui::ViewProviderViewPart::onChanged(), TechDrawGui::ViewProviderDrawingView::onChanged(), TechDrawGui::ViewProviderDrawingView::onGuiRepaint(), TechDrawGui::QGSPage::refreshViews(), TechDrawGui::ViewProviderAnnotation::updateData(), TechDrawGui::ViewProviderBalloon::updateData(), TechDrawGui::ViewProviderDimension::updateData(), TechDrawGui::ViewProviderGeomHatch::updateGraphic(), TechDrawGui::ViewProviderViewSection::updateGraphic(), TechDrawGui::QGIViewAnnotation::updateView(), TechDrawGui::QGIViewClip::updateView(), TechDrawGui::QGIViewCollection::updateView(), TechDrawGui::QGIViewImage::updateView(), TechDrawGui::QGIViewPart::updateView(), TechDrawGui::QGIViewSection::updateView(), and TechDrawGui::QGIViewSymbol::updateView().

Member Data Documentation

◆ alignHash

QHash<QString, QGraphicsItem*> TechDrawGui::QGIView::alignHash
protected

Referenced by alignTo(), and itemChange().

◆ DefaultFontSizeInMM

const double QGIView::DefaultFontSizeInMM = 5.0
static

◆ m_border

QGCustomBorder* TechDrawGui::QGIView::m_border
protected

◆ m_brush

QBrush TechDrawGui::QGIView::m_brush
protected

◆ m_caption

QGICaption* TechDrawGui::QGIView::m_caption
protected

Referenced by drawCaption(), and QGIView().

◆ m_colCurrent

◆ m_colNormal

◆ m_colPre

QColor TechDrawGui::QGIView::m_colPre
protected

◆ m_colSel

QColor TechDrawGui::QGIView::m_colSel
protected

◆ m_colSetting

QColor TechDrawGui::QGIView::m_colSetting
protected

◆ m_decorPen

QPen TechDrawGui::QGIView::m_decorPen
protected

Referenced by drawBorder(), and QGIView().

◆ m_dragState

int TechDrawGui::QGIView::m_dragState
protected

◆ m_font

◆ m_innerView

bool TechDrawGui::QGIView::m_innerView
protected

◆ m_label

QGCustomLabel* TechDrawGui::QGIView::m_label
protected

◆ m_lock

QGCustomImage* TechDrawGui::QGIView::m_lock
protected

Referenced by drawBorder(), and QGIView().

◆ m_locked

bool TechDrawGui::QGIView::m_locked
protected

Referenced by itemChange(), and mouseReleaseEvent().

◆ m_lockHeight

double TechDrawGui::QGIView::m_lockHeight
protected

Referenced by drawBorder(), and QGIView().

◆ m_lockWidth

double TechDrawGui::QGIView::m_lockWidth
protected

Referenced by QGIView().

◆ m_pen

QPen TechDrawGui::QGIView::m_pen
protected

Referenced by QGIView().

◆ signalSelectPoint

boost::signals2::signal<void (QGIView*, QPointF)> TechDrawGui::QGIView::signalSelectPoint

Referenced by mousePressEvent(), and ~QGIView().

◆ viewName

◆ viewObj

TechDraw::DrawView* TechDrawGui::QGIView::viewObj
protected

Referenced by getViewObject(), and setViewFeature().


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