MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / addHtml

Method addHtml

MiniZincIDE/outputwidget.cpp:317–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315}
316
317void OutputWidget::addHtml(const QString& html, const QString& messageType) {
318 TextLayoutLock lock(this);
319 auto cursor = nextInsertAt();
320 if (messageType != "trace") {
321 _lastTraceLoc = "";
322 }
323 if (messageType.isEmpty()) {
324 cursor.insertHtml(html);
325 } else {
326 addMessageType(messageType);
327 auto start = cursor.position();
328 QTextBlockFormat f;
329 f.setProperty(Property::MessageType, messageType);
330 cursor.insertHtml(html);
331 auto end = cursor.position();
332 cursor.setPosition(start);
333 while (cursor.position() < end) {
334 cursor.mergeBlockFormat(f);
335 cursor.block().setVisible(isMessageTypeVisible(messageType));
336 cursor.movePosition(QTextCursor::NextBlock);
337 }
338 }
339}
340
341void OutputWidget::addTextToSection(const QString& section, const QString& text)
342{

Callers 4

addOutputMethod · 0.80
runMethod · 0.80
on_minizincErrorMethod · 0.80
startVisualisationMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected