TechDrawGui::TemplateTextField Class Reference

QGraphicsRectItem-derived class for the text fields in title blocks. More...

#include <TemplateTextField.h>

Public Types

enum  { Type = QGraphicsItem::UserType + 160 }
 

Public Member Functions

std::string fieldName () const
 Returns the field name that this TemplateTextField represents. More...
 
 TemplateTextField (QGraphicsItem *parent, TechDraw::DrawTemplate *myTmplte, const std::string &myFieldName)
 
int type () const
 
virtual ~TemplateTextField ()=default
 

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Need this to properly handle mouse release. More...
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 Trigger the dialog for editing template text. More...
 

Protected Attributes

std::string fieldNameStr
 
TechDraw::DrawTemplatetmplte
 

Detailed Description

QGraphicsRectItem-derived class for the text fields in title blocks.

Makes an area on the drawing that's clickable, so appropriate Properties of the template can be modified.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Type 

Constructor & Destructor Documentation

◆ TemplateTextField()

TemplateTextField::TemplateTextField ( QGraphicsItem *  parent,
TechDraw::DrawTemplate myTmplte,
const std::string &  myFieldName 
)

◆ ~TemplateTextField()

virtual TechDrawGui::TemplateTextField::~TemplateTextField ( )
virtualdefault

Member Function Documentation

◆ fieldName()

std::string TechDrawGui::TemplateTextField::fieldName ( ) const

Returns the field name that this TemplateTextField represents.

◆ mousePressEvent()

void TemplateTextField::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Need this to properly handle mouse release.

References tmplte.

◆ mouseReleaseEvent()

void TemplateTextField::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

◆ type()

int TechDrawGui::TemplateTextField::type ( void  ) const

Member Data Documentation

◆ fieldNameStr

std::string TechDrawGui::TemplateTextField::fieldNameStr
protected

Referenced by mouseReleaseEvent().

◆ tmplte

TechDraw::DrawTemplate* TechDrawGui::TemplateTextField::tmplte
protected

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