109 lines
3.4 KiB
QML
109 lines
3.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.DBusConnector 1.0
|
|
import shared 1.0
|
|
|
|
|
|
ScrollView {
|
|
id: view
|
|
|
|
property var requiredInterfaces:
|
|
[ {shortname : "hostname"
|
|
, service : "org.freedesktop.hostname1"
|
|
, path : "/org/freedesktop/hostname1"
|
|
, interface : "org.freedesktop.hostname1"
|
|
, isSessionBus : false}]
|
|
|
|
anchors.fill: parent
|
|
ColumnLayout{
|
|
id: content
|
|
|
|
height: view.height
|
|
|
|
DistInfo{id: back}
|
|
DBusConnector{id: dbus}
|
|
|
|
TextWithHeader{
|
|
id: editionArea
|
|
|
|
Layout.minimumWidth: 500
|
|
Layout.preferredWidth: currentPage.width
|
|
headerS: "ALT edition"
|
|
keys: ["Kernel", "OS version", "Updated to"]
|
|
vals: [dbus.getProperty("hostname", "KernelName").toString() + " " +
|
|
dbus.getProperty("hostname", "KernelRelease").toString()
|
|
, back.getInstalledOS()
|
|
, dbus.getProperty("hostname", "OperatingSystemPrettyName").toString()]
|
|
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: [ dbus.getProperty("hostname", "Chassis").toString()
|
|
, dbus.getProperty("hostname", "HardwareVendor").toString()
|
|
, dbus.getProperty("hostname", "HardwareModel").toString()
|
|
, back.getProcessor(), back.getRAM(), getSysType() ]
|
|
n: 6
|
|
comp: Component{
|
|
Button{
|
|
text: '<font color="blue"><u>More information</u></font>'
|
|
background: Rectangle{
|
|
color: "white"
|
|
}
|
|
}
|
|
}
|
|
|
|
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: [dbus.getProperty("hostname", "Hostname").toString()
|
|
, back.getRealm(), back.getRole(), back.getWorkgroup()]
|
|
n: 4
|
|
comp: Component{
|
|
Button{
|
|
text: '<font color="blue"><u>Domain settings</u></font>'
|
|
background: Rectangle{
|
|
color: "white"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|