MCPcopy Create free account
hub / github.com/baldurk/renderdoc / captureAdded

Method captureAdded

qrenderdoc/Windows/Dialogs/LiveCapture.cpp:1138–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136}
1137
1138void LiveCapture::captureAdded(const QString &name, const NewCaptureData &newCapture)
1139{
1140 Capture *cap = new Capture();
1141
1142 cap->name = name;
1143
1144 cap->api = newCapture.api;
1145
1146 cap->timestamp =
1147 QDateTime(QDate(1970, 1, 1), QTime(0, 0, 0), Qt::UTC).addSecs(newCapture.timestamp).toLocalTime();
1148 cap->byteSize = newCapture.byteSize;
1149
1150 cap->thumb = QImage(newCapture.thumbnail.data(), newCapture.thumbWidth, newCapture.thumbHeight,
1151 newCapture.thumbWidth * 3, QImage::Format_RGB888)
1152 .copy(0, 0, newCapture.thumbWidth, newCapture.thumbHeight);
1153
1154 cap->remoteID = newCapture.captureId;
1155 cap->saved = false;
1156 cap->path = newCapture.path;
1157 cap->local = newCapture.local;
1158 cap->frameNumber = newCapture.frameNumber;
1159 cap->title = newCapture.title;
1160
1161 QListWidgetItem *item = new QListWidgetItem();
1162 item->setFlags(item->flags() | Qt::ItemIsEditable);
1163 item->setText(MakeText(cap));
1164 item->setIcon(QIcon(QPixmap::fromImage(MakeThumb(cap->thumb))));
1165 if(!newCapture.local)
1166 {
1167 QFont f = item->font();
1168 f.setItalic(true);
1169 item->setFont(f);
1170 }
1171
1172 AddCapture(item, cap);
1173
1174 ui->captures->addItem(item);
1175}
1176
1177void LiveCapture::connectionClosed()
1178{

Callers

nothing calls this directly

Calls 15

fromImageFunction · 0.85
setFlagsMethod · 0.80
QDateTimeClass · 0.50
QDateClass · 0.50
QTimeClass · 0.50
QImageFunction · 0.50
QIconFunction · 0.50
copyMethod · 0.45
dataMethod · 0.45
flagsMethod · 0.45
setTextMethod · 0.45
setIconMethod · 0.45

Tested by

no test coverage detected