From a4332348b55d4cbdacbed0363e8aa6ae249c8d53 Mon Sep 17 00:00:00 2001 From: ubbo Date: Sun, 30 Jan 2011 21:45:46 +0000 Subject: add logo and change about-box git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@463 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- gpgwin.cpp | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'gpgwin.cpp') diff --git a/gpgwin.cpp b/gpgwin.cpp index 50311a9..484aeee 100644 --- a/gpgwin.cpp +++ b/gpgwin.cpp @@ -69,6 +69,7 @@ GpgWin::GpgWin() } edit->curTextPage()->setFocus(); + this->setWindowTitle(qApp->applicationName()); } void GpgWin::restoreSettings() @@ -465,17 +466,38 @@ void GpgWin::about() "Bene, Heimer, Juergen, Nils, Ubbo

" "Translation:
" "Alessandro (pt_br), Kirill (ru), Viriato (es), Serse (it)

" - "If you have any questions and/or
" - "suggestions, contact us at
" - "gpg4usb at cpunk.de

" - "or feel free to meet us in our xmpp-channel:
" + "If you have any questions and/or suggestions,
" + "contact us at gpg4usb at cpunk.de or feel
" + "free to meet us in our xmpp-channel:
" "gpg4usb at conference.jabber.ccc.de")); - QMessageBox::about(this, *title, *text); -/* aboutBox.setText(*text); + /*QMessageBox::about(this, *title, *text); + QMessageBox aboutBox(this); + aboutBox.setText(*text); aboutBox.setIconPixmap(*pixmap); aboutBox.setWindowTitle(*title); aboutBox.exec();*/ + + QDialog *dialog = new QDialog(this); + dialog->setWindowTitle(*title); + QPushButton *closeButton = new QPushButton(tr("&Close")); + connect(closeButton, SIGNAL(clicked()), dialog, SLOT(close())); + + QGridLayout *layout = new QGridLayout(dialog); + QLabel *pixmapLabel = new QLabel(); + pixmapLabel->setPixmap(*pixmap); + layout->addWidget(pixmapLabel, 0, 0, 1, -1, Qt::AlignCenter); + QLabel *aboutLabel = new QLabel(); + aboutLabel->setText(*text); + layout->addWidget(aboutLabel, 1, 0, 1, -1); + layout->addItem(new QSpacerItem(20, 10, QSizePolicy::Minimum, + QSizePolicy::Fixed), 2, 1, 1, 1); + layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 0, 1, 1); + layout->addWidget(closeButton, 3, 1, 1, 1); + layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding), 3, 2, 1, 1); + + dialog->exec(); + } void GpgWin::openTranslate() { -- cgit v1.2.3