From 03fcbb79629a20210433328a5ad8def6f105fb90 Mon Sep 17 00:00:00 2001 From: "littletux89@gmail.com" <littletux89@gmail.com> Date: Tue, 24 Dec 2019 23:20:24 +0300 Subject: [PATCH] [+] Added comment. --- DapButton.qml | 4 +++- DapMainWindow.qml | 4 +++- DapMainWindowForm.ui.qml | 31 ++++++++++++++++++------------- DapMenuTabWidget.qml | 21 ++++++++++++++------- DapMenuTabWidgetForm.ui.qml | 21 ++++++++++++++------- DapRightPanel.qml | 4 +++- DapRightPanelForm.ui.qml | 13 +++++++------ DapScreenForm.ui.qml | 4 ++-- DapTabForm.ui.qml | 26 +++++++++++++------------- DapTopPanelForm.ui.qml | 1 + 10 files changed, 78 insertions(+), 51 deletions(-) diff --git a/DapButton.qml b/DapButton.qml index a0ef388..f728aab 100644 --- a/DapButton.qml +++ b/DapButton.qml @@ -1,4 +1,6 @@ import QtQuick 2.4 -DapButtonForm { +DapButtonForm +{ + } diff --git a/DapMainWindow.qml b/DapMainWindow.qml index 4abae0f..2a97151 100644 --- a/DapMainWindow.qml +++ b/DapMainWindow.qml @@ -1,4 +1,6 @@ import QtQuick 2.4 -DapMainWindowForm { +DapMainWindowForm +{ + } diff --git a/DapMainWindowForm.ui.qml b/DapMainWindowForm.ui.qml index 740bc87..178859b 100644 --- a/DapMainWindowForm.ui.qml +++ b/DapMainWindowForm.ui.qml @@ -3,21 +3,26 @@ import QtQuick.Controls 2.0 Rectangle { - /// ----------- Load fonts ----------- - /// using example: font.family: fontRobotoLight.name - readonly property FontLoader fontRobotoLight: FontLoader { - source: "qrc:/res/fonts/roboto_light.ttf" - } - readonly property FontLoader fontRobotoRegular: FontLoader { - source: "qrc:/res/fonts/roboto_regular.ttf" - } + id: mainWindow + + readonly property FontLoader fontRobotoLight: + FontLoader + { + source: "qrc:/res/fonts/roboto_light.ttf" + } + readonly property FontLoader fontRobotoRegular: + FontLoader + { + source: "qrc:/res/fonts/roboto_regular.ttf" + } + + readonly property FontLoader fontRobotoMedium: + FontLoader + { + source: "qrc:/res/fonts/roboto_medium.ttf" + } - readonly property FontLoader fontRobotoMedium: FontLoader { - source: "qrc:/res/fonts/roboto_medium.ttf" - } - /// ----------- - id: mainWindow property alias iconLogotype: iconLogotype property alias frameLogotype: frameLogotype diff --git a/DapMenuTabWidget.qml b/DapMenuTabWidget.qml index 91a8f4d..dcd702d 100644 --- a/DapMenuTabWidget.qml +++ b/DapMenuTabWidget.qml @@ -3,23 +3,29 @@ import QtQuick.Controls 1.4 DapMenuTabWidgetForm { - property int widthItemMenu: viewMenuTab.width + ///@detalis Width of the main menu bar item. + property int widthItemMenu: dapMenuTab.width + ///@detalis Height of the main menu bar item. property int heightItemMenu: 60 * pt + ///@detalis Width of the main menu bar item icon. property int widthIconItemMenu: 18 * pt + ///@detalis Height of the main menu bar item icon. property int heightIconItemMenu: 18 * pt + ///@detalis Сolor of the main menu bar item in normal condition. property string normalColorItemMenu: "transparent" + ///@detalis Сolor of the main menu bar item in the selected state. property string selectColorItemMenu: "#D51F5D" + // Widget of the main menu bar item Component { - id: itemMenuTabDelegate - + id: itemMenuTabDelegate Rectangle { id: frameItemMenu - property bool isPushed: viewMenuTab.currentIndex === index + property bool isPushed: dapMenuTab.currentIndex === index width: widthItemMenu height: heightItemMenu @@ -36,7 +42,8 @@ DapMenuTabWidgetForm source: normalIcon } - Text { + Text + { id: textItem anchors.verticalCenter: parent.verticalCenter anchors.left: iconItem.right @@ -49,7 +56,7 @@ DapMenuTabWidgetForm MouseArea { - id: dapHandler + id: handler anchors.fill: parent hoverEnabled: true @@ -73,7 +80,7 @@ DapMenuTabWidgetForm onClicked: { - viewMenuTab.currentIndex = index; + dapMenuTab.currentIndex = index; puthScreen = page; } } diff --git a/DapMenuTabWidgetForm.ui.qml b/DapMenuTabWidgetForm.ui.qml index d29273f..3645224 100644 --- a/DapMenuTabWidgetForm.ui.qml +++ b/DapMenuTabWidgetForm.ui.qml @@ -1,23 +1,30 @@ +//**************************************************************************** +// Implements the widget of the main menu panel. +//**************************************************************************** + import QtQuick 2.4 import QtQuick.Controls 2.0 -Rectangle { - property alias frameMenuTab: dapFrameMenuTab - property alias viewMenuTab: dapListViewMenuTab - property string puthScreen: "" +Rectangle +{ + id: frameMenuTab + ///@detalis Main menu panel widget frame. + property alias dapFrameMenuTab: frameMenuTab + ///@detalis Main menu bar widget. + property alias dapMenuTab: menuTab - id: dapFrameMenuTab color: "#070023" + focus: true + // Install the widget of the main menu panel ListView { - id: dapListViewMenuTab + id: menuTab anchors.fill: parent delegate: itemMenuTabDelegate spacing: 3 * pt clip: true interactive: false } - focus: true } diff --git a/DapRightPanel.qml b/DapRightPanel.qml index d636b5b..07ac704 100644 --- a/DapRightPanel.qml +++ b/DapRightPanel.qml @@ -1,4 +1,6 @@ import QtQuick 2.4 -DapRightPanelForm { +DapRightPanelForm +{ + } diff --git a/DapRightPanelForm.ui.qml b/DapRightPanelForm.ui.qml index 7de8857..38aca46 100644 --- a/DapRightPanelForm.ui.qml +++ b/DapRightPanelForm.ui.qml @@ -9,21 +9,22 @@ Rectangle { id: rightPanel - // Right panel widget + ///@detalis Right panel widget. property alias dapRightPanel: rightPanel - // Right pane title widget + ///@detalis Right pane title widget. property alias dapHeader: header - // Right pane header data + ///@detalis Right pane header data. property Item dapHeaderData: Item { } - // + ///@detalis Stack of right panels owned by current. property alias dapChildRightPanels: childRightPanels - // + ///@detalis Content of the current right panel. property Item dapContentItemPanel: Item { } dapRightPanel.anchors.top: parent.top dapRightPanel.anchors.bottom: parent.bottom dapRightPanel.anchors.right: parent.right + // Install right panel title Item { id: header @@ -32,7 +33,7 @@ Rectangle anchors.left: parent.left anchors.right: parent.right } - + // Install right panel content StackView { id: childRightPanels diff --git a/DapScreenForm.ui.qml b/DapScreenForm.ui.qml index a2385ca..9083647 100644 --- a/DapScreenForm.ui.qml +++ b/DapScreenForm.ui.qml @@ -9,9 +9,9 @@ Rectangle { id: frame - // Frame widget + ///@detalis Frame widget. property alias dapFrame: frame - // Screen components + ///@detalis Screen components. property Item dapContenetItemScreen anchors.fill: parent diff --git a/DapTabForm.ui.qml b/DapTabForm.ui.qml index 4ed75ab..6f48578 100644 --- a/DapTabForm.ui.qml +++ b/DapTabForm.ui.qml @@ -7,18 +7,18 @@ import QtQuick.Controls 2.0 Page { - // Top panel widget - property DapTopPanelForm dapTopPanelForm - // Screen widget - property DapScreenForm dapScreenForm - // Separator widget + ///@detalis Top panel widget. + property DapTopPanel dapTopPanel + ///@detalis Screen widget. + property DapScreen dapScreen + ///@detalis Separator widget. property alias dapSeparator: separator - // Right pane widget - property DapRightPanelForm dapRightPanelForm + ///@detalis Right pane widget. + property DapRightPanel dapRightPanel anchors.fill: parent // Install the top panel widget - header: dapTopPanelForm + header: dapTopPanel // Install the screen widget and the right panel contentItem: Rectangle @@ -26,8 +26,8 @@ Page // Screen widget Item { - id: screenForm - data: dapScreenForm + id: screen + data: dapScreen height: parent.height anchors.left: parent.left anchors.right: separator.left @@ -39,13 +39,13 @@ Page height: parent.height width: 3 * pt color: "green" - anchors.right: rightPanelForm.left + anchors.right: rightPanel.left } // Right pane widget Item { - id: rightPanelForm - data: dapRightPanelForm + id: rightPanel + data: dapRightPanel height: parent.height anchors.right: parent.right } diff --git a/DapTopPanelForm.ui.qml b/DapTopPanelForm.ui.qml index 7492a7c..4621384 100644 --- a/DapTopPanelForm.ui.qml +++ b/DapTopPanelForm.ui.qml @@ -9,5 +9,6 @@ Rectangle { id: frame + ///@detalis Top panel frame. property alias dapFrame: frame } -- GitLab