| 1 | // -*- c-basic-offset: 2 -*- |
|---|
| 2 | /* |
|---|
| 3 | * This file is part of Licq, an instant messaging client for UNIX. |
|---|
| 4 | * Copyright (C) 2007 Licq developers |
|---|
| 5 | * |
|---|
| 6 | * Licq is free software; you can redistribute it and/or modify |
|---|
| 7 | * it under the terms of the GNU General Public License as published by |
|---|
| 8 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | * (at your option) any later version. |
|---|
| 10 | * |
|---|
| 11 | * Licq is distributed in the hope that it will be useful, |
|---|
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | * GNU General Public License for more details. |
|---|
| 15 | * |
|---|
| 16 | * You should have received a copy of the GNU General Public License |
|---|
| 17 | * along with Licq; if not, write to the Free Software |
|---|
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 19 | */ |
|---|
| 20 | |
|---|
| 21 | #include "aboutdlg.h" |
|---|
| 22 | |
|---|
| 23 | #include "config.h" |
|---|
| 24 | |
|---|
| 25 | #include <QVBoxLayout> |
|---|
| 26 | #include <QDialogButtonBox> |
|---|
| 27 | #include <QLabel> |
|---|
| 28 | |
|---|
| 29 | #include <licq_icqd.h> |
|---|
| 30 | |
|---|
| 31 | #include "helpers/support.h" |
|---|
| 32 | |
|---|
| 33 | using namespace LicqQtGui; |
|---|
| 34 | /* TRANSLATOR LicqQtGui::AboutDlg */ |
|---|
| 35 | |
|---|
| 36 | AboutDlg::AboutDlg(QWidget* parent) |
|---|
| 37 | : QDialog(parent) |
|---|
| 38 | { |
|---|
| 39 | Support::setWidgetProps(this, "AboutDialog"); |
|---|
| 40 | setAttribute(Qt::WA_DeleteOnClose, true); |
|---|
| 41 | setWindowTitle(tr("Licq - About")); |
|---|
| 42 | |
|---|
| 43 | QVBoxLayout* lay = new QVBoxLayout(this); |
|---|
| 44 | |
|---|
| 45 | QString text = QString( |
|---|
| 46 | "<table width=100%>" |
|---|
| 47 | "<tr><th colspan=2>%1</th></tr>" |
|---|
| 48 | "<tr><td>Licq</td><td align=right>%2%3</td></tr>" |
|---|
| 49 | "<tr><td>Qt4-GUI</td><td align=right>%4%5</td></tr>" |
|---|
| 50 | "<tr><td>%6</td><td align=right>%7</td></tr>" |
|---|
| 51 | "</table>" |
|---|
| 52 | "<hr>" |
|---|
| 53 | "<table width=100%>" |
|---|
| 54 | "<tr><th colspan=2>%8</th></tr>" |
|---|
| 55 | "<tr><td>%9</td><td align=right>Jon Keating</td></tr>" |
|---|
| 56 | "<tr><td>%10</td><td align=right>Dirk A. Mueller</td></tr>" |
|---|
| 57 | "<tr><td>%11</td><td align=right>Graham Roff</td></tr>" |
|---|
| 58 | "</table>" |
|---|
| 59 | "<hr>" |
|---|
| 60 | "<table width=100%>" |
|---|
| 61 | "<tr><th colspan=2>%12</th></tr>" |
|---|
| 62 | "<tr><td>WWW</td><td align=right>http://www.licq.org</td></tr>" |
|---|
| 63 | "<tr><td>IRC</td><td align=right>irc://irc.freenode.net/licq</td></tr>" |
|---|
| 64 | "</table>" |
|---|
| 65 | ) |
|---|
| 66 | .arg(tr("Version")) |
|---|
| 67 | .arg(gLicqDaemon->Version()) |
|---|
| 68 | .arg(CICQDaemon::CryptoEnabled() ? "/SSL" : "") |
|---|
| 69 | .arg(VERSION) |
|---|
| 70 | #ifdef USE_KDE |
|---|
| 71 | .arg("/KDE") |
|---|
| 72 | #else |
|---|
| 73 | .arg("") |
|---|
| 74 | #endif |
|---|
| 75 | .arg(tr("Compiled on")) |
|---|
| 76 | .arg(__DATE__) |
|---|
| 77 | .arg(tr("Credits")) |
|---|
| 78 | .arg(tr("Maintainer")) |
|---|
| 79 | .arg(tr("Contributions")) |
|---|
| 80 | .arg(tr("Original author")) |
|---|
| 81 | .arg(tr("Contact us")); |
|---|
| 82 | |
|---|
| 83 | QLabel* label = new QLabel(text); |
|---|
| 84 | |
|---|
| 85 | lay->addWidget(label); |
|---|
| 86 | |
|---|
| 87 | lay->addSpacing(20); |
|---|
| 88 | |
|---|
| 89 | QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok); |
|---|
| 90 | buttons->setCenterButtons(true); |
|---|
| 91 | connect(buttons, SIGNAL(accepted()), SLOT(close())); |
|---|
| 92 | |
|---|
| 93 | lay->addWidget(buttons); |
|---|
| 94 | |
|---|
| 95 | show(); |
|---|
| 96 | } |
|---|