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

Method setAlignment

Gui/NodeGui.cpp:3314–3327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3312}
3313
3314void
3315TextItem::setAlignment(Qt::Alignment alignment)
3316{
3317 _alignement = alignment;
3318 QTextBlockFormat format;
3319 format.setAlignment(alignment);
3320 QTextCursor cursor = textCursor(); // save cursor position
3321 int position = textCursor().position();
3322 cursor.select(QTextCursor::Document);
3323 cursor.mergeBlockFormat(format);
3324 cursor.clearSelection();
3325 cursor.setPosition(position); // restore cursor position
3326 setTextCursor(cursor);
3327}
3328
3329int
3330TextItem::type() const

Callers 4

ViewerTabMethod · 0.80
onDoDialogMethod · 0.80
findKnobGuiOrCreateMethod · 0.80
initMethod · 0.80

Calls 3

selectMethod · 0.45
clearSelectionMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected