// OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
-#include "mainwindow.h"
//#include "ui_mainwindow.h"
#include "mainwindow.h"
#include <QtGui>
conf->setValue(QString("buttonsbefore"), QVariant("background-color: red;"));
conf->setValue(QString("buttonsafter"), QVariant("background-color: blue;"));
conf->setValue(QString("menu"), QVariant(1));
- conf->setValue(QString("download"), QVariant("http://www.nothing2do.eu/"+conf->value(QString("filebuttons")).toString()));
+ conf->setValue(QString("download"), QVariant("http://<server>/<path>/"+conf->value(QString("filebuttons")).toString()));
+ conf->setValue(QString("downloaduser"), QVariant("<user name>"));
+ conf->setValue(QString("downloadpass"), QVariant("<pass>"));
+
conf->setValue(QString("init"), QVariant("http://www.nothing2do.eu/init"));
conf->setValue(QString("userftp"), QVariant("<userftp>"));
conf->setValue(QString("hostftp"), QVariant("<hostftp>"));
void MainWindow::download(const QString & a){//keep downloaded data into m->downloadedData(). You've to connect(m, SIGNAL(downloaded()), target,SLOT(targetFunc()));
qDebug()<<"download() : "<<a;
QUrl url(a);
+ url.setUserName(conf->value(QString("downloaduser")).toString());
+ url.setPassword(conf->value(QString("downloadpass")).toString());
m = new FileDownloader(url, this);
}
void MainWindow::download(const QString & a, const QString & b){//write downloaded data from "a" into "b"
qDebug()<<"download("<<a<<") in "<<b;
d.lock();
QUrl url(a);
+ url.setUserName(conf->value(QString("downloaduser")).toString());
+ url.setPassword(conf->value(QString("downloadpass")).toString());
m = new FileDownloader(url, this);
file=b;
connect(m, SIGNAL(downloaded()), this, SLOT(writeFile()));