fix(StatusChartPanel): fix #893 PR comments

This commit is contained in:
Alexandra Betouni 2022-09-14 14:39:51 +03:00 committed by Lukáš Tinkl
parent d02fea1cd3
commit 865fee22b8
1 changed files with 7 additions and 7 deletions

View File

@ -56,30 +56,30 @@ Page {
id: root id: root
/*! /*!
\qmlproperty real StatusChartPanel::graphsModel \qmlproperty var StatusChartPanel::graphsModel
This property holds the graphs model options to be set on the left side tab bar of the header. This property holds the graphs model options to be set on the left side tab bar of the header.
*/ */
property var graphsModel property var graphsModel
/*! /*!
\qmlproperty real StatusChartPanel::timeRangeModel \qmlproperty var StatusChartPanel::timeRangeModel
This property holds the time range options to be set on the right side tab bar of the header. This property holds the time range options to be set on the right side tab bar of the header.
*/ */
property var timeRangeModel property var timeRangeModel
/*! /*!
\qmlproperty real StatusChartPanel::graphComponent \qmlproperty alias StatusChartPanel::graphComponent
This property holds holds a reference to the graph component. This property holds holds a reference to the graph component.
*/ */
property alias chart: graphComponent property alias chart: graphComponent
/*! /*!
\qmlproperty real StatusChartPanel::timeRangeTabBarIndex \qmlproperty alias StatusChartPanel::timeRangeTabBarIndex
This property holds holds a reference to the time range tab bar current index. This property holds holds a reference to the time range tab bar current index.
*/ */
property alias timeRangeTabBarIndex: timeRangeTabBar.currentIndex property alias timeRangeTabBarIndex: timeRangeTabBar.currentIndex
/*! /*!
\qmlproperty real StatusChartPanel::selectedTimeRange \qmlproperty string StatusChartPanel::selectedTimeRange
This property holds holds the text of the current time range tab bar selected tab. This property holds holds the text of the current time range tab bar selected tab.
*/ */
property string selectedTimeRange: timeRangeTabBar.currentItem.text property string selectedTimeRange: timeRangeTabBar.currentItem.text
@ -104,14 +104,14 @@ Page {
Component.onCompleted: { Component.onCompleted: {
if (!!timeRangeModel) { if (!!timeRangeModel) {
for (var i = 0; i < timeRangeModel.length; i++) { for (var i = 0; i < timeRangeModel.length; i++) {
var timeTab = tabButton.createObject(root, { text: qsTr(timeRangeModel[i].text.toString()), var timeTab = tabButton.createObject(root, { text: timeRangeModel[i].text,
enabled: timeRangeModel[i].enabled }); enabled: timeRangeModel[i].enabled });
timeRangeTabBar.addItem(timeTab); timeRangeTabBar.addItem(timeTab);
} }
} }
if (!!graphsModel) { if (!!graphsModel) {
for (var j = 0; j < graphsModel.length; j++) { for (var j = 0; j < graphsModel.length; j++) {
var graphTab = tabButton.createObject(root, { text: qsTr(graphsModel[j].text.toString()), var graphTab = tabButton.createObject(root, { text: graphsModel[j].text,
enabled: graphsModel[j].enabled }); enabled: graphsModel[j].enabled });
graphsTabBar.addItem(graphTab); graphsTabBar.addItem(graphTab);
} }