20#include <QApplication>
90 timer->setSingleShot(
false);
91 timer->setInterval(700);
134 if (
sfont !=
nullptr) {
138 sfont->setCapitalization(QFont::SmallCaps);
139 sfont->setItalic(
true);
197 Qt::SmoothTransformation);
235 update_final_pixmap();
236 QWidget::enterEvent(
event);
249 QWidget::leaveEvent(
event);
263 QWidget::contextMenuEvent(
event);
312 gui()->game_tab_widget->setCurrentIndex(0);
321 int delta =
event->angleDelta().y();
325 }
else if (delta > 90 &&
wheel_up) {
338 if (!
timer->isActive()) {
344 if (
timer->isActive()) {
365 if (!
qvar.isValid()) {
369 if (act->property(
"scimenu").toBool()) {
374 if (
qvar.toInt() == -1) {
399 bool current =
false;
406 if (
i ==
gui()->game_tab_widget->currentIndex()) {
437 p.drawPixmap(
pos, 5,
sprite->
pm->scaled(w, h), 0, 0, w, h);
446 p.drawPixmap(
pos, 5,
sprite->
pm->scaled(w, h), 0, 0, w, h);
453 for (; d < 10 ; ++d) {
454 p.drawPixmap(
pos, 5,
sprite->
pm->scaled(w, h), 0, 0, w, h);
481 p.drawText(0, 0,
width(),
height(), Qt::AlignLeft | Qt::TextWordWrap,
491 p.setCompositionMode(QPainter::CompositionMode_ColorDodge);
498 p.setCompositionMode(QPainter::CompositionMode_Darken);
499 p.setPen(
QColor(0, 0, 0));
500 p.setBrush(
QColor(0, 0, 50, 95));
505 p.setCompositionMode(QPainter::CompositionMode_ColorDodge);
506 p.setPen(
QColor(0, 0, 0));
522 layout->setContentsMargins(0, 0, 0, 0);
575 screen_hres = QApplication::primaryScreen()->availableGeometry().width();
590 sw->setFixedSize(w, sw->
get_pixmap()->height());
603 sw->setFixedSize(w, h);
625 gui()->game_tab_widget->setCurrentIndex(0);
651 gui()->game_tab_widget->setCurrentIndex(0);
663 gui()->sw_endturn->setToolTip(
_(
"Fixed length turns"));
668 _(
"Turn Done"),
_(
"Shift+Return"));
669 gui()->sw_endturn->setToolTip(
buf);
683 gui()->sw_endturn->update_final_pixmap();
695 gui()->sw_endturn->update_final_pixmap();
707 menu->popup(QCursor::pos());
718 QMenu *menu =
new QMenu(
gui()->central_wdg);
730 eiskalt->setData(QVariant::fromValue((
void *)pplayer));
731 QObject::connect(
eiskalt, &QAction::triggered,
gui()->sw_diplo,
740 QObject::connect(
eiskalt, &QAction::triggered,
gui()->sw_diplo,
744 menu->setAttribute(Qt::WA_DeleteOnClose);
745 menu->popup(QCursor::pos());
749 i =
gui()->gimme_index_of(
"DDI");
753 gui()->game_tab_widget->setCurrentIndex(
i);
777 curr_list.append(
item);
780 if (curr_list.isEmpty()) {
784 menu =
new QMenu(
gui()->central_wdg);
785 for (
int i = 0;
i < curr_list.count();
i++) {
789 qvar = curr_list.at(
i).id;
794 act =
new QAction(
ic, curr_list.at(
i).tech_str,
gui()->mapview_wdg);
796 act->setProperty(
"scimenu",
true);
797 menu->addAction(act);
798 QObject::connect(act, &QAction::triggered,
gui()->sw_science,
801 menu->setAttribute(Qt::WA_DeleteOnClose);
802 menu->popup(QCursor::pos());
818 if (!
gui()->is_repo_dlg_open(
"SCI")) {
822 i =
gui()->gimme_index_of(
"SCI");
823 w =
gui()->game_tab_widget->widget(
i);
824 if (w->isVisible()) {
825 gui()->game_tab_widget->setCurrentIndex(0);
829 gui()->game_tab_widget->setCurrentWidget(
sci_rep);
static QFont * get_font(enum client_font font)
struct canvas int int struct sprite int int int int height
struct canvas int int struct sprite int int int width
int send_chat(const char *message)
static fc_font * instance()
bool client_is_global_observer(void)
bool client_is_observer(void)
struct sprite * client_warming_sprite(void)
struct sprite * client_cooling_sprite(void)
struct sprite * client_research_sprite(void)
struct sprite * client_government_sprite(void)
void request_center_focus_unit(void)
void popup_rates_dialog(void)
static enum client_pages current_page
const char *const notify_label
const char * nation_plural_translation(const struct nation_type *pnation)
const struct option_set * server_optset
bool option_bool_get(const struct option *poption)
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
int dsend_packet_player_research(struct connection *pc, int tech)
#define players_iterate_end
#define players_iterate(_pplayer)
bool comp_less_than(const qlist_item &q1, const qlist_item &q2)
struct research * research_get(const struct player *pplayer)
struct player_economic economic
struct research::research_invention inventions[A_ARRAY_SIZE]
int fc_snprintf(char *str, size_t n, const char *format,...)
struct advance * advance_by_number(const Tech_type_id atype)
const char * advance_name_translation(const struct advance *padvance)
#define advance_index_iterate_end
#define advance_index_iterate(_start, _index)
struct sprite * get_tax_sprite(const struct tileset *t, Output_type_id otype)
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)