53 #include "ui_dialogaboutseamlyme.h"
54 #include "../version.h"
55 #include "../vmisc/def.h"
56 #include "../fervor/fvupdater.h"
59 #include <QDesktopServices>
60 #include <QMessageBox>
76 connect(
ui->pushButton_Web_Site, &QPushButton::clicked,
this, [
this]()
78 if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
80 qWarning() << tr(
"Cannot open your default browser");
83 connect(ui->buttonBox, &QDialogButtonBox::accepted,
this, &DialogAboutSeamlyMe::close);
84 connect(ui->pushButtonCheckUpdate, &QPushButton::clicked, []()
87 FvUpdater::sharedUpdater()->SetFeedURL(defaultFeedURL);
88 FvUpdater::sharedUpdater()->CheckForUpdatesNotSilent();
92 FontPointSize(ui->label_Legal_Stuff, 11);
93 FontPointSize(ui->label_SeamlyMe_Built, 11);
94 FontPointSize(ui->label_QT_Version, 11);
96 ui->downloadProgress->hide();
97 ui->downloadProgress->setValue(0);
110 if (event->type() == QEvent::LanguageChange)
113 ui->retranslateUi(
this);
118 QDialog::changeEvent(event);
124 QDialog::showEvent( event );
125 if ( event->spontaneous() )
136 setMaximumSize(size());
137 setMinimumSize(size());
147 QFont font = w->font();
148 font.setPointSize(pointSize);
155 ui->label_SeamlyMe_Version->setText(QString(
"SeamlyMe %1").arg(
APP_VERSION_STR));
156 ui->labelBuildRevision->setText(tr(
"Build revision: %1").arg(BUILD_REVISION));
159 const QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String(
"MMM d yyyy"));
160 ui->label_SeamlyMe_Built->setText(tr(
"Built on %1 at %2").arg(date.toString()).arg(__TIME__));
163 "The program is provided AS IS with NO WARRANTY OF ANY "
164 "KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY "
165 "AND FITNESS FOR A PARTICULAR PURPOSE."));
171 if (!
ui->downloadProgress->isVisible()){
172 ui->downloadProgress->show();
173 ui->pushButtonCheckUpdate->setDisabled(
true);
175 ui->downloadProgress->setValue(val);
177 ui->downloadProgress->hide();
178 ui->downloadProgress->setValue(0);
179 ui->pushButtonCheckUpdate->setDisabled(
false);
void FontPointSize(QWidget *w, int pointSize)
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
void setProgressValue(int val)
virtual ~DialogAboutSeamlyMe()
Ui::DialogAboutSeamlyMe * ui
DialogAboutSeamlyMe(QWidget *parent=nullptr)
virtual void changeEvent(QEvent *event) Q_DECL_OVERRIDE
static FvUpdater * sharedUpdater()
QString buildCompatibilityString()
#define VER_COMPANYDOMAIN_STR
const QString APP_VERSION_STR
#define translate(context, source)