QElectroTech  0.70
Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
autonum::AssignVariables Class Reference

The AssignVariables class This class assign variable of a formula string. Return the final string used to be displayed from a formula string. More...

#include <assignvariables.h>

Static Public Member Functions

static QString formulaToLabel (QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt=nullptr)
 AssignVariables::formulaToLabel Return the with variable assigned (ready to be displayed) More...
 
static QString replaceVariable (const QString &formula, const DiagramContext &dc)
 AssignVariables::replaceVariable Replace the variables in in form %{my-var} to the corresponding value stored in . More...
 

Private Member Functions

 AssignVariables (const QString &formula, const sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt=nullptr)
 
void assignTitleBlockVar ()
 
void assignProjectVar ()
 
void assignSequence ()
 

Private Attributes

Diagramm_diagram = nullptr
 
QString m_arg_formula
 
QString m_assigned_label
 
sequentialNumbers m_seq_struct
 
const Elementm_element = nullptr
 

Detailed Description

The AssignVariables class This class assign variable of a formula string. Return the final string used to be displayed from a formula string.

Definition at line 62 of file assignvariables.h.

Constructor & Destructor Documentation

◆ AssignVariables()

autonum::AssignVariables::AssignVariables ( const QString &  formula,
const sequentialNumbers seqStruct,
Diagram diagram,
const Element elmt = nullptr 
)
private

Member Function Documentation

◆ assignProjectVar()

void autonum::AssignVariables::assignProjectVar ( )
private

◆ assignSequence()

void autonum::AssignVariables::assignSequence ( )
private

◆ assignTitleBlockVar()

void autonum::AssignVariables::assignTitleBlockVar ( )
private

◆ formulaToLabel()

QString autonum::AssignVariables::formulaToLabel ( QString  formula,
sequentialNumbers seqStruct,
Diagram diagram,
const Element elmt = nullptr 
)
static

AssignVariables::formulaToLabel Return the with variable assigned (ready to be displayed)

Parameters
formula- the formula to work
seqStruct- struct where is stocked int values (struct is passed as a reference and modified by this static method)
diagram- the diagram where occure the formula.
elmt- parent element (if any) of the formula
Returns
the string with variable assigned.

Definition at line 163 of file assignvariables.cpp.

References m_assigned_label, and m_seq_struct.

Referenced by CrossRefItem::AddExtraInfo(), LinkSingleElementWidget::buildTree(), DynamicElementTextItem::elementInfoChanged(), CrossRefItem::elementPositionText(), nomenclature::getElementInfo(), ConductorAutoNumerotation::numerateNewConductor(), Conductor::refreshText(), DynamicElementTextItem::reportReplacedCompositeText(), Conductor::setProperties(), Element::setUpFormula(), DynamicElementTextItem::updateLabel(), DynamicElementTextItem::updateReportText(), ProjectView::updateTabTitle(), MasterPropertiesWidget::updateUi(), ElementTextItemGroup::updateXref(), and DynamicElementTextItem::updateXref().

◆ replaceVariable()

QString autonum::AssignVariables::replaceVariable ( const QString &  formula,
const DiagramContext dc 
)
static

Member Data Documentation

◆ m_arg_formula

QString autonum::AssignVariables::m_arg_formula
private

Definition at line 75 of file assignvariables.h.

◆ m_assigned_label

QString autonum::AssignVariables::m_assigned_label
private

◆ m_diagram

Diagram* autonum::AssignVariables::m_diagram = nullptr
private

Definition at line 74 of file assignvariables.h.

Referenced by assignProjectVar(), assignTitleBlockVar(), and AssignVariables().

◆ m_element

const Element* autonum::AssignVariables::m_element = nullptr
private

Definition at line 78 of file assignvariables.h.

Referenced by AssignVariables().

◆ m_seq_struct

sequentialNumbers autonum::AssignVariables::m_seq_struct
private

Definition at line 77 of file assignvariables.h.

Referenced by assignSequence(), and formulaToLabel().


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