From a6d58bb6052ac8cb01805a48c4ad2f129126116f Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 24 Feb 2010 02:13:59 +0000 Subject: Added KDE3 version of kvirc git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1095341 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/modules/about/aboutdialog.cpp | 166 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 src/modules/about/aboutdialog.cpp (limited to 'src/modules/about/aboutdialog.cpp') diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp new file mode 100644 index 00000000..4d13d98f --- /dev/null +++ b/src/modules/about/aboutdialog.cpp @@ -0,0 +1,166 @@ +//============================================================================= +// +// 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. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 +#include +#include +#include +#include +#include + +extern KviAboutDialog * g_pAboutDialog; +/* +"KVIrc public releases :
\n" \ +"
\n" \ +"0.9.0
\n" \ +"Release date: 25.01.1999
\n" \ +"
\n" \ +"1.0.0 'Millennium'
\n" \ +"\"The net in your hands\"
\n" \ +"Release date: 21.12.1999
\n" \ +"
\n" \ +"2.0.0 'Phoenix'
\n" \ +"\"The client that can't make coffee\"
\n" \ +"Release date: 30.05.2000
\n" \ +"
\n" \ +"2.1.0 'Dark Star'
\n" \ +"\"The client that can't make coffee\"
\n" \ +"Release date: 30.01.2001
\n" \ +"
\n" \ +"2.1.1 'Monolith'
\n" \ +"\"A breath of fresh net\"
\n" \ +"Release date: 01.05.2001
\n" \ +"
3.0.0-xmas build: 24-12-2001\n" \ +"3.0.0-beta1: 24-06-2002\n " +"3.0.0 'Avatar'
\n" \ +"\"No slogan yet\"
\n" \ +"Release date: Still unknown
\n" \ +*/ + +#include "abouttext.inc" + +KviAboutDialog::KviAboutDialog() +: KviTalTabDialog(0) +{ + setCaption(__tr2qs_ctx("About KVIrc...","about")); + setOkButton(__tr2qs_ctx("Close","about")); + + 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 " KVI_VERSION " '" KVI_RELEASE_NAME "'
"; + aboutString += __tr2qs_ctx("Forged by the KVIrc Development Team","about"); + aboutString += "
"; + aboutString += __tr2qs_ctx("Sources date","about"); + aboutString += ": "; + aboutString += KVI_SOURCES_DATE; + + l = new QLabel(aboutString,w); + l->setAlignment(Qt::AlignCenter); + g->addWidget(l,1,0); + + addTab(w,__tr2qs_ctx("About","about")); + + + + 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); + + v->setText(g_szAboutText); + + addTab(w,__tr2qs_ctx("Honor && Glory","about")); + + + + 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,"EULA"); + + 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 ","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; +} + +#include "aboutdialog.moc" -- cgit v1.2.1