MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / initLabel

Method initLabel

Gui/Edge.cpp:140–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void
141EdgePrivate::initLabel()
142{
143 NodeGuiPtr dst = dest.lock();
144
145 if ( (inputNb != -1) && dst ) {
146 label = new NodeGraphSimpleTextItem(dst->getDagGui(), _publicInterface, false);
147 label->setText( QString::fromUtf8( dst->getNode()->getInputLabel(inputNb).c_str() ) );
148 QColor txt;
149 double r, g, b;
150 appPTR->getCurrentSettings()->getTextColor(&r, &g, &b);
151 txt.setRgbF( Image::clamp(r, 0., 1.), Image::clamp(g, 0., 1.), Image::clamp(b, 0., 1.) );
152 label->setBrush(txt);
153 QFont f = qApp->font();
154 bool antialias = appPTR->getCurrentSettings()->isNodeGraphAntiAliasingEnabled();
155 if (!antialias) {
156 f.setStyleStrategy(QFont::NoAntialias);
157 }
158 label->setFont(f);
159 //_imp->label->setDefaultTextColor( QColor(200,200,200) );
160 }
161}
162
163Edge::Edge(const NodeGuiPtr & src,
164 QGraphicsItem *parent)

Callers 2

EdgeMethod · 0.80

Calls 10

clampFunction · 0.85
getDagGuiMethod · 0.80
getTextColorMethod · 0.80
getCurrentSettingsMethod · 0.80
setFontMethod · 0.80
lockMethod · 0.45
setTextMethod · 0.45
getInputLabelMethod · 0.45
getNodeMethod · 0.45

Tested by

no test coverage detected