969 menu = this->addMenu(
_(
"Game"));
978 menu = menu->addMenu(QString(
"\u200B") +
_(
"Options"));
980 menu = menu->addMenu(
_(
"Options"));
983 act = menu->addAction(
_(
"Set local options"));
985 act = menu->addAction(
_(
"Server Options"));
987 act = menu->addAction(
_(
"Messages"));
989 act = menu->addAction(
_(
"Shortcuts"));
991 act = menu->addAction(
_(
"Load another tileset"));
993 act = menu->addAction(
_(
"Save Options Now"));
994 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
996 act = menu->addAction(
_(
"Save Options on Exit"));
997 act->setCheckable(
true);
1000 menu->addSeparator();
1001 act = menu->addAction(
_(
"Save Game"));
1002 act->setShortcut(QKeySequence(tr(
"Ctrl+s")));
1003 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
1006 act = menu->addAction(
_(
"Save Game As..."));
1008 act->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
1010 act = menu->addAction(
_(
"Save Map to Image"));
1012 menu->addSeparator();
1013 act = menu->addAction(
_(
"Leave game"));
1014 act->setIcon(style()->standardIcon(QStyle::SP_DialogDiscardButton));
1016 act = menu->addAction(
_(
"Quit"));
1017 act->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton));
1021 menu = this->addMenu(
Q_(
"?verb:View"));
1022 act = menu->addAction(
_(
"Center View"));
1026 menu->addSeparator();
1027 act = menu->addAction(
_(
"Fullscreen"));
1030 act->setCheckable(
true);
1033 menu->addSeparator();
1041 osd_status = menu->addAction(
_(
"Show new turn information"));
1043 osd_status->setChecked(
gui()->qt_settings.show_new_turn_text);
1044 connect(
osd_status, &QAction::triggered,
this,
1046 btlog_status = menu->addAction(
_(
"Show combat detailed information"));
1057 menu->addSeparator();
1058 act = menu->addAction(
_(
"Zoom in"));
1062 act = menu->addAction(
_(
"Zoom default"));
1066 act = menu->addAction(
_(
"Zoom out"));
1075 menu->addSeparator();
1076 act = menu->addAction(
_(
"City Outlines"));
1077 act->setCheckable(
true);
1080 act = menu->addAction(
_(
"City Output"));
1081 act->setCheckable(
true);
1086 act = menu->addAction(
_(
"Map Grid"));
1089 act->setCheckable(
true);
1092 act = menu->addAction(
_(
"National Borders"));
1093 act->setCheckable(
true);
1098 act = menu->addAction(
_(
"Native Tiles"));
1099 act->setCheckable(
true);
1101 act->setShortcut(QKeySequence(tr(
"ctrl+shift+n")));
1103 act = menu->addAction(
_(
"City Full Bar"));
1104 act->setCheckable(
true);
1109 act = menu->addAction(
_(
"City Names"));
1110 act->setCheckable(
true);
1115 act = menu->addAction(
_(
"City Growth"));
1116 act->setCheckable(
true);
1118 act->setShortcut(QKeySequence(tr(
"ctrl+o")));
1120 act = menu->addAction(
_(
"City Production"));
1121 act->setCheckable(
true);
1126 act = menu->addAction(
_(
"City Buy Cost"));
1127 act->setCheckable(
true);
1130 act = menu->addAction(
_(
"City Trade Routes"));
1131 act->setCheckable(
true);
1136 act = menu->addAction(
_(
"Unit Stack Size"));
1137 act->setCheckable(
true);
1144 menu = this->addMenu(
_(
"Select"));
1145 act = menu->addAction(
_(
"Single Unit (Unselect Others)"));
1146 act->setShortcut(QKeySequence(tr(
"shift+z")));
1149 act = menu->addAction(
_(
"All On Tile"));
1150 act->setShortcut(QKeySequence(tr(
"v")));
1153 menu->addSeparator();
1154 act = menu->addAction(
_(
"Same Type on Tile"));
1155 act->setShortcut(QKeySequence(tr(
"shift+v")));
1158 act = menu->addAction(
_(
"Same Type on Continent"));
1159 act->setShortcut(QKeySequence(tr(
"shift+c")));
1161 connect(act, &QAction::triggered,
this,
1163 act = menu->addAction(
_(
"Same Type Everywhere"));
1164 act->setShortcut(QKeySequence(tr(
"shift+x")));
1166 connect(act, &QAction::triggered,
this,
1168 menu->addSeparator();
1169 act = menu->addAction(
_(
"Wait"));
1174 act = menu->addAction(
_(
"Done"));
1180 act = menu->addAction(
_(
"Advanced unit selection"));
1181 act->setShortcut(QKeySequence(tr(
"ctrl+e")));
1186 menu = this->addMenu(
_(
"Unit"));
1187 act = menu->addAction(
_(
"Go to Tile"));
1196 act = menu->addAction(
_(
"Go to Nearest City"));
1197 act->setShortcut(QKeySequence(tr(
"shift+g")));
1200 act = menu->addAction(
_(
"Go to/Airlift to City..."));
1205 menu->addSeparator();
1206 act = menu->addAction(
_(
"Auto Explore"));
1211 act = menu->addAction(
_(
"Patrol"));
1213 act->setEnabled(
false);
1217 menu->addSeparator();
1218 act = menu->addAction(
_(
"Sentry"));
1223 act = menu->addAction(
_(
"Unsentry All On Tile"));
1228 menu->addSeparator();
1229 act = menu->addAction(
_(
"Load"));
1234 act = menu->addAction(
_(
"Unload"));
1239 act = menu->addAction(
_(
"Unload All From Transporter"));
1240 act->setShortcut(QKeySequence(tr(
"shift+t")));
1243 menu->addSeparator();
1246 .replace(
"&",
"&&"));
1251 act = menu->addAction(
_(
"Upgrade"));
1256 act = menu->addAction(
_(
"Convert"));
1257 act->setShortcut(QKeySequence(tr(
"shift+o")));
1260 act = menu->addAction(
_(
"Disband"));
1261 act->setShortcut(QKeySequence(tr(
"shift+d")));
1266 menu = this->addMenu(
_(
"Combat"));
1267 act = menu->addAction(
_(
"Fortify Unit"));
1273 .replace(
"&",
"&&"));
1275 act->setShortcut(QKeySequence(tr(
"shift+f")));
1278 .replace(
"&",
"&&"));
1280 act->setShortcut(QKeySequence(tr(
"shift+e")));
1283 menu->addSeparator();
1284 act = menu->addAction(
_(
"Pillage"));
1286 act->setShortcut(QKeySequence(tr(
"shift+p")));
1289 act = menu->addAction(
_(
"Do..."));
1296 menu = this->addMenu(
_(
"Work"));
1298 .replace(
"&",
"&&"));
1303 act = menu->addAction(
_(
"Auto Settler"));
1308 menu->addSeparator();
1309 act = menu->addAction(
_(
"Build Road"));
1315 act = menu->addAction(
_(
"Build Irrigation"));
1320 act = menu->addAction(
_(
"Cultivate"));
1325 act = menu->addAction(
_(
"Build Mine"));
1330 act = menu->addAction(
_(
"Plant"));
1335 menu->addSeparator();
1336 act = menu->addAction(
_(
"Connect With Road"));
1337 act->setShortcut(QKeySequence(tr(
"ctrl+r")));
1340 act = menu->addAction(
_(
"Connect With Railroad"));
1342 act->setShortcut(QKeySequence(tr(
"ctrl+l")));
1344 act = menu->addAction(
_(
"Connect With Maglev"));
1346 act->setShortcut(QKeySequence(tr(
"ctrl+m")));
1348 act = menu->addAction(
_(
"Connect With Irrigation"));
1350 act->setShortcut(QKeySequence(tr(
"ctrl+i")));
1352 menu->addSeparator();
1353 act = menu->addAction(
_(
"Transform Terrain"));
1358 act = menu->addAction(
_(
"Clean Pollution"));
1363 act = menu->addAction(
_(
"Clean Nuclear Fallout"));
1365 act->setShortcut(QKeySequence(tr(
"n")));
1368 .replace(
"&",
"&&"));
1369 act->setShortcut(QKeySequence(tr(
"b")));
1373 .replace(
"&",
"&&"));
1374 act->setShortcut(QKeySequence(tr(
"r")));
1381 act->setShortcut(QKeySequence(tr(
"z")));
1384 act->setShortcut(QKeySequence(tr(
"ctrl+z")));
1387 act->setShortcut(QKeySequence(tr(
"ctrl+shift+c")));
1394 act->setShortcut(QKeySequence(tr(
"ctrl+t")));
1401 act->setShortcut(QKeySequence(tr(
"ctrl+j")));
1403 act->setShortcut(QKeySequence(tr(
"shift+s")));
1406 act->setShortcut(QKeySequence(tr(
"ctrl+y")));
1417 act->setCheckable(
true);
1418 act->setChecked(
true);
1424 act->setCheckable(
true);
1425 act->setChecked(
false);
1426 act->setData(ACTION_SPY_BRIBE_UNIT);
1431 act->setCheckable(
true);
1432 act->setChecked(
false);
1433 act->setData(ACTION_SPY_SABOTAGE_UNIT);
1438 act->setCheckable(
true);
1439 act->setChecked(
false);
1440 act->setData(ACTION_SPY_SABOTAGE_UNIT_ESC);
1446 act->setCheckable(
true);
1447 act->setChecked(
true);
1453 act->setCheckable(
true);
1454 act->setChecked(
false);
1455 act->setData(ACTION_SPY_INVESTIGATE_CITY);
1460 act->setCheckable(
true);
1461 act->setChecked(
false);
1462 act->setData(ACTION_INV_CITY_SPEND);
1467 act->setCheckable(
true);
1468 act->setChecked(
false);
1469 act->setData(ACTION_ESTABLISH_EMBASSY);
1474 act->setCheckable(
true);
1475 act->setChecked(
false);
1476 act->setData(ACTION_ESTABLISH_EMBASSY_STAY);
1481 act->setCheckable(
true);
1482 act->setChecked(
false);
1483 act->setData(ACTION_SPY_STEAL_TECH);
1488 act->setCheckable(
true);
1489 act->setChecked(
false);
1490 act->setData(ACTION_SPY_STEAL_TECH_ESC);
1495 act->setCheckable(
true);
1496 act->setChecked(
false);
1497 act->setData(ACTION_SPY_INCITE_CITY);
1502 act->setCheckable(
true);
1503 act->setChecked(
false);
1504 act->setData(ACTION_SPY_INCITE_CITY_ESC);
1509 act->setCheckable(
true);
1510 act->setChecked(
false);
1511 act->setData(ACTION_SPY_POISON);
1516 act->setCheckable(
true);
1517 act->setChecked(
false);
1518 act->setData(ACTION_SPY_POISON_ESC);
1523 menu = this->addMenu(
_(
"Civilization"));
1524 act = menu->addAction(
_(
"Tax Rates..."));
1527 menu->addSeparator();
1529 act = menu->addAction(
_(
"Policies..."));
1532 menu->addSeparator();
1534 menu->addMenu(
new class gov_menu(
this));
1535 menu->addSeparator();
1537 act = menu->addAction(
Q_(
"?noun:View"));
1538 act->setShortcut(QKeySequence(tr(
"F1")));
1541 act = menu->addAction(
_(
"Units"));
1542 act->setShortcut(QKeySequence(tr(
"F2")));
1545 act = menu->addAction(
_(
"Nations"));
1546 act->setShortcut(QKeySequence(tr(
"F3")));
1549 act = menu->addAction(
_(
"Cities"));
1550 act->setShortcut(QKeySequence(tr(
"F4")));
1553 act = menu->addAction(
_(
"Economy"));
1554 act->setShortcut(QKeySequence(tr(
"F5")));
1557 act = menu->addAction(
_(
"Research"));
1558 act->setShortcut(QKeySequence(tr(
"F6")));
1561 act = menu->addAction(
_(
"Wonders of the World"));
1562 act->setShortcut(QKeySequence(tr(
"F7")));
1565 act = menu->addAction(
_(
"Top Five Cities"));
1566 act->setShortcut(QKeySequence(tr(
"F8")));
1569 act = menu->addAction(
_(
"Demographics"));
1570 act->setShortcut(QKeySequence(tr(
"F11")));
1573 act = menu->addAction(
_(
"Spaceship"));
1574 act->setShortcut(QKeySequence(tr(
"F12")));
1577 act = menu->addAction(
_(
"Achievements"));
1580 act = menu->addAction(
_(
"Endgame report"));
1585 menu = this->addMenu(
_(
"Battle Groups"));
1587 act = menu->addAction(
_(
"Select Battle Group 1"));
1588 act->setShortcut(QKeySequence(tr(
"Shift+F1")));
1591 act = menu->addAction(
_(
"Assign Battle Group 1"));
1592 act->setShortcut(QKeySequence(tr(
"Ctrl+F1")));
1595 act = menu->addAction(
_(
"Append to Battle Group 1"));
1596 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F1")));
1599 act = menu->addAction(
_(
"Select Battle Group 2"));
1600 act->setShortcut(QKeySequence(tr(
"Shift+F2")));
1603 act = menu->addAction(
_(
"Assign Battle Group 2"));
1604 act->setShortcut(QKeySequence(tr(
"Ctrl+F2")));
1607 act = menu->addAction(
_(
"Append to Battle Group 2"));
1608 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F2")));
1611 act = menu->addAction(
_(
"Select Battle Group 3"));
1612 act->setShortcut(QKeySequence(tr(
"Shift+F3")));
1615 act = menu->addAction(
_(
"Assign Battle Group 3"));
1616 act->setShortcut(QKeySequence(tr(
"Ctrl+F3")));
1619 act = menu->addAction(
_(
"Append to Battle Group 3"));
1620 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F3")));
1623 act = menu->addAction(
_(
"Select Battle Group 4"));
1624 act->setShortcut(QKeySequence(tr(
"Shift+F4")));
1627 act = menu->addAction(
_(
"Assign Battle Group 4"));
1628 act->setShortcut(QKeySequence(tr(
"Ctrl+F4")));
1631 act = menu->addAction(
_(
"Append to Battle Group 4"));
1632 act->setShortcut(QKeySequence(tr(
"Ctrl+Shift+F4")));
1636 menu = this->addMenu(
_(
"Help"));
1639 QObject::connect(act, &QAction::triggered, [
this]() {
1644 QObject::connect(act, &QAction::triggered, [
this]() {
1649 QObject::connect(act, &QAction::triggered, [
this]() {
1654 QObject::connect(act, &QAction::triggered, [
this]() {
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]() {
1733 menu->addSeparator();
1736 QObject::connect(act, &QAction::triggered, [
this]() {
1741 QObject::connect(act, &QAction::triggered, [
this]() {
1746 QObject::connect(act, &QAction::triggered, [
this]() {
1751 QObject::connect(act, &QAction::triggered, [
this]() {
1756 QObject::connect(act, &QAction::triggered, [
this]() {
1760 menu->addSeparator();
1763 QObject::connect(act, &QAction::triggered, [
this]() {
1768 QObject::connect(act, &QAction::triggered, [
this]() {
1773 QObject::connect(act, &QAction::triggered, [
this]() {
1777 menus = this->findChildren<QMenu*>();
1778 for (i = 0; i < menus.count(); i++) {
1779 menus[i]->setAttribute(Qt::WA_TranslucentBackground);
1781 this->setVisible(
false);