/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
width: 800; height: 480
property int componentWidth: screen.width
- property int itemHeight: 50
+ property int itemHeight: 75
function close(){
Qt.quit();
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
property bool updateFreqEnabled
property string updateFreqMin
property bool updateWeekdaysOnly
+ property int fontSizeMed: 24
+ property int fontSizeSmall: 20
+
//property bool updateOnSavedNetworksOnly
property string rssURL: "http://finance.yahoo.com/rss/topfinstories"
signal logRequest(string strMessage)
function loadSettings(){
var value;
value = DBUtility.getSetting("UpdateFreqency");
- if (!value || value == "0.0" || value === "" || isNaN(value)){
+ if (!value || value === "0.0" || value === "" || isNaN(value)){
configParametersComponent.updateFreqEnabled = false;
}
else{
configParametersComponent.updateFreqMin = parseInt(value);
}
value = DBUtility.getSetting("UpdateWeekdaysOnly");
- if (!value || value == "0.0" || value === ""|| !configParametersComponent.updateFreqEnabled){
+ if (!value || value === "0.0" || value === ""|| !configParametersComponent.updateFreqEnabled){
configParametersComponent.updateWeekdaysOnly = false;
}
else{
*/
value = DBUtility.getSetting("RSSURL");
- if (!value || value == "Unknown" || value === ""){
+ if (!value || value === "Unknown" || value === ""){
//configParametersComponent.rssURL = configParametersComponent.defaultRSSFeed;
}
else{
anchors.leftMargin: 35
height: 50
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 22; font.bold: true; elide: Text.ElideRight; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
text: "News Feed"
}
Text{
height:parent.height
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeSmall; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
text: "RSS URL: "
color: "#ffffff";
}
Text {
id: autoUpdateSectionLabel
anchors.top: newsSection.bottom
- //anchors.topMargin: 10
+ anchors.topMargin: 20
anchors.left: parent.left
anchors.leftMargin: 35
height: 50
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 22; font.bold: true; elide: Text.ElideRight; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
text: "Auto-Update *"
}
Text{
height:parent.height
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeSmall; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
text: "Every "
color: configParametersComponent.updateFreqEnabled? "#ffffff" :"#B8B8B8";
}
Text{
height:parent.height
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeSmall; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
text: " minutes"
color: configParametersComponent.updateFreqEnabled? "#ffffff" :"#B8B8B8";
}
Text{
height:parent.height
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeSmall; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
text: "Only on weekdays"
color: configParametersComponent.updateWeekdaysOnly? "#ffffff" :"#B8B8B8";
}
Text{
height:parent.height
horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 20; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ font.pixelSize: fontSizeSmall; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
text: "Only on saved Wifi connections"
color: configParametersComponent.updateOnSavedNetworksOnly? "#ffffff" :"#B8B8B8";
}
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
Item {
id: tickerTab
property int componentWidth
- property int itemHeight
+ property int itemHeight: 75
signal logRequest(string strMessage)
Component.onCompleted: {
logRequest("Removing symbol "+symbol+" at index "+index);
var result = DBUtility.removeSymbol(symbol);
- if (result != "Error"){
+ if (result !== "Error"){
symbolsListModel.remove(index);
}
else{
var result = DBUtility.addSymbol(symbol);
logRequest("Result is "+result);
- if (result != "Error"){
+ if (result !== "Error"){
symbolsListModel.append({"symbol": symbol});
}
else{
verticalAlignment: Text.AlignVCenter
width: parent.width - 120;
height: parent.height
- font.pixelSize: 18;
+ font.pixelSize: 24;
font.bold: true;
elide: Text.ElideRight;
color: "white";
width: componentWidth
height: itemHeight;
anchors.top: parent.top
+ z: 5
color: "#343434"
Item {
anchors.leftMargin: 5
anchors.verticalCenter: parent.verticalCenter
maximumLength:25
- font.pixelSize: 18
+ font.pixelSize: 24
font.bold: true
font.capitalization: Font.AllUppercase
inputMethodHints: Qt.ImhNoPredictiveText
Rectangle{
id: footerTextArea
width: parent.width
- height: itemHeight
- z: 5
+ height: 25
+ //z: 5
color: "#343434"
anchors.bottom: parent.bottom
Text {
property string text
property bool keyUsing: false
- property int fontSize: 12
+ property int fontSize: 20
BorderImage {
id: buttonImage
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
Button {
id: buttonTickers
text: "Add/Remove Tickers"
- fontSize: 14
+ fontSize: 18
width: 200; height: parent.height
onClicked: menuBar.tickersClicked()
}
Button {
id: buttonOptions
text: "Update Settings"
- fontSize: 14
+ fontSize: 18
width: 200; height: parent.height
onClicked: menuBar.optionsClicked()
}
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
elide: Text.ElideMiddle
text: title
font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black"
- font.pixelSize: 18
+ font.pixelSize: 20
}
Image {
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
function isTodayAWeekDay(){
var dayOfWeek = (new Date()).getDay();
- var isWeekDay = (dayOfWeek == 0 || dayOfWeek == 6)? false : true;
+ var isWeekDay = (dayOfWeek === 0 || dayOfWeek === 6)? false : true;
return isWeekDay;
}
+
+
+//Source: Mout JS library (https://github.com/mout/mout/blob/master/src/number/abbreviate.js)
+
+/**
+* Enforce a specific amount of decimal digits and also fix floating
+* point rounding issues.
+* @example `enforcePrecision(0.615, 2) -> 0.62`, `(0.615).toFixed(2) ->
+* 0.61`
+*/
+function enforcePrecision(val, nDecimalDigits){
+ var pow = Math.pow(10, nDecimalDigits);
+ return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits);
+}
+
+var _defaultDict = {
+ thousand : 'K',
+ million : 'M',
+ billion : 'B'
+};
+
+
+/**
+* Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...)
+*/
+function abbreviateNumber(val, nDecimals, dict){
+ nDecimals = nDecimals !== null? nDecimals : 1;
+ dict = dict || _defaultDict;
+ val = enforcePrecision(val, nDecimals);
+
+ var str, mod;
+
+ if (val < 1000){
+ str = val;
+ } else if (val < 1000000) {
+ mod = enforcePrecision(val / 1000, nDecimals);
+ // might overflow to next scale during rounding
+ str = mod < 1000? mod + dict.thousand : 1 + dict.million;
+ } else if (val < 1000000000) {
+ mod = enforcePrecision(val / 1000000, nDecimals);
+ str = mod < 1000? mod + dict.million : 1 + dict.billion;
+ } else {
+ str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion;
+ }
+
+ return str;
+}
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
Page {
id: mainPage
- property int itemHeight: 50
+ property int itemHeight: 75
property int titleBarHeight: 60
property int toolBarHeight: 40
+ property int fontSizeMed: 24
+ property int fontSizeSmall: 20
+ property int colSpacing: 4
property int componentWidth: mainPage.width
function reloadData(){
}
Row {
- x: 30;y: 15;
+ x: 30;y: (wrapper.height - mainPage.fontSizeMed)/2;
width: mainPage.componentWidth - 60;
spacing: 5
- Text { text: stockName; width: parent.width * 30/100; font.pixelSize: 18; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
- Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
+ Text { text: stockName; width: parent.width * 30/100; font.pixelSize: mainPage.fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
+ Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
color: change >= 0 ? "#00ff00":"#ff0000"; style: Text.Raised; styleColor: "black"}
- Text { text: volume; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: marketCap; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: volume; width: parent.width * 18/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: marketCap; width: parent.width * 12/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
}
}
}
}
Row {
- x: 10;y: 15;
+ x: 10;y: (wrapperItem.height - mainPage.fontSizeMed)/2;
width: mainPage.componentWidth - 5;
spacing: 3
- Text { text: stockName; width: parent.width * 42/100; font.pixelSize: 18; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
- Text { text: lastTradedPrice; width: parent.width * 20/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: stockName; width: parent.width * 42/100; font.pixelSize: mainPage.fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black"}
+ Text { text: lastTradedPrice; width: parent.width * 20/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black"}
Column {
- y: -15;
+ y: (wrapperItem.height - mainPage.colSpacing - mainPage.fontSizeSmall*2)/2 - (wrapperItem.height - mainPage.fontSizeMed)/2;
width: parent.width * 18/100; height: parent.height
- spacing: 2
- Text { text: change; font.pixelSize: 16; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
+ spacing: mainPage.colSpacing
+ Text { text: change; font.pixelSize: mainPage.fontSizeSmall; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
color: change >= 0 ? "#00ff00":"#ff0000";
style: Text.Raised; styleColor: "black" }
- Text { text: changePercentage; font.pixelSize: 16; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight;
+ Text { text: changePercentage; font.pixelSize: mainPage.fontSizeSmall; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight;
color: change >= 0 ? "#00ff00":"#ff0000";
style: Text.Raised; styleColor: "black" }
}
- Text { text: volume; width: parent.width * 20/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: volume !== ''? Common.abbreviateNumber(volume,2) :''; width: parent.width * 20/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black"}
}
}
}
anchors.left: parent.left
anchors.leftMargin: 10
anchors.right: parent.right
- text: title; font.pixelSize: 18
+ text: title; font.pixelSize: mainPage.fontSizeSmall
font.bold: false;
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
signal newsReloadCompleted(bool success, string strMessage)
signal checkNetworkStatus
- property int itemHeight: 50
+ property int itemHeight: 75
property int titleBarHeight: 60
property int toolBarHeight: 40
+ property int fontSizeMed: 24
+ property int fontSizeSmall: 20
property int componentWidth: mainPage.width
property int autoUpdateInterval: 300000
property bool updateWeekDaysOnly: false
}
Row {
- x: 30;y: 15;
+ x: 30;y: (wrapper.height - mainPage.fontSizeMed)/2;
width: mainPage.componentWidth - 60;
spacing: 5
- Text { text: stockName; width: parent.width * 30/100; font.pixelSize: 18; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
- Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
+ Text { text: stockName; width: parent.width * 30/100; font.pixelSize: mainPage.fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
+ Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
color: change >= 0 ? "#00ff00":"#ff0000";
style: Text.Raised; styleColor: "black" }
- Text { text: volume; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: marketCap; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: volume; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: marketCap; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
}
}
}
anchors.left: parent.left
anchors.leftMargin: 10
anchors.right: parent.right
- text: title; font.pixelSize: 18
+ text: title; font.pixelSize: mainPage.fontSizeSmall
font.bold: false;
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
id: stockDetailsScreen
property int componentWidth: width
- property int itemHeight: 50
+ property int itemHeight: 75
+ property int newsItemHeight: 50
+ property int fontSizeMed: 24
+ property int fontSizeSmall: 20
property string symbol: "YHOO"
property string stockName: ""
property string lastTradedPrice: ""
id: stockNewsDelegate
Item {
- id: newsWrapper; width: stockDetailsLoader.width; height: itemHeight
+ id: newsWrapper; width: stockDetailsLoader.width; height: newsItemHeight
Item {
anchors.fill: parent
Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: newsWrapper.height - 2; width: newsWrapper.width; y: 1 }
Text {
anchors {verticalCenter: parent.verticalCenter;left: parent.left;leftMargin: 10;right: parent.right}
- text: title; font.pixelSize: 14
+ text: title; font.pixelSize: stockDetailsScreen.fontSizeSmall
font.bold: false;
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
id: stockNameLabel
anchors.top: parent.top
width: parent.width
+ z: 5
anchors.horizontalCenter: parent.horizontalCenter
- height: 30
+ height: stockDetailsScreen.fontSizeMed + 15
horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 18; font.bold: true; elide: Text.ElideMiddle; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
+ font.pixelSize: stockDetailsScreen.fontSizeMed; font.bold: true; elide: Text.ElideMiddle; color: "#B8B8B8"; style: Text.Raised; styleColor: "black"
text: (stockName != "")? (stockName +" ("+symbol+")"):symbol
}
border.color: "#BFBFBF"
color:"#2E2E2E"
anchors {top: stockNameLabel.bottom;left: parent.left;right: parent.right}
- height: 125
+ z: 5
+ height: (stockDetailsScreen.width > stockDetailsScreen.height)? 105:155
radius: 15
Column{
id: stockDetailsColumn
- anchors {top: parent.top; left: parent.left; leftMargin: 10}
- width: parent.width
+ anchors {top: parent.top; left: parent.left; leftMargin: 10; right: parent.right; rightMargin: 10}
+ //spacing: 10
+ //width: parent.width
StockDetailsRow{
label1: "Last Traded"
value1: lastTradedPrice
cell1Width: stockDetailsColumn.width/2
+ multilineLabel1: false
+ landscape: (stockDetailsScreen.width > stockDetailsScreen.height)
label2: "Day's Range"
value2: daysRange
cell2Width: stockDetailsColumn.width/2
+ multilineLabel2: true
}
StockDetailsRow{
label1: "Last Trade Time"
value1: lastTradedDateTime
cell1Width: stockDetailsColumn.width/2
+ multilineLabel1: true
+ landscape: (stockDetailsScreen.width > stockDetailsScreen.height)
label2: "52w Range"
value2: yearRange
cell2Width: stockDetailsColumn.width/2
+ multilineLabel2: true
}
StockDetailsRow{
label1: "Change"
value1: ((change != "" && changePercentage != "")? change + " ("+changePercentage+")":"")
cell1Width: stockDetailsColumn.width/2
+ landscape: (stockDetailsScreen.width > stockDetailsScreen.height)
label2: "Volume"
value2: marketVolume
label1: "Prev. Close"
value1: prevClose
cell1Width: stockDetailsColumn.width/2
+ landscape: (stockDetailsScreen.width > stockDetailsScreen.height)
label2: "Market Cap"
value2: marketCap
border.color: "#BFBFBF"
color:"#2E2E2E"
width: parent.width
- anchors {top: stockDetailsSection.bottom;topMargin: 5;
+ anchors {top: stockDetailsSection.bottom;topMargin: 10;
bottom: parent.bottom;
left: parent.left;
right: parent.right}
width: 130
spacing: 20
anchors {top: parent.top; topMargin: 40; bottom: parent.bottom;
- right: chartAreaLand.right;rightMargin: 10}
+ right: chartAreaLand.right;rightMargin: 60}
Row {
height: 40
Library.Button {
text: "1d"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("1d");
}
Library.Button {
text: "5d"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("5d");
}
}
Library.Button {
text: "3m"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("3m");
}
Library.Button {
text: "6m"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("6m");
}
}
Library.Button {
text: "1y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("1y");
}
Library.Button {
text: "2y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("2y");
}
}
Library.Button {
text: "5y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("5y");
}
Library.Button {
text: "max"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("my");
}
}
Column {
width: 280
spacing: 20
- anchors {verticalCenter: parent.verticalCenter;verticalCenterOffset: 80; horizontalCenter: parent.horizontalCenter}
+ anchors {verticalCenter: parent.verticalCenter;verticalCenterOffset: 100; horizontalCenter: parent.horizontalCenter}
Row {
height: 40
Library.Button {
text: "1d"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("1d");
}
Library.Button {
text: "5d"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("5d");
}
Library.Button {
text: "3m"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("3m");
}
Library.Button {
text: "6m"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("6m");
}
}
Library.Button {
text: "1y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("1y");
}
Library.Button {
text: "2y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("2y");
}
Library.Button {
text: "5y"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("5y");
}
Library.Button {
text: "max"
anchors { verticalCenter: parent.verticalCenter}
- width: 50; height: 32
+ width: 75; height: 40
onClicked: loadChart("my");
}
}
/*
-@version: 0.4
+@version: 0.5
@author: Sudheer K. <scifi1947 at gmail.com>
@license: GNU General Public License
*/
property string label2
property string value2
property int cell2Width
+ property int fontSize: 20
+ property bool multilineLabel1:false
+ property bool multilineLabel2:false
+ property bool landscape: false
- height: 30
+ height: (multilineLabel1|multilineLabel2) && !landscape? 50:25
spacing: 5
Text{
width: cell1Width
height: itemHeight
- horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 14;font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignTop
+ font.pixelSize: fontSize;font.bold: false; style: Text.Raised; styleColor: "black"; wrapMode: multilineLabel1?Text.Wrap:Text.NoWrap
color: "#ffffff";
text: label1+": " + value1
}
Text{
width: cell2Width
height: itemHeight
- horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: 14; font.bold: false; elide: Text.ElideRight; style: Text.Raised; styleColor: "black"
+ horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignTop
+ font.pixelSize: fontSize; font.bold: false; style: Text.Raised; styleColor: "black"; wrapMode: multilineLabel2?Text.Wrap:Text.NoWrap
color: "#ffffff";
text: label2+": " + value2
}