diff options
author | 2021-04-18 13:10:38 +0530 | |
---|---|---|
committer | 2021-04-18 13:10:38 +0530 | |
commit | d89d8215a6aa357731ca465c404b8b05a78b06c6 (patch) | |
tree | 3aad2c1cd356db3e79f82d072a1422bededc68c4 /src/about.cpp | |
parent | a6f0d4166e202f889c988de2a6a7ddad9ad240a9 (diff) | |
download | whatsie-d89d8215a6aa357731ca465c404b8b05a78b06c6.tar.gz whatsie-d89d8215a6aa357731ca465c404b8b05a78b06c6.zip |
updated class
Diffstat (limited to 'src/about.cpp')
-rw-r--r-- | src/about.cpp | 52 |
1 files changed, 41 insertions, 11 deletions
diff --git a/src/about.cpp b/src/about.cpp index b48c7e2..617e773 100644 --- a/src/about.cpp +++ b/src/about.cpp @@ -3,7 +3,6 @@ #include <QDesktopServices> #include <QGraphicsOpacityEffect> #include <QPropertyAnimation> -#include <QTimer> #include <QUrl> #include <utils.h> @@ -13,25 +12,58 @@ About::About(QWidget *parent) : { ui->setupUi(this); + //init + appName = QApplication::applicationName(); + appDescription = "WhatsApp Web clinet for Linux Desktop"; + isOpenSource = true; + appAuthorName = "Keshav Bhatt"; + appAuthorEmail = "keshavnrj@gmail.com"; + appAuthorLink = "http://ktechpit.com"; + donateLink = "https://paypal.me/keshavnrj/5"; + moreAppsLink = "https://snapcraft.io/search?q=keshavnrj"; + + appSourceCodeLink = "https://github.com/whatsie"; + appRateLink = "snap://whatsie"; + + + ui->appNameDesc->setText(QString("<p style=' margin-top:12px; margin-bottom:12px; margin-left:0px;" + " margin-right:0px; -qt-block-indent:0; text-indent:0px;'>" + "<span style=' font-size:18pt;'>%1</span></p>" + "<p style=' margin-top:12px; margin-bottom:12px; margin-left:0px;" + " margin-right:0px; -qt-block-indent:0; text-indent:0px;'>" + "%2</p>").arg(appName,appDescription)); + + ui->desc2->setText(QString("<p><span style=' font-weight:600;'>Designed & Developed by:</span>" + " %1 </p><p><span style=' font-weight:600;'>" + "Developer Email address: </span>%2</p>" + "<p><span style=' font-weight:600;'>Developer Website:</span>" + " %3</p>").arg(appAuthorName,appAuthorEmail,appAuthorLink)); + + + ui->version->setText("Version: "+QApplication::applicationVersion()); + ui->debugInfoText->setHtml(utils::appDebugInfo()); + ui->debugInfoText->hide(); - ui->debugInfoButton->setText(QObject::tr("Show Debug Info")); + ui->debugInfoButton->setText(QObject::tr("Show Debug Info")); - ui->version->setText("Version: "+QApplication::applicationVersion()); + if(isOpenSource == false){ + ui->source_code->hide(); + } connect(ui->donate,&QPushButton::clicked,[=](){ - QDesktopServices::openUrl(QUrl("https://paypal.me/keshavnrj/10")); + QDesktopServices::openUrl(QUrl(donateLink)); }); connect(ui->rate,&QPushButton::clicked,[=](){ - QDesktopServices::openUrl(QUrl("snap://whatsie")); + QDesktopServices::openUrl(QUrl(appRateLink)); }); connect(ui->more_apps,&QPushButton::clicked,[=](){ - QDesktopServices::openUrl(QUrl("https://snapcraft.io/search?q=keshavnrj")); + QDesktopServices::openUrl(QUrl(moreAppsLink)); }); connect(ui->source_code,&QPushButton::clicked,[=](){ - QDesktopServices::openUrl(QUrl("https://github.com/keshavbhatt/whatsie")); + QDesktopServices::openUrl(QUrl(appSourceCodeLink)); }); setWindowTitle(QApplication::applicationName() +" | About"); @@ -59,10 +91,8 @@ void About::on_debugInfoButton_clicked() if(ui->debugInfoText->isVisible()){ ui->debugInfoText->hide(); ui->debugInfoButton->setText(QObject::tr("Show Debug Info")); - //update geometry after above loop is finished - QTimer::singleShot(300,this,[=]{ - this->resize(this->width(),this->minimumHeight()); - }); + + this->resize(this->width(),this->minimumHeight()); }else{ ui->debugInfoText->show(); ui->debugInfoButton->setText(QObject::tr("Hide Debug Info")); |