Skip to content
Snippets Groups Projects
DapNewPaymentMainRightPanelForm.ui.qml 17 KiB
Newer Older
andrey.daragan's avatar
andrey.daragan committed
import QtQuick 2.4
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import "qrc:/widgets"
import "../../../"

DapAbstractRightPanel
{
andrey.daragan's avatar
andrey.daragan committed
    /// @param dapButtonSend Send funds button.
    property alias dapButtonSend: buttonSend
    /// @param dapTextInputAmountPayment Input field for transfer amount.
    property alias dapTextInputAmountPayment: textInputAmountPayment
    /// @param dapCmboBoxToken Token combobox.
    property alias dapCmboBoxToken: comboBoxToken
    /// @param dapTextInputRecipientWalletAddress Recipient wallet address input field.
    property alias dapTextInputRecipientWalletAddress: textInputRecipientWalletAddress

andrey.daragan's avatar
andrey.daragan committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
    dapHeaderData:
        Row
        {
            anchors.fill: parent
            anchors.leftMargin: 16 * pt
            anchors.rightMargin: 16 * pt
            anchors.topMargin: 12 * pt
            anchors.bottomMargin: 12 * pt
            spacing: 12 * pt

            Item
            {
                id: itemButtonClose
                data: dapButtonClose
                height: dapButtonClose.height
                width: dapButtonClose.width
            }

            Text
            {
                id: textHeader
                text: qsTr("New payment")
                font.pixelSize: 14 * pt
                color: "#3E3853"
            }
        }

    dapContentItemData:
        Rectangle
        {
            anchors.fill: parent
            color: "transparent"

            // Sender wallet
            Rectangle
            {
                id: frameSenderWallet
                anchors.top: parent.top
                anchors.left: parent.left
                anchors.right: parent.right
                anchors.topMargin: 8 * pt
                anchors.bottomMargin: 8 * pt
                color: "#757184"
                height: 30 * pt
                Text
                {
                    id: textFrameSenderWallet
                    color: "#ffffff"
                    text: qsTr("From")
                    font.pixelSize: 12 * pt
                    horizontalAlignment: Text.AlignLeft
                    font.family: "Roboto"
                    font.styleName: "Normal"
                    font.weight: Font.Normal
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.left: parent.left
                    anchors.leftMargin: 16 * pt
                }
            }



                ListModel
                {
                    id: tokenModel
                    ListElement
                    {
                        signatureName: "Kelvin"
                    }
                    ListElement
                    {
                        signatureName: "Token 1"
                    }
                    ListElement
                    {
                        signatureName: "Token 2"
                    }
                    ListElement
                    {
                        signatureName: "NewGold"
                    }
                }

                Rectangle
                {
                    id: frameSenderWalletAddress
                    color: "#F8F7FA"
                    anchors.top: frameSenderWallet.bottom
                    anchors.left: parent.left
                    anchors.right: parent.right
                    anchors.leftMargin: 16 * pt
                    anchors.rightMargin: 16 * pt
                    height: 120 * pt

                    Rectangle
                    {
                        id: frameSenderWalletToken
                        color: "#F8F7FA"
                        anchors.top: frameSenderWalletAddress.top
                        anchors.left: parent.left
                        anchors.right: parent.right
                        anchors.topMargin: 20 * pt
                        anchors.leftMargin: 16 * pt
                        anchors.rightMargin: 16 * pt
                        height: comboBoxToken.height
                        DapComboBox
                        {
                            id: comboBoxToken
                            model: tokenModel
                            anchors.top: parent.top
                            anchors.left: parent.left
                            anchors.right: parent.right
                            indicatorImageNormal: "qrc:/res/icons/ic_arrow_drop_down_dark.png"
                            indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up.png"
                            sidePaddingNormal: 0 * pt
                            sidePaddingActive: 0 * pt
                            normalColorText: "#070023"
                            hilightColorText: "#transparent"
                            normalColorTopText: "#070023"
                            hilightColorTopText: "#070023"
                            hilightColor: "#330F54"
                            normalTopColor: "transparent"
                            widthPopupComboBoxNormal: 148 * pt
                            widthPopupComboBoxActive: 180 * pt
                            heightComboBoxNormal: 24 * pt
                            heightComboBoxActive: 44 * pt
                            bottomIntervalListElement: 8 * pt
                            topEffect: false
                            x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal
                            normalColor: "#FFFFFF"
                            hilightTopColor: normalColor
                            paddingTopItemDelegate: 8 * pt
                            heightListElement: 32 * pt
                            intervalListElement: 10 * pt
                            indicatorWidth: 20 * pt
                            indicatorHeight: indicatorWidth
                            indicatorLeftInterval: 8 * pt
                            colorTopNormalDropShadow: "#00000000"
                            colorDropShadow: "#40ABABAB"
                            fontComboBox.pixelSize: 16 * pt
                            fontComboBox.family: "Roboto"
                        }
                    }
                    Rectangle
                    {
                        id: splitLineSenderWalletToken
                        height: 1 * pt
                        width: parent.width
                        color: "#E3E2E6"
                        anchors.top: frameSenderWalletToken.bottom
                        anchors.left: parent.left
                        anchors.right: parent.right
                        anchors.topMargin: 14 * pt
                        anchors.leftMargin: 20 * pt
                        anchors.rightMargin: 20 * pt
                    }
                    Text
                    {
                        id: textSenderWalletAddress
                        width: 328 * pt
                        anchors.top: splitLineSenderWalletToken.top
                        anchors.topMargin: 20 * pt
                        anchors.left: parent.left
                        anchors.leftMargin: 20 * pt
                        anchors.right: parent.right
                        anchors.rightMargin: 20 * pt
                        font.pixelSize: 14 * pt
                        font.family: "Roboto"
                        font.styleName: "Normal"
                        font.weight: Font.Normal
                        color: "#757184"
                        text: "dsgfsghdfsht5y5wv546v76b67v66354c6565v576764657676767f5f46"
                        elide: Text.ElideRight
                    }
            }

            // Amount payment
            Rectangle
            {
                id: frameAmountPayment
                anchors.top: frameSenderWalletAddress.bottom
                anchors.right: parent.right
                anchors.left: parent.left
                color: "#757184"
                height: 30 * pt
                Text
                {
                    id: textFrameamountPayment
                    color: "#ffffff"
                    text: qsTr("Amount")
                    font.pixelSize: 12 * pt
                    anchors.leftMargin: 16 * pt
                    anchors.left: parent.left
                    horizontalAlignment: Text.AlignLeft
                    font.styleName: "Normal"
                    font.family: "Roboto"
                    font.weight: Font.Normal
                    anchors.verticalCenter: parent.verticalCenter
                }
            }

            Rectangle
            {
                id: frameInputAmountPayment
                height: 112 * pt
                color: "#F8F7FA"
                anchors.top: frameAmountPayment.bottom
                anchors.left: parent.left
                anchors.right: parent.right
                anchors.leftMargin: 16 * pt
                anchors.rightMargin: 16 * pt
                Rectangle
                {
                    id: frameAmountField
                    anchors.left: parent.left
                    anchors.leftMargin: 20 * pt
                    anchors.right: parent.right
                    anchors.rightMargin: 20 * pt
                    anchors.top: frameInputAmountPayment.top
                    anchors.topMargin: 20 * pt
                    height: textTokenReduction.height
                    color: "transparent"
                    TextField
                    {
                        id: textInputAmountPayment
                        anchors.verticalCenter: parent.verticalCenter
                        placeholderText: qsTr("0")
                        font.pixelSize: 16 * pt
                        font.family: "Roboto"
                        font.styleName: "Normal"
                        font.weight: Font.Normal
                        horizontalAlignment: Text.AlignLeft
                        anchors.left: parent.left
                        anchors.right: textTokenReduction.left
                        anchors.rightMargin: 20 * pt

                        style:
                            TextFieldStyle
                            {
                                textColor: "#070023"
                                placeholderTextColor: "#070023"
                                background:
                                    Rectangle
                                    {
                                        border.width: 0
                                        color: "transparent"
                                    }
                            }
                    }
                    Text
                    {
                        id: textTokenReduction
                        anchors.verticalCenter: parent.verticalCenter
                        anchors.right: parent.right
                        font.pixelSize: 16 * pt
                        font.family: "Roboto"
                        font.styleName: "Normal"
                        font.weight: Font.Normal
                        horizontalAlignment: Text.AlignRight
                        color: "#070023"
                        text: "KLVN"
                    }
                }
                Rectangle
                {
                    id: splitLineAmount
                    height: 1 * pt
                    width: parent.width
                    color: "#E3E2E6"
                    anchors.top: frameAmountField.bottom
                    anchors.left: parent.left
                    anchors.right: parent.right
                    anchors.topMargin: 16 * pt
                    anchors.leftMargin: 20 * pt
                    anchors.rightMargin: 20 * pt
                }
                Rectangle
                {
                    id: frameAmountConvert
                    anchors.left: parent.left
                    anchors.leftMargin: 20 * pt
                    anchors.right: parent.right
                    anchors.rightMargin: 20 * pt
                    anchors.top: splitLineAmount.top
                    anchors.topMargin: 16 * pt
                    height: textAmountConvertValue.height
                    color: "transparent"
                    Text
                    {
                        id: textAmountConvertValue
                        anchors.verticalCenter: parent.verticalCenter
                        font.pixelSize: 14 * pt
                        font.family: "Roboto"
                        font.styleName: "Normal"
                        font.weight: Font.Normal
                        horizontalAlignment: Text.AlignLeft
                        anchors.left: parent.left
                        color: "#757184"
                        text: qsTr("0")
                    }
                    Text
                    {
                        id: textAmountConvertCurrency
                        anchors.verticalCenter: parent.verticalCenter
                        anchors.right: parent.right
                        font.pixelSize: 14 * pt
                        font.family: "Roboto"
                        font.styleName: "Normal"
                        font.weight: Font.Normal
                        horizontalAlignment: Text.AlignRight
                        color: "#757184"
                        text: qsTr("USD")
                    }
                }
            }

            // Recipient wallet
            Rectangle
            {
                id: frameRecipientWallet
                anchors.top: frameInputAmountPayment.bottom
                anchors.right: parent.right
                anchors.left: parent.left
                color: "#757184"
                height: 30 * pt
                Text
                {
                    id: textRecipientWallet
                    color: "#ffffff"
                    text: qsTr("To")
                    font.pixelSize: 12 * pt
                    anchors.leftMargin: 16 * pt
                    anchors.left: parent.left
                    horizontalAlignment: Text.AlignLeft
                    font.styleName: "Normal"
                    font.family: "Roboto"
                    font.weight: Font.Normal
                    anchors.verticalCenter: parent.verticalCenter
                }
            }

            Rectangle
            {
                id: frameRecipientWalletAddress
                anchors.top: frameRecipientWallet.bottom
                anchors.left: parent.left
                anchors.leftMargin: 16 * pt
                anchors.right: parent.right
                anchors.rightMargin: 16 * pt
                height: 52 * pt
                color: "transparent"

                TextField
                {
                    id: textInputRecipientWalletAddress
                    anchors.verticalCenter: parent.verticalCenter
                    placeholderText: qsTr("Recipient wallet")
                    font.pixelSize: 17 * pt
                    font.family: "Roboto"
                    font.styleName: "Normal"
                    font.weight: Font.Normal
                    horizontalAlignment: Text.AlignLeft
                    anchors.top: frameRecipientWalletAddress.top
                    anchors.topMargin: 12 * pt
                    anchors.left: parent.left
                    anchors.right: parent.right
                    anchors.leftMargin: 20 * pt
                    anchors.rightMargin: 20 * pt
                    style:
                        TextFieldStyle
                        {
                            textColor: "#070023"
                            placeholderTextColor: "#070023"
                            background:
                                Rectangle
                                {
                                    border.width: 0
                                    color: "transparent"
                                }
                        }
                }

                Rectangle
                {
                    id: splitLineRecipientWalletAddress
                    height: 1 * pt
                    width: parent.width
                    color: "#E3E2E6"
                    anchors.top: textInputRecipientWalletAddress.bottom
                    anchors.left: parent.left
                    anchors.right: parent.right
                    anchors.topMargin: 12 * pt
                    anchors.leftMargin: 20 * pt
                    anchors.rightMargin: 20 * pt
                }
            }

            // Button "Send"
            DapButton
            {
                id: buttonSend
                height: 44 * pt
                width: 130 * pt
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.top: frameRecipientWalletAddress.bottom
                anchors.topMargin: 60 * pt
                textButton: qsTr("Send")
                colorBackgroundHover: "#D51F5D"
                colorBackgroundNormal: "#070023"
                colorButtonTextNormal: "#FFFFFF"
                horizontalAligmentText: Text.AlignHCenter
                indentTextRight: 0
                fontButton.pixelSize: 18 * pt
            }

            Rectangle
            {
                id: frameBottom
                height: 124 * pt
                anchors.top: buttonSend.bottom
                anchors.topMargin: 24 * pt
                anchors.left: parent.left
                anchors.right: parent.right
                anchors.bottom: parent.bottom
                color: "transparent"
            }

        }
}