MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / update

Method update

source/ui/MsgViewUi.cpp:116–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 {
115 item = new QTableWidgetItem(lang_trans("错误"));
116 item->setTextAlignment(Qt::AlignCenter);
117 ui.line->setItem(pos, _col_level, item);
118 } break;
119 default:
120 {
121 item = new QTableWidgetItem(lang_trans("消息"));
122 item->setTextAlignment(Qt::AlignCenter);
123 ui.line->setItem(pos, _col_level, item);
124 } break;
125 }
126
127 item = new QTableWidgetItem(info.macro);
128 item->setTextAlignment(Qt::AlignCenter);
129 ui.line->setItem(pos, _col_macro, item);
130
131 item = new QTableWidgetItem(info.text);
132 item->setTextAlignment(Qt::AlignCenter);
133 ui.line->setItem(pos, _col_text, item);
134
135 ui.line->scrollToBottom();
136 if (!isUpdate && infos.size() > max_row) update();
137}
138
139void MsgViewUi::update()
140{
141 ui.line->setRowCount(0);
142 size_t count = infos.size();
143 size_t count_new = count >> 1;
144 if (count > max_row)
145 {
146 for (size_t i = 0; i < 3; i++)
147 {

Callers

nothing calls this directly

Calls 3

setRowCountMethod · 0.80
sizeMethod · 0.45
remove_of_findMethod · 0.45

Tested by

no test coverage detected