| 307 | } |
| 308 | |
| 309 | void PopupLineEdit::showPupopInput() |
| 310 | { |
| 311 | #ifdef _WIN32 |
| 312 | PopupLineEditInput *input = new PopupLineEditInput(this); |
| 313 | auto line = input->GetInput(); |
| 314 | |
| 315 | QString mask = this->inputMask(); |
| 316 | if (mask != ""){ |
| 317 | line->setInputMask(mask); |
| 318 | } |
| 319 | |
| 320 | line->setMaxLength(this->maxLength()); |
| 321 | line->setText(this->text()); |
| 322 | line->setFont(this->font()); |
| 323 | line->set_number_mode(_is_number_mode); |
| 324 | |
| 325 | if (_is_number_mode){ |
| 326 | if (_max != 0 || _min != 0){ |
| 327 | line->setRange(_min, _max); |
| 328 | } |
| 329 | } |
| 330 | else{ |
| 331 | auto regular = this->validator(); |
| 332 | if (regular != NULL){ |
| 333 | line->setValidator(regular); |
| 334 | } |
| 335 | } |
| 336 | |
| 337 | _old_text = this->text(); |
| 338 | _popup_input = input; |
| 339 | |
| 340 | connect(input, SIGNAL(sig_inputEnd(QString)), this, SLOT(onPopupInputEditEnd(QString))); |
| 341 | |
| 342 | if (_is_number_mode){ |
| 343 | connect(line, SIGNAL(valueChanged(int)), this, SLOT(onPopupInputValueChanged(int))); |
| 344 | } |
| 345 | |
| 346 | input->Popup(this); |
| 347 | #endif |
| 348 | } |
| 349 | |
| 350 | void PopupLineEdit::onPopupInputEditEnd(QString text) |
| 351 | { |
nothing calls this directly
no test coverage detected