Structure Of The Custom Widget Interface - Siemens SINUMERIK 828D Commissioning Manual

Hide thumbs Also See for SINUMERIK 828D:
Table of Contents

Advertisement

Graphic and logic elements
7.4 Custom widgets
Programming
The class definition of the dll file should look like this:
#define SLESTESTCUSTOMWIDGET_EXPORT Q_DECL_EXPORT
class SLESTESTCUSTOMWIDGET_EXPORT SlEsTestCustomWidget
{
Q_OBJECT
....
....
}
7.4.3

Structure of the custom widget interface

Description
The library is supplemented by an interface in order to display the custom widget in the dialog.
This contains macro definitions with which "Run MyScreens" initiates the custom widget. The
interface is available in the form of a cpp file. The file name can be freely selected, e.g.:
sleswidgetfactory.cpp
Programming
The interface is defined as follows:
#include "slestestcustomwidget.h"
....
//Makros
....
WIDGET_CLASS_EXPORT(SlEsTestCustom-
Widget)
Example
Content of the file sleswidgetfactory.cpp for a custom widget with the class name
SlEsTestCustomWidget":
#include <Qt/qglobal.h>
#include "slestestcustomwidget.h"
///////////////////////////////////////////////////////////////////////////
176
: public QWidget
; The header file for the relevant custom widg-
ets is inserted at the beginning of the file
; Macro definitions are not changed
; The relevant custom widget is declared at
the end of the file
SINUMERIK Integrate Run MyScreens
Programming Manual, 10/2015, 6FC5397-3DP40-5BA3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents