Freeciv-3.1: req_vec_fix Class Reference

Freeciv-3.1

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

`#include <req_vec_fix.h>`

Inheritance diagram for req_vec_fix:

## Signals

void | req_vec_may_have_changed (const requirement_vector *vec)

## Public Member Functions

| req_vec_fix (ruledit_gui *ui_in, req_vec_fix_item *item_info)
| ~req_vec_fix ()
const void * | item ()
bool | refresh (void)

## Private Slots

void | apply_solution (int selected_solution)
void | accept_applied_solutions ()
void | reject_applied_solutions ()
void | incoming_req_vec_change (const requirement_vector *vec)

## Private Attributes

struct req_vec_problem * | current_problem
req_vec_fix_item * | item_info
bool | did_apply_a_solution
ruledit_gui * | ui
req_vec_fix_problem * | current_problem_viewer
QStackedLayout * | current_problem_area
QPushButton * | apply_changes
QPushButton * | abort
QPushButton * | close

## Detailed Description

Widget for solving requirement vector problems for a ruleset item.

Definition at line 157 of file req_vec_fix.h.

## Constructor & Destructor Documentation

## ◆ req_vec_fix()

req_vec_fix::req_vec_fix | ( | ruledit_gui * | ui_in,
|  | req_vec_fix_item * | item
| ) |  |

explicit

Set up a widget for displaying and fixing requirement vector problems for a specific ruleset entity item.

Parameters

  ui_in | ruledit instance this is for.
  item | ruleset entity item specific helpers. req_vec_fix's destructor calls close() on it.

Definition at line 143 of file req_vec_fix.cpp.

## ◆ ~req_vec_fix()

req_vec_fix::~req_vec_fix | ( |  | ) |

Destructor for req_vec_fix.

Definition at line 202 of file req_vec_fix.cpp.

## Member Function Documentation

## ◆ accept_applied_solutions

void req_vec_fix::accept_applied_solutions | ( |  | ) |

privateslot

Do all the accepted solutions for real.

Definition at line 299 of file req_vec_fix.cpp.

Referenced by req_vec_fix().

## ◆ apply_solution

void req_vec_fix::apply_solution | ( | int | selected_solution | ) |

privateslot

Apply the selected solution to the current requirement vector problem.

Parameters

  selected_solution | the selected solution

Definition at line 263 of file req_vec_fix.cpp.

Referenced by refresh().

## ◆ incoming_req_vec_change

void req_vec_fix::incoming_req_vec_change | ( | const requirement_vector * | vec | ) |

privateslot

A requirement vector may have been changed.

Parameters

  vec | the requirement vector that may have been changed.

Definition at line 335 of file req_vec_fix.cpp.

Referenced by req_vec_fix().

## ◆ item()

const void * req_vec_fix::item | ( |  | ) |

Returns the item this dialog is trying to fix.

Returns
  the item this dialog is trying to fix.

Definition at line 217 of file req_vec_fix.cpp.

Referenced by req_vec_fix().

## ◆ refresh()

bool req_vec_fix::refresh | ( | void |  | ) |

Find the next requirement vector problem and its suggested solutions.

Returns
  true iff a new problem was found.

Definition at line 226 of file req_vec_fix.cpp.

Referenced by accept_applied_solutions(), apply_solution(), ruledit_gui::open_req_vec_fix(), and reject_applied_solutions().

## ◆ reject_applied_solutions

void req_vec_fix::reject_applied_solutions | ( |  | ) |

privateslot

Undo all accepted solutions.

Definition at line 320 of file req_vec_fix.cpp.

Referenced by incoming_req_vec_change(), and req_vec_fix().

## ◆ req_vec_may_have_changed

void req_vec_fix::req_vec_may_have_changed | ( | const requirement_vector * | vec | ) |

signal

A requirement vector may have been changed.

Parameters

  vec | the requirement vector that was changed.

Referenced by accept_applied_solutions(), and req_vec_fix().

## Field Documentation

## ◆ abort

QPushButton * req_vec_fix::abort

private

Definition at line 185 of file req_vec_fix.h.

Referenced by refresh(), and req_vec_fix().

## ◆ apply_changes

QPushButton* req_vec_fix::apply_changes

private

Definition at line 185 of file req_vec_fix.h.

Referenced by refresh(), and req_vec_fix().

## ◆ close

QPushButton * req_vec_fix::close

private

Definition at line 185 of file req_vec_fix.h.

Referenced by refresh(), and req_vec_fix().

## ◆ current_problem

struct req_vec_problem* req_vec_fix::current_problem

private

Definition at line 177 of file req_vec_fix.h.

Referenced by apply_solution(), refresh(), req_vec_fix(), and ~req_vec_fix().

## ◆ current_problem_area

QStackedLayout* req_vec_fix::current_problem_area

private

Definition at line 184 of file req_vec_fix.h.

Referenced by refresh(), and req_vec_fix().

## ◆ current_problem_viewer

req_vec_fix_problem* req_vec_fix::current_problem_viewer

private

Definition at line 183 of file req_vec_fix.h.

Referenced by refresh(), and req_vec_fix().

## ◆ did_apply_a_solution

bool req_vec_fix::did_apply_a_solution

private

Definition at line 179 of file req_vec_fix.h.

Referenced by accept_applied_solutions(), apply_solution(), refresh(), reject_applied_solutions(), and req_vec_fix().

## ◆ item_info

req_vec_fix_item* req_vec_fix::item_info

private

Definition at line 178 of file req_vec_fix.h.

Referenced by accept_applied_solutions(), apply_solution(), incoming_req_vec_change(), item(), refresh(), reject_applied_solutions(), req_vec_fix(), and ~req_vec_fix().

## ◆ ui

ruledit_gui* req_vec_fix::ui

private

Definition at line 181 of file req_vec_fix.h.

Referenced by req_vec_fix(), and ~req_vec_fix().