/*************************************************************************** * Copyright (C) 2005-2006 by Tarek Saidi * * tarek.saidi@arcor.de * * * * 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; version 2 of the License. * * * * 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 #include #include #include #include #include "main.h" #include "AboutDlg.h" AboutDialog::AboutDialog(QWidget* parent):QDialog(parent) { setupUi(this); createBanner(&BannerPixmap,getPixmap("keepassx_large"),tr("KeePassX %1").arg(KEEPASS_VERSION),width()); loadLicFromFile(); QString AboutTr=tr("Current Translation: None

","Please replace 'None' with the language of your translation"); if(TrActive){ AboutTr+=tr("Author: %1
").arg(tr("$TRANSLATION_AUTHOR")); QString mail=tr("$TRANSLATION_AUTHOR_EMAIL","Here you can enter your email or homepage if you want."); if(mail!=QString()){ AboutTr+=mail+"
"; } AboutTr+="
"; } Edit_Translation->setHtml(AboutTr+tr("\ Information on how to translate KeePassX can be found under:\n\ http://keepassx.sourceforge.net/")); QString str; str+=""+tr("Team")+"
"; str+="
"; str+=""+tr("Tarek Saidi")+"
"+tr("Developer, Project Admin")+"
"+tr("tariq@users.berlios.de")+"
"; str+="
"; str+=""+tr("Eugen Gorschenin")+"
"+tr("Web Designer")+"
"+tr("geugen@users.berlios.de")+"
"; str+="

"; str+=""+tr("Thanks To")+""; str+="
"; str+=""+tr("Matthias Miller")+"
"+tr("Patches for better MacOS X support")+"
"+tr("www.outofhanwell.com")+"
"; str+="
"; str+="
"; str+=""+tr("James Nicholls")+"
"+tr("Main Application Icon")/*+"
"+tr("mailto:???")*/+"
"; str+="
"; str+="
"; str+=""+tr("Constantin Makshin")+"
"+tr("Various fixes and improvements")+"
"+tr("dinosaur-rus@users.sourceforge.net")+"
"; Edit_Thanks->setHtml(str); } void AboutDialog::paintEvent(QPaintEvent *event){ QDialog::paintEvent(event); QPainter painter(this); painter.setClipRegion(event->region()); painter.drawPixmap(QPoint(0,0),BannerPixmap); } void AboutDialog::OnClose() { close(); } void AboutDialog::loadLicFromFile(){ QFile gpl(AppDir+"/../share/keepass/license.html"); if(!gpl.exists()){ QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.") .arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.") ,tr("OK"),0,0,2,1); return; } if(!gpl.open(QIODevice::ReadOnly)){ QMessageBox::critical(this,tr("Error"),tr("Could not open file '%1'") .arg("'license.txt'")+tr("The following error occured:\n%1").arg(gpl.errorString()) ,tr("OK"),0,0,2,1); return; } char* buffer=new char[gpl.size()]; long l=gpl.read(buffer,gpl.size()); gpl.close(); Edit_License->setHtml(QString::fromUtf8(buffer,l)); delete buffer; } void AboutDialog::OnHomepageClicked(){ openBrowser(tr("http://keepassx.sf.net")); } void AboutDialog::OnEMailClicked(){ openBrowser("mailto:keepassx@gmail.com"); }