Freeciv-3.2
Loading...
Searching...
No Matches
helpeditor.cpp
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#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18// Qt
19#include <QGridLayout>
20#include <QPushButton>
21
22// utility
23#include "fcintl.h"
24#include "string_vector.h"
25
26// ruledit
27#include "values_dlg.h"
28
29#include "helpeditor.h"
30
31/**********************************************************************/
35{
36 QGridLayout *main_layout = new QGridLayout(this);
37 QPushButton *close_button;
38 int row = 0;
39
42
43 area = new QTextEdit();
44 area->setParent(this);
45 area->setReadOnly(true);
46 main_layout->addWidget(area, row++, 0);
47
49 area->append(QString::fromUtf8(text));
50 area->append("\n\n");
52
53 close_button = new QPushButton(QString::fromUtf8(R__("Close")), this);
54 connect(close_button, SIGNAL(pressed()), this, SLOT(close_now()));
55 main_layout->addWidget(close_button, row++, 0);
56
57 setLayout(main_layout);
58}
59
60/**********************************************************************/
64{
65 done(0);
66}
67
68/**********************************************************************/
72{
73 // Both closes this dialog, and handles parent's own bookkeeping
75}
void close_now()
void close()
struct strvec * helptext
Definition helpeditor.h:37
QTextEdit * area
Definition helpeditor.h:40
helpeditor(values_dlg *parent_dlg, struct strvec *helptext_in)
values_dlg * pdlg
Definition helpeditor.h:38
void close_help()
char * incite_cost
Definition comments.c:74
#define R__(String)
Definition fcintl.h:75
#define strvec_iterate(psv, str)
#define strvec_iterate_end