예제 #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();
}
예제 #2
0
bool JsRoboKey::onClipboardChange(const QJSValue &callback)
{
    JSCallback* pcallback = new JSRClipboardChange(app()->jsengine(), callback);
    m_callbacks.push_back(pcallback);
    return pcallback->exec();
}
예제 #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();
}