diff --git a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml index b94101f05e94b7cd6238032dd65608a2e6d25e39..d96e2f9501e62f67d08ee0ce2475306dfcc5aeae 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml @@ -67,6 +67,11 @@ Page { page: "DapUiQmlScreenConsoleForm.ui.qml" source: "qrc:/Resources/Icons/defaul_icon.png" } + ListElement{ + name: qsTr("VPN") + page: "DapUiQmlScreenVpn.qml" + source: "qrc:/Resources/Icons/defaul_icon.png" + } ListElement { name: qsTr("About") page: "DapQmlScreenAbout.qml" diff --git a/CellFrameDashboardGUI/DapUiQmlScreenSettings.qml b/CellFrameDashboardGUI/DapUiQmlScreenSettings.qml index f7897fe4e805a44e761276f288f82fb2f4cf7e2e..5fb8481403408cb8c49a3e94c3f879483848d2eb 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenSettings.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenSettings.qml @@ -10,6 +10,11 @@ DapUiQmlScreenSettingsForm { name: qsTr("Network") element: "DapUiQmlWidgetSettingsNetwork.qml" } + + ListElement { + name: qsTr("VPN") + element: "DapUiQmlWidgetSettingsVpn.qml" + } } ListView { diff --git a/CellFrameDashboardGUI/DapUiQmlScreenVpn.qml b/CellFrameDashboardGUI/DapUiQmlScreenVpn.qml new file mode 100644 index 0000000000000000000000000000000000000000..d764fba09aba7faae098b42a8719adfb46219bd0 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlScreenVpn.qml @@ -0,0 +1,4 @@ +import QtQuick 2.4 + +DapUiQmlScreenVpnForm { +} diff --git a/CellFrameDashboardGUI/DapUiQmlScreenVpnForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenVpnForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..0d46084bd97551357824b53f563d75dfa59f2ebe --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlScreenVpnForm.ui.qml @@ -0,0 +1,149 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.5 +import QtQuick.Controls.Styles 1.4 +import QtGraphicalEffects 1.0 +import QtQuick.Layouts 1.13 + +Item { + width: 400 + height: 600 + + Text { + anchors.left: parent.left + anchors.top: parent.top + anchors.leftMargin: 30 * pt + anchors.topMargin: 18 * pt + color: "#d61f5d" + font.family: "Roboto Regular" + font.pixelSize: 14 * pt + text: "283 days left" + } + + Row { + width: childrenRect.width + anchors.top: parent.top + anchors.topMargin: 40 * pt + anchors.horizontalCenter: parent.horizontalCenter + spacing: 10 * pt + + Image { + id: imageVpn + Layout.alignment: Qt.AlignVCenter + width: 48 * pt + height: 48 * pt + source: "qrc:/Resources/Icons/defaul_icon.png" + } + + Text { + id: titleVpn + Layout.alignment: Qt.AlignVCenter + verticalAlignment: Text.AlignVCenter + text: "KELVPN" + font.family: "Roboto Regular" + font.pixelSize: 42 * pt + } + } + + + Switch { + id: control + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: 150 * pt + height: 70 * pt + text: checked ? "Connected" : "Disconnected" + + indicator: Rectangle { + implicitWidth: control.width + implicitHeight: control.height + x: control.leftPadding + y: parent.height / 2 - height / 2 + radius: control.height / 2 + color: control.checked ? "#d61f5d" : "#ffffff" + border.color: control.checked ? "#d61f5d" : "#cccccc" + + Rectangle { + x: control.checked ? parent.width - width - 10 * pt : 10 * pt + anchors.verticalCenter: parent.verticalCenter + width: control.height - 15 * pt + height: width + radius: height / 2 + color: control.down ? "#cccccc" : "#ffffff" + border.color: control.checked ? (control.down ? "#17a81a" : "#d61f5d") : "#999999" + } + } + + contentItem: Text { + text: control.text + anchors.left: control.left + anchors.right: control.right + anchors.bottom: control.top + anchors.bottomMargin: 10 * pt + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignBottom + font.family: "Roboto" + font.pixelSize: 16 * pt + color: "#707070" + } + } + + ComboBox { + id: comboboxServer + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 40 * pt + width: 150 * pt + height: 48 * pt + textRole: "name" + + model: ListModel { + id: modelTest + ListElement {name: "first"; icon: "qrc:/Resources/Icons/defaul_icon.png" } + ListElement {name: "second"; icon: "qrc:/Resources/Icons/defaul_icon.png" } + } + + background: Rectangle { + anchors.fill: parent + + Rectangle { + id: contentCorner + anchors.fill: parent + color: "#FFFFFF" + radius: width / 2 + } + + DropShadow { + anchors.fill: parent + source: contentCorner + verticalOffset: 4 * pt + samples: 13 * pt + color: "#40000000" + } + } + + contentItem: Rectangle { + anchors.fill: parent + color: "transparent" + + Image { + id: imageServer + anchors.left: parent.left + anchors.leftMargin: 22 * pt + anchors.verticalCenter: parent.verticalCenter + source: modelTest.get(modelTest.index(comboboxServer.currentIndex, 0)).icon + width: 24 * pt + height: 24 * pt + } + + Text { + anchors.left: imageServer.right + anchors.leftMargin: 10 * pt + anchors.verticalCenter: parent.verticalCenter + text: comboboxServer.currentText + font.family: "Roboto Light" + font.pixelSize: 16 * pt + } + } + + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsNetwork.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsNetwork.qml index 30286e2c369761260bcb845cba90c05cf553666f..b73c03d6c3d61fa71dd5b3dd9e75e6854ad7559c 100644 --- a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsNetwork.qml +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsNetwork.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.12 DapUiQmlWidgetSettingsNetworkForm { width: parent.width - height: childrenRect.height + height: childrenRect.height + 40 * pt ComboBox { width: 150 diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpn.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpn.qml new file mode 100644 index 0000000000000000000000000000000000000000..d8d1cccb01d64291326ade967d539ca959d259c9 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpn.qml @@ -0,0 +1,67 @@ +import QtQuick 2.4 + +DapUiQmlWidgetSettingsVpnForm { + Column { + anchors.left: parent.left + anchors.top: parent.top + anchors.leftMargin: 15 * pt + anchors.topMargin: 13 * pt + spacing: 15 * pt + + DapUiQmlWidgetSettingsVpnComboBox { + id: comboBoxBand + width: 150 * pt + height: 32 * pt + textRole: "band" + model: ListModel { + ListElement {band: "100 Mbit" } + ListElement {band: "200 Mbit" } + } + } + + DapUiQmlWidgetSettingsVpnComboBox { + id: comboBoxUptime + width: 150 * pt + height: 32 * pt + textRole: "uptime" + model: ListModel { + ListElement {uptime: "30 minutes" } + ListElement {uptime: "3 hours" } + } + } + + DapUiQmlWidgetSettingsVpnComboBox { + id: comboBoxEncription + width: 150 * pt + height: 32 * pt + textRole: "encription" + model: ListModel { + ListElement {encription: "RSA-2048" } + ListElement {encription: "AES-256" } + } + } + + DapUiQmlWidgetSettingsVpnComboBox { + id: comboBoxBalance + width: 150 * pt + height: 32 * pt + textRole: "balance" + model: ListModel { + ListElement {balance: "320 RUB" } + ListElement {balance: "500 RUB" } + } + } + + DapUiQmlWidgetSettingsVpnComboBox { + id: comboBoxLanguage + width: 150 * pt + height: 32 * pt + textRole: "language" + model: ListModel { + ListElement {language: "RUS" } + ListElement {language: "ENG" } + } + } + } + +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBox.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBox.qml new file mode 100644 index 0000000000000000000000000000000000000000..3651997ceb88c62df61fcd9a4866c1fc82c9abef --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBox.qml @@ -0,0 +1,5 @@ +import QtQuick 2.4 + +DapUiQmlWidgetSettingsVpnComboBoxForm { + +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..fa2b6d69636b2c54f4930b1e6334491d8c6836ce --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml @@ -0,0 +1,32 @@ +import QtQuick 2.4 +import QtQuick.Controls 2.5 +import QtGraphicalEffects 1.0 + +ComboBox { + background: Rectangle { + anchors.fill: parent + border.color: "#707070" + border.width: 1 + radius: parent.width / 2 + } + + contentItem: Text { + anchors.fill: parent + anchors.leftMargin: 12 * pt + anchors.rightMargin: 52 * pt + text: parent.displayText + font.family: "Regular" + font.pixelSize: 14 * pt + color: "#A7A7A7" + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + + DropShadow { + anchors.fill: parent + source: parent.background + verticalOffset: 4 * pt + samples: 13 * pt + color: "#40000000" + } +} diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnForm.ui.qml new file mode 100644 index 0000000000000000000000000000000000000000..86a170a0ae976cc400dcf7bfed4ef6fb825ea7f8 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetSettingsVpnForm.ui.qml @@ -0,0 +1,7 @@ +import QtQuick 2.4 + +Item { + width: 400 + height: 400 + +} diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index eb7e5db8577d7b8077b4b13ef8891f48d3e94b9e..086fd64f9c71350494ce4f508deeafed4bf97e15 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -75,5 +75,11 @@ <file>DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml</file> <file>DapUiQmlWidgetStatusBarComboBoxToken.qml</file> <file>DapUiQmlWidgetStatusBarComboBoxTokenForm.ui.qml</file> + <file>DapUiQmlScreenVpn.qml</file> + <file>DapUiQmlScreenVpnForm.ui.qml</file> + <file>DapUiQmlWidgetSettingsVpn.qml</file> + <file>DapUiQmlWidgetSettingsVpnForm.ui.qml</file> + <file>DapUiQmlWidgetSettingsVpnComboBox.qml</file> + <file>DapUiQmlWidgetSettingsVpnComboBoxForm.ui.qml</file> </qresource> </RCC>