Freeciv-3.2
Loading...
Searching...
No Matches
tab_tech.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_TECH_H
15#define FC__TAB_TECH_H
16
17#ifdef HAVE_CONFIG_H
18#include <fc_config.h>
19#endif
20
21// Qt
22#include <QWidget>
23
24// common
25#include "tech.h"
26
27class QCheckBox;
28class QGridLayout;
29class QLabel;
30class QLineEdit;
31class QListWidget;
32class QMenu;
33class QToolButton;
34
35class ruledit_gui;
36
37class tab_tech : public QWidget
38{
40
41 public:
42 explicit tab_tech(ruledit_gui *ui_in);
43 void refresh();
44 static void techs_to_menu(QMenu *fill_menu);
45 static QString tech_name(struct advance *padv);
46
47 private:
49 void update_tech_info(struct advance *adv);
50 QMenu *prepare_req_button(QToolButton *button, enum tech_req rn);
51 bool initialize_new_tech(struct advance *padv);
52
53 QLineEdit *name;
54 QLineEdit *rname;
58 QMenu *req1;
59 QMenu *req2;
60 QMenu *root_req;
63
65
66 private slots:
67 void name_given();
68 void select_tech();
69 void req1_jump();
70 void req2_jump();
71 void root_req_jump();
75 void add_now();
76 void delete_now();
77 void edit_now();
78 void same_name_toggle(bool checked);
79 void edit_effects();
80};
81
82
83#endif // FC__TAB_TECH_H
QCheckBox * same_name
Definition tab_tech.h:62
QToolButton * root_req_button
Definition tab_tech.h:57
ruledit_gui * ui
Definition tab_tech.h:48
void edit_now()
Definition tab_tech.cpp:490
void same_name_toggle(bool checked)
Definition tab_tech.cpp:463
bool initialize_new_tech(struct advance *padv)
Definition tab_tech.cpp:405
void select_tech()
Definition tab_tech.cpp:249
QToolButton * req1_button
Definition tab_tech.h:55
QLineEdit * rname
Definition tab_tech.h:54
void req1_menu(QAction *action)
Definition tab_tech.cpp:294
void edit_effects()
Definition tab_tech.cpp:474
void refresh()
Definition tab_tech.cpp:139
struct advance * selected
Definition tab_tech.h:64
void delete_now()
Definition tab_tech.cpp:381
QMenu * req1
Definition tab_tech.h:58
static void techs_to_menu(QMenu *fill_menu)
Definition tab_tech.cpp:187
QLineEdit * name
Definition tab_tech.h:53
void add_now()
Definition tab_tech.cpp:428
QMenu * prepare_req_button(QToolButton *button, enum tech_req rn)
Definition tab_tech.cpp:157
void req2_jump()
Definition tab_tech.cpp:274
void req2_menu(QAction *action)
Definition tab_tech.cpp:312
void root_req_menu(QAction *action)
Definition tab_tech.cpp:330
void req1_jump()
Definition tab_tech.cpp:264
void root_req_jump()
Definition tab_tech.cpp:284
void name_given()
Definition tab_tech.cpp:348
QToolButton * req2_button
Definition tab_tech.h:56
QMenu * root_req
Definition tab_tech.h:60
static QString tech_name(struct advance *padv)
Definition tab_tech.cpp:199
QListWidget * tech_list
Definition tab_tech.h:61
QMenu * req2
Definition tab_tech.h:59
void update_tech_info(struct advance *adv)
Definition tab_tech.cpp:211
char * incite_cost
Definition comments.c:75
struct player_slot * slots
Definition player.c:51
tech_req
Definition tech.h:110