Freeciv-3.2: research_diagram Class Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Public Member Functions | Private Slots | Private Member Functions | Private Attributes
research_diagram Class Reference

`#include <repodlgs.h>`

Inheritance diagram for research_diagram:

## Public Member Functions

| research_diagram (QWidget *parent=nullptr)
| ~research_diagram ()
void | update_reqtree ()
void | reset ()
QSize | size ()

## Private Slots

void | show_tooltip ()

## Private Member Functions

void | mousePressEvent (QMouseEvent *event)
void | mouseMoveEvent (QMouseEvent *event)
void | paintEvent (QPaintEvent *event)
void | create_tooltip_help ()

## Private Attributes

struct canvas * | pcanvas
struct reqtree * | req
bool | timer_active
int | width
int | height
QList< req_tooltip_help * > | tt_help
QPoint | tooltip_pos
QString | tooltip_text
QRect | tooltip_rect

## Detailed Description

Definition at line 139 of file repodlgs.h.

## Constructor & Destructor Documentation

## ◆ research_diagram()

research_diagram::research_diagram | ( | QWidget * | parent = `nullptr` | ) |

Constructor for research diagram

Definition at line 553 of file repodlgs.cpp.

## ◆ ~research_diagram()

research_diagram::~research_diagram | ( |  | ) |

Destructor for research diagram

Definition at line 564 of file repodlgs.cpp.

## Member Function Documentation

## ◆ create_tooltip_help()

void research_diagram::create_tooltip_help | ( |  | ) |

private

Create list of rectangles for showing tooltips

Definition at line 585 of file repodlgs.cpp.

Referenced by update_reqtree().

## ◆ mouseMoveEvent()

void research_diagram::mouseMoveEvent | ( | QMouseEvent * | event | ) |

private

Mouse move handler for research_diagram - for showing tooltips

Definition at line 767 of file repodlgs.cpp.

## ◆ mousePressEvent()

void research_diagram::mousePressEvent | ( | QMouseEvent * | event | ) |

private

Mouse handler for research_diagram

Definition at line 720 of file repodlgs.cpp.

## ◆ paintEvent()

void research_diagram::paintEvent | ( | QPaintEvent * | event | ) |

private

Paint event for research_diagram

Definition at line 840 of file repodlgs.cpp.

## ◆ reset()

void research_diagram::reset | ( |  | ) |

Initializes research diagram

Definition at line 701 of file repodlgs.cpp.

Referenced by research_diagram(), science_report::reset_tree(), and update_reqtree().

## ◆ show_tooltip

void research_diagram::show_tooltip | ( |  | ) |

privateslot

Slot for timer used to show tooltip

Definition at line 825 of file repodlgs.cpp.

Referenced by mouseMoveEvent().

## ◆ size()

QSize research_diagram::size | ( |  | ) |

Returns size of research_diagram

Definition at line 852 of file repodlgs.cpp.

Referenced by science_report::reset_tree(), and science_report::science_report().

## ◆ update_reqtree()

void research_diagram::update_reqtree | ( |  | ) |

Recreates whole diagram and schedules update

Definition at line 690 of file repodlgs.cpp.

Referenced by science_report::update_reqtree().

## Field Documentation

## ◆ height

int research_diagram::height

private

Definition at line 160 of file repodlgs.h.

Referenced by paintEvent(), reset(), size(), and update_reqtree().

## ◆ pcanvas

struct canvas* research_diagram::pcanvas

private

Definition at line 156 of file repodlgs.h.

Referenced by paintEvent(), research_diagram(), reset(), update_reqtree(), and ~research_diagram().

## ◆ req

struct reqtree* research_diagram::req

private

Definition at line 157 of file repodlgs.h.

Referenced by create_tooltip_help(), mousePressEvent(), research_diagram(), reset(), update_reqtree(), and ~research_diagram().

## ◆ timer_active

bool research_diagram::timer_active

private

Definition at line 158 of file repodlgs.h.

Referenced by mouseMoveEvent(), reset(), and show_tooltip().

## ◆ tooltip_pos

QPoint research_diagram::tooltip_pos

private

Definition at line 162 of file repodlgs.h.

Referenced by mouseMoveEvent(), and show_tooltip().

## ◆ tooltip_rect

QRect research_diagram::tooltip_rect

private

Definition at line 164 of file repodlgs.h.

Referenced by mouseMoveEvent(), and show_tooltip().

## ◆ tooltip_text

QString research_diagram::tooltip_text

private

Definition at line 163 of file repodlgs.h.

Referenced by mouseMoveEvent(), and show_tooltip().

## ◆ tt_help

QList<req_tooltip_help*> research_diagram::tt_help

private

Definition at line 161 of file repodlgs.h.

Referenced by create_tooltip_help(), mouseMoveEvent(), mousePressEvent(), and ~research_diagram().

## ◆ width

int research_diagram::width

private

Definition at line 159 of file repodlgs.h.

Referenced by paintEvent(), reset(), size(), and update_reqtree().