BtDelegateInquiry::~BtDelegateInquiry()
{
    BOstraceFunctionEntry1( DUMMY_DEVLIST, this );
    if (isExecuting()) {
        deviceModel()->cancelSearchDevice();
    }
    BOstraceFunctionExit0( DUMMY_DEVLIST );
}
/**
 * A custom event handler, which in this case monitors for ScriptChangeEvent signals
 * @param event :: The custome event
 */
void MultiTabScriptInterpreter::customEvent(QEvent *event)
{
  if( !isExecuting() && event->type() == SCRIPTING_CHANGE_EVENT )
  {
    ScriptingChangeEvent *sce = static_cast<ScriptingChangeEvent*>(event);
    // This handles reference counting of the scripting environment
    Scripted::scriptingChangeEvent(sce);
  }
}
void BtDelegateInquiry::exec( const QVariant& params )
{
    BOstraceFunctionEntry1( DUMMY_DEVLIST, this );
    Q_UNUSED(params);
    BTUI_ASSERT_X(!isExecuting(), "BtDelegateInquiry::exec", "operation ongoing!");
    bool ok(false);
    
    setExecuting(true);
    // Inquiry needs BT to be on.
    if(!isBtPowerOn()) {
        mPowerDelegate = new BtDelegatePower(settingModel(), deviceModel(), this);
        ok = connect(
                mPowerDelegate, SIGNAL(delegateCompleted(int,BtAbstractDelegate*)), 
            this, SLOT(handleManagePowerCompleted(int)));
        if (ok ) {
            mPowerDelegate->exec(QVariant(BtPowerOn));
        }
    } else {
Exemple #4
0
/// Request that this script be aborted
void Script::abort() {
  if (isExecuting())
    this->abortImpl();
}