Allow using things that were deprecated in gtk+-3.22.
[freeciv.git] / tools / ruledit / ruledit_qt.h
bloba097696226371e0dff7feb3013e87c6e3cc1ee84
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.
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 ***********************************************************************/
14 #ifndef FC__RULEDIT_QT_H
15 #define FC__RULEDIT_QT_H
17 // Qt
18 #include <QApplication>
19 #include <QMainWindow>
20 #include <QObject>
21 #include <QLabel>
22 #include <QTabWidget>
24 // ruledit
25 #include "rulesave.h"
27 class QLineEdit;
28 class QStackedLayout;
30 class requirers_dlg;
31 class tab_building;
32 class tab_misc;
33 class tab_tech;
34 class tab_unit;
35 class tab_nation;
37 class ruledit_main : public QMainWindow
39 Q_OBJECT
41 public:
42 ruledit_main(QApplication *qapp_in, QWidget *central_in);
44 private:
45 void popup_quit_dialog();
46 QApplication *qapp;
47 QWidget *central;
49 protected:
50 void closeEvent(QCloseEvent *cevent);
53 class ruledit_gui : public QObject
55 Q_OBJECT
57 public:
58 void setup(QWidget *central_in);
59 void display_msg(const char *msg);
60 void clear_required(const char *title);
61 void show_required(const char *msg);
62 void flush_widgets();
64 struct rule_data data;
66 private:
67 QLabel *msg_dspl;
68 QTabWidget *stack;
69 QLineEdit *ruleset_select;
70 QWidget *central;
71 QStackedLayout *main_layout;
73 requirers_dlg *requirers;
75 tab_building *bldg;
76 tab_misc *misc;
77 tab_tech *tech;
78 tab_unit *unit;
79 tab_nation *nation;
81 private slots:
82 void launch_now();
85 int ruledit_qt_run(int argc, char **argv);
86 void ruledit_qt_display_requirers(const char *msg);
88 #endif // FC__RULEDIT_QT_H