Freeciv-3.1: /fast/freeciv/nightly/S3_1/tools/ruledit/edit_utype.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
edit_utype.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__EDIT_UTYPE_H
15#define FC__EDIT_UTYPE_H
16
17#ifdef HAVE_CONFIG_H
18#include <fc_config.h>
19#endif
20
21// Qt
22#include <QDialog>
23
24// ruledit
25#include "values_dlg.h"
26
27class QGridLayout;
28class QLineEdit;
29class QSpinBox;
30class QToolButton;
31
32class ruledit_gui;
33
34 class edit_utype : public values_dlg
35{
36 Q_OBJECT
37
38 public:
39 explicit edit_utype(ruledit_gui *ui_in, struct unit_type *utype_in);
40 void refresh();
41
42 private:
43 ruledit_gui *ui;
44 struct unit_type *utype;
45 QToolButton *req_button;
46 QToolButton *class_button;
47 QSpinBox *bcost;
48 QSpinBox *attack;
49 QSpinBox *defense;
50 QSpinBox *hitpoints;
51 QSpinBox *firepower;
52 QSpinBox *move_rate;
53 QLineEdit *gfx_tag;
54 QLineEdit *gfx_tag_alt;
55 QLineEdit *sound_move_tag;
56 QLineEdit *sound_move_tag_alt;
57 QLineEdit *sound_fight_tag;
58 QLineEdit *sound_fight_tag_alt;
59
60 QGridLayout *flag_layout;
61
62 protected:
63 void closeEvent(QCloseEvent *cevent);
64
65 private slots:
66 void req_menu(QAction *action);
67 void class_menu(QAction *action);
68 void set_bcost_value(int value);
69 void set_attack_value(int value);
70 void set_defense_value(int value);
71 void set_hitpoints(int value);
72 void set_firepower(int value);
73 void set_move_rate(int value);
74 void gfx_tag_given();
75 void gfx_tag_alt_given();
76 void sound_move_tag_given();
77 void sound_move_tag_alt_given();
78 void sound_fight_tag_given();
79 void sound_fight_tag_alt_given();
80 void helptext();
81};
82
83#endif // FC__EDIT_UTYPE_H
edit_utype
Definition edit_utype.h:35
edit_utype::firepower
QSpinBox * firepower
Definition edit_utype.h:51
edit_utype::set_bcost_value
void set_bcost_value(int value)
Definition edit_utype.cpp:320
edit_utype::sound_move_tag_alt
QLineEdit * sound_move_tag_alt
Definition edit_utype.h:56
edit_utype::sound_move_tag_given
void sound_move_tag_given()
Definition edit_utype.cpp:388
edit_utype::set_defense_value
void set_defense_value(int value)
Definition edit_utype.cpp:336
edit_utype::set_attack_value
void set_attack_value(int value)
Definition edit_utype.cpp:328
edit_utype::attack
QSpinBox * attack
Definition edit_utype.h:48
edit_utype::bcost
QSpinBox * bcost
Definition edit_utype.h:47
edit_utype::sound_fight_tag
QLineEdit * sound_fight_tag
Definition edit_utype.h:57
edit_utype::sound_fight_tag_alt
QLineEdit * sound_fight_tag_alt
Definition edit_utype.h:58
edit_utype::gfx_tag_given
void gfx_tag_given()
Definition edit_utype.cpp:368
edit_utype::sound_fight_tag_given
void sound_fight_tag_given()
Definition edit_utype.cpp:408
edit_utype::sound_move_tag
QLineEdit * sound_move_tag
Definition edit_utype.h:55
edit_utype::refresh
void refresh()
Definition edit_utype.cpp:281
edit_utype::set_firepower
void set_firepower(int value)
Definition edit_utype.cpp:352
edit_utype::ui
ruledit_gui * ui
Definition edit_utype.h:43
edit_utype::class_button
QToolButton * class_button
Definition edit_utype.h:46
edit_utype::closeEvent
void closeEvent(QCloseEvent *cevent)
Definition edit_utype.cpp:244
edit_utype::helptext
void helptext()
Definition edit_utype.cpp:444
edit_utype::defense
QSpinBox * defense
Definition edit_utype.h:49
edit_utype::move_rate
QSpinBox * move_rate
Definition edit_utype.h:52
edit_utype::set_move_rate
void set_move_rate(int value)
Definition edit_utype.cpp:360
edit_utype::hitpoints
QSpinBox * hitpoints
Definition edit_utype.h:50
edit_utype::req_menu
void req_menu(QAction *action)
Definition edit_utype.cpp:302
edit_utype::sound_move_tag_alt_given
void sound_move_tag_alt_given()
Definition edit_utype.cpp:398
edit_utype::gfx_tag_alt
QLineEdit * gfx_tag_alt
Definition edit_utype.h:54
edit_utype::class_menu
void class_menu(QAction *action)
Definition edit_utype.cpp:428
edit_utype::flag_layout
QGridLayout * flag_layout
Definition edit_utype.h:60
edit_utype::gfx_tag_alt_given
void gfx_tag_alt_given()
Definition edit_utype.cpp:378
edit_utype::utype
struct unit_type * utype
Definition edit_utype.h:44
edit_utype::sound_fight_tag_alt_given
void sound_fight_tag_alt_given()
Definition edit_utype.cpp:418
edit_utype::gfx_tag
QLineEdit * gfx_tag
Definition edit_utype.h:53
edit_utype::req_button
QToolButton * req_button
Definition edit_utype.h:45
edit_utype::set_hitpoints
void set_hitpoints(int value)
Definition edit_utype.cpp:344
ruledit_gui
Definition ruledit_qt.h:96
values_dlg
Definition values_dlg.h:28
slots
struct player_slot * slots
Definition player.c:50
action
Definition actions.h:379
unit_type
Definition unittype.h:481
values_dlg.h