1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
//=============================================================================
//
// File : aboutdialog.cpp
// Creation date : Sun Jun 23 17:59:12 2002 GMT by Szymon Stefanek
//
// This file is part of the KVirc irc client distribution
// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your opinion) any later version.
//
// This program is distributed in the HOPE that it will be USEFUL,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//=============================================================================
#include "aboutdialog.h"
#include "kvi_defaults.h"
#include "kvi_locale.h"
#include "kvi_app.h"
#include "kvi_fileutils.h"
#include "kvi_sourcesdate.h"
#include <kvi_tal_textedit.h>
#include <QWidget>
#include <QLayout>
#include <QLabel>
#include <QPixmap>
#include <QEvent>
#include <QCloseEvent>
extern KviAboutDialog * g_pAboutDialog;
/*
"<font color=\"#FFFF00\"><b>KVIrc public releases :</b></font><br>\n" \
"<br>\n" \
"<font color=\"#FF0000\">0.9.0</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: 25.01.1999</font><br>\n" \
"<br>\n" \
"<font color=\"#FF0000\">1.0.0 'Millennium'</font><br>\n" \
"<font size=\"2\">\"The net in your hands\"</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: 21.12.1999</font><br>\n" \
"<br>\n" \
"<font color=\"#FF0000\">2.0.0 'Phoenix'</font><br>\n" \
"<font size=\"2\">\"The client that can't make coffee\"</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: 30.05.2000</font><br>\n" \
"<br>\n" \
"<font color=\"#FF0000\">2.1.0 'Dark Star'</font><br>\n" \
"<font size=\"2\">\"The client that can't make coffee\"</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: 30.01.2001</font><br>\n" \
"<br>\n" \
"<font color=\"#FF0000\">2.1.1 'Monolith'</font><br>\n" \
"<font size=\"2\">\"A breath of fresh net\"</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: 01.05.2001</font><br>\n" \
"<br> 3.0.0-xmas build: 24-12-2001\n" \
"3.0.0-beta1: 24-06-2002\n "
"<font color=\"#FF0000\">3.0.0 'Avatar'</font><br>\n" \
"<font size=\"2\">\"No slogan yet\"</font><br>\n" \
"<font size=\"2\" color=\"#808080\">Release date: Still unknown</font><br>\n" \
*/
#include "abouttext.inc"
KviAboutDialog::KviAboutDialog()
: KviTalTabDialog(0)
{
setWindowTitle(__tr2qs_ctx("About KVIrc...","about"));
setOkButton(__tr2qs_ctx("Close","about"));
// About tab
KviStr buffer;
g_pApp->findImage(buffer,"kvi_splash.png");
QPixmap pix(buffer.ptr());
QWidget * w = new QWidget(this);
QGridLayout * g = new QGridLayout(w,2,1,4,8);
QLabel * l = new QLabel(w);
l->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
l->setBackgroundColor(Qt::black);
l->setAlignment(Qt::AlignCenter);
l->setPixmap(pix);
g->addWidget(l,0,0);
QString aboutString= "KVIrc <b>" KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br>";
aboutString += __tr2qs_ctx("Forged by the <b>KVIrc Development Team</b>","about");
l = new QLabel(aboutString,w);
l->setAlignment(Qt::AlignCenter);
g->addWidget(l,1,0);
addTab(w,__tr2qs_ctx("About","about"));
// Info tab
w = new QWidget(this);
g = new QGridLayout(w,1,1,4,8);
KviTalTextEdit * v = new KviTalTextEdit(w);
v->setReadOnly(true);
g->addWidget(v,0,0);
// Get info
QString infoString = "KVIrc <b>" KVI_VERSION " '" KVI_RELEASE_NAME "'</b><br><br>";
#ifndef COMPILE_ON_WINDOWS
infoString += __tr2qs_ctx("System Name","about");
infoString += ": " KVI_BUILD_SYSTEM "<br>";
infoString += __tr2qs_ctx("CPU Name","about");
infoString += ": " KVI_BUILD_CPU "<br>";
infoString += __tr2qs_ctx("Sources Date","about");
infoString += ": " KVI_SOURCES_DATE "<br>";
infoString += __tr2qs_ctx("Build Date","about");
infoString += ": " KVI_BUILD_DATE "<br>";
infoString += __tr2qs_ctx("Build Command","about");
infoString += ": " KVI_BUILD_COMMAND "<br>";
infoString += __tr2qs_ctx("Build Flags","about");
infoString += ": " KVI_BUILD_FLAGS "<br>";
infoString += __tr2qs_ctx("Compiler Name","about");
infoString += ": " KVI_BUILD_COMPILER "<br>";
infoString += __tr2qs_ctx("Compiler Flags","about");
infoString += ": " KVI_BUILD_COMPILER_FLAGS;
#endif
v->setText(infoString);
addTab(w,__tr2qs_ctx("Executable Informations","about"));
// Honor & Glory tab
w = new QWidget(this);
g = new QGridLayout(w,1,1,4,8);
v = new KviTalTextEdit(w);
v->setReadOnly(true);
g->addWidget(v,0,0);
v->setText(g_szAboutText);
addTab(w,__tr2qs_ctx("Honor && Glory","about"));
// License tab
w = new QWidget(this);
g = new QGridLayout(w,1,1,4,8);
v = new KviTalTextEdit(w);
v->setReadOnly(true);
v->setWordWrap(KviTalTextEdit::NoWrap);
g->addWidget(v,0,0);
QString szLicense;
QString szLicensePath;
g_pApp->getGlobalKvircDirectory(szLicensePath,KviApp::License,"COPYING");
if(!KviFileUtils::loadFile(szLicensePath,szLicense))
{
szLicense = __tr2qs_ctx("Oops... Can't find the license file...\n" \
"It MUST be included in the distribution...\n" \
"Please report to <pragma at kvirc dot net>","about");
}
v->setText(szLicense);
addTab(w,__tr2qs_ctx("License","about"));
connect(this,SIGNAL(applyButtonPressed()),this,SLOT(closeButtonPressed()));
}
KviAboutDialog::~KviAboutDialog()
{
g_pAboutDialog = 0;
}
void KviAboutDialog::closeEvent(QCloseEvent *e)
{
e->ignore();
delete this;
}
void KviAboutDialog::closeButtonPressed()
{
delete this;
}
#ifndef COMPILE_USE_STANDALONE_MOC_SOURCES
#include "aboutdialog.moc"
#endif //!COMPILE_USE_STANDALONE_MOC_SOURCES
|