| 138 | } |
| 139 | |
| 140 | void |
| 141 | EdgePrivate::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 | |
| 163 | Edge::Edge(const NodeGuiPtr & src, |
| 164 | QGraphicsItem *parent) |
no test coverage detected