MCPcopy Create free account
hub / github.com/KDE/okular / FormLineEdit

Method FormLineEdit

part/formwidgets.cpp:538–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538FormLineEdit::FormLineEdit(Okular::FormFieldText *text, PageView *pageView)
539 : QLineEdit(pageView->viewport())
540 , FormWidgetIface(this, text)
541{
542 int maxlen = text->maximumLength();
543 if (maxlen >= 0) {
544 setMaxLength(maxlen);
545 }
546 setAlignment(text->textAlignment());
547 setText(text->text());
548 if (text->isPassword()) {
549 setEchoMode(QLineEdit::Password);
550 }
551
552 m_prevCursorPos = cursorPosition();
553 m_prevAnchorPos = cursorPosition();
554 m_editing = false;
555
556 connect(this, &QLineEdit::textEdited, this, &FormLineEdit::slotChanged);
557 connect(this, &QLineEdit::cursorPositionChanged, this, &FormLineEdit::slotChanged);
558
559 setVisible(text->isVisible());
560}
561
562void FormLineEdit::setFormWidgetsController(FormWidgetsController *controller)
563{

Callers

nothing calls this directly

Calls 5

maximumLengthMethod · 0.45
textAlignmentMethod · 0.45
textMethod · 0.45
isPasswordMethod · 0.45
isVisibleMethod · 0.45

Tested by

no test coverage detected