Freeciv-3.2
Loading...
Searching...
No Matches
tools
ruledit
conversion_log.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
25
#include "
conversion_log.h
"
26
27
/**********************************************************************/
30
conversion_log::conversion_log
(
QString
title
) : QDialog()
31
{
32
QGridLayout
*main_layout =
new
QGridLayout
(
this
);
33
QPushButton *close_button;
34
int
row
= 0;
35
36
area
=
new
QTextEdit
();
37
area
->setParent(
this
);
38
area
->setReadOnly(
true
);
39
main_layout->addWidget(
area
,
row
++, 0);
40
41
close_button =
new
QPushButton(QString::fromUtf8(
R__
(
"Close"
)),
this
);
42
connect(close_button,
SIGNAL
(
pressed
()),
this
,
SLOT
(
close_now
()));
43
main_layout->addWidget(close_button,
row
++, 0);
44
45
setLayout
(main_layout);
46
setWindowTitle
(
title
);
47
48
setVisible
(
false
);
49
}
50
51
/**********************************************************************/
54
void
conversion_log::add
(
const
char
*msg)
55
{
56
area
->append(QString::fromUtf8(msg));
57
setVisible
(
true
);
58
}
59
60
/**********************************************************************/
63
void
conversion_log::close_now
()
64
{
65
done(0);
66
}
conversion_log::conversion_log
conversion_log(QString title)
Definition
conversion_log.cpp:30
conversion_log::add
void add(const char *msg)
Definition
conversion_log.cpp:54
conversion_log::area
QTextEdit * area
Definition
conversion_log.h:34
conversion_log::close_now
void close_now()
Definition
conversion_log.cpp:63
incite_cost
char * incite_cost
Definition
comments.c:75
conversion_log.h
fcintl.h
R__
#define R__(String)
Definition
fcintl.h:75
title
const char * title
Definition
repodlgs.c:1314
Generated on Sun Dec 22 2024 23:00:34 for Freeciv-3.2 by
1.9.8