IMail is an unofficial Gmail client for Ubuntu touch. You can do pretty much anything you can do with Gmail.
The app uses the lite version of Gmail so its faster and very lightweight on device memory.
Source code:
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1
import Ubuntu.Components.Extras.Browser 0.1
import "components"
/*!
\brief MainView with a Label and Button elements.
*/
MainView {
id: root
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer.karthik.upadya1.imail"
/*
This property enables the application to change orientation
when the device is rotated. The default is false.
*/
//automaticOrientation: true
backgroundColor: "#222930"
property bool loadingInd: false
width: units.gu(40)
height: units.gu(75)
Page {
title: i18n.tr("IMail")
Column {
spacing: units.gu(1)
clip: true
anchors {
fill: parent
}
Row {
id: line1
spacing: units.gu(1)
ActivityIndicator {
id: activity
running: root.loadingInd
visible: root.loadingInd
anchors.verticalCenter: line1.verticalCenter
Text {
id: activityText
anchors.centerIn: activity
color: "white"
text: (activity.running) ? i18n.tr("\t Loading...") : ""
}
}
}
Row {
id: line2
width: parent.width
height: parent.height
anchors.top: line1.bottom
UbuntuWebView {
id: webView
url: "https://mail.google.com/mail/mu/mp/530/"
width: parent.width
height: parent.height
Scrollbar {
parent: webView
flickableItem: webView
align: Qt.AlignTrailing
}
Scrollbar {
parent: webView
flickableItem: webView
align: Qt.AlignBottom
}
onLoadingChanged: root.loadingInd = !root.loadingInd
}
}
}
tools: ToolbarItems {
ToolbarButton {
id: homeButton
text: i18n.tr("Home")
iconSource: "home.png"
onTriggered: webView.url = "https://mail.google.com/mail/mu/mp/530/"
visible: true
}
ToolbarButton {
id: reloadButton
text: i18n.tr("Reload")
iconSource: "reload.png"
onTriggered: webView.reload()
visible: true
}
ToolbarButton {
id: actionsButton
text: "Options"
iconSource: "option.png"
onTriggered: PopupUtils.open(actionSelectionPopover, actionsButton)
visible: true
}
locked: false
opened: true
}
Item {
Component {
id: actionSelectionPopover
ActionSelectionPopover {
actions: ActionList {
Action {
text: i18n.tr("About me")
onTriggered: PopupUtils.open(defaultSheet, null)
}
Action {
text: i18n.tr("Quit")
onTriggered: Qt.quit()
}
}
}
}
}
Component {
id: defaultSheet
DefaultSheet {
id: sheet
title: i18n.tr("About me")
Label {
anchors.fill: parent
color: UbuntuColors.orange
fontSize: "small"
wrapMode: Text.WordWrap
text: "Developed by: <b>KARTHIK</b><br/>" +
"Email: <b>karthik.upadya1@gmail.com</b><br/>" +
"Country: <b>INDIA</b><br/>" +
"This is unofficial gmail client designed for Ubuntu and Ubuntu Touch.<br/>" +
"Please mail me to get source code.<br/>" +
"Please give credit to me if you use this application as part of your project.<br/>" +
"Check out my other apps \"Daily Karma\", \"Weather Forecast\", \"Street Watch\".<br/>"+
"If you have android device you can download my apps from SlideMe.<br/>"+
"1. Dude! Escape<br/>2. Bumpy Adventures I<br/>3. Auto Call Blocker<br/>4. Snake<br/>5. Millenium alien<br/>"+
"My developer name in the site is \"developerKASS013\" Thanks :)"
}
}
}
}
}
Screenshots:
The app uses the lite version of Gmail so its faster and very lightweight on device memory.
Source code:
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1
import Ubuntu.Components.Extras.Browser 0.1
import "components"
/*!
\brief MainView with a Label and Button elements.
*/
MainView {
id: root
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer.karthik.upadya1.imail"
/*
This property enables the application to change orientation
when the device is rotated. The default is false.
*/
//automaticOrientation: true
backgroundColor: "#222930"
property bool loadingInd: false
width: units.gu(40)
height: units.gu(75)
Page {
title: i18n.tr("IMail")
Column {
spacing: units.gu(1)
clip: true
anchors {
fill: parent
}
Row {
id: line1
spacing: units.gu(1)
ActivityIndicator {
id: activity
running: root.loadingInd
visible: root.loadingInd
anchors.verticalCenter: line1.verticalCenter
Text {
id: activityText
anchors.centerIn: activity
color: "white"
text: (activity.running) ? i18n.tr("\t Loading...") : ""
}
}
}
Row {
id: line2
width: parent.width
height: parent.height
anchors.top: line1.bottom
UbuntuWebView {
id: webView
url: "https://mail.google.com/mail/mu/mp/530/"
width: parent.width
height: parent.height
Scrollbar {
parent: webView
flickableItem: webView
align: Qt.AlignTrailing
}
Scrollbar {
parent: webView
flickableItem: webView
align: Qt.AlignBottom
}
onLoadingChanged: root.loadingInd = !root.loadingInd
}
}
}
tools: ToolbarItems {
ToolbarButton {
id: homeButton
text: i18n.tr("Home")
iconSource: "home.png"
onTriggered: webView.url = "https://mail.google.com/mail/mu/mp/530/"
visible: true
}
ToolbarButton {
id: reloadButton
text: i18n.tr("Reload")
iconSource: "reload.png"
onTriggered: webView.reload()
visible: true
}
ToolbarButton {
id: actionsButton
text: "Options"
iconSource: "option.png"
onTriggered: PopupUtils.open(actionSelectionPopover, actionsButton)
visible: true
}
locked: false
opened: true
}
Item {
Component {
id: actionSelectionPopover
ActionSelectionPopover {
actions: ActionList {
Action {
text: i18n.tr("About me")
onTriggered: PopupUtils.open(defaultSheet, null)
}
Action {
text: i18n.tr("Quit")
onTriggered: Qt.quit()
}
}
}
}
}
Component {
id: defaultSheet
DefaultSheet {
id: sheet
title: i18n.tr("About me")
Label {
anchors.fill: parent
color: UbuntuColors.orange
fontSize: "small"
wrapMode: Text.WordWrap
text: "Developed by: <b>KARTHIK</b><br/>" +
"Email: <b>karthik.upadya1@gmail.com</b><br/>" +
"Country: <b>INDIA</b><br/>" +
"This is unofficial gmail client designed for Ubuntu and Ubuntu Touch.<br/>" +
"Please mail me to get source code.<br/>" +
"Please give credit to me if you use this application as part of your project.<br/>" +
"Check out my other apps \"Daily Karma\", \"Weather Forecast\", \"Street Watch\".<br/>"+
"If you have android device you can download my apps from SlideMe.<br/>"+
"1. Dude! Escape<br/>2. Bumpy Adventures I<br/>3. Auto Call Blocker<br/>4. Snake<br/>5. Millenium alien<br/>"+
"My developer name in the site is \"developerKASS013\" Thanks :)"
}
}
}
}
}
Screenshots:
No comments:
Post a Comment