Freeciv21
Develop your civilization from humble roots to a global empire
helpdlg.cpp File Reference
#include <QApplication>
#include <QGraphicsDropShadowEffect>
#include <QPainter>
#include <QProgressBar>
#include <QScreen>
#include <QScrollArea>
#include <QSplitter>
#include <QTreeWidget>
#include <QVBoxLayout>
#include "fcintl.h"
#include "government.h"
#include "helpdata.h"
#include "movement.h"
#include "nation.h"
#include "specialist.h"
#include "terrain.h"
#include "canvas.h"
#include "client_main.h"
#include "climisc.h"
#include "fc_client.h"
#include "fonts.h"
#include "helpdlg.h"
#include "tileset/tilespec.h"
#include "views/view_map_common.h"
+ Include dependency graph for helpdlg.cpp:

Go to the source code of this file.

Macros

#define MAX_HELP_TEXT_SIZE   8192
 
#define REQ_LABEL_NEVER   _("(Never)")
 
#define REQ_LABEL_NONE   _("?tech:None")
 
#define SET_MAX(v)   max->v = max->v > terrain->v ? max->v : terrain->v
 
#define SET_MAX(v)   max->v = max->v > utype->v ? max->v : utype->v
 

Functions

QPixmap * terrain_canvas (struct terrain *terrain, const struct extra_type *resource, enum extra_cause cause)
 Creates a terrain image on the given canvas. More...
 
void popup_help_dialog_typed (const char *item, enum help_page_type htype)
 Popup the help dialog to display help on the given string topic from the given section. More...
 
void popdown_help_dialog (void)
 Close the help dialog. More...
 
void update_help_fonts ()
 Updates fonts. More...
 
static QLabel * set_properties (help_widget *hw)
 
static QLabel * make_helplabel (const QString &title, const QString &tooltip, QHBoxLayout *layout)
 
static void make_helppiclabel (QPixmap *spr, const QString &tooltip, QHBoxLayout *layout)
 

Variables

static help_dialoghelp_dlg = nullptr
 
QList< const struct help_item * > * help_nodes
 

Macro Definition Documentation

◆ MAX_HELP_TEXT_SIZE

#define MAX_HELP_TEXT_SIZE   8192

Definition at line 40 of file helpdlg.cpp.

◆ REQ_LABEL_NEVER

#define REQ_LABEL_NEVER   _("(Never)")

Definition at line 41 of file helpdlg.cpp.

◆ REQ_LABEL_NONE

#define REQ_LABEL_NONE   _("?tech:None")

Definition at line 42 of file helpdlg.cpp.

◆ SET_MAX [1/2]

#define SET_MAX (   v)    max->v = max->v > terrain->v ? max->v : terrain->v

◆ SET_MAX [2/2]

#define SET_MAX (   v)    max->v = max->v > utype->v ? max->v : utype->v

Function Documentation

◆ make_helplabel()

static QLabel* make_helplabel ( const QString &  title,
const QString &  tooltip,
QHBoxLayout *  layout 
)
static

Definition at line 1197 of file helpdlg.cpp.

Referenced by help_widget::create_terrain_widget().

◆ make_helppiclabel()

static void make_helppiclabel ( QPixmap *  spr,
const QString &  tooltip,
QHBoxLayout *  layout 
)
static

Definition at line 1211 of file helpdlg.cpp.

Referenced by help_widget::create_terrain_widget().

◆ popdown_help_dialog()

void popdown_help_dialog ( void  )

Close the help dialog.

Definition at line 75 of file helpdlg.cpp.

Referenced by client_state(), handle_game_info(), popdown_all_game_dialogs(), and tilespec_reread().

◆ popup_help_dialog_typed()

void popup_help_dialog_typed ( const char *  item,
enum help_page_type  htype 
)

Popup the help dialog to display help on the given string topic from the given section.

The string will be translated.

Definition at line 56 of file helpdlg.cpp.

Referenced by help_widget::anchor_clicked(), freeciv::upkeep_widget::contextMenuEvent(), research_diagram::mousePressEvent(), and mr_menu::slot_help().

◆ set_properties()

◆ terrain_canvas()

QPixmap * terrain_canvas ( struct terrain terrain,
const struct extra_type resource = nullptr,
enum extra_cause  cause = EC_COUNT 
)

Creates a terrain image on the given canvas.

Definition at line 1155 of file helpdlg.cpp.

Referenced by help_dialog::make_tree(), and help_widget::set_topic_terrain().

◆ update_help_fonts()

void update_help_fonts ( )

Updates fonts.

Definition at line 87 of file helpdlg.cpp.

Referenced by apply_help_font().

Variable Documentation

◆ help_dlg

help_dialog* help_dlg = nullptr
static

Definition at line 43 of file helpdlg.cpp.

Referenced by popdown_help_dialog(), popup_help_dialog_typed(), and update_help_fonts().

◆ help_nodes

QList<const struct help_item *>* help_nodes
extern