| 1 |
// SPDX-License-Identifier: GPL-3.0-or-later |
| 2 |
// Copyright 2019 Juan Palacios <[email protected]> |
| 3 |
|
| 4 |
import QtQuick 2.15 |
| 5 |
import QtQuick.Controls 2.15 |
| 6 |
import QtQuick.Layouts 1.15 |
| 7 |
import CoreCtrl.UIComponents 1.0 |
| 8 |
import "Style.js" as Style |
| 9 |
|
| 10 |
AMD_PM_FREQ_OD { |
| 11 |
id: pmFreqOd |
| 12 |
objectName: "AMD_PM_FREQ_OD" |
| 13 |
|
| 14 |
width: contents.width |
| 15 |
height: contents.height |
| 16 |
|
| 17 |
onSclkOdChanged: value => sclkOd.value = value |
| 18 |
onMclkOdChanged: value => mclkOd.value = value |
| 19 |
|
| 20 |
onSclkChanged: value => sclkFreq.text = value; |
| 21 |
onMclkChanged: value => mclkFreq.text = value; |
| 22 |
|
| 23 |
|
| 24 |
TextMetrics { |
| 25 |
id: freqTFMetrics |
| 26 |
text: "0000 MHz" |
| 27 |
} |
| 28 |
|
| 29 |
TextMetrics { |
| 30 |
id: odTFMetrics |
| 31 |
text: "+ 00 %" |
| 32 |
} |
| 33 |
|
| 34 |
CPane { |
| 35 |
id: contents |
| 36 |
|
| 37 |
ColumnLayout { |
| 38 |
spacing: 0 |
| 39 |
|
| 40 |
RowLayout { |
| 41 |
spacing: 8 |
| 42 |
|
| 43 |
Item { Layout.fillWidth: true } |
| 44 |
|
| 45 |
Label { text: qsTr("GPU") } |
| 46 |
|
| 47 |
Slider { |
| 48 |
id: sclkOd |
| 49 |
|
| 50 |
value: 0 |
| 51 |
from: 0 |
| 52 |
to: 20 |
| 53 |
stepSize: 1 |
| 54 |
|
| 55 |
onPressedChanged: pressed => { |
| 56 |
if (!pressed) |
| 57 |
pmFreqOd.changeSclkOd(sclkOd.value) |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
Label { |
| 62 |
text: "+ " + sclkOd.value + " %" |
| 63 |
horizontalAlignment: Text.AlignRight |
| 64 |
Layout.preferredWidth: odTFMetrics.width |
| 65 |
} |
| 66 |
|
| 67 |
Label { |
| 68 |
id: sclkFreq |
| 69 |
horizontalAlignment: Text.AlignRight |
| 70 |
Layout.preferredWidth: freqTFMetrics.width |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
RowLayout { |
| 75 |
spacing: 8 |
| 76 |
|
| 77 |
Item { Layout.fillWidth: true } |
| 78 |
|
| 79 |
Label { text: qsTr("Memory") } |
| 80 |
|
| 81 |
Slider { |
| 82 |
id: mclkOd |
| 83 |
|
| 84 |
value: 0 |
| 85 |
from: 0 |
| 86 |
to: 20 |
| 87 |
stepSize: 1 |
| 88 |
|
| 89 |
onPressedChanged: pressed => { |
| 90 |
if (!pressed) |
| 91 |
pmFreqOd.changeMclkOd(mclkOd.value) |
| 92 |
} |
| 93 |
} |
| 94 |
|
| 95 |
Label { |
| 96 |
text: "+ " + mclkOd.value + " %" |
| 97 |
horizontalAlignment: Text.AlignRight |
| 98 |
Layout.preferredWidth: odTFMetrics.width |
| 99 |
} |
| 100 |
|
| 101 |
Label { |
| 102 |
id: mclkFreq |
| 103 |
horizontalAlignment: Text.AlignRight |
| 104 |
Layout.preferredWidth: freqTFMetrics.width |
| 105 |
} |
| 106 |
} |
| 107 |
} |
| 108 |
} |
| 109 |
} |