MCPcopy Create free account
hub / github.com/IgKh/katvan / toggleTextBlockDirection

Method toggleTextBlockDirection

core/katvan_editor.cpp:426–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426void Editor::toggleTextBlockDirection()
427{
428 QTextBlock currentBlock = textCursor().block();
429 Qt::LayoutDirection currentDirection = currentBlock.layout()->textOption().textDirection();
430 if (currentDirection == Qt::LeftToRight) {
431 setTextBlockDirection(Qt::RightToLeft);
432 }
433 else {
434 setTextBlockDirection(Qt::LeftToRight);
435 }
436}
437
438void Editor::setTextBlockDirection(Qt::LayoutDirection dir)
439{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected