12 #ifndef FC__REQ_VEC_FIX_H
13 #define FC__REQ_VEC_FIX_H
15 #include <fc_config.h>
24 class QListWidgetItem;
55 virtual const void *
item() = 0;
69 virtual const char *
name() = 0;
Ruleset entity specific methods for the ruleset item having its requirements fixed.
virtual requirement_vector_by_number vector_getter()=0
Returns a function pointer to a function that returns a writable pointer to the specified requirement...
virtual requirement_vector_namer vector_namer()=0
Returns a function pointer to a function that names this item kind's requirement vector number number...
virtual void close()=0
Tell the helper that it has outlived its usefulness.
virtual void * item_working_copy()=0
Returns a pointer to the working copy of the ruleset item.
virtual void undo_accepted_changes()=0
Undo all the changes the user has accepted to the ruleset item.
virtual const void * item()=0
Returns a pointer to the ruleset item.
virtual void apply_accepted_changes()=0
Do all the changes the user has accepted to the ruleset item.
virtual bool vector_in_item(const struct requirement_vector *vec)=0
Check if the specified vector belongs to this item.
virtual int num_vectors()=0
Returns the number of requirement vectors in this item.
virtual const char * name()=0
Returns a name to describe the item, hopefully good enough to distinguish it from other items.
virtual struct req_vec_problem * find_next_problem()=0
Returns the next detected requirement vector problem for the ruleset item or nullptr if no fix is fou...
Widget for choosing among the suggested solutions to a problem.
req_vec_fix_problem(const struct req_vec_problem *problem, req_vec_fix_item *item_info)
Set up the display and solution choice of the specified problem.
void solution_accepted(int selected_solution)
void accept_solution()
The user selected one of the suggested solutions to the requirement vector problem.
Widget for solving requirement vector problems for a ruleset item.
struct req_vec_problem * current_problem
void rec_vec_may_have_changed(const requirement_vector *vec)
A requirement vector may have been changed.
bool refresh()
Find the next requirement vector problem and its suggested solutions.
const void * item()
Returns the item this dialog is trying to fix.
void accept_applied_solutions()
Do all the accepted solutions for real.
req_vec_fix_problem * current_problem_viewer
void incoming_rec_vec_change(const requirement_vector *vec)
A requirement vector may have been changed.
QStackedLayout * current_problem_area
void reject_applied_solutions()
Undo all accepted solutions.
~req_vec_fix() override
Destructor for req_vec_fix.
void apply_solution(int selected_solution)
Apply the selected solution to the current requirement vector problem.
req_vec_fix(ruledit_gui *ui_in, req_vec_fix_item *item_info)
Set up a widget for displaying and fixing requirement vector problems for a specific ruleset entity i...
req_vec_fix_item * item_info
bool did_apply_a_solution
QPushButton * apply_changes
req_vec_problem_seriousness
void mark_item(QListWidgetItem *item, enum req_vec_problem_seriousness problem_level)
Mark a ruleset item in a list as having a problem.
struct requirement_vector *(* requirement_vector_by_number)(const void *parent_item, req_vec_num_in_item number)
Returns a writable pointer to the specified requirement vector in the specified parent item or nullpt...
const char *(* requirement_vector_namer)(req_vec_num_in_item number)
Returns the name of the specified requirement vector number in the parent item or nullptr if parent i...