989 menu = this->addMenu(
_(
"Game"));
998 menu = menu->addMenu(QString(
"\u200B") +
_(
"Options"));
1000 menu = menu->addMenu(
_(
"Options"));
1003 act = menu->addAction(
_(
"Set local options"));
1005 act = menu->addAction(
_(
"Server Options"));
1007 act = menu->addAction(
_(
"Messages"));
1009 act = menu->addAction(
_(
"Shortcuts"));
1011 act = menu->addAction(
_(
"Load another tileset"));
1013 act = menu->addAction(
_(
"Save Options Now"));
1014 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
1016 act = menu->addAction(
_(
"Save Options on Exit"));
1017 act->setCheckable(
true);
1020 menu->addSeparator();
1021 act = menu->addAction(
_(
"Save Game"));
1022 act->setShortcut(QKeySequence(tr(
"Ctrl+s")));
1023 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
1026 act = menu->addAction(
_(
"Save Game As..."));
1028 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
1030 act = menu->addAction(
_(
"Save Map to Image"));
1032 menu->addSeparator();
1033 act = menu->addAction(
_(
"Leave game"));
1034 act->setIcon(style()->standardIcon(QStyle::SP_DialogDiscardButton));
1036 act = menu->addAction(
_(
"Quit"));
1037 act->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton));
1041 menu = this->addMenu(
Q_(
"?verb:View"));
1042 act = menu->addAction(
_(
"Center View"));
1046 menu->addSeparator();
1047 act = menu->addAction(
_(
"Fullscreen"));
1050 act->setCheckable(
true);
1053 menu->addSeparator();
1061 osd_status = menu->addAction(
_(
"Show new turn information"));
1063 osd_status->setChecked(
gui()->qt_settings.show_new_turn_text);
1064 connect(
osd_status, &QAction::triggered,
this,
1066 btlog_status = menu->addAction(
_(
"Show combat detailed information"));
1077 menu->addSeparator();
1078 act = menu->addAction(
_(
"Zoom in"));
1082 act = menu->addAction(
_(
"Zoom default"));
1086 act = menu->addAction(
_(
"Zoom out"));
1095 menu->addSeparator();
1096 act = menu->addAction(
_(
"City Outlines"));
1097 act->setCheckable(
true);
1100 act = menu->addAction(
_(
"City Output"));
1101 act->setCheckable(
true);
1106 act = menu->addAction(
_(
"Map Grid"));
1109 act->setCheckable(
true);
1112 act = menu->addAction(
_(
"National Borders"));
1113 act->setCheckable(
true);
1118 act = menu->addAction(
_(
"Native Tiles"));
1119 act->setCheckable(
true);
1121 act->setShortcut(QKeySequence(tr(
"ctrl+shift+n")));
1123 act = menu->addAction(
_(
"City Full Bar"));
1124 act->setCheckable(
true);
1129 act = menu->addAction(
_(
"City Names"));
1130 act->setCheckable(
true);
1135 act = menu->addAction(
_(
"City Growth"));
1136 act->setCheckable(
true);
1138 act->setShortcut(QKeySequence(tr(
"ctrl+o")));
1140 act = menu->addAction(
_(
"City Production"));
1141 act->setCheckable(
true);
1146 act = menu->addAction(
_(
"City Buy Cost"));
1147 act->setCheckable(
true);
1150 act = menu->addAction(
_(
"City Trade Routes"));
1151 act->setCheckable(
true);
1156 act = menu->addAction(
_(
"Unit Stack Size"));
1157 act->setCheckable(
true);
1164 menu = this->addMenu(
_(
"Select"));
1165 act = menu->addAction(
_(
"Single Unit (Unselect Others)"));
1166 act->setShortcut(QKeySequence(tr(
"shift+z")));
1169 act = menu->addAction(
_(
"All On Tile"));
1170 act->setShortcut(QKeySequence(tr(
"v")));
1173 menu->addSeparator();
1174 act = menu->addAction(
_(
"Same Type on Tile"));
1175 act->setShortcut(QKeySequence(tr(
"shift+v")));
1178 act = menu->addAction(
_(
"Same Type on Continent"));
1179 act->setShortcut(QKeySequence(tr(
"shift+c")));
1181 connect(act, &QAction::triggered,
this,
1183 act = menu->addAction(
_(
"Same Type Everywhere"));
1184 act->setShortcut(QKeySequence(tr(
"shift+x")));
1186 connect(act, &QAction::triggered,
this,
1188 menu->addSeparator();
1189 act = menu->addAction(
_(
"Wait"));
1194 act = menu->addAction(
_(
"Done"));
1200 act = menu->addAction(
_(
"Advanced unit selection"));
1201 act->setShortcut(QKeySequence(tr(
"ctrl+e")));
1206 menu = this->addMenu(
_(
"Unit"));
1207 act = menu->addAction(
_(
"Go to Tile"));
1216 act = menu->addAction(
_(
"Go to Nearest City"));
1217 act->setShortcut(QKeySequence(tr(
"shift+g")));
1220 act = menu->addAction(
_(
"Go to/Airlift to City..."));
1225 menu->addSeparator();
1226 act = menu->addAction(
_(
"Auto Explore"));
1231 act = menu->addAction(
_(
"Patrol"));
1233 act->setEnabled(
false);
1237 menu->addSeparator();
1238 act = menu->addAction(
_(
"Sentry"));
1243 act = menu->addAction(
_(
"Unsentry All On Tile"));
1248 menu->addSeparator();
1249 act = menu->addAction(
_(
"Load"));
1254 act = menu->addAction(
_(
"Unload"));
1259 act = menu->addAction(
_(
"Unload All From Transporter"));
1260 act->setShortcut(QKeySequence(tr(
"shift+t")));
1263 menu->addSeparator();
1266 .replace(
"&",
"&&"));
1271 act = menu->addAction(
_(
"Upgrade"));
1276 act = menu->addAction(
_(
"Convert"));
1277 act->setShortcut(QKeySequence(tr(
"shift+o")));
1280 act = menu->addAction(
_(
"Disband"));
1281 act->setShortcut(QKeySequence(tr(
"shift+d")));
1286 menu = this->addMenu(
_(
"Combat"));
1287 act = menu->addAction(
_(
"Fortify Unit"));
1293 .replace(
"&",
"&&"));
1295 act->setShortcut(QKeySequence(tr(
"shift+f")));
1298 .replace(
"&",
"&&"));
1300 act->setShortcut(QKeySequence(tr(
"shift+e")));
1303 menu->addSeparator();
1304 act = menu->addAction(
_(
"Pillage"));
1306 act->setShortcut(QKeySequence(tr(
"shift+p")));
1309 act = menu->addAction(
_(
"Do..."));
1316 menu = this->addMenu(
_(
"Work"));
1318 .replace(
"&",
"&&"));
1323 act = menu->addAction(
_(
"Auto Settler"));
1328 menu->addSeparator();
1329 act = menu->addAction(
_(
"Build Road"));
1335 act = menu->addAction(
_(
"Build Irrigation"));
1340 act = menu->addAction(
_(
"Cultivate"));
1345 act = menu->addAction(
_(
"Build Mine"));
1350 act = menu->addAction(
_(
"Plant"));
1355 menu->addSeparator();
1356 act = menu->addAction(
_(
"Connect With Road"));
1357 act->setShortcut(QKeySequence(tr(
"ctrl+r")));
1360 act = menu->addAction(
_(
"Connect With Railroad"));
1362 act->setShortcut(QKeySequence(tr(
"ctrl+l")));
1364 act = menu->addAction(
_(
"Connect With Maglev"));
1366 act->setShortcut(QKeySequence(tr(
"ctrl+m")));
1368 act = menu->addAction(
_(
"Connect With Irrigation"));
1370 act->setShortcut(QKeySequence(tr(
"ctrl+i")));
1372 menu->addSeparator();
1373 act = menu->addAction(
_(
"Transform Terrain"));
1378 act = menu->addAction(
_(
"Clean Pollution"));
1383 act = menu->addAction(
_(
"Clean Nuclear Fallout"));
1385 act->setShortcut(QKeySequence(tr(
"n")));
1388 .replace(
"&",
"&&"));
1389 act->setShortcut(QKeySequence(tr(
"b")));
1393 .replace(
"&",
"&&"));
1394 act->setShortcut(QKeySequence(tr(
"r")));
1401 act->setShortcut(QKeySequence(tr(
"z")));
1404 act->setShortcut(QKeySequence(tr(
"ctrl+z")));
1407 act->setShortcut(QKeySequence(tr(
"ctrl+shift+c")));
1414 act->setShortcut(QKeySequence(tr(
"ctrl+t")));
1421 act->setShortcut(QKeySequence(tr(
"ctrl+j")));
1423 act->setShortcut(QKeySequence(tr(
"shift+s")));
1426 act->setShortcut(QKeySequence(tr(
"ctrl+y")));
1437 act->setCheckable(
true);
1438 act->setChecked(
true);
1444 act->setCheckable(
true);
1445 act->setChecked(
false);
1446 act->setData(ACTION_SPY_BRIBE_UNIT);
1451 act->setCheckable(
true);
1452 act->setChecked(
false);
1453 act->setData(ACTION_SPY_SABOTAGE_UNIT);
1458 act->setCheckable(
true);
1459 act->setChecked(
false);
1460 act->setData(ACTION_SPY_SABOTAGE_UNIT_ESC);
1466 act->setCheckable(
true);
1467 act->setChecked(
true);
1473 act->setCheckable(
true);
1474 act->setChecked(
false);
1475 act->setData(ACTION_SPY_INVESTIGATE_CITY);
1480 act->setCheckable(
true);
1481 act->setChecked(
false);
1482 act->setData(ACTION_INV_CITY_SPEND);
1487 act->setCheckable(
true);
1488 act->setChecked(
false);
1489 act->setData(ACTION_ESTABLISH_EMBASSY);
1494 act->setCheckable(
true);
1495 act->setChecked(
false);
1496 act->setData(ACTION_ESTABLISH_EMBASSY_STAY);
1501 act->setCheckable(
true);
1502 act->setChecked(
false);
1503 act->setData(ACTION_SPY_STEAL_TECH);
1508 act->setCheckable(
true);
1509 act->setChecked(
false);
1510 act->setData(ACTION_SPY_STEAL_TECH_ESC);
1515 act->setCheckable(
true);
1516 act->setChecked(
false);
1517 act->setData(ACTION_SPY_INCITE_CITY);
1522 act->setCheckable(
true);
1523 act->setChecked(
false);
1524 act->setData(ACTION_SPY_INCITE_CITY_ESC);
1529 act->setCheckable(
true);
1530 act->setChecked(
false);
1531 act->setData(ACTION_SPY_POISON);
1536 act->setCheckable(
true);
1537 act->setChecked(
false);
1538 act->setData(ACTION_SPY_POISON_ESC);
1543 menu = this->addMenu(
_(
"Civilization"));
1544 act = menu->addAction(
_(
"Tax Rates..."));
1547 menu->addSeparator();
1549 act = menu->addAction(
_(
"Policies..."));
1552 menu->addSeparator();
1554 menu->addMenu(
new class gov_menu(
this));
1555 menu->addSeparator();
1557 act = menu->addAction(
Q_(
"?noun:View"));
1558 act->setShortcut(QKeySequence(tr(
"F1")));
1561 act = menu->addAction(
_(
"Units"));
1562 act->setShortcut(QKeySequence(tr(
"F2")));
1565 act = menu->addAction(
_(
"Nations"));
1566 act->setShortcut(QKeySequence(tr(
"F3")));
1569 act = menu->addAction(
_(
"Cities"));
1570 act->setShortcut(QKeySequence(tr(
"F4")));
1573 act = menu->addAction(
_(
"Economy"));
1574 act->setShortcut(QKeySequence(tr(
"F5")));
1577 act = menu->addAction(
_(
"Research"));
1578 act->setShortcut(QKeySequence(tr(
"F6")));
1581 act = menu->addAction(
_(
"Wonders of the World"));
1582 act->setShortcut(QKeySequence(tr(
"F7")));
1585 act = menu->addAction(
_(
"Top Five Cities"));
1586 act->setShortcut(QKeySequence(tr(
"F8")));
1589 act = menu->addAction(
_(
"Demographics"));
1590 act->setShortcut(QKeySequence(tr(
"F11")));
1593 act = menu->addAction(
_(
"Spaceship"));
1594 act->setShortcut(QKeySequence(tr(
"F12")));
1597 act = menu->addAction(
_(
"Achievements"));
1600 act = menu->addAction(
_(
"Endgame report"));
1605 menu = this->addMenu(
_(
"Battle Groups"));
1607 act = menu->addAction(
_(
"Select Battle Group 1"));
1608 act->setShortcut(QKeySequence(tr(
"Shift+F1")));
1611 act = menu->addAction(
_(
"Assign Battle Group 1"));
1612 act->setShortcut(QKeySequence(tr(
"Ctrl+F1")));
1615 act = menu->addAction(
_(
"Append to Battle Group 1"));
1616 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F1")));
1619 act = menu->addAction(
_(
"Select Battle Group 2"));
1620 act->setShortcut(QKeySequence(tr(
"Shift+F2")));
1623 act = menu->addAction(
_(
"Assign Battle Group 2"));
1624 act->setShortcut(QKeySequence(tr(
"Ctrl+F2")));
1627 act = menu->addAction(
_(
"Append to Battle Group 2"));
1628 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F2")));
1631 act = menu->addAction(
_(
"Select Battle Group 3"));
1632 act->setShortcut(QKeySequence(tr(
"Shift+F3")));
1635 act = menu->addAction(
_(
"Assign Battle Group 3"));
1636 act->setShortcut(QKeySequence(tr(
"Ctrl+F3")));
1639 act = menu->addAction(
_(
"Append to Battle Group 3"));
1640 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F3")));
1643 act = menu->addAction(
_(
"Select Battle Group 4"));
1644 act->setShortcut(QKeySequence(tr(
"Shift+F4")));
1647 act = menu->addAction(
_(
"Assign Battle Group 4"));
1648 act->setShortcut(QKeySequence(tr(
"Ctrl+F4")));
1651 act = menu->addAction(
_(
"Append to Battle Group 4"));
1652 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F4")));
1656 menu = this->addMenu(
_(
"Help"));
1659 QObject::connect(act, &QAction::triggered, [
this]() {
1664 QObject::connect(act, &QAction::triggered, [
this]() {
1669 QObject::connect(act, &QAction::triggered, [
this]() {
1674 QObject::connect(act, &QAction::triggered, [
this]() {
1679 QObject::connect(act, &QAction::triggered, [
this]() {
1684 QObject::connect(act, &QAction::triggered, [
this]() {
1689 QObject::connect(act, &QAction::triggered, [
this]() {
1694 QObject::connect(act, &QAction::triggered, [
this]() {
1699 QObject::connect(act, &QAction::triggered, [
this]() {
1704 QObject::connect(act, &QAction::triggered, [
this]() {
1709 QObject::connect(act, &QAction::triggered, [
this]() {
1714 QObject::connect(act, &QAction::triggered, [
this]() {
1719 QObject::connect(act, &QAction::triggered, [
this]() {
1724 QObject::connect(act, &QAction::triggered, [
this]() {
1729 QObject::connect(act, &QAction::triggered, [
this]() {
1734 QObject::connect(act, &QAction::triggered, [
this]() {
1739 QObject::connect(act, &QAction::triggered, [
this]() {
1744 QObject::connect(act, &QAction::triggered, [
this]() {
1749 QObject::connect(act, &QAction::triggered, [
this]() {
1753 menu->addSeparator();
1756 QObject::connect(act, &QAction::triggered, [
this]() {
1761 QObject::connect(act, &QAction::triggered, [
this]() {
1766 QObject::connect(act, &QAction::triggered, [
this]() {
1771 QObject::connect(act, &QAction::triggered, [
this]() {
1776 QObject::connect(act, &QAction::triggered, [
this]() {
1780 menu->addSeparator();
1783 QObject::connect(act, &QAction::triggered, [
this]() {
1788 QObject::connect(act, &QAction::triggered, [
this]() {
1793 QObject::connect(act, &QAction::triggered, [
this]() {
1797 menus = this->findChildren<QMenu*>();
1798 for (i = 0; i < menus.count(); i++) {
1799 menus[i]->setAttribute(Qt::WA_TranslucentBackground);
1801 this->setVisible(
false);