Freeciv-3.3
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 voiditem ()
 
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_problemcurrent_problem
 
req_vec_fix_itemitem_info
 
bool did_apply_a_solution
 
ruledit_guiui
 
req_vec_fix_problemcurrent_problem_viewer
 
QStackedLayoutcurrent_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_inruledit instance this is for.
itemruleset entity item specific helpers. req_vec_fix's destructor calls close() on it.

Definition at line 144 of file req_vec_fix.cpp.

◆ ~req_vec_fix()

req_vec_fix::~req_vec_fix ( )

Destructor for req_vec_fix.

Definition at line 203 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 300 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_solutionthe selected solution

Definition at line 264 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
vecthe requirement vector that may have been changed.

Definition at line 336 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 218 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 227 of file req_vec_fix.cpp.

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

◆ reject_applied_solutions

void req_vec_fix::reject_applied_solutions ( )
privateslot

Undo all accepted solutions.

Definition at line 321 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
vecthe 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

◆ item_info

req_vec_fix_item* req_vec_fix::item_info
private

◆ 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().