summaryrefslogtreecommitdiffstats
path: root/tools/qqem/qml/HelpView.qml
blob: 0d893bb8b09c05165eddbc15e4ec6f51a61e5d7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick

Item {
    id: rootItem

    Rectangle {
        anchors.fill: parent
        color: mainView.backgroundColor1
    }

    Flickable {
        id: helpFlickable
        anchors.fill: parent
        contentWidth: helpTextEdit.width
        contentHeight: helpTextEdit.height
        clip: true
        TextEdit {
            id: helpTextEdit
            padding: 20
            width: helpFlickable.width
            wrapMode: TextEdit.WordWrap
            color: mainView.foregroundColor2
            textFormat: TextEdit.RichText
            readOnly: true
            selectByMouse: true
            text: effectManager.getHelpTextString();
            font.pixelSize: 14
            onLinkActivated: (link)=> Qt.openUrlExternally(link)
            MouseArea {
                anchors.fill: parent
                acceptedButtons: Qt.NoButton
                cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
            }
        }
    }
}