本文整理汇总了C++中Messages::size方法的典型用法代码示例。如果您正苦于以下问题:C++ Messages::size方法的具体用法?C++ Messages::size怎么用?C++ Messages::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Messages
的用法示例。
在下文中一共展示了Messages::size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: transformRequestFinished
void MemoryPacketModel::transformRequestFinished(QList<QByteArray> dataList, Messages messages)
{
quintptr senderID = (quintptr)sender();
if (transformRequests.contains(senderID)) {
QPair<int,int> target = transformRequests.take(senderID);
if (target.second > lastPredefinedColumn && target.second < columnNames.size()) {
int size = dataList.size();
if (size > packetsList.size() - target.first) {
qWarning() << tr("[MemoryPacketModel::transformRequestFinished] data set size (%1) is too big")
.arg(dataList.size());
size = packetsList.size() - target.first; // reducing the saice
}
QString colName = columnNames.at(target.second);
OutputFormat format = userColumnsDef.value(colName).format;
int j = 0;
for (int i = target.first; i < target.first + size; i++) {
Packet * pa = packetsList.at(i);
QString data = QString::fromUtf8((format == Pip3lineConst::TEXTFORMAT) ? dataList.at(j) : dataList.at(j).toHex());
pa->setAdditionalField(colName, data);
j++;
}
emit dataChanged(createIndex(target.first, target.second), createIndex(target.first + size - 1, target.second));
// loggin error messages
for (int i = 0; i < messages.size(); i++) {
emit log(messages.at(i).message,messages.at(i).source, messages.at(i).level);
}
} else {
qCritical() << tr("[MemoryPacketModel::transformRequestFinished] Can't find the column %1 T_T").arg(target.second);
}
} else {
qCritical() << tr("[MemoryPacketModel::transformRequestFinished] Can't find the request id T_T");
}
emit readOnlyStateChanged(false);
}