Freeciv-3.1
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Private Slots | Private Attributes
effect_edit Class Reference

#include <effect_edit.h>

+ Inheritance diagram for effect_edit:

Public Member Functions

 effect_edit (ruledit_gui *ui_in, QString target, struct universal *filter_in, enum effect_filter_main_class efmc_in)
 
 ~effect_edit ()
 
void refresh ()
 
void add (const char *msg)
 
void add_effect_to_list (struct effect *peffect, struct effect_list_fill_data *fill_data)
 
struct universalfilter_get ()
 

Data Fields

enum effect_filter_main_class efmc
 

Protected Member Functions

void closeEvent (QCloseEvent *event)
 

Private Slots

void select_effect ()
 
void fill_active ()
 
void edit_reqs ()
 
void add_now ()
 
void delete_now ()
 
void close_now ()
 
void effect_type_menu (QAction *action)
 
void set_value (int value)
 
void multiplier_menu (QAction *action)
 

Private Attributes

ruledit_guiui
 
QString name
 
QListWidget * list_widget
 
struct universal filter
 
struct effect_list * effects
 
struct effectselected
 
int selected_nbr
 
QToolButton * edit_type_button
 
QSpinBox * value_box
 
QToolButton * mp_button
 

Detailed Description

Definition at line 46 of file effect_edit.h.

Constructor & Destructor Documentation

◆ effect_edit()

effect_edit::effect_edit ( ruledit_gui ui_in,
QString  target,
struct universal filter_in,
enum effect_filter_main_class  efmc_in 
)
explicit

Setup effect_edit object

Definition at line 44 of file effect_edit.cpp.

◆ ~effect_edit()

effect_edit::~effect_edit ( )

Effect edit destructor

Definition at line 142 of file effect_edit.cpp.

Member Function Documentation

◆ add()

void effect_edit::add ( const char *  msg)

◆ add_effect_to_list()

void effect_edit::add_effect_to_list ( struct effect peffect,
struct effect_list_fill_data fill_data 
)

Add entry to effect list.

Definition at line 194 of file effect_edit.cpp.

Referenced by effect_list_fill_cb().

◆ add_now

void effect_edit::add_now ( )
privateslot

User requested new effect

Definition at line 321 of file effect_edit.cpp.

Referenced by effect_edit().

◆ close_now

void effect_edit::close_now ( )
privateslot

User pushed close button

Definition at line 222 of file effect_edit.cpp.

Referenced by effect_edit().

◆ closeEvent()

void effect_edit::closeEvent ( QCloseEvent *  event)
protected

User clicked windows close button.

Definition at line 313 of file effect_edit.cpp.

◆ delete_now

void effect_edit::delete_now ( )
privateslot

User requested effect deletion

Definition at line 340 of file effect_edit.cpp.

Referenced by effect_edit().

◆ edit_reqs

void effect_edit::edit_reqs ( )
privateslot

User wants to edit requirements

Definition at line 296 of file effect_edit.cpp.

Referenced by effect_edit().

◆ effect_type_menu

void effect_edit::effect_type_menu ( QAction *  action)
privateslot

User selected type for the effect.

Definition at line 268 of file effect_edit.cpp.

Referenced by effect_edit().

◆ fill_active

void effect_edit::fill_active ( )
privateslot

Fill active menus from selected effect.

Definition at line 250 of file effect_edit.cpp.

Referenced by refresh(), and select_effect().

◆ filter_get()

struct universal * effect_edit::filter_get ( )

Getter for filter

Definition at line 214 of file effect_edit.cpp.

◆ multiplier_menu

void effect_edit::multiplier_menu ( QAction *  action)
privateslot

User selected multiplier for the effect

Definition at line 354 of file effect_edit.cpp.

Referenced by effect_edit().

◆ refresh()

void effect_edit::refresh ( )

Refresh the information.

Definition at line 175 of file effect_edit.cpp.

Referenced by add_now(), delete_now(), effect_edit(), and multiplier_menu().

◆ select_effect

void effect_edit::select_effect ( )
privateslot

User selected effect from the list.

Definition at line 231 of file effect_edit.cpp.

Referenced by effect_edit().

◆ set_value

void effect_edit::set_value ( int  value)
privateslot

Read value from spinbox to effect

Definition at line 284 of file effect_edit.cpp.

Referenced by effect_edit().

Field Documentation

◆ edit_type_button

QToolButton* effect_edit::edit_type_button
private

Definition at line 74 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().

◆ effects

struct effect_list* effect_edit::effects
private

Definition at line 69 of file effect_edit.h.

Referenced by add_effect_to_list(), effect_edit(), refresh(), select_effect(), and ~effect_edit().

◆ efmc

enum effect_filter_main_class effect_edit::efmc

Definition at line 61 of file effect_edit.h.

Referenced by effect_edit(), and refresh().

◆ filter

struct universal effect_edit::filter
private

Definition at line 68 of file effect_edit.h.

Referenced by add_now(), effect_edit(), filter_get(), and refresh().

◆ list_widget

QListWidget* effect_edit::list_widget
private

Definition at line 67 of file effect_edit.h.

Referenced by add_effect_to_list(), effect_edit(), refresh(), and select_effect().

◆ mp_button

QToolButton* effect_edit::mp_button
private

Definition at line 77 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().

◆ name

QString effect_edit::name
private

Definition at line 66 of file effect_edit.h.

Referenced by edit_reqs(), and effect_edit().

◆ selected

struct effect* effect_edit::selected
private

◆ selected_nbr

int effect_edit::selected_nbr
private

Definition at line 72 of file effect_edit.h.

Referenced by edit_reqs(), and select_effect().

◆ ui

ruledit_gui* effect_edit::ui
private

Definition at line 64 of file effect_edit.h.

Referenced by close_now(), closeEvent(), edit_reqs(), effect_edit(), effect_type_menu(), and set_value().

◆ value_box

QSpinBox* effect_edit::value_box
private

Definition at line 75 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().