Freeciv-3.3
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)
 
void comment_given ()
 

Private Attributes

ruledit_guiui
 
QString name
 
QListWidgetlist_widget
 
struct universal filter
 
struct effect_listeffects
 
struct effectselected
 
int selected_nbr
 
QToolButtonedit_type_button
 
QSpinBoxvalue_box
 
QToolButtonmp_button
 
QLineEdit * comment
 

Detailed Description

Definition at line 47 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 45 of file effect_edit.cpp.

◆ ~effect_edit()

effect_edit::~effect_edit ( )

Effect edit destructor

Definition at line 148 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 200 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 333 of file effect_edit.cpp.

Referenced by effect_edit().

◆ close_now

void effect_edit::close_now ( )
privateslot

User pushed close button

Definition at line 228 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 325 of file effect_edit.cpp.

◆ comment_given

void effect_edit::comment_given ( )
privateslot

User entered comment for the effect

Definition at line 386 of file effect_edit.cpp.

Referenced by effect_edit().

◆ delete_now

void effect_edit::delete_now ( )
privateslot

User requested effect deletion

Definition at line 352 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 308 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 280 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 256 of file effect_edit.cpp.

Referenced by comment_given(), refresh(), and select_effect().

◆ filter_get()

struct universal * effect_edit::filter_get ( )

Getter for filter

Definition at line 220 of file effect_edit.cpp.

◆ multiplier_menu

void effect_edit::multiplier_menu ( QAction action)
privateslot

User selected multiplier for the effect

Definition at line 366 of file effect_edit.cpp.

Referenced by effect_edit().

◆ refresh()

void effect_edit::refresh ( )

Refresh the information.

Definition at line 181 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 237 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 296 of file effect_edit.cpp.

Referenced by effect_edit().

Field Documentation

◆ comment

QLineEdit* effect_edit::comment
private

Definition at line 79 of file effect_edit.h.

Referenced by comment_given(), effect_edit(), and fill_active().

◆ edit_type_button

QToolButton* effect_edit::edit_type_button
private

Definition at line 75 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().

◆ effects

struct effect_list* effect_edit::effects
private

Definition at line 70 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 62 of file effect_edit.h.

Referenced by effect_edit(), and refresh().

◆ filter

struct universal effect_edit::filter
private

Definition at line 69 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 68 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 78 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().

◆ name

QString effect_edit::name
private

Definition at line 67 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 73 of file effect_edit.h.

Referenced by edit_reqs(), and select_effect().

◆ ui

ruledit_gui* effect_edit::ui
private

Definition at line 65 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 76 of file effect_edit.h.

Referenced by effect_edit(), and fill_active().