10 : qLineEdit(new QLineEdit)
12 qLineEdit->setProperty(
"type",
"nlmItem");
17 QObject::connect(qLineEdit, &QLineEdit::editingFinished, cb);
22 QObject::connect(qLineEdit, &QLineEdit::textEdited, cb);
30 void init(
const QString& placeholderText, QValidator* qValidator)
override
32 qLineEdit->setFrame(
false);
33 qLineEdit->setAlignment(Qt::AlignHCenter);
34 qLineEdit->setPlaceholderText(placeholderText);
35 if (qValidator !=
nullptr) {
36 qLineEdit->setValidator(qValidator);
42 qLineEdit->setPlaceholderText(placeholderText);
47 qLineEdit->setDisabled(state);
52 return qLineEdit->text().length();
57 return qLineEdit->text();
60 void setText(
const QString& text)
override
64 qLineEdit->insert(text);
Definition lineeditinterface.h:8
std::function< void()> textChanged_t
Definition lineeditinterface.h:13
Definition nlmlineedit.h:7
NLMLineEdit()
Definition nlmlineedit.h:9
const QString getText() override
Definition nlmlineedit.h:55
int getTextLength() override
Definition nlmlineedit.h:50
QWidget * mainWidget() override
Definition nlmlineedit.h:25
void init(const QString &placeholderText, QValidator *qValidator) override
Definition nlmlineedit.h:30
void editingFinishedCbk(const textChanged_t &cb) override
Definition nlmlineedit.h:15
void textChangedCbk(const textChanged_t &cb) override
Definition nlmlineedit.h:20
void setText(const QString &text) override
Definition nlmlineedit.h:60
void setPlaceholderText(const QString &placeholderText) override
Definition nlmlineedit.h:40
void setDisabled(bool state) override
Definition nlmlineedit.h:45