Freeciv-3.1
Loading...
Searching...
No Matches
effect_edit.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC__EFFECT_EDIT_H
15#define FC__EFFECT_EDIT_H
16
17#ifdef HAVE_CONFIG_H
18#include <fc_config.h>
19#endif
20
21// Qt
22#include <QDialog>
23#include <QListWidget>
24#include <QToolButton>
25
26// common
27#include "requirements.h"
28
29class QSpinBox;
30
31class ruledit_gui;
32
34 EFMC_NONE, /* No requirements */
35 EFMC_ALL /* Any requirements */
36};
37
45
46class effect_edit : public QDialog
47{
48 Q_OBJECT
49
50 public:
51 explicit effect_edit(ruledit_gui *ui_in, QString target,
52 struct universal *filter_in, enum effect_filter_main_class efmc_in);
54 void refresh();
55 void add(const char *msg);
56 void add_effect_to_list(struct effect *peffect,
57 struct effect_list_fill_data *fill_data);
58
59 struct universal *filter_get();
60
62
63 private:
65
66 QString name;
67 QListWidget *list_widget;
69 struct effect_list *effects;
70
73
74 QToolButton *edit_type_button;
75 QSpinBox *value_box;
76
77 QToolButton *mp_button;
78
79 private slots:
80 void select_effect();
81 void fill_active();
82 void edit_reqs();
83 void add_now();
84 void delete_now();
85 void close_now();
86
87 void effect_type_menu(QAction *action);
88 void set_value(int value);
89 void multiplier_menu(QAction *action);
90
91 protected:
92 void closeEvent(QCloseEvent *event);
93};
94
95#endif // FC__EFFECT_EDIT_H
struct effect_list * effects
Definition effect_edit.h:69
void multiplier_menu(QAction *action)
QToolButton * edit_type_button
Definition effect_edit.h:74
QString name
Definition effect_edit.h:66
void add_effect_to_list(struct effect *peffect, struct effect_list_fill_data *fill_data)
void fill_active()
enum effect_filter_main_class efmc
Definition effect_edit.h:61
void add(const char *msg)
void set_value(int value)
QToolButton * mp_button
Definition effect_edit.h:77
void delete_now()
void closeEvent(QCloseEvent *event)
struct universal filter
Definition effect_edit.h:68
QListWidget * list_widget
Definition effect_edit.h:67
struct universal * filter_get()
QSpinBox * value_box
Definition effect_edit.h:75
ruledit_gui * ui
Definition effect_edit.h:64
void effect_type_menu(QAction *action)
struct effect * selected
Definition effect_edit.h:71
void select_effect()
effect_filter_main_class
Definition effect_edit.h:33
@ EFMC_ALL
Definition effect_edit.h:35
@ EFMC_NORMAL
Definition effect_edit.h:33
@ EFMC_NONE
Definition effect_edit.h:34
enum event_type event
Definition events.c:81
struct player_slot * slots
Definition player.c:50
struct universal * filter
Definition effect_edit.h:40
enum effect_filter_main_class efmc
Definition effect_edit.h:41
class effect_edit * edit
Definition effect_edit.h:42