diff options
author | 2021-04-05 23:52:34 +0530 | |
---|---|---|
committer | 2021-04-05 23:52:34 +0530 | |
commit | 939af726dc0b5e07e7d941719dfadf2c9831f4e0 (patch) | |
tree | be02a45434a06dc77e10ab45e80017066a412287 /src | |
parent | ee687f769175b39b611424d5a7bdc11a93b3ba65 (diff) | |
download | whatsie-939af726dc0b5e07e7d941719dfadf2c9831f4e0.tar.gz whatsie-939af726dc0b5e07e7d941719dfadf2c9831f4e0.zip |
new about dialog
Diffstat (limited to 'src')
-rw-r--r-- | src/about.cpp | 48 | ||||
-rw-r--r-- | src/about.h | 22 | ||||
-rw-r--r-- | src/about.ui | 216 |
3 files changed, 286 insertions, 0 deletions
diff --git a/src/about.cpp b/src/about.cpp new file mode 100644 index 0000000..c49e68b --- /dev/null +++ b/src/about.cpp @@ -0,0 +1,48 @@ +#include "about.h" +#include "ui_about.h" +#include <QDesktopServices> +#include <QGraphicsOpacityEffect> +#include <QPropertyAnimation> +#include <QUrl> + +About::About(QWidget *parent) : + QWidget(parent), + ui(new Ui::About) +{ + ui->setupUi(this); + + ui->version->setText("Version: "+QApplication::applicationVersion()); + + connect(ui->donate,&QPushButton::clicked,[=](){ + QDesktopServices::openUrl(QUrl("https://paypal.me/keshavnrj/10")); + }); + + connect(ui->rate,&QPushButton::clicked,[=](){ + QDesktopServices::openUrl(QUrl("snap://whatsie")); + }); + connect(ui->more_apps,&QPushButton::clicked,[=](){ + QDesktopServices::openUrl(QUrl("https://snapcraft.io/search?q=keshavnrj")); + }); + connect(ui->source_code,&QPushButton::clicked,[=](){ + QDesktopServices::openUrl(QUrl("https://github.com/keshavbhatt/whatsie")); + }); + + setWindowTitle(QApplication::applicationName() +" | About"); + + ui->centerWidget->hide(); + + QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(this); + ui->centerWidget->setGraphicsEffect(eff); + QPropertyAnimation *a = new QPropertyAnimation(eff,"opacity"); + a->setDuration(1000); + a->setStartValue(0); + a->setEndValue(1); + a->setEasingCurve(QEasingCurve::InCurve); + a->start(QPropertyAnimation::DeleteWhenStopped); + ui->centerWidget->show(); +} + +About::~About() +{ + delete ui; +} diff --git a/src/about.h b/src/about.h new file mode 100644 index 0000000..360749f --- /dev/null +++ b/src/about.h @@ -0,0 +1,22 @@ +#ifndef ABOUT_H +#define ABOUT_H + +#include <QWidget> + +namespace Ui { +class About; +} + +class About : public QWidget +{ + Q_OBJECT + +public: + explicit About(QWidget *parent = nullptr); + ~About(); + +private: + Ui::About *ui; +}; + +#endif // ABOUT_H diff --git a/src/about.ui b/src/about.ui new file mode 100644 index 0000000..0baa5a5 --- /dev/null +++ b/src/about.ui @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>About</class> + <widget class="QWidget" name="About"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>509</width> + <height>267</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QWidget" name="centerWidget" native="true"> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <property name="rightMargin"> + <number>12</number> + </property> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="label"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>100</width> + <height>100</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>100</width> + <height>100</height> + </size> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="icons.qrc">:/icons/app/icon-256.png</pixmap> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QLabel" name="label_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> +<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;">WhatSie</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">WhatsApp Web Client for Linux Desktop.</p></body></html></string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="openExternalLinks"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="version"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>-</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="version_2"> + <property name="text"> + <string><html><head/><body><p><span style=" font-weight:600;">Designed &amp; Developed by:</span> Keshav Bhatt </p><p><span style=" font-weight:600;">Developer Email address: </span>keshavnrj@gmail.com</p><p><span style=" font-weight:600;">Developer Website:</span> http://ktechpit.com</p></body></html></string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="QWidget" name="widget" native="true"> + <property name="styleSheet"> + <string notr="true"> QWidget#widget + { + background-image:url(:/icons/texture.png), linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95)); + selection-background-color:#3d8ec9; + selection-color: black; background-clip: border; + border-image: none; outline: 0;}</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="topMargin"> + <number>0</number> + </property> + <item> + <widget class="QPushButton" name="donate"> + <property name="text"> + <string>Donate</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="rate"> + <property name="text"> + <string>Rate in Store</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="source_code"> + <property name="text"> + <string>Source Code</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="more_apps"> + <property name="text"> + <string>More Application by Developer</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="icons.qrc"/> + </resources> + <connections/> +</ui> |