Skip to content
Snippets Groups Projects
Commit 52b791dd authored by Alexandr Mruchok's avatar Alexandr Mruchok
Browse files

Merge branch 'feature-4584'

parents ab9d1c16 b522735c
No related branches found
No related tags found
No related merge requests found
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>widgets/DapButton.qml</file> <file>widgets/DapButton.qml</file>
<file>widgets/DapButtonForm.ui.qml</file>
<file>widgets/DapComboBox.qml</file> <file>widgets/DapComboBox.qml</file>
<file>widgets/DapComboBoxForm.ui.qml</file> <file>widgets/DapComboBoxForm.ui.qml</file>
<file>widgets/DapMenuTabWidget.qml</file> <file>widgets/DapMenuTabWidget.qml</file>
...@@ -12,7 +11,6 @@ ...@@ -12,7 +11,6 @@
<file>widgets/DapScreen.qml</file> <file>widgets/DapScreen.qml</file>
<file>widgets/DapScreenForm.ui.qml</file> <file>widgets/DapScreenForm.ui.qml</file>
<file>widgets/DapTab.qml</file> <file>widgets/DapTab.qml</file>
<file>widgets/DapTabForm.ui.qml</file>
<file>widgets/DapTopPanel.qml</file> <file>widgets/DapTopPanel.qml</file>
<file>Device.qml</file> <file>Device.qml</file>
<file>widgets/DapRadioButton.qml</file> <file>widgets/DapRadioButton.qml</file>
...@@ -31,5 +29,6 @@ ...@@ -31,5 +29,6 @@
<file>widgets/DapCalendarForm.ui.qml</file> <file>widgets/DapCalendarForm.ui.qml</file>
<file>widgets/DapComboBoxCustomRange.qml</file> <file>widgets/DapComboBoxCustomRange.qml</file>
<file>widgets/DapComboBoxCustomRangeForm.ui.qml</file> <file>widgets/DapComboBoxCustomRangeForm.ui.qml</file>
<file>widgets/DapButton_New.qml</file>
</qresource> </qresource>
</RCC> </RCC>
import QtQuick 2.4 import QtQuick 2.0
import QtQuick.Controls 2.0
DapButtonForm Button
{ {
///@detalis heightButton Button height.
property int heightButton
///@detalis widthButton Button width.
property int widthButton
///@detalis normalImageButton The picture on the Button is in normal state.
property string normalImageButton
///@detalis hoverImageButton The image on the Button is in the mouseover state.
property string hoverImageButton
///@detalis widthImageButton Image width.
property int widthImageButton: 0 * pt
///@detalis heightImageButton Image height.
property int heightImageButton: 0 * pt
///@detalis indentImageLeftButton: Indentation of the image from the left edge.
property int indentImageLeftButton
///@detalis colorBackgroundNormal Button background color in normal state.
property string colorBackgroundNormal
///@detalis colorBackgroundHover Button background color in hover state.
property string colorBackgroundHover
///@detalis textButton Text button.
property string textButton
///@detalis colorButtonTextNormal Button text color in normal state.
property string colorButtonTextNormal
///@detalis colorButtonTextHover Button text color in hover state.
property string colorButtonTextHover
///@detalis indentTextRight: Indentation of the text from the right edge.
property int indentTextRight
///@detalis fontButton Font setting.
property alias fontButton: buttonText.font
///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:buttonText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color.
property alias colorBackgroundButton: dapBackgroundButton.color
///@detalis colorTextButton This property overrides the color of the text.
property alias colorTextButton: buttonText.color
///@detalis borderColorButton Sets the color of the border.
property string borderColorButton
///@detalis borderWidthButton Sets the width of the border.
property int borderWidthButton
///@detalis dapHorizontalAlignment Horizontal text alignment.
property alias dapHorizontalAlignment: buttonText.horizontalAlignment
///@details button background radius
property alias radius: dapBackgroundButton.radius
id: dapButton
///@details empty default background
background: Item { }
contentItem:
Rectangle
{
id: dapBackgroundButton
anchors.fill: parent
color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal
implicitWidth: widthButton
implicitHeight: heightButton
border.color: borderColorButton
border.width: borderWidthButton
radius: 0
///button text
Text
{
id: buttonText
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
anchors.rightMargin: indentTextRight
color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal
text: qsTr(textButton)
}
///button picture
Image
{
id: iconNewWallet
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: indentImageLeftButton
source: dapButton.hovered ? hoverImageButton : normalImageButton
width: widthImageButton
height: heightImageButton
}
}
} }
import QtQuick 2.0
import QtQuick.Controls 2.0
Button
{
///@detalis heightButton Button height.
property int heightButton
///@detalis widthButton Button width.
property int widthButton
///@detalis normalImageButton The picture on the Button is in normal state.
property string normalImageButton
///@detalis hoverImageButton The image on the Button is in the mouseover state.
property string hoverImageButton
///@detalis widthImageButton Image width.
property int widthImageButton: 0 * pt
///@detalis heightImageButton Image height.
property int heightImageButton: 0 * pt
///@detalis indentImageLeftButton: Indentation of the image from the left edge.
property int indentImageLeftButton
///@detalis colorBackgroundNormal Button background color in normal state.
property string colorBackgroundNormal
///@detalis colorBackgroundHover Button background color in hover state.
property string colorBackgroundHover
///@detalis textButton Text button.
property string textButton
///@detalis colorButtonTextNormal Button text color in normal state.
property string colorButtonTextNormal
///@detalis colorButtonTextHover Button text color in hover state.
property string colorButtonTextHover
///@detalis indentTextRight: Indentation of the text from the right edge.
property int indentTextRight
///@detalis fontButton Font setting.
property alias fontButton: buttonText.font
///@detalis horizontalAligmentText Horizontal alignment.
property alias horizontalAligmentText:buttonText.horizontalAlignment
///@detalis colorBackgroundButton This property overrides the background color.
property alias colorBackgroundButton: dapBackgroundButton.color
///@detalis colorTextButton This property overrides the color of the text.
property alias colorTextButton: buttonText.color
///@detalis borderColorButton Sets the color of the border.
property string borderColorButton
///@detalis borderWidthButton Sets the width of the border.
property int borderWidthButton
///@detalis dapHorizontalAlignment Horizontal text alignment.
property alias dapHorizontalAlignment: buttonText.horizontalAlignment
///@details button background radius
property alias radius: dapBackgroundButton.radius
id: dapButton
///@details empty default background
background: Item { }
contentItem:
Rectangle
{
id: dapBackgroundButton
anchors.fill: parent
color: dapButton.hovered ? colorBackgroundHover : colorBackgroundNormal
implicitWidth: widthButton
implicitHeight: heightButton
border.color: borderColorButton
border.width: borderWidthButton
radius: 0
///button text
Text
{
id: buttonText
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
anchors.rightMargin: indentTextRight
color: dapButton.hovered ? colorButtonTextHover : colorButtonTextNormal
text: qsTr(textButton)
}
///button picture
Image
{
id: iconNewWallet
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: indentImageLeftButton
source: dapButton.hovered ? hoverImageButton : normalImageButton
width: widthImageButton
height: heightImageButton
}
}
}
import QtQuick 2.0
import QtQuick.Controls 2.0
Button
{
id: root
property alias backgroundSubcontroll: background
property alias iconSubcontroll: iconSubcontroll
property alias textSubcontroll: textSubcontroll
property string iconSource
property string hoverIconSource
property bool isHovered: false
background: Item {
}
contentItem:
Rectangle
{
id: background
anchors.fill: parent
Text
{
id: textSubcontroll
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
text: qsTr(root.text)
}
Image
{
id: iconSubcontroll
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
source: root.hovered ? hoverIconSource : iconSource
}
}
}
//****************************************************************************
// Implements a general view of the tab.
//****************************************************************************
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Controls 2.0
DapTabForm Rectangle
{ {
id: frameTab
///@detalis Top panel widget.
property Item dapTopPanel
///@detalis Screen widget.
property Item dapScreen
///@detalis Separator widget.
property alias dapSeparator: separator
///@detalis Right pane widget.
property Item dapRightPanel
///@detalis Tab frame.
property alias dapFrame: frameTab
property alias rightPanel: rightPanel
anchors.fill: parent
// Install the top panel widget
Item
{
id: topPanel
data: dapTopPanel
height: dapTopPanel.height
width: parent.width
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
}
// Install the screen widget and the right panel
Row
{
anchors.top: topPanel.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
// Screen widget
Item
{
id: screen
data: dapScreen
height: parent.height
width: parent.width - separator.width - rightPanel.width
}
// Separator widget
Rectangle
{
id: separator
height: parent.height
}
// Right pane widget
Item
{
id: rightPanel
data: dapRightPanel
height: parent.height
width: dapRightPanel.width
}
}
} }
//****************************************************************************
// Implements a general view of the tab.
//****************************************************************************
import QtQuick 2.4
import QtQuick.Controls 2.0
Rectangle
{
id: frameTab
///@detalis Top panel widget.
property Item dapTopPanel
///@detalis Screen widget.
property Item dapScreen
///@detalis Separator widget.
property alias dapSeparator: separator
///@detalis Right pane widget.
property Item dapRightPanel
///@detalis Tab frame.
property alias dapFrame: frameTab
property alias rightPanel: rightPanel
anchors.fill: parent
// Install the top panel widget
Item
{
id: topPanel
data: dapTopPanel
height: dapTopPanel.height
width: parent.width
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
}
// Install the screen widget and the right panel
Row
{
anchors.top: topPanel.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
// Screen widget
Item
{
id: screen
data: dapScreen
height: parent.height
width: parent.width - separator.width - rightPanel.width
}
// Separator widget
Rectangle
{
id: separator
height: parent.height
}
// Right pane widget
Item
{
id: rightPanel
data: dapRightPanel
height: parent.height
width: dapRightPanel.width
}
}
}
...@@ -2,11 +2,17 @@ import QtQuick 2.4 ...@@ -2,11 +2,17 @@ import QtQuick 2.4
Rectangle Rectangle
{ {
id: frameTopPanel radius: 8 * pt
height: 60 * pt height: 60 * pt
width: parent.width
color: "#070023" color: "#070023"
anchors.fill: parent
///@detalis Top panel frame. Rectangle {
property alias dapFrame: frameTopPanel color: parent.color
height: parent.height
width: parent.radius
x: parent.width - width
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment