Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Functions | Variables
mpgui_qt.cpp File Reference
#include <QApplication>
#include <QCloseEvent>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
#include <QLineEdit>
#include <QMainWindow>
#include <QMessageBox>
#include <QProgressBar>
#include <QPushButton>
#include <QTableWidget>
#include <QVBoxLayout>
#include "fc_cmdline.h"
#include "fciconv.h"
#include "fcintl.h"
#include "log.h"
#include "version.h"
#include "download.h"
#include "mpcmdline.h"
#include "mpdb.h"
#include "mpgui_qt_worker.h"
#include "modinst.h"
#include "mpgui_qt.h"

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 char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)
 
static void msg_callback (const char *msg)
 
static void msg_callback_thr (const char *msg)
 
static void progress_callback_thr (int downloaded, int max)
 
static void gui_download_modpack (QString URL)
 
int main (int argc, char **argv)
 

Variables

struct fcmp_params fcmp = { MODPACK_LIST_URL, NULL, NULL }
 
static mpguigui
 
static mpqt_workerworker = nullptr
 
static int mpcount = 0
 

Macro Definition Documentation

◆ ML_COL_COUNT

#define ML_COL_COUNT   8

Definition at line 68 of file mpgui_qt.cpp.

◆ ML_COL_INST

#define ML_COL_INST   2

Definition at line 60 of file mpgui_qt.cpp.

◆ ML_COL_LIC

#define ML_COL_LIC   5

Definition at line 63 of file mpgui_qt.cpp.

◆ ML_COL_NAME

#define ML_COL_NAME   0

Definition at line 58 of file mpgui_qt.cpp.

◆ ML_COL_SUBTYPE

#define ML_COL_SUBTYPE   4

Definition at line 62 of file mpgui_qt.cpp.

◆ ML_COL_TYPE

#define ML_COL_TYPE   3

Definition at line 61 of file mpgui_qt.cpp.

◆ ML_COL_URL

#define ML_COL_URL   6

Definition at line 64 of file mpgui_qt.cpp.

◆ ML_COL_VER

#define ML_COL_VER   1

Definition at line 59 of file mpgui_qt.cpp.

◆ ML_TYPE

#define ML_TYPE   7

Definition at line 66 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 ( QString  URL)
static

Download modpack from given URL

Definition at line 319 of file mpgui_qt.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Entry point for whole freeciv-mp-qt program.

Definition at line 83 of file mpgui_qt.cpp.

◆ msg_callback()

static void msg_callback ( const char msg)
static

Progress indications from downloader

Definition at line 167 of file mpgui_qt.cpp.

Referenced by main().

◆ msg_callback_thr()

static void msg_callback_thr ( const char msg)
static

Progress indications from downloader thread

Definition at line 175 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 183 of file mpgui_qt.cpp.

Referenced by gui_download_modpack().

◆ setup_modpack_list()

static void setup_modpack_list ( const char name,
const char URL,
const char version,
const char license,
enum modpack_type  type,
const char subtype,
const char notes 
)
static

Build main modpack list view

Definition at line 446 of file mpgui_qt.cpp.

Referenced by main().

Variable Documentation

◆ fcmp

Definition at line 50 of file mpgui_qt.cpp.

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

◆ gui

mpgui* gui
static

Definition at line 52 of file mpgui_qt.cpp.

Referenced by action_selection_actor_unit(), action_selection_close(), action_selection_refresh(), action_selection_target_city(), action_selection_target_extra(), action_selection_target_tile(), action_selection_target_unit(), trade_generator::add_city(), add_to_gui_list(), fc_shortcuts_dialog::apply_option(), mr_menu::back_to_menu(), mr_menu::calc_trade_routes(), trade_generator::calculate(), city_widget::center(), fc_shortcut_popup::check_if_exist(), choice_dialog::choice_dialog(), city_dialog::city_rename(), city_report::city_report(), city_report_dialog_popup(), trade_generator::clear_trade_planing(), close_all_diplomacy_dialogs(), city_dialog::closeEvent(), units_select::closeEvent(), help_dialog::closeEvent(), option_dialog::closeEvent(), mr_menu::confirm_disruptive_selection(), unit_item::contextMenuEvent(), create_line_at_mouse_pos(), del_widget_pointer_from_gui_list(), eco_report::disband_units(), city_widget::display_list_menu(), draw_calculated_trade_routes(), economy_report_dialog_popup(), enable_interface(), endgame_report_dialog_player(), chatwdg::eventFilter(), mr_menu::execute_shortcut(), flush_dirty(), flush_mapcanvas(), get_font(), get_overview_window(), gui_download_modpack(), gui_flush(), handle_authentication_req(), handle_client_info(), city_dialog::hideEvent(), help_dialog::hideEvent(), option_dialog::hideEvent(), city_report::init(), plr_report::init(), science_report::init(), eco_report::init(), endgame_report::init(), ss_report::init(), diplo_dlg::init(), is_this_widget_first_on_list(), messagewdg::item_selected(), map_view::keyPressEvent(), mr_menu::load_new_tileset(), mr_menu::local_options(), main(), mr_menu::menus_sensitive(), message_dlg::message_dlg(), resize_widget::mouseMoveEvent(), move_widget::mouseMoveEvent(), minimap_view::mouseMoveEvent(), info_tab::mouseMoveEvent(), city_label::mousePressEvent(), resize_widget::mousePressEvent(), move_widget::mousePressEvent(), close_widget::mousePressEvent(), minimap_view::mousePressEvent(), info_tab::mousePressEvent(), fc_sidewidget::mousePressEvent(), info_tab::mouseReleaseEvent(), move_widget_to_front_of_gui_list(), hud_units::moveEvent(), hud_battle_log::moveEvent(), msg_callback(), msg_callback_thr(), notify_dialog::notify_dialog(), click_label::on_clicked(), hud_action::on_clicked(), option_dialog_popup(), option_gui_update(), overview_size_changed(), plr_report::plr_report(), popdown_all_game_dialogs(), popdown_all_spaceships_dialogs(), popdown_city_report(), popdown_economy_report(), popdown_endgame_report(), popdown_players_report(), popdown_science_report(), popup_act_confirmation_dialog(), popup_action_selection(), popup_bribe_dialog(), popup_connect_msg(), popup_disband_dialog(), popup_endgame_report(), fc_sc_button::popup_error(), popup_goto_dialog(), popup_incite_dialog(), popup_messageopt_dialog(), popup_multiplier_dialog(), popup_musicset_suggestion_dialog(), popup_newcity_dialog(), popup_notify_dialog(), popup_notify_goto_dialog(), popup_pillage_dialog(), popup_players_dialog(), popup_races_dialog(), popup_rates_dialog(), popup_revolution_dialog(), popup_sabotage_dialog(), popup_shortcuts_dialog(), popup_soundset_suggestion_dialog(), popup_spaceship_dialog(), popup_tileset_suggestion_dialog(), popup_upgrade_dialog(), progress_callback_thr(), qload_lua_script(), qtg_close_connection_dialog(), qtg_get_current_client_page(), qtg_gui_load_theme(), qtg_init_meeting(), qtg_load_gfxnumber(), qtg_popup_combat_info(), qtg_popup_image(), qtg_real_city_dialog_popup(), qtg_real_output_window_append(), qtg_real_set_client_page(), qtg_recv_accept_treaty(), qtg_recv_cancel_meeting(), qtg_recv_create_clause(), qtg_recv_remove_clause(), qtg_set_rulesets(), qtg_update_timeout_label(), qtg_version_message(), real_city_report_dialog_update(), real_city_report_update_city(), real_economy_report_dialog_update(), real_menus_init(), real_menus_update(), real_meswin_dialog_update(), real_players_dialog_update(), real_science_report_dialog_update(), receive_packet_client_info_100(), refresh_spaceship_dialog(), trade_generator::remove_city(), trade_generator::remove_virtual_city(), minimap_view::resizeEvent(), restart_notify_dialogs(), diplo_wdg::restore_pixmap(), city_dialog::save_cma(), mr_menu::save_game_as(), mr_menu::save_image(), city_dialog::save_worklist(), science_report_dialog_popup(), science_report_dialog_redraw(), eco_report::sell_buildings(), eco_report::sell_redundant(), server_handle_packet(), mr_menu::server_options(), set_indicator_icons(), mr_menu::setup_menus(), setup_modpack_list(), map_view::shortcut_pressed(), map_view::shortcut_released(), show_new_turn_info(), show_tileset_error(), city_dialog::showEvent(), help_dialog::showEvent(), option_dialog::showEvent(), side_blink_endturn(), side_center_unit(), side_disable_endturn(), side_indicators_menu(), side_left_click_science(), side_right_click_diplomacy(), side_right_click_science(), side_show_map(), mr_menu::slot_autocaravan(), mr_menu::slot_battlelog(), mr_menu::slot_calculate(), mr_menu::slot_clear_trade(), mr_menu::slot_fullscreen(), mr_menu::slot_lock(), mr_menu::slot_minimap_view(), mr_menu::slot_rally(), mr_menu::slot_show_map(), mr_menu::slot_show_new_turn_text(), mr_menu::slot_trade_add_all(), mr_menu::slot_trade_city(), mr_menu::slot_unit_filter(), spy_steal_shared(), style_callback(), tileset_changed(), map_view::timer_event(), chatwdg::toggle_size(), toggle_units_report(), unit_select_dialog_popup(), unit_select_dialog_update_real(), units_report_dialog_popup(), units_reports::units_reports(), unit_actions::update_actions(), hud_units::update_actions(), city_dialog::update_citizens(), map_view::update_cursor(), fc_sidewidget::update_final_pixmap(), update_info_label(), update_map_canvas_scrollbars(), minimap_view::update_menu(), update_mouse_cursor(), hud_battle_log::update_size(), update_start_page(), update_turn_done_tooltip(), update_unit_info_label(), units_reports::update_units(), unittype_item::upgrade_units(), voteinfo_gui_update(), widget_free(), widget_free(), mr_menu::zoom_in(), mr_menu::zoom_out(), mr_menu::zoom_reset(), mr_menu::zoom_scale_fonts(), choice_dialog::~choice_dialog(), city_report::~city_report(), city_widget::~city_widget(), diplo_dlg::~diplo_dlg(), eco_report::~eco_report(), endgame_report::~endgame_report(), message_dlg::~message_dlg(), plr_report::~plr_report(), plr_widget::~plr_widget(), science_report::~science_report(), and ss_report::~ss_report().

◆ mpcount

int mpcount = 0
static

Definition at line 56 of file mpgui_qt.cpp.

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

◆ worker

mpqt_worker* worker = nullptr
static