text: /*
  
    Qt4xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 4
  
    Copyright (C) 2021 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
  
  */
  
  /*
    DO NOT EDIT THIS FILE - the content was created using a source code generator
  */
  
  #include "QWorkspaceSlots.h"
  
  QWorkspaceSlots::QWorkspaceSlots( QObject * parent ) : QObject( parent )
  {
  }
  
  QWorkspaceSlots::~QWorkspaceSlots()
  {
  }
  
  void QWorkspaceSlots::windowActivated( QWidget * w )
  {
    QObject * object = qobject_cast< QObject * >( sender() );
  
    PHB_ITEM cb = Qt4xHb::Signals_return_codeblock( object, "windowActivated(QWidget*)" );
  
    if( cb )
    {
      PHB_ITEM pSender = Qt4xHb::Signals_return_qobject( object, "QWORKSPACE" );
      PHB_ITEM pW = Qt4xHb::Signals_return_qobject( w, "QWIDGET" );
  
      hb_vmEvalBlockV( cb, 2, pSender, pW );
  
      hb_itemRelease( pSender );
      hb_itemRelease( pW );
    }
  }
  
  void QWorkspaceSlots_connect_signal( const QString & signal, const QString & slot )
  {
    QWorkspace * obj = qobject_cast< QWorkspace * >( Qt4xHb::getQObjectPointerFromSelfItem() );
  
    if( obj )
    {
      QWorkspaceSlots * s = QCoreApplication::instance()->findChild<QWorkspaceSlots *>();
  
      if( s == NULL )
      {
        s = new QWorkspaceSlots();
        s->moveToThread( QCoreApplication::instance()->thread() );
        s->setParent( QCoreApplication::instance() );
      }
  
      hb_retl( Qt4xHb::Signals_connection_disconnection( s, signal, slot ) );
    }
    else
    {
      hb_retl( false );
    }
  }
  