Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions
menu.cpp File Reference
#include <QActionGroup>
#include <QApplication>
#include <QFileDialog>
#include <QMainWindow>
#include <QMessageBox>
#include <QScrollArea>
#include <QStandardPaths>
#include <QVBoxLayout>
#include "string_vector.h"
#include "game.h"
#include "government.h"
#include "goto.h"
#include "name_translation.h"
#include "road.h"
#include "unit.h"
#include "connectdlg_common.h"
#include "control.h"
#include "helpdata.h"
#include "fc_client.h"
#include "chatline.h"
#include "cityrep.h"
#include "dialogs.h"
#include "gotodlg.h"
#include "gui_main.h"
#include "hudwidget.h"
#include "mapctrl.h"
#include "messagedlg.h"
#include "plrdlg.h"
#include "ratesdlg.h"
#include "repodlgs.h"
#include "shortcuts.h"
#include "spaceshipdlg.h"
#include "sprite.h"
#include "menu.h"

Go to the source code of this file.

Macros

#define CREATE_SUB_ITEM(_menu_, _act_id_, _sub_tgt_id_, _sub_tgt_name_)
 
#define ADD_OLD_SHORTCUT(wanted_action_id, sc_id)
 

Functions

static void enable_interface (bool enable)
 
void real_menus_init (void)
 
void real_menus_update (void)
 
static const charget_tile_change_menu_text (struct tile *ptile, enum unit_activity activity)
 
void multiairlift (struct city *acity, Unit_type_id ut)
 

Macro Definition Documentation

◆ ADD_OLD_SHORTCUT

#define ADD_OLD_SHORTCUT (   wanted_action_id,
  sc_id 
)
Value:
if (act_id == wanted_action_id) { \
fc_shortcuts::sc()->get_shortcut(sc_id)))); \
}
static fc_shortcuts * sc()
char * incite_cost
Definition comments.c:76
QString shortcut_to_string(fc_shortcut *sc)
Definition climisc.h:82

◆ CREATE_SUB_ITEM

#define CREATE_SUB_ITEM (   _menu_,
  _act_id_,
  _sub_tgt_id_,
  _sub_tgt_name_ 
)
Value:
{ \
QObject::connect(_sub_item_, &QAction::triggered, \
[this, _act_id_, _sub_target_id_]() { \
}); \
}

Function Documentation

◆ enable_interface()

void enable_interface ( bool  enable)
static

Helper function to hide/show widgets

Definition at line 3198 of file menu.cpp.

Referenced by mr_menu::slot_lock().

◆ get_tile_change_menu_text()

static const char * get_tile_change_menu_text ( struct tile ptile,
enum unit_activity  activity 
)
static

Return the text for the tile, changed by the activity. Should only be called for irrigation, mining, or transformation, and only when the activity changes the base terrain type.

Definition at line 553 of file menu.cpp.

◆ multiairlift()

void multiairlift ( struct city acity,
Unit_type_id  ut 
)

Airlift unit type to city acity from each city

Definition at line 3919 of file menu.cpp.

Referenced by map_view::shortcut_pressed().

◆ real_menus_init()

void real_menus_init ( void  )

Initialize menus (sensitivity, name, etc.) based on the current state and current ruleset, etc. Call menus_update().

Definition at line 512 of file menu.cpp.

◆ real_menus_update()

void real_menus_update ( void  )

Update all of the menus (sensitivity, name, etc.) based on the current state.

Definition at line 530 of file menu.cpp.