143 lines
4.4 KiB
QML
143 lines
4.4 KiB
QML
|
|
import QtQuick 2.15
|
|
import QtQuick.Window 2.15
|
|
import QtQuick.Layouts 1.15
|
|
import QtQuick.Controls 2.15
|
|
import Alterator.DistInfo 1.0
|
|
import Alterator.DBusInterface 1.0
|
|
import shared 1.0
|
|
|
|
ScrollView {
|
|
id: view
|
|
objectName: "page"
|
|
|
|
NewInterface{
|
|
id: hostname
|
|
initialServiceName: "org.freedesktop.hostname1"
|
|
initialAdress: "/org/freedesktop/hostname1"
|
|
initialInterfaceName: "org.freedesktop.hostname1"
|
|
initialIsSessionBus : false
|
|
|
|
Component.onCompleted:{
|
|
console.log("completed")
|
|
logSignal.connect(window.addRecord)
|
|
completed.connect(hostname.onCompleted)
|
|
completed()
|
|
}
|
|
}
|
|
|
|
NewInterface{
|
|
id: hostnameProps
|
|
initialServiceName: "org.freedesktop.hostname1"
|
|
initialAdress: "/org/freedesktop/hostname1"
|
|
initialInterfaceName: "org.freedesktop.DBus.Properties"
|
|
initialIsSessionBus : false
|
|
|
|
function fun(args){console.log("abc")}
|
|
|
|
Component.onCompleted:{
|
|
logSignal.connect(window.addRecord)
|
|
completed.connect(hostname.onCompleted)
|
|
completed()
|
|
dbusConnect("PropertiesChanged",
|
|
"fun(QVariant)")
|
|
}
|
|
}
|
|
|
|
anchors.fill: parent
|
|
|
|
ColumnLayout{
|
|
id: content
|
|
|
|
height: view.height
|
|
|
|
DistInfo{id: back}
|
|
|
|
TextWithHeader{
|
|
id: editionArea
|
|
|
|
Layout.minimumWidth: 500
|
|
Layout.preferredWidth: currentPage.width
|
|
headerS: "ALT edition"
|
|
keys: ["Kernel", "OS version", "Updated to"]
|
|
vals: [hostname.properties.KernelName + " " +
|
|
hostname.properties.KernelRelease
|
|
, back.getInstalledOS()
|
|
, hostname.properties.OperatingSystemPrettyName]
|
|
n: 3
|
|
comp: Component{
|
|
Image {
|
|
sourceSize.width: 100
|
|
sourceSize.height: 100
|
|
source: "../resources/wiki_logo.svg"
|
|
}
|
|
}
|
|
}
|
|
|
|
TextWithHeader {
|
|
id: systemArea
|
|
|
|
Layout.minimumWidth: 550
|
|
Layout.preferredWidth: currentPage.width
|
|
headerS: "System"
|
|
keys: ["Chassis", "Vendor", "Device name", "Processor", "RAM", "GPU"]
|
|
vals: [ hostname.properties.Chassis,
|
|
hostname.properties.HardwareVendor,
|
|
hostname.properties.HardwareModel,
|
|
back.getProcessor(), back.getRAM(), getSysType() ]
|
|
n: 6
|
|
comp: Component{
|
|
Button{
|
|
text: '<font color="blue"><u>More information</u></font>'
|
|
font.pointSize: 10
|
|
background: Rectangle{
|
|
color: Universal.theme === Universal.Light ? "white" : "black"
|
|
}
|
|
}
|
|
}
|
|
|
|
function getSysType() { return "qwerty" }
|
|
}
|
|
|
|
TextWithHeader{
|
|
id: hostnameArea
|
|
|
|
Layout.minimumWidth: 550
|
|
Layout.preferredWidth: currentPage.width
|
|
headerS: "Computer name, domain..."
|
|
keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
|
vals: [hostname.properties.Hostname,
|
|
back.getRealm(), back.getRole(), back.getWorkgroup()]
|
|
n: 4
|
|
comp: Component{
|
|
Button{
|
|
text: '<font color="blue"><u>Domain settings</u></font>'
|
|
font.pointSize: 10
|
|
background: Rectangle{
|
|
color: Universal.theme === Universal.Light ? "white" : "black"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Item {Layout.fillHeight: true}
|
|
|
|
TextArea{
|
|
textFormat: Text.AutoText
|
|
text: "<html><p>Project's site: <a href=" +
|
|
back.getHomeURL() + ">" + back.getHomeURL() +
|
|
"</a><br>Report bugs here: <a href=" +
|
|
back.getBugURL() + ">" + back.getBugURL() + "</a></p></html>"
|
|
onLinkActivated: Qt.openUrlExternally(link)
|
|
selectByMouse: true
|
|
selectByKeyboard: true
|
|
Layout.bottomMargin: 12
|
|
font.pointSize: 10
|
|
background: Rectangle {
|
|
color: Universal.theme === Universal.Light ? "white" : "black"
|
|
border.color: Universal.theme === Universal.Light ? "white" : "black"
|
|
}
|
|
}
|
|
}
|
|
}
|