30 #include "ui_dialogaboutapp.h"
31 #include "../version.h"
33 #include <QDesktopServices>
34 #include <QMessageBox>
36 #include "../options.h"
37 #include "../core/vapplication.h"
38 #include "../fervor/fvupdater.h"
48 qApp->Seamly2DSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
51 ui->labelBuildRevision->setText(QString(
"Build revision: %1").arg(BUILD_REVISION));
54 QDate date = QLocale::c().toDate(QString(__DATE__).simplified(), QLatin1String(
"MMM d yyyy"));
55 ui->label_Seamly2D_Built->setText(tr(
"Built on %1 at %2").arg(date.toString()).arg(__TIME__));
58 "The program is provided AS IS with NO WARRANTY OF ANY "
59 "KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY "
60 "AND FITNESS FOR A PARTICULAR PURPOSE."));
64 connect(
ui->pushButton_Web_Site, &QPushButton::clicked,
this, [
this]()
66 if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
68 qWarning() << tr(
"Cannot open your default browser");
72 connect(ui->pushButtonCheckUpdate, &QPushButton::clicked, []()
75 FvUpdater::sharedUpdater()->SetFeedURL(defaultFeedURL);
76 FvUpdater::sharedUpdater()->CheckForUpdatesNotSilent();
80 FontPointSize(ui->label_Legal_Stuff, 11);
81 FontPointSize(ui->label_contrib_label, 11);
82 FontPointSize(ui->label_Seamly2D_Built, 11);
83 FontPointSize(ui->label_QT_Version, 11);
84 ui->downloadProgress->hide();
85 ui->downloadProgress->setValue(0);
98 QDialog::showEvent( event );
99 if ( event->spontaneous() )
110 setMaximumSize(size());
111 setMinimumSize(size());
121 QFont font = w->font();
122 font.setPointSize(pointSize);
127 if (!
ui->downloadProgress->isVisible()){
128 ui->downloadProgress->show();
129 ui->pushButtonCheckUpdate->setDisabled(
true);
131 ui->downloadProgress->setValue(val);
133 ui->downloadProgress->hide();
134 ui->downloadProgress->setValue(0);
135 ui->pushButtonCheckUpdate->setDisabled(
false);
DialogAboutApp(QWidget *parent=nullptr)
virtual ~DialogAboutApp()
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
void FontPointSize(QWidget *w, int pointSize)
void setProgressValue(int val)
static FvUpdater * sharedUpdater()
QString buildCompatibilityString()
#define VER_COMPANYDOMAIN_STR
const QString APP_VERSION_STR
#define translate(context, source)