/* vi: set sw=4 ts=4: * * Copyright (C) 2001 - 2013 Christian Hohnstaedt. * * All rights reserved. */ #include "MainWindow.h" #include #include #include #include #include "ui_About.h" #include "ui_Help.h" #include "lib/func.h" void MainWindow::cmd_version() { fprintf(stderr, XCA_TITLE " Version " VER "\n"); exitApp = 1; } void MainWindow::cmd_help(const char* msg) { exitApp = 1; fprintf(stderr, XCA_TITLE " Version " VER "\n" "\n" " -v show version information and exit\n" " -h shows this help screen and exit\n" " -k expect all following non-option arguments to be RSA keys\n" " -r expect all following non-option arguments to be\n" " Certificate signing requests or SPKAC requests\n" " -c expect all following non-option arguments to be Certificates\n" " -p expect all following non-option arguments to be PKCS#12 files\n" " -7 expect all following non-option arguments to be PKCS#7 files\n" " -l expect all following non-option arguments to be Revocation lists\n" " -t expect all following non-option arguments to be XCA templates\n" " -P expect all following non-option arguments to be PEM encoded 'thingies'\n" " -d expect the following argument to be the database name to use\n" " -x Exit after processing all commandline options\n\n"); if(msg) { fprintf(stderr, "Cmdline Error: %s\n", msg); } } void MainWindow::about() { Ui::About ui; QDialog *about = new QDialog(this, 0); QString openssl, qt, cont, version; openssl = SSLeay_version(SSLEAY_VERSION); qt = qVersion(); if (openssl != OPENSSL_VERSION_TEXT || qt != QT_VERSION_STR) { version = QString("" "" "" "" "" "" "" "" "
Compile time:"OPENSSL_VERSION_TEXT"QT version: "QT_VERSION_STR"
Run time:%1QT version: %2
").arg(openssl).arg(qt); } else { version = QString("%1
QT version: %2").arg(openssl).arg(qt); } ui.setupUi(about); cont = QString( "

XCA

" "

Copyright 2001 - 2013 by Christian Hohnstädt\n" "

Version : " VER "" "

%1" "


" "" "" "" "" "" "" "" "" "" "" "
Christian Hohnstädt<christian@hohnstaedt.de>
Programming, Translation and Testing
Kerstin Steinhauff<tine@kerstine.de>
Arts and Graphics
Ilya Kozhevnikov<ilya@ef.unn.ru>
Windows registry stuff
Wolfgang Glas<wolfgang.glas@ev-i.at>
SPKAC support and Testing
Geoff Beier<geoffbeier@gmail.com>
MAC OSX support and Testing

General support
" "

" "" "" "" "" "" "
Mark Foster<mark@foster.cc>
Thorsten Weiss<weiss2@gmx.de>
Oobj<www.oobj.com.br>
Frank Isemann<isemannf@firflabs.net>
Helmut Strobl<helmut.strobl@t-online.de>


Translations
" "

" "" "" "" "" "
GermanChristian Hohnstädt
RussianPavel Belly <pavel.belly@gmail.com>
FrenchPatrick Monnerat <Patrick.Monnerat@datasphere.ch>
CroatianNevenko Bartolincic <nevenko.bartolincic@gmail.com>
"). arg(version); about->setWindowTitle(XCA_TITLE); ui.image->setPixmap( *keyImg ); ui.image1->setPixmap( *certImg ); ui.textbox->setHtml(cont); about->exec(); delete about; } void MainWindow::donations() { Ui::About ui; QDialog *d = new QDialog(this, 0); ui.setupUi(d); QString cont; cont.sprintf("

XCA

" "

This program is free software." "

It doesn't bother you with Pop-Ups, Countdown-Timers, " "commercials or any type of 'Register Now' buttons. " "Nor are there any constraints or any limited functionality." "

Everybody who wants to support my work at XCA may use " "my PayPal account: <christian@hohnstaedt.de> " "for a donation." "

Every donator will in return be honored in the about dialog " "of the next version." ); d->setWindowTitle(tr(XCA_TITLE)); ui.image->setPixmap( *keyImg ); ui.image1->setPixmap( *certImg ); ui.textbox->setHtml(cont); d->exec(); } void MainWindow::help() { QDialog *h = new QDialog(this, 0); QString path, uri; Ui::Help ui; ui.setupUi(h); path = QString("file://"); #ifdef WIN32 path += "/"; #endif path += getDocDir() + "/"; #ifdef WIN32 path = path.replace("\\","/"); #endif uri = path + "xca.html"; ui.textbox->setSource(QUrl(uri)); ui.textbox->setSearchPaths(QStringList(path)); h->setWindowTitle(tr(XCA_TITLE)); h->show(); }