Freeciv-3.2
Loading...
Searching...
No Matches
mpgui_qt.h
Go to the documentation of this file.
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)
6 any later version.
7
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***********************************************************************/
13
14#ifndef FC__MPGUI_QT_H
15#define FC__MPGUI_QT_H
16
17#ifdef HAVE_CONFIG_H
18#include <fc_config.h>
19#endif
20
21// Qt
22#include <QMainWindow>
23#include <QObject>
24
25// tools
26#include "modinst.h"
27
28class QLabel;
29class QLineEdit;
30class QProgressBar;
31class QTableWidget;
32
33class mpgui_main : public QMainWindow
34{
36
37public:
39
40private:
41 void popup_quit_dialog();
43 QWidget *central;
44
45protected:
47};
48
49class mpgui : public QObject
50{
52
53 public:
54 void setup(QWidget *central, struct fcmp_params *fcmp);
55 void display_msg_thr(const char *msg);
56 void progress_thr(int downloaded, int max);
57 void setup_list(const char *name, const char *URL,
58 const char *version, const char *license,
59 enum modpack_type type, const char *subtype,
60 const char *notes);
62
63 signals:
65 void progress_thr_signal(int downloaded, int max);
67
68 public slots:
69 void display_msg(QString msg);
70 void progress(int downloaded, int max);
72
73 private slots:
74 void URL_given();
75 void row_selected(int, int);
76 void row_download(const QModelIndex &);
77
78 private:
79 QLineEdit *URLedit;
80 QLabel *msg_dspl;
81 QProgressBar *bar;
82 QTableWidget *mplist_table;
83};
84
85#endif // FC__MPGUI_QT_H
void popup_quit_dialog()
Definition mpgui_qt.cpp:489
QApplication * qapp
Definition mpgui_qt.h:42
QWidget * central
Definition mpgui_qt.h:43
void closeEvent(QCloseEvent *event)
Definition mpgui_qt.cpp:514
void refresh_list_versions_thr()
Definition mpgui_qt.cpp:372
void row_selected(int, int)
Definition mpgui_qt.cpp:458
QLineEdit * URLedit
Definition mpgui_qt.h:79
void display_msg(QString msg)
Definition mpgui_qt.cpp:283
void row_download(const QModelIndex &)
Definition mpgui_qt.cpp:468
void display_msg_thr_signal(QString msg)
void display_msg_thr(const char *msg)
Definition mpgui_qt.cpp:294
void refresh_list_versions_thr_signal()
void URL_given()
Definition mpgui_qt.cpp:336
void progress_thr_signal(int downloaded, int max)
QTableWidget * mplist_table
Definition mpgui_qt.h:82
void progress_thr(int downloaded, int max)
Definition mpgui_qt.cpp:311
void setup_list(const char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)
Definition mpgui_qt.cpp:380
QLabel * msg_dspl
Definition mpgui_qt.h:80
void refresh_list_versions()
Definition mpgui_qt.cpp:344
QProgressBar * bar
Definition mpgui_qt.h:81
void setup(QWidget *central, struct fcmp_params *fcmp)
Definition mpgui_qt.cpp:191
void progress(int downloaded, int max)
Definition mpgui_qt.cpp:302
char * incite_cost
Definition comments.c:75
enum event_type event
Definition events.c:81
GType type
Definition repodlgs.c:1313
const char * name
Definition inputfile.c:127
struct fcmp_params fcmp
Definition mpcli.c:37
struct player_slot * slots
Definition player.c:51