Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Tab {
- imageSource: "asset:///images/share_icon.png"
- NavigationPane {
- id: navTab
- Page {
- id:sharePage
- ScrollView {
- Container {
- layout: StackLayout {
- orientation: LayoutOrientation.TopToBottom
- }
- background: Color.Black
- Container {
- layout: DockLayout {
- }
- leftPadding: 15.0
- rightPadding: 15.0
- horizontalAlignment: HorizontalAlignment.Fill
- background: Color.create("#f9393b30")
- ImageView {
- imageSource: "asset:///images/title.png"
- horizontalAlignment: HorizontalAlignment.Center
- maxHeight: 250
- maxWidth: 300
- scaleX: 0.5
- scaleY: 0.5
- }
- Button {
- horizontalAlignment: HorizontalAlignment.Right
- imageSource: "asset:///images/settings_button_icon.png"
- //
- preferredWidth: 10.0
- preferredHeight: 10.0
- leftPadding: 100
- contextActions: [
- ActionSet {
- title: "Share Settings"
- actions: [
- ActionItem {
- title: "Add/Delete Symbols"
- onTriggered: {
- var add_Delete = addOrDelete.createObject();
- // var add_Delete=_app.getDropDownSymbols();
- add_Delete.appPage_ID =
- { 'id': navTab ,'title': 'Share'};
- navTab.push(add_Delete);
- //navTab.push(addOrDelete.createObject());
- }
- imageSource: "asset:///images/add_button.png"
- },
- ActionItem {
- title: "Alerts"
- onTriggered: {
- var alerts = alertsPage.createObject();
- alerts.alerts_ID = {
- 'id': navTab
- };
- navTab.push(alerts);
- //navTab.push(alertsPage.createObject());
- }
- imageSource: "asset:///images/alert_title_icon.png"
- },
- ActionItem {
- title: "Portfolio"
- onTriggered: {
- var port_page= portfolio.createObject();
- port_page.data_ID={'id':navTab};
- navTab.push(port_page);
- }
- imageSource: "asset:///images/portfolio_title_icon.png"
- },
- ActionItem {
- title: "News Feeds"
- onTriggered: {
- var feeds= newsFeeds.createObject();
- feeds.navId={
- 'id': navTab
- }
- navTab.push(feeds);
- }
- imageSource: "asset:///images/news_feed_icon.png"
- },
- ActionItem {
- title: "Exit Application"
- onTriggered: {
- _app.exitApp();
- }
- imageSource: "asset:///images/exit_icon.png"
- }
- ]
- } // end of ActionSet
- ]
- }
- }
- Container {
- layout: StackLayout {
- }
- leftPadding: 15.0
- rightPadding: 15.0
- background: Color.create("#00a3b8")
- horizontalAlignment: HorizontalAlignment.Fill
- Label {
- text: "Share"
- textStyle.color: Color.White
- }
- }
- Container {
- leftPadding: 15.0
- rightPadding: 15.0
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
- topPadding: 20.0
- Label {
- id: symbolTop
- text: "Symbol"
- // Text Style and size etc
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 4.0
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: changePer
- text: "Change %"
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 2.0
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: ltpTop
- text: "LTP"
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1.0
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: high
- text: "High"
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1.0
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: low
- text: "Low"
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1.0
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- }
- //Integrating
- Container {
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
- ListView {
- id: tradeList
- objectName: "tradeList"
- dataModel: _app.dataModel
- listItemComponents: [
- ListItemComponent {
- type: "header"
- Header {
- title: {
- ListItemData
- }
- }
- },
- // The tradeList Item
- ListItemComponent {
- type: "item"
- // StandardListItem {
- // title: ListItemData.Symbol + ' ' + ListItemData.PerChange +' '+
- // ListItemData.LTP
- // }
- Container {
- leftPadding: 15.0
- rightPadding: 15.0
- layout: StackLayout {
- orientation: LayoutOrientation.LeftToRight
- }
- topPadding: 20.0
- Label {
- id: symbol
- text: ListItemData.Symbol_En
- //text: ListItemData.Symbol_En.length()>20?Symbol_En.subString(0,15): Symbol_En
- // Text Style and size etc
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 3.8
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: change
- text: ListItemData.PerChange
- textStyle.color: ListItemData.PerChange.indexOf('-') < 0 ? Color.Green : Color.Red //here
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 2
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- }
- Label {
- id: ltp
- text: ListItemData.LTP
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: highValue
- text: ListItemData.High
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- Label {
- id: lowValue
- text: ListItemData.Low
- textStyle.base: SystemDefaults.TextStyles.SubtitleText
- textStyle.fontSizeValue: 30.0
- layoutProperties: StackLayoutProperties {
- spaceQuota: 1
- }
- verticalAlignment: VerticalAlignment.Center
- horizontalAlignment: HorizontalAlignment.Center
- textStyle.color: Color.White
- }
- }
- }
- ]
- onTriggered: {
- var quick_chart = quickView.createObject();
- quick_chart.chart_ID = {
- 'id': navTab
- };
- navTab.push(quick_chart);
- var selectedItem = dataModel.data(indexPath);
- textField.text = selectedItem.status;
- }
- }
- Timer {
- id: lightTimer
- // Specify a timeout interval of 1 second
- interval: 1000
- onTimeout: {
- // call method Qinvikable to load records
- _app.readRecords();
- } // end of onTimeout signal handler
- } // end of Timer
- }
- }
- }
- }
- onCreationCompleted: {
- lightTimer.start();
- _app.reqForSymbols(1);
- }
- }
- onTriggered: {
- _app.dropSymbols(2);
- _app.clearModel();
- // lightTimer2.stop();
- _app.reqForSymbols(1);
- lightTimer.start();
- }
- attachedObjects: [
- ComponentDefinition {
- id: quickView
- source: "QuickORChartview.qml"
- },
- ComponentDefinition {
- id: alertsPage
- source: "AlertsPage.qml"
- },
- ComponentDefinition {
- id: portfolio
- source: "portfolio.qml"
- },
- ComponentDefinition {
- id: addOrDelete
- source: "AddOrDelete.qml"
- },
- ComponentDefinition {
- id: newsFeeds
- source: "FeedsHome.qml"
- },
- ComponentDefinition {
- id: exitApp
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement