diff options
Diffstat (limited to 'src/javascriptInterface.cpp')
| -rw-r--r-- | src/javascriptInterface.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/javascriptInterface.cpp b/src/javascriptInterface.cpp index 399f863..c4dd61b 100644 --- a/src/javascriptInterface.cpp +++ b/src/javascriptInterface.cpp @@ -33,10 +33,16 @@ void javascriptInterface::startDownload(QString filename) emit requestFile(filename); } //------------------------------------------------------------------------------------------------------- -void javascriptInterface::updateProgressBar(int percent, double speed) +void javascriptInterface::downloadInfo(QString filename, double filesize) +{ + QString code = QString("downloadInfo('\%1', \%2)").arg(filename).arg(filesize); + _parent->evaluateJavaScript(code); +} +//------------------------------------------------------------------------------------------------------- +void javascriptInterface::updateProgressBar(int percent, double speed, QString unit) { if (percent == 0) return; - QString code = QString("updateProgress('\%1', \%2)").arg(percent).arg(speed); + QString code = QString("updateProgress(\%1, \%2, '\%3')").arg(percent).arg(speed).arg(unit); if (debug) qDebug() << "To JS: " << code; _parent->evaluateJavaScript(code); } |
