1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
15 #include <fc_config.h>
19 #include <QApplication>
20 #include <QHBoxLayout>
21 #include <QHeaderView>
23 #include <QMainWindow>
24 #include <QPushButton>
25 #include <QTableWidget>
26 #include <QVBoxLayout>
37 #include "mpgui_qt_worker.h"
39 /**************************************************************************
41 **************************************************************************/
42 void mpqt_worker::run()
46 errmsg
= download_modpack(URL
.toUtf8().data(),
47 fcmp
, msg_callback
, pb_callback
);
49 if (errmsg
!= nullptr) {
52 msg_callback(_("Ready"));
55 gui
->refresh_list_versions_thr();
58 /**************************************************************************
59 Start thread to download and install given modpack.
60 **************************************************************************/
61 void mpqt_worker::download(QString URL_in
, class mpgui
*gui_in
,
62 struct fcmp_params
*fcmp_in
,
63 dl_msg_callback msg_callback_in
,
64 dl_pb_callback pb_callback_in
)
69 msg_callback
= msg_callback_in
;
70 pb_callback
= pb_callback_in
;