|
Freeciv-3.1
|
#include <helpdlg.h>
Inheritance diagram for help_widget:Public Slots | |
| void | set_topic (const help_item *item) |
Public Member Functions | |
| help_widget (QWidget *parent=0) | |
| help_widget (const help_item *item, QWidget *parent=0) | |
| ~help_widget () | |
| void | update_fonts () |
| struct terrain * | terrain_max_values () |
| struct unit_type * | uclass_max_values (struct unit_class *uclass) |
Private Slots | |
| void | anchor_clicked (const QString &link) |
Private Member Functions | |
| void | setup_ui () |
| void | set_main_widget (QWidget *main_widget) |
| void | do_layout (bool horizontal) |
| void | undo_layout () |
| void | show_info_panel () |
| void | add_info_pixmap (QPixmap *pm, bool shadow=false) |
| void | add_info_label (const QString &text) |
| void | add_info_progress (const QString &label, int progress, int min, int max, const QString &value=QString()) |
| void | add_extras_of_act_for_terrain (struct terrain *pterr, enum unit_activity act, const char *label) |
| void | add_info_separator () |
| void | add_info_widget (QWidget *widget) |
| void | info_panel_done () |
| void | set_bottom_panel (QWidget *widget) |
| QLayout * | create_terrain_widget (const QString &title, const struct canvas *image, const QString &legend, const QString &tooltip=QString()) |
| void | set_topic_other (const help_item *item, const char *title) |
| void | set_topic_any (const help_item *item, const char *title) |
| void | set_topic_text (const help_item *item, const char *title) |
| void | set_topic_unit (const help_item *item, const char *title) |
| void | set_topic_building (const help_item *item, const char *title) |
| void | set_topic_tech (const help_item *item, const char *title) |
| void | set_topic_terrain (const help_item *item, const char *title) |
| bool | set_topic_extra (const help_item *item, const char *title) |
| void | set_topic_specialist (const help_item *item, const char *title) |
| void | set_topic_government (const help_item *item, const char *title) |
| void | set_topic_nation (const help_item *item, const char *title) |
| void | set_topic_goods (const help_item *item, const char *title) |
| QString | link_me (const char *str, help_page_type hpt) |
Private Attributes | |
| QFrame * | box_wdg |
| QLabel * | title_label |
| QWidget * | main_widget |
| QTextBrowser * | text_browser |
| QWidget * | bottom_panel |
| QWidget * | info_panel |
| QSplitter * | splitter |
| QVBoxLayout * | info_layout |
| QList< int > | splitter_sizes |
| help_widget::help_widget | ( | QWidget * | parent = 0 | ) |
Creates a new, empty help widget.
Definition at line 435 of file helpdlg.cpp.
| help_widget::help_widget | ( | const help_item * | topic, |
| QWidget * | parent = 0 |
||
| ) |
Creates a new help widget displaying the specified topic.
Definition at line 446 of file helpdlg.cpp.
| help_widget::~help_widget | ( | ) |
Destructor.
Definition at line 458 of file helpdlg.cpp.
|
private |
Create labels about all extras of one cause buildable to the terrain.
Definition at line 703 of file helpdlg.cpp.
Referenced by set_topic_terrain().
|
private |
Adds a text label to the information panel.
Definition at line 647 of file helpdlg.cpp.
Referenced by set_topic_building(), and set_topic_unit().
Adds a pixmap to the information panel.
Definition at line 626 of file helpdlg.cpp.
Referenced by set_topic_building(), set_topic_extra(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
|
private |
Adds a widget indicating a progress to the information panel. Arguments: text: A descriptive text progress: The progress to display [min,max]: The interval progress is in value: Use this to display a non-numeral value
Definition at line 664 of file helpdlg.cpp.
Referenced by set_topic_terrain(), and set_topic_unit().
|
private |
Adds a separator to the information panel.
Definition at line 752 of file helpdlg.cpp.
Referenced by set_topic_terrain(), and set_topic_unit().
|
private |
|
privateslot |
Hyperlink clicked, link has 2 variables, string(name of given help) and int(help_page_type)
Definition at line 769 of file helpdlg.cpp.
Referenced by add_extras_of_act_for_terrain(), set_topic_building(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
|
private |
Creates a terrain widget with title, terrain image, legend. An optional tooltip can be given to explain the legend.
Definition at line 1245 of file helpdlg.cpp.
Referenced by set_topic_terrain().
|
private |
Lays things out. In case of horizontal being true, the widget is organized as follows, with the additional complexity that info_ and/or bottom_panel may be absent.
+------------------------------—+ | title_label | +------------------------------—+ |+-main_widget----------------—+| ||+---------—+ +-----------—+|| ||| | | ||| ||| info_panel | | text_browser ||| ||| | | ||| ||| |.+-----------—+|| ||| |. ... || ||| |.+-----------—+|| ||| | | ||| ||| | | bottom_panel ||| ||| | | ||| ||+---------—+ +-----------—+|| |+----------------------------—+| +------------------------------—+
Definition at line 516 of file helpdlg.cpp.
Referenced by set_topic().
|
private |
Called when everything needed has been added to the information panel.
Definition at line 760 of file helpdlg.cpp.
Referenced by set_topic_building(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
|
private |
Creates link to given help page
Definition at line 741 of file helpdlg.cpp.
Referenced by add_extras_of_act_for_terrain(), set_topic_building(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
|
private |
Sets the bottom panel.
Definition at line 853 of file helpdlg.cpp.
Referenced by set_topic_terrain().
|
private |
|
slot |
Shows the given help page.
Definition at line 794 of file helpdlg.cpp.
Referenced by help_widget(), help_dialog::item_changed(), and help_dialog::set_topic().
|
private |
|
private |
Creates improvement help pages.
Definition at line 998 of file helpdlg.cpp.
Referenced by set_topic().
Creates extra help pages.
Definition at line 1468 of file helpdlg.cpp.
Referenced by set_topic().
|
private |
|
private |
Creates government help pages.
Definition at line 1525 of file helpdlg.cpp.
Referenced by set_topic().
|
private |
|
private |
Creates help pages with no special widgets.
Definition at line 860 of file helpdlg.cpp.
Referenced by set_topic(), set_topic_building(), set_topic_extra(), set_topic_goods(), set_topic_government(), set_topic_nation(), set_topic_specialist(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
|
private |
Creates specialist help pages.
Definition at line 1508 of file helpdlg.cpp.
Referenced by set_topic().
|
private |
Creates technology help pages.
Definition at line 1090 of file helpdlg.cpp.
Referenced by set_topic().
|
private |
|
private |
|
private |
|
private |
Creates the UI.
Definition at line 465 of file helpdlg.cpp.
Referenced by help_widget(), and help_widget().
|
private |
Creates the information panel. It will be shown by do_complex_layout().
Definition at line 617 of file helpdlg.cpp.
Referenced by set_topic_building(), set_topic_extra(), set_topic_tech(), set_topic_terrain(), and set_topic_unit().
| struct terrain * help_widget::terrain_max_values | ( | ) |
Retrieves the maximum values any terrain will ever have. Supported fields: base_time, clean_fallout_time, clean_pollution_time, defense_bonus, irrigation_food_incr, irrigation_time, mining_shield_incr, mining_time, movement_cost, output, pillage_time, road_output_incr_pct, road_time, transform_time Other fields in returned value are undefined. Especially, all pointers are invalid.
Definition at line 1582 of file helpdlg.cpp.
Referenced by set_topic_terrain().
| struct unit_type * help_widget::uclass_max_values | ( | struct unit_class * | uclass | ) |
Retrieves the maximum values any unit of uclass will ever have. Supported fields: attack_strength, bombard_rate, build_cost, city_size, convert_time, defense_strength, firepower, fuel, happy_cost, hp, move_rate, pop_cost, upkeep, vision_radius_sq Other fields in returned value are undefined. Especially, all pointers are invalid except uclass.
Definition at line 1654 of file helpdlg.cpp.
Referenced by set_topic_unit().
|
private |
Deletes the widgets created by do_complex_layout().
Definition at line 594 of file helpdlg.cpp.
Referenced by set_topic().
| void help_widget::update_fonts | ( | ) |
Updates fonts for manual
Definition at line 564 of file helpdlg.cpp.
Referenced by setup_ui(), and help_dialog::update_fonts().
|
private |
Definition at line 87 of file helpdlg.h.
Referenced by do_layout(), set_bottom_panel(), and undo_layout().
|
private |
Definition at line 82 of file helpdlg.h.
Referenced by setup_ui().
|
private |
Definition at line 90 of file helpdlg.h.
Referenced by add_extras_of_act_for_terrain(), add_info_label(), add_info_pixmap(), add_info_progress(), add_info_separator(), do_layout(), info_panel_done(), set_topic_building(), set_topic_tech(), set_topic_terrain(), set_topic_unit(), show_info_panel(), and undo_layout().
|
private |
Definition at line 88 of file helpdlg.h.
Referenced by do_layout(), show_info_panel(), and undo_layout().
|
private |
Definition at line 85 of file helpdlg.h.
Referenced by do_layout(), setup_ui(), and undo_layout().
|
private |
Definition at line 89 of file helpdlg.h.
Referenced by do_layout(), and undo_layout().
|
private |
Definition at line 91 of file helpdlg.h.
Referenced by do_layout(), setup_ui(), and undo_layout().
|
private |
Definition at line 86 of file helpdlg.h.
Referenced by do_layout(), set_topic_building(), set_topic_extra(), set_topic_goods(), set_topic_government(), set_topic_nation(), set_topic_other(), set_topic_specialist(), set_topic_tech(), set_topic_terrain(), set_topic_unit(), setup_ui(), and undo_layout().
|
private |
Definition at line 83 of file helpdlg.h.
Referenced by set_topic(), and setup_ui().