bool SlEsTestCustomWidget::serialize(const QString& szFilePath, bool bIsStoring)
QFile fileData(szFilePath);
QIODevice::OpenMode mode;
if (bIsStoring)
{
mode = QIODevice::WriteOnly;
}
else
{
mode = QIODevice::ReadOnly;
}
if (fileData.open(mode))
{
QDataStream streamData;
streamData.setDevice(&fileData);
if (bIsStoring)
{
streamData << m_nDataCount << m_dValueX;
}
else
{
streamData >> m_nDataCount >> m_dValueX;
}
streamData.setDevice(0);
fileData.flush();
fileData.close();
bReturn = true;
}
}
return bReturn;
}
7.4.5.3 Response to a custom widget signal
Description
In Run MyScreens it is possible to respond to a particular signal (invokeSub()) of the custom
widget and call up a subprogram (SUB).
10 global variables, the so-called SIGARG, are available for passing values (custom widget
signal -> SUB), which are comparable to registers (REG) in configuration. This is where the
values transferred with the custom widget signal are stored.
Graphic and logic elements
7.4 Custom widgets
SINUMERIK Integrate Run MyScreens (BE2)
214 Programming Manual, 12/2017, 6FC5397-1DP40-6BA1