Elementos gráficos y lógicos
7.4 Widgets personalizados
#define SL_ES_FCT_NAME(PLUGIN) sl_es_create_ ##PLUGIN
#define SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( IMPLEMENTATION , PARAM) \
{ \
IMPLEMENTATION *i = new PARAM; \
return i; \
}
#ifdef Q_WS_WIN
# ifdef Q_CC_BOR
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C __declspec(dllexport) void* \
__stdcall SL_ES_FCT_NAME(PLUGIN) (QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
# else
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C __declspec(dllexport) void* SL_ES_FCT_NAME(PLUGIN) \
(QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
# endif
#else
# define EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(PLUGIN,PARAM) \
Q_EXTERN_C void* SL_ES_FCT_NAME(PLUGIN) (QWidget* pParent) \
SL_ES_CUSTOM_WIDGET_PLUGIN_INSTANTIATE( PLUGIN,PARAM )
#endif
#define WIDGET_CLASS_EXPORT(CLASSNAME) \
EXPORT_SL_ES_CUSTOM_WIDGET_PLUGIN(CLASSNAME,CLASSNAME(pParent))
///////////////////////////////////////////////////////////////////////////
// FOR OEM USER - please declare here your widget classes for export
///////////////////////////////////////////////////////////////////////////
WIDGET_CLASS_EXPORT(SlEsTestCustomWidget)
152
SINUMERIK Integrate Run MyScreens (BE2)
Manual de programación, 03/2013, 6FC5397-1DP40-3EA1