Freeciv-3.3
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Attributes
fc_shortcuts Class Reference

#include <shortcuts.h>

Public Member Functions

 ~fc_shortcuts ()
 
fc_shortcutget_shortcut (shortcut_id id)
 
shortcut_id get_id (fc_shortcut *sc)
 
void set_shortcut (fc_shortcut *sc)
 
QString get_desc (shortcut_id id)
 

Static Public Member Functions

static fc_shortcutssc ()
 
static bool is_instantiated ()
 
static void drop ()
 
static void init_default (bool read)
 

Static Public Attributes

static QMap< shortcut_id, fc_shortcut * > hash = QMap<shortcut_id, fc_shortcut*>()
 

Private Member Functions

 Q_DISABLE_COPY (fc_shortcuts)
 
 fc_shortcuts ()
 

Static Private Attributes

static fc_shortcutsm_instance = 0
 

Detailed Description

Definition at line 119 of file shortcuts.h.

Constructor & Destructor Documentation

◆ fc_shortcuts()

fc_shortcuts::fc_shortcuts ( )
private

fc_shortcuts constructor

Definition at line 208 of file shortcuts.cpp.

Referenced by sc().

◆ ~fc_shortcuts()

fc_shortcuts::~fc_shortcuts ( )

fc_shortcuts destructor

Definition at line 216 of file shortcuts.cpp.

Member Function Documentation

◆ drop()

void fc_shortcuts::drop ( )
static

Deletes current instance

Definition at line 267 of file shortcuts.cpp.

◆ get_desc()

QString fc_shortcuts::get_desc ( shortcut_id  id)

Returns description for given shortcut

Definition at line 226 of file shortcuts.cpp.

Referenced by fc_shortcut_popup::check_if_exist(), and fc_shortcuts_dialog::init().

◆ get_id()

shortcut_id fc_shortcuts::get_id ( fc_shortcut sc)

Returns id for given shortcut

Definition at line 246 of file shortcuts.cpp.

Referenced by fc_shortcuts_dialog::init().

◆ get_shortcut()

fc_shortcut * fc_shortcuts::get_shortcut ( shortcut_id  id)

◆ init_default()

void fc_shortcuts::init_default ( bool  read)
static

Inits defaults shortcuts or reads from settings

Definition at line 299 of file shortcuts.cpp.

Referenced by fc_shortcuts_dialog::apply_option(), and fc_shortcuts().

◆ is_instantiated()

bool fc_shortcuts::is_instantiated ( )
static

Check, without instantiating it in the process, if shortcuts system has been instantiated already.

Definition at line 291 of file shortcuts.cpp.

Referenced by write_shortcuts().

◆ Q_DISABLE_COPY()

fc_shortcuts::Q_DISABLE_COPY ( fc_shortcuts  )
private

◆ sc()

fc_shortcuts * fc_shortcuts::sc ( )
static

◆ set_shortcut()

void fc_shortcuts::set_shortcut ( fc_shortcut s)

Sets given shortcut

Definition at line 254 of file shortcuts.cpp.

Referenced by fc_shortcut_popup::closeEvent().

Field Documentation

◆ hash

QMap< shortcut_id, fc_shortcut * > fc_shortcuts::hash = QMap<shortcut_id, fc_shortcut*>()
static

◆ m_instance

fc_shortcuts * fc_shortcuts::m_instance = 0
staticprivate

Definition at line 123 of file shortcuts.h.

Referenced by drop(), is_instantiated(), and sc().