From 9a5a44bb80e7f36de9790ee2a7326e6834741285 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Fri, 4 Nov 2016 17:39:28 -0700 Subject: [PATCH] added about page --- Goober.pro | 2 +- assets/.assets.index | 4 ++- assets/AboutPage.qml | 55 +++++++++++++++++++++++++++++++++++++++ assets/icons/ic_info.png | Bin 0 -> 2884 bytes assets/main.qml | 13 +++++++++ buildnum | 2 +- config.pri | 2 ++ src/applicationui.cpp | 8 ++++++ src/applicationui.hpp | 1 + translations/Goober.ts | 21 +++++++++------ 10 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 assets/AboutPage.qml create mode 100644 assets/icons/ic_info.png diff --git a/Goober.pro b/Goober.pro index d9ea75d..13d284e 100644 --- a/Goober.pro +++ b/Goober.pro @@ -1,7 +1,7 @@ APP_NAME = Goober CONFIG += qt warn_on cascades10 -LIBS += -lbbdata -lbbsystem +LIBS += -lbbdata -lbbsystem -lbb QT += network include(config.pri) diff --git a/assets/.assets.index b/assets/.assets.index index 6e8d35c..3495f3d 100644 --- a/assets/.assets.index +++ b/assets/.assets.index @@ -1,5 +1,6 @@ 1 -41 +43 +AboutPage.qml AppCover.qml icons/at.png icons/bell-slash.png @@ -17,6 +18,7 @@ icons/ic_contact.png icons/ic_del_bookmarks.png icons/ic_edit.png icons/ic_favorite.png +icons/ic_info.png icons/ic_reload.png icons/ic_reply.png icons/ic_reply_all.png diff --git a/assets/AboutPage.qml b/assets/AboutPage.qml new file mode 100644 index 0000000..89ef274 --- /dev/null +++ b/assets/AboutPage.qml @@ -0,0 +1,55 @@ +import bb.cascades 1.4 + +Page { + + property string appversion + + Container { + layout: DockLayout {} + verticalAlignment: VerticalAlignment.Fill + horizontalAlignment: HorizontalAlignment.Fill + Container { + horizontalAlignment: HorizontalAlignment.Center + verticalAlignment: VerticalAlignment.Center + Container { + horizontalAlignment: HorizontalAlignment.Center + Label { + text: "Goober" + horizontalAlignment: HorizontalAlignment.Center + textStyle.fontSize: FontSize.XXLarge + } + } + Container { + horizontalAlignment: HorizontalAlignment.Center + Label { + text: "v%1".arg(appversion) + } + } + Container { + horizontalAlignment: HorizontalAlignment.Center + topPadding: ui.sdu(2) + Label { + text: "A short messaging client for the pnut.io network." + multiline: true + } + } + Container { + horizontalAlignment: HorizontalAlignment.Center + topPadding: ui.sdu(2) + Label { + text: "Copyright © 2016 Morgan McMillian" + textStyle.fontSize: FontSize.XSmall + textFormat: TextFormat.Html + } + } + Container { + horizontalAlignment: HorizontalAlignment.Center + topPadding: ui.sdu(3) + Label { + text: "https://monkeystew.org" + textFormat: TextFormat.Html + } + } + } + } +} \ No newline at end of file diff --git a/assets/icons/ic_info.png b/assets/icons/ic_info.png new file mode 100644 index 0000000000000000000000000000000000000000..145f94482010cfc1ee5eb2077cb6a28cd99e0730 GIT binary patch literal 2884 zcmbVOeLRzEAKw`A7CVUY(i-wo_P${@na#8^37s>c%yzS#Y|}Q3(5M!rctn(XtVkz$ zJ5F9tC;P<7TZuSvILb-Uc}nz(sGhA;JS49ik0lKe#YmIbVgN+pilPA+L%@y&f&n%+ zd2csB0)e!7{7{yZ#S9>FL;?g`ql1tM;?-ynh_p!-&*tm_q_AipmM z{2M$I#f+x{JpSesF%Xgx7|Kc6!|~+8H+jQIGNPJ507%&|nIKLmA(WT5Haqs zPZwNmP0WoU2Gi)DY^hgdI8Q2#CnAwaNlAz#EJ7rXMWQ`DJvAH{jGJ1+O_D5>vSn^U ziT!5=8X)0_`SDV|NC?v~vZF-_QZiia>7OA8;+f1Z#6roZM5$ATl(FNHXaou=5NP81 zs4bBO1OIX3FSRA1$?*U(7?6k(#2od0#MplZt8@4FhBS(5Z;0E(eD$WV<7gsIf&dUo z88k9n{RP40bBQRlhdPVyIFvgEMesnQJ?I1s9gW5l@a{Ma$`|*Ugo z=oB>C59^7i(W&lKJcZ(crrQP*lr7`{pY8J1c0Xa!e~Tqj#Q<9>5{HUJai1$7 zh$oVYBs@_(j2c3KIWyTDzEC4@(QMG4@zMY>KM~;4#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VNQ~h);|Y~)CS2d9EE2mCx0-1 zC53nh-<32M_8CSn!;aa+j-P2R{MvtQ!?GWuiIqL1t(TBQE4XyjrSKm2Z9V>{zPazXI+>-nQKoeIhA5GjCPlA5SKq_ITF^yiM7*Zg*hD z*XG7e9pYU51hXUk9v$cG@3W@#Y_yQZPW!JP?9;!0tH$-UQ$YTyq3(udp`)1Yu>ZP4 rwJ~nf1I<}hyz76TXHnd)O #include #include +#include using namespace bb::cascades; @@ -64,6 +65,7 @@ ApplicationUI::ApplicationUI() : // Set created root object as the application scene Application::instance()->setScene(root); + } QVariant ApplicationUI::setting(const QString& key) @@ -86,3 +88,9 @@ void ApplicationUI::onSystemLanguageChanged() QCoreApplication::instance()->installTranslator(m_pTranslator); } } + +QString ApplicationUI::appversion() +{ + bb::ApplicationInfo appinfo; + return appinfo.version(); +} diff --git a/src/applicationui.hpp b/src/applicationui.hpp index cba42ae..46d0e60 100644 --- a/src/applicationui.hpp +++ b/src/applicationui.hpp @@ -44,6 +44,7 @@ public: Q_INVOKABLE QVariant setting(const QString &key); Q_INVOKABLE void setSetting(const QString &key, const QString &value); + Q_INVOKABLE QString appversion(); private slots: void onSystemLanguageChanged(); private: diff --git a/translations/Goober.ts b/translations/Goober.ts index b37ea43..aca0054 100644 --- a/translations/Goober.ts +++ b/translations/Goober.ts @@ -200,26 +200,31 @@ - - + + About + + + + + Home - - + + Mentions - - + + Bookmarks - - + + Global