MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / showPupopInput

Method showPupopInput

DSView/pv/dock/keywordlineedit.cpp:309–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309void 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
350void PopupLineEdit::onPopupInputEditEnd(QString text)
351{

Callers

nothing calls this directly

Calls 4

GetInputMethod · 0.80
set_number_modeMethod · 0.80
setRangeMethod · 0.80
PopupMethod · 0.80

Tested by

no test coverage detected