Freeciv-3.1
Loading...
Searching...
No Matches
gui_main.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__GUI_MAIN_H
15#define FC__GUI_MAIN_H
16
18QApplication *current_app();
19
20#ifdef FREECIV_HAVE_CXX20_CAPTURE_THIS
21#define CAPTURE_DEFAULT_THIS [=, this]
22#else // FREECIV_HAVE_CXX20_CAPTURE_THIS
23#define CAPTURE_DEFAULT_THIS [=]
24#endif // FREECIV_HAVE_CXX20_CAPTURE_THIS
25
26// Compatibility layer between Qt5 and Qt6 while we support
27// also the former.
28#ifndef FC_QT5_MODE
29#define mevent_gpos(__ev__) (__ev__)->globalPosition().toPoint()
30#else // FC_QT5_MODE
31#define mevent_gpos(__ev__) (__ev__)->globalPos()
32#endif // FC_QT5_MODE
33
34#endif // FC__GUI_MAIN_H
void popup_quit_dialog(void)
Definition gui_main.c:2154
QApplication * current_app()
Definition gui_main.cpp:220