| 90 | } |
| 91 | |
| 92 | void HTMLViewWidget::refresh() { |
| 93 | QString HTML; |
| 94 | if (C->Kind_Get() == Core::Kind_Graph_Svg) |
| 95 | HTML = generateGraphHTML(); |
| 96 | else |
| 97 | HTML = wstring2QString(C->Inform_Get()); |
| 98 | |
| 99 | if (HTML.toUtf8().size() < 0.5e6) |
| 100 | webView->setHtml(HTML); |
| 101 | else { |
| 102 | if (!tempFile.open()) |
| 103 | return; |
| 104 | tempFile.resize(0); |
| 105 | tempFile.write(HTML.toUtf8()); |
| 106 | webView->load(QUrl::fromLocalFile(tempFile.fileName())); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | void HTMLViewWidget::changeFilePos(int newFilePos) { |
| 111 | FilePos = newFilePos; |
nothing calls this directly
no test coverage detected