Freeciv-3.1
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{
39 Q_OBJECT
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;
55 QToolButton *req1_button;
56 QToolButton *req2_button;
57 QToolButton *root_req_button;
58 QMenu *req1;
59 QMenu *req2;
60 QMenu *root_req;
61 QListWidget *tech_list;
62 QCheckBox *same_name;
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();
72 void req1_menu(QAction *action);
73 void req2_menu(QAction *action);
74 void root_req_menu(QAction *action);
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:492
void same_name_toggle(bool checked)
Definition tab_tech.cpp:465
bool initialize_new_tech(struct advance *padv)
Definition tab_tech.cpp:407
void select_tech()
Definition tab_tech.cpp:251
QToolButton * req1_button
Definition tab_tech.h:55
QLineEdit * rname
Definition tab_tech.h:54
void req1_menu(QAction *action)
Definition tab_tech.cpp:296
void edit_effects()
Definition tab_tech.cpp:476
void refresh()
Definition tab_tech.cpp:141
struct advance * selected
Definition tab_tech.h:64
void delete_now()
Definition tab_tech.cpp:383
QMenu * req1
Definition tab_tech.h:58
static void techs_to_menu(QMenu *fill_menu)
Definition tab_tech.cpp:189
QLineEdit * name
Definition tab_tech.h:53
void add_now()
Definition tab_tech.cpp:430
QMenu * prepare_req_button(QToolButton *button, enum tech_req rn)
Definition tab_tech.cpp:159
void req2_jump()
Definition tab_tech.cpp:276
void req2_menu(QAction *action)
Definition tab_tech.cpp:314
void root_req_menu(QAction *action)
Definition tab_tech.cpp:332
void req1_jump()
Definition tab_tech.cpp:266
void root_req_jump()
Definition tab_tech.cpp:286
void name_given()
Definition tab_tech.cpp:350
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:201
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:213
struct player_slot * slots
Definition player.c:50
tech_req
Definition tech.h:110