Freeciv21
Develop your civilization from humble roots to a global empire
mpgui_qt.cpp File Reference
#include <fc_config.h>
#include <QApplication>
#include <QCloseEvent>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
#include <QLineEdit>
#include <QMainWindow>
#include <QMessageBox>
#include <QProgressBar>
#include <QPushButton>
#include <QTableWidget>
#include "fcintl.h"
#include "version.h"
#include "download.h"
#include "modinst.h"
#include "mpcmdline.h"
#include "mpdb.h"
#include "mpgui_qt_worker.h"
#include "mpgui_qt.h"
+ Include dependency graph for mpgui_qt.cpp:

Go to the source code of this file.

Macros

#define ML_COL_NAME   0
 
#define ML_COL_VER   1
 
#define ML_COL_INST   2
 
#define ML_COL_TYPE   3
 
#define ML_COL_SUBTYPE   4
 
#define ML_COL_LIC   5
 
#define ML_COL_URL   6
 
#define ML_TYPE   7
 
#define ML_COL_COUNT   8
 
#define URL_LABEL_TEXT   N_("Modpack URL")
 

Functions

static void setup_modpack_list (const QString &name, const QUrl &url, const QString &version, const QString &license, enum modpack_type type, const QString &subtype, const QString &notes)
 Build main modpack list view. More...
 
static void msg_callback (const QString &msg)
 Progress indications from downloader. More...
 
static void msg_callback_thr (const QString &msg)
 Progress indications from downloader thread. More...
 
static void progress_callback_thr (int downloaded, int max)
 Progress indications from downloader. More...
 
static void gui_download_modpack (const QString &URL)
 Download modpack from given URL. More...
 
int main (int argc, char **argv)
 Entry point for whole freeciv-mp-qt program. More...
 

Variables

struct fcmp_params fcmp
 
static mpguigui
 
static mpqt_workerworker = nullptr
 
static int mpcount = 0
 

Macro Definition Documentation

◆ ML_COL_COUNT

#define ML_COL_COUNT   8

Definition at line 63 of file mpgui_qt.cpp.

◆ ML_COL_INST

#define ML_COL_INST   2

Definition at line 55 of file mpgui_qt.cpp.

◆ ML_COL_LIC

#define ML_COL_LIC   5

Definition at line 58 of file mpgui_qt.cpp.

◆ ML_COL_NAME

#define ML_COL_NAME   0

Definition at line 53 of file mpgui_qt.cpp.

◆ ML_COL_SUBTYPE

#define ML_COL_SUBTYPE   4

Definition at line 57 of file mpgui_qt.cpp.

◆ ML_COL_TYPE

#define ML_COL_TYPE   3

Definition at line 56 of file mpgui_qt.cpp.

◆ ML_COL_URL

#define ML_COL_URL   6

Definition at line 59 of file mpgui_qt.cpp.

◆ ML_COL_VER

#define ML_COL_VER   1

Definition at line 54 of file mpgui_qt.cpp.

◆ ML_TYPE

#define ML_TYPE   7

Definition at line 61 of file mpgui_qt.cpp.

◆ URL_LABEL_TEXT

#define URL_LABEL_TEXT   N_("Modpack URL")

Function Documentation

◆ gui_download_modpack()

static void gui_download_modpack ( const QString &  url)
static

Download modpack from given URL.

Definition at line 282 of file mpgui_qt.cpp.

Referenced by mpgui::URL_given().

◆ main()

int main ( int  argc,
char **  argv 
)

Entry point for whole freeciv-mp-qt program.

Definition at line 79 of file mpgui_qt.cpp.

◆ msg_callback()

static void msg_callback ( const QString &  msg)
static

Progress indications from downloader.

Definition at line 144 of file mpgui_qt.cpp.

Referenced by main().

◆ msg_callback_thr()

static void msg_callback_thr ( const QString &  msg)
static

Progress indications from downloader thread.

Definition at line 149 of file mpgui_qt.cpp.

Referenced by gui_download_modpack().

◆ progress_callback_thr()

static void progress_callback_thr ( int  downloaded,
int  max 
)
static

Progress indications from downloader.

Definition at line 157 of file mpgui_qt.cpp.

Referenced by gui_download_modpack().

◆ setup_modpack_list()

static void setup_modpack_list ( const QString &  name,
const QUrl &  url,
const QString &  version,
const QString &  license,
enum modpack_type  type,
const QString &  subtype,
const QString &  notes 
)
static

Build main modpack list view.

Definition at line 394 of file mpgui_qt.cpp.

Referenced by main().

Variable Documentation

◆ fcmp

struct fcmp_params fcmp
Initial value:
= {
QUrl::fromUserInput(QStringLiteral(MODPACK_LIST_URL)), QLatin1String(),
QLatin1String()}
#define MODPACK_LIST_URL
Definition: modinst.h:25

Definition at line 1 of file mpgui_qt.cpp.

Referenced by fcmp_parse_cmdline(), gui_download_modpack(), and main().

◆ gui

◆ mpcount

int mpcount = 0
static

Definition at line 51 of file mpgui_qt.cpp.

Referenced by mpgui::refresh_list_versions(), and mpgui::setup_list().

◆ worker

mpqt_worker* worker = nullptr
static

Definition at line 49 of file mpgui_qt.cpp.

Referenced by mpgui_main::closeEvent(), gui_download_modpack(), and main().