134 lines
4.3 KiB
QML
134 lines
4.3 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
|
|
import "../shared/font_styles/Font_styles.js" as Font_styles;
|
|
import "../shared/someStyle.js" as SomeStyle;
|
|
import "../shared/Colors.js" as Colors;
|
|
import Alterator.Style 1.0
|
|
|
|
|
|
Item {
|
|
id: systemInfo
|
|
|
|
// anchors.fill: parent
|
|
|
|
property int keyWidth: 130
|
|
property int valWidth: 280
|
|
property int columnSpacing: -10
|
|
|
|
Style{
|
|
id: redSquare
|
|
|
|
Rectangle {
|
|
color: "red"
|
|
width: 10
|
|
height: 10
|
|
}
|
|
// onCompleted: console.log(2)
|
|
}
|
|
|
|
DBusInterface{
|
|
id: hostname
|
|
initialServiceName: "org.freedesktop.hostname1"
|
|
initialAdress: "/org/freedesktop/hostname1"
|
|
initialInterfaceName: "org.freedesktop.hostname1"
|
|
initialIsSessionBus : false
|
|
|
|
Component.onCompleted:{
|
|
logSignal.connect(window.addRecord)
|
|
completed.connect(hostname.onCompleted)
|
|
completed()
|
|
}
|
|
}
|
|
|
|
ScrollView{
|
|
anchors.fill: parent
|
|
Component.onCompleted: SomeStyle.DefaultScrollView.style(this)
|
|
|
|
ColumnLayout{
|
|
// anchors.fill: parent
|
|
height: systemInfo.height
|
|
|
|
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
|
|
, "TODO"
|
|
, 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, "TODO", "TODO", "TODO" ]
|
|
n: 6
|
|
comp: Component{
|
|
Button{
|
|
id: cba
|
|
text: 'More information'
|
|
Component.onCompleted: SomeStyle. DefaultButton.style(cba)
|
|
}
|
|
}
|
|
}
|
|
|
|
TextWithHeader{
|
|
id: hostnameArea
|
|
|
|
Layout.minimumWidth: 550
|
|
Layout.preferredWidth: currentPage.width
|
|
headerS: "Computer name, domain..."
|
|
keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
|
vals: [hostname.properties.Hostname,"TODO", "TODO", "TODO"]
|
|
n: 4
|
|
comp: Component{
|
|
Button{
|
|
id: domainSettigsButton
|
|
text: 'Domain settings'
|
|
Component.onCompleted: SomeStyle.HyperlinkButton.style(domainSettigsButton)
|
|
}
|
|
}
|
|
}
|
|
Item{Layout.fillHeight: true}
|
|
TextArea{
|
|
textFormat: Text.AutoText
|
|
text: "<html><p>Project's site: <a href=" +
|
|
"TODO" + ">" + "TODO" +
|
|
"</a><br>Report bugs here: <a href=" +
|
|
"TODO" + ">" + "TODO" + "</a></p></html>"
|
|
onLinkActivated: Qt.openUrlExternally(link)
|
|
selectByMouse: true
|
|
selectByKeyboard: true
|
|
Layout.bottomMargin: 12
|
|
font.pointSize: 10
|
|
background: Rectangle {
|
|
color: "white"//Universal.theme === Universal.Light ? "white" : "black"
|
|
border.color: "white"//Universal.theme === Universal.Light ? "white" : "black"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|