Exemplo n.º 1
0
bool JsRoboKey::download(const QString &url, const QJSValue &callback_complete)
{
    JSCallback* jscb = new JSRDownload(app()->jsengine(), callback_complete, url);
    m_callbacks.push_back(jscb);
    //start the download, the callback will happen
    return jscb->exec();
}
Exemplo n.º 2
0
bool JsRoboKey::onClipboardChange(const QJSValue &callback)
{
    JSCallback* pcallback = new JSRClipboardChange(app()->jsengine(), callback);
    m_callbacks.push_back(pcallback);
    return pcallback->exec();
}
Exemplo n.º 3
0
bool JsRoboKey::addGlobalHotkey(const QString &hotkey, const QJSValue &callback)
{
    JSCallback* pcallback = new JSRGlobalHotkey(app()->jsengine(), callback, hotkey);
    m_callbacks.push_back(pcallback);
    return pcallback->exec();
}