Siemens SINUMERIK 840DE sl Commissioning Manual page 1199

Basesoftware and operating software
Hide thumbs Also See for SINUMERIK 840DE sl:
Table of Contents

Advertisement

Example
Custom widget class declaration:
class SLESTESTCUSTOMWIDGET_EXPORT SlEsTestCustomWidget
{
...
Dialog box configuration:
DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
DEF MyStringVar1 = (S)
DEF MyRealVar = (R)
PRESS(VS3)
8)
END_PRESS
Note
The custom widget must implement the "serialize" method. Here, you have the option of writing
the internal data of a custom widget
to a specified file, or restoring it again. This is especially necessary, if, with the "Run
MyScreens" screen open, you change to another operating area and then return again.
Otherwise, internal data are lost when redisplaying.
Syntax:
Description:
Parameter:
Example
bool SlEsTestCustomWidget::serialize(const QString& szFilePath, bool bIsStoring)
{
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1
Q_OBJECT
public slots:
void myFunc1(int nValue, const QString& szString, double dValue);
REG[9] = CallCWMethod("MyCWVar1", "myFunc1", 1+7, MyStringVar1, sin(MyRealVar) –
public slots:
bool serialize(const QString& szFilePath, bool bIsStoring);
Reading and writing internal data and states to and from a file
szFilePath
bIsStoring
QFileInfo fi(szFilePath);
bool bReturn = false;
QDir dir;
if (dir.mkpath(fi.canonicalPath()))
{
: public QWidget
Name of the file with complete path data, in which the
internal data and states of the custom widget are written
to – or from which they are to be read.
If necessary, the file must create the custom widget itself.
TRUE = write
FALSE = read
Graphic and logic elements
7.4 Custom widgets
213

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840d sl

Table of Contents