MCPcopy Create free account
hub / github.com/c3d/tao3D / checkEditorInstructionsFile

Method checkEditorInstructionsFile

tao/widget.cpp:4707–4743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4705
4706
4707void Widget::checkEditorInstructionsFile()
4708// ----------------------------------------------------------------------------
4709// Check if the Tao editor left instructions for us
4710// ----------------------------------------------------------------------------
4711{
4712 QString instrsFile = +xlProgram->name + ".tao-instrs";
4713 QFileInfo instrsInfo(instrsFile);
4714 if (instrsInfo.exists())
4715 {
4716 QFile file(instrsInfo.absoluteFilePath());
4717 file.open(QIODevice::ReadOnly);
4718 QTextStream textStream(&file);
4719 textStream.setAutoDetectUnicode(true);
4720 text data = +textStream.readAll();
4721 file.close();
4722 file.remove();
4723
4724 unsigned pnum = 0, pid = 0;
4725 if (sscanf(data.c_str(), "page %u id %u", &pnum, &pid) == 2)
4726 {
4727 if (pnum)
4728 {
4729 pnum--;
4730 if (pnum < pageNames.size())
4731 {
4732 gotoPageName = pageNames[pnum];
4733 QString previewScreenShot = QString("%1-preview-%2.png")
4734 .arg(+xlProgram->name).arg(pid);
4735 savePreviewThread.setMaxSize(800, 600);
4736 savePreviewThread.setInterval(533);
4737 savePreviewThread.setPath(previewScreenShot);
4738 refresh(0);
4739 }
4740 }
4741 }
4742 }
4743}
4744
4745
4746void Widget::preloadSelectionCode()

Callers

nothing calls this directly

Calls 7

closeMethod · 0.80
removeMethod · 0.80
setMaxSizeMethod · 0.80
setIntervalMethod · 0.80
setPathMethod · 0.80
openMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected