EasyManuals Logo

Siemens SINUMERIK ONE MCP 2400.4c Commissioning Manual

Siemens SINUMERIK ONE MCP 2400.4c
1734 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1199 background imageLoading...
Page #1199 background image
Example
Custom widget class declaration:
class SLESTESTCUSTOMWIDGET_EXPORT SlEsTestCustomWidget : public QWidget
{
Q_OBJECT
public slots:
void myFunc1(int nValue, const QString& szString, double dValue);
...
Dialog box configuration:
DEF MyCWVar1 = (W///,"slestestcustomwidget.SlEsTestCustomWidget")
DEF MyStringVar1 = (S)
DEF MyRealVar = (R)
PRESS(VS3)
REG[9] = CallCWMethod("MyCWVar1", "myFunc1", 1+7, MyStringVar1, sin(MyRealVar) –
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: public slots:
bool serialize(const QString& szFilePath, bool bIsStoring);
Description: Reading and writing internal data and states to and from a file
Parameter:
szFilePath 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.
bIsStoring TRUE = write
FALSE = read
Example
bool SlEsTestCustomWidget::serialize(const QString& szFilePath, bool bIsStoring)
{
QFileInfo fi(szFilePath);
bool bReturn = false;
QDir dir;
if (dir.mkpath(fi.canonicalPath()))
{
Graphic and logic elements
7.4 Custom widgets
SINUMERIK Integrate Run MyScreens (BE2)
Programming Manual, 12/2017, 6FC5397-1DP40-6BA1 213

Table of Contents

Other manuals for Siemens SINUMERIK ONE MCP 2400.4c

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SINUMERIK ONE MCP 2400.4c and is the answer not in the manual?

Siemens SINUMERIK ONE MCP 2400.4c Specifications

General IconGeneral
BrandSiemens
ModelSINUMERIK ONE MCP 2400.4c
CategoryControl Systems
LanguageEnglish

Related product manuals