MCPcopy Create free account
hub / github.com/cc20110101/RedisView / valueChanged

Method valueChanged

src/RedisView/AppView/DataView.cpp:483–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483void DataView::valueChanged(ValueTableItem *item, int column) {
484 _cmdMsg.init();
485 _cmdMsg._dbIndex = _dbIndex;
486 _cmdMsg._clientIndex = _clientIndex;
487 _cmdMsg._operate = OPERATION_ALTER;
488 _cmdMsg._type = _type;
489 _cmdMsg._key = _key;
490 if(_type == KEY_STRING) {
491 _cmdMsg._value = item->text(column);
492 if(_vCmdMsg.contains(_cmdMsg)) {
493 _vCmdMsg.removeAll(_cmdMsg);
494 }
495 } else if(_type == KEY_HASH) {
496 if(item)
497 _cmdMsg._filed = item->text();
498 else
499 return;
500 _cmdMsg._value = item->text(column);
501 if(_vCmdMsg.contains(_cmdMsg)) {
502 _vCmdMsg.removeAll(_cmdMsg);
503 }
504 } else if(_type == KEY_LIST) {
505 _cmdMsg._valueIndex = _itemTableModel->childNumber(item);
506 _cmdMsg._value = item->text(column);
507 } else {
508 return;
509 }
510
511 _vCmdMsg << _cmdMsg;
512}
513
514void DataView::clearData() {
515 _keyLineEdit->clear();

Callers

nothing calls this directly

Calls 3

initMethod · 0.45
textMethod · 0.45
childNumberMethod · 0.45

Tested by

no test coverage detected