1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
//=========================================================================//
// //
// PonyProg - Serial Device Programmer //
// //
// Copyright (C) 1997-2025 Claudio Lanconelli //
// //
// https://github.com/lancos/ponyprog //
// //
//-------------------------------------------------------------------------//
// //
// 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 version2 of //
// the License, or (at your option) 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 (see LICENSE); if not, write to the //
// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
//=========================================================================//
#include <QDebug>
#include <QCheckBox>
#include <QLabel>
#include <QPixmap>
#include "version.h"
#include "aboutmdlg.h"
#include "e2profil.h"
#ifndef AUTHORWEB
# define AUTHORWEB "http://www.LancOS.com"
#endif
#ifndef PORTERGQT
# define PORTERGQT "Eduard Kalinowski"
#endif
#ifndef PORTERMAIL
# define PORTERMAIL "eduard_kalinowski@yahoo.de"
#endif
#undef PROGRAM_DATE
#ifndef PROGRAM_DATE
# define PROGRAM_DATE __DATE__
#endif
AboutModalDialog::AboutModalDialog(QWidget *bw, const QString title)
: QDialog(bw)
{
qDebug() << "AboutModalDialog::AboutModalDialog()";
setupUi(this);
setWindowTitle(title);
cmdw = static_cast<e2CmdWindow *>(bw);
if (cmdw->getStyleSheet().length() > 0)
{
setStyleSheet(cmdw->getStyleSheet());
}
lblAbout0->setText(APP_NAME " - " + translate(STR_APPNAME_EXT) + "<br>" + translate(STR_MSGVERSION) + " " APP_VERSION " " PROGRAM_DATE);
QString t = "Copyright (C) 1997-" APP_YEAR " by <a href=\"" APP_EMAIL "\">" APP_AUTHOR "</a><br><br>"
"Porting to Qt by <a href=\"" PORTERMAIL "\">" PORTERGQT "</a><br><br>" +
translate(STR_APPDOWNLOAD1) + " " APP_NAME " " + translate(STR_APPDOWNLOAD2) + "<br>" +
"<a href=\"" AUTHORWEB "\">" AUTHORWEB "</a>";
if (translate(MSG_TRANSLATORNAME).length() > 0)
{
t += "<br><br>" + translate(MSG_TRANSLATORCREDITS) + "<br>" +
translate(MSG_TRANSLATORNAME).replace("\n", "<br>");
}
lblAbout1->setText(t);
chkSound->setChecked(E2Profile::GetSkipStartupDialog());
chkSound->setText(translate(STR_LBLSKIPMSG));
pushOk->setText(translate(STR_BTNOK));
pushHelp->setText(translate(STR_BTNHELP));
icoPonyProg->setPixmap(QPixmap(":/icons/ponyprog.png"));
connect(pushOk, SIGNAL(clicked()), this, SLOT(accept()));
connect(pushHelp, SIGNAL(clicked()), this, SLOT(onHelp()));
connect(chkSound, SIGNAL(clicked(bool)), this, SLOT(onChkStart(bool)));
adjustSize();
}
AboutModalDialog::~AboutModalDialog()
{
qDebug() << "AboutModalDialog::~AboutModalDialog()";
}
void AboutModalDialog::onHelp()
{
cmdw->CmdHelp();
accept();
}
void AboutModalDialog::onChkStart(bool c)
{
E2Profile::SetSkipStartupDialog(c);
}
|