2018-01-07 05:20:45 +00:00
|
|
|
// Copyright (c) 2014-2018, The Monero Project
|
2017-08-07 10:32:51 +00:00
|
|
|
//
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without modification, are
|
|
|
|
// permitted provided that the following conditions are met:
|
|
|
|
//
|
|
|
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
|
|
// conditions and the following disclaimer.
|
|
|
|
//
|
|
|
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
|
|
// of conditions and the following disclaimer in the documentation and/or other
|
|
|
|
// materials provided with the distribution.
|
|
|
|
//
|
|
|
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
|
|
// used to endorse or promote products derived from this software without specific
|
|
|
|
// prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
|
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
|
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
import QtQuick.Controls 1.2
|
|
|
|
import QtQuick.Controls.Styles 1.2
|
|
|
|
import QtQuick 2.2
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: (isMobile) ? 1 : 2
|
2017-12-09 16:46:03 +00:00
|
|
|
columnSpacing: 32
|
2017-08-07 10:32:51 +00:00
|
|
|
id: root
|
|
|
|
property alias daemonAddrText: daemonAddr.text
|
|
|
|
property alias daemonPortText: daemonPort.text
|
2017-12-09 16:46:03 +00:00
|
|
|
property alias daemonAddrLabelText: daemonAddr.labelText
|
|
|
|
property alias daemonPortLabelText: daemonPort.labelText
|
2017-08-07 10:32:51 +00:00
|
|
|
|
2018-03-27 20:04:18 +00:00
|
|
|
// TODO: LEGACY; remove these placeHolder variables when
|
|
|
|
// the wizards get redesigned to the black-theme
|
|
|
|
property string placeholderFontFamily: Style.fontRegular.name
|
|
|
|
property bool placeholderFontBold: false
|
|
|
|
property int placeholderFontSize: 18 * scaleRatio
|
|
|
|
property string placeholderColor: Style.defaultFontColor
|
|
|
|
property real placeholderOpacity: 0.25
|
|
|
|
|
2018-01-21 18:14:34 +00:00
|
|
|
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
|
|
|
|
property string lineEditBackgroundColor: "white"
|
|
|
|
property string lineEditFontColor: "black"
|
|
|
|
property bool lineEditFontBold: true
|
|
|
|
|
2017-08-07 10:32:51 +00:00
|
|
|
signal editingFinished()
|
|
|
|
|
|
|
|
function getAddress() {
|
|
|
|
return daemonAddr.text.trim() + ":" + daemonPort.text.trim()
|
|
|
|
}
|
|
|
|
|
|
|
|
LineEdit {
|
|
|
|
id: daemonAddr
|
|
|
|
Layout.fillWidth: true
|
|
|
|
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
|
2018-03-27 20:04:18 +00:00
|
|
|
placeholderFontFamily: root.placeholderFontFamily
|
|
|
|
placeholderFontBold: root.placeholderFontBold
|
|
|
|
placeholderFontSize: root.placeholderFontSize
|
|
|
|
placeholderColor: root.placeholderColor
|
|
|
|
placeholderOpacity: root.placeholderOpacity
|
2017-08-07 10:32:51 +00:00
|
|
|
onEditingFinished: root.editingFinished()
|
2018-01-21 18:14:34 +00:00
|
|
|
borderColor: lineEditBorderColor
|
|
|
|
backgroundColor: lineEditBackgroundColor
|
|
|
|
fontColor: lineEditFontColor
|
|
|
|
fontBold: lineEditFontBold
|
2017-08-07 10:32:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LineEdit {
|
|
|
|
id: daemonPort
|
|
|
|
Layout.fillWidth: true
|
|
|
|
placeholderText: qsTr("Port") + translationManager.emptyString
|
2018-03-27 20:04:18 +00:00
|
|
|
placeholderFontFamily: root.placeholderFontFamily
|
|
|
|
placeholderFontBold: root.placeholderFontBold
|
|
|
|
placeholderFontSize: root.placeholderFontSize
|
|
|
|
placeholderColor: root.placeholderColor
|
|
|
|
placeholderOpacity: root.placeholderOpacity
|
2017-08-07 10:32:51 +00:00
|
|
|
onEditingFinished: root.editingFinished()
|
2018-01-21 18:14:34 +00:00
|
|
|
borderColor: lineEditBorderColor
|
|
|
|
backgroundColor: lineEditBackgroundColor
|
|
|
|
fontColor: lineEditFontColor
|
|
|
|
fontBold: lineEditFontBold
|
2017-08-07 10:32:51 +00:00
|
|
|
}
|
|
|
|
}
|