mirror of https://github.com/layters/testshop
parent
da179ea3aa
commit
5d40c23cc2
@ -0,0 +1,6 @@
|
||||
There are many ways that you can contribute.
|
||||
|
||||
- Creating pull requests that solve issues found on the (Issues page)[https://github.com/larteyoh/testshop/issues]
|
||||
- Making a (donation)[#donations] to fund the development of the project
|
||||
- Reporting any bugs or vulnerabilities found in the code as a GitHub (issue)[https://github.com/larteyoh/testshop/issues]
|
||||
|
@ -0,0 +1,109 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
|
||||
//import FontAwesome 1.0
|
||||
import "." as NeroshopComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 2
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 2
|
||||
property real titleBoxRadius: 3
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumHeight: 25
|
||||
color: "#6c6c6f"
|
||||
radius: parent.titleBoxRadius
|
||||
|
||||
Label {
|
||||
text: qsTr("Node")
|
||||
color: "white"
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter//left: parent.left;leftMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: heightTitle
|
||||
Layout.minimumWidth: 100//50
|
||||
Layout.minimumHeight: 25
|
||||
color: "#6c6c6f"
|
||||
radius: parent.titleBoxRadius
|
||||
|
||||
Label {
|
||||
text: qsTr("Height")
|
||||
color: "white"
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter//left: parent.left; leftMargin: 4
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
clip: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
ScrollBar.vertical: ScrollBar { }
|
||||
model: 50
|
||||
delegate: Item {
|
||||
width: listView.width
|
||||
height: 25
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: parent.ListView.isCurrentItem ? NeroshopComponents.Style.moneroOrangeColor : "transparent"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
listView.currentIndex = index
|
||||
listView.positionViewAtIndex(index, ListView.Contain)
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: delegateRow
|
||||
anchors.fill: parent
|
||||
|
||||
Label {
|
||||
id: nodeStatusLabel
|
||||
text: index % 3 === 0 ? "✅" : "❌" // TODO create normal model
|
||||
Layout.maximumWidth: 25
|
||||
property bool status: index % 3 === 0//false // todo: use data from model to determine the status
|
||||
}
|
||||
|
||||
Label {
|
||||
id: nodeAddressLabel
|
||||
Layout.fillWidth: true
|
||||
text: "node.neroshop.org:38081"//:18081" // TODO create normal model
|
||||
color: (NeroshopComponents.Style.darkTheme) ? "#ffffff" : "#000000"
|
||||
elide: Label.ElideRight
|
||||
}
|
||||
|
||||
Label {
|
||||
id: nodeHeightLabel
|
||||
Layout.minimumWidth: heightTitle.width//50
|
||||
Layout.maximumWidth: heightTitle.width//50
|
||||
text: "100500" // TODO create normal model
|
||||
color: nodeAddressLabel.color
|
||||
elide: Label.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
|
||||
RadioButton {
|
||||
id: control
|
||||
text: qsTr("RadioButton")
|
||||
checked: true
|
||||
property string color: control.down ? "#39304f" : "#6b5b95"
|
||||
property string innerColor: borderColor//"white"
|
||||
property string borderColor: control.down ? "#39304f" : "#6b5b95"
|
||||
property string textColor: control.down ? "#39304f" : "#6b5b95"
|
||||
property alias textObject: radioButtonText
|
||||
|
||||
indicator: Rectangle {
|
||||
implicitWidth: 16//26
|
||||
implicitHeight: 16//26
|
||||
x: control.leftPadding
|
||||
y: parent.height / 2 - height / 2
|
||||
radius: 13
|
||||
color: innerColor
|
||||
border.color: control.borderColor
|
||||
|
||||
Rectangle {
|
||||
width: 10//14
|
||||
height: 10//14
|
||||
anchors.horizontalCenter: parent.horizontalCenter////x: 5//6
|
||||
anchors.verticalCenter: parent.verticalCenter////y: 5//6
|
||||
radius: 7
|
||||
color: control.color
|
||||
visible: control.checked
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: Text {
|
||||
id: radioButtonText
|
||||
text: control.text
|
||||
font: control.font
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
color: control.textColor
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: control.indicator.width + control.spacing
|
||||
}
|
||||
}
|
Loading…
Reference in new issue