Freeciv-3.3: /fast/freeciv/nightly/main/tools/ruledit/tab_counters.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
tab_counters.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__TAB_COUNTER_H
15#define FC__TAB_COUNTER_H
16
17#ifdef HAVE_CONFIG_H
18#include <fc_config.h>
19#endif
20
21// Qt
22#include <QCheckBox>
23#include <QComboBox>
24#include <QListWidget>
25#include <QMenu>
26#include <QPushButton>
27#include <QSpinBox>
28#include <QWidget>
29
30// common
31#include "counters.h"
32
33class ruledit_gui;
34
35 class tab_counter : public QWidget
36{
37 Q_OBJECT
38
39 public:
40 explicit tab_counter(ruledit_gui *ui_in);
41 void refresh();
42 static void techs_to_menu(QMenu *fill_menu);
43 static QString counter_name(struct counter *padv);
44
45 private:
46 ruledit_gui *ui;
47
48 QLineEdit *name;
49 QLineEdit *rname;
50 QSpinBox *checkpoint;
51 QSpinBox *def;
52 QComboBox *type;
53 QCheckBox *same_name;
54 QPushButton *effects_button;
55
56 QListWidget *counter_list;
57
58 struct counter *selected;
59
60 private slots:
61 void update_counter_info(struct counter *counter);
62 void checkpoint_given(int val);
63 void default_given(int val);
64 void name_given();
65 void select_counter();
66 void add_now();
67 void delete_now();
68 void same_name_toggle(bool checked);
69 void edit_effects();
70 bool initialize_new_counter(struct counter *padv);
71 void counter_behaviour_selected(int item);
72};
73
74
75#endif // FC__TAB_COUNTER_H
ruledit_gui
Definition ruledit_qt.h:97
tab_counter
Definition tab_counters.h:36
tab_counter::add_now
void add_now()
Definition tab_counters.cpp:330
tab_counter::rname
QLineEdit * rname
Definition tab_counters.h:49
tab_counter::update_counter_info
void update_counter_info(struct counter *counter)
Definition tab_counters.cpp:193
tab_counter::initialize_new_counter
bool initialize_new_counter(struct counter *padv)
Definition tab_counters.cpp:313
tab_counter::selected
struct counter * selected
Definition tab_counters.h:58
tab_counter::techs_to_menu
static void techs_to_menu(QMenu *fill_menu)
tab_counter::effects_button
QPushButton * effects_button
Definition tab_counters.h:54
tab_counter::ui
ruledit_gui * ui
Definition tab_counters.h:46
tab_counter::type
QComboBox * type
Definition tab_counters.h:52
tab_counter::select_counter
void select_counter()
Definition tab_counters.cpp:222
tab_counter::same_name
QCheckBox * same_name
Definition tab_counters.h:53
tab_counter::name_given
void name_given()
Definition tab_counters.cpp:264
tab_counter::counter_behaviour_selected
void counter_behaviour_selected(int item)
Definition tab_counters.cpp:161
tab_counter::def
QSpinBox * def
Definition tab_counters.h:51
tab_counter::counter_list
QListWidget * counter_list
Definition tab_counters.h:56
tab_counter::checkpoint
QSpinBox * checkpoint
Definition tab_counters.h:50
tab_counter::same_name_toggle
void same_name_toggle(bool checked)
Definition tab_counters.cpp:365
tab_counter::edit_effects
void edit_effects()
Definition tab_counters.cpp:376
tab_counter::name
QLineEdit * name
Definition tab_counters.h:48
tab_counter::refresh
void refresh()
Definition tab_counters.cpp:179
tab_counter::delete_now
void delete_now()
Definition tab_counters.cpp:292
tab_counter::default_given
void default_given(int val)
Definition tab_counters.cpp:253
tab_counter::counter_name
static QString counter_name(struct counter *padv)
tab_counter::checkpoint_given
void checkpoint_given(int val)
Definition tab_counters.cpp:242
incite_cost
char * incite_cost
Definition comments.c:74
counters.h
slots
struct player_slot * slots
Definition player.c:51
counter
Definition counters.h:27
item
Definition climisc.h:80