//============================================================================= // // 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"); TQPixmap pix(TQString(buffer.ptr())); TQWidget * w = new TQWidget(this); TQGridLayout * g = new TQGridLayout(w,2,1,4,8); TQLabel * l = new TQLabel(w); l->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); l->setBackgroundColor(TQt::black); l->setAlignment(TQt::AlignCenter); l->setPixmap(pix); g->addWidget(l,0,0); TQString 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 TQLabel(aboutString,w); l->setAlignment(TQt::AlignCenter); g->addWidget(l,1,0); addTab(w,__tr2qs_ctx("About","about")); w = new TQWidget(this); g = new TQGridLayout(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 TQWidget(this); g = new TQGridLayout(w,1,1,4,8); v = new KviTalTextEdit(w); v->setReadOnly(true); v->setWordWrap(KviTalTextEdit::NoWrap); g->addWidget(v,0,0); TQString szLicense; TQString 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,TQT_SIGNAL(applyButtonPressed()),this,TQT_SLOT(closeButtonPressed())); } KviAboutDialog::~KviAboutDialog() { g_pAboutDialog = 0; } void KviAboutDialog::closeEvent(TQCloseEvent *e) { e->ignore(); delete this; } void KviAboutDialog::closeButtonPressed() { delete this; } #include "aboutdialog.moc"