2022-08-03 11:30:27 +03:00
2022-07-08 18:54:15 +03:00
import QtQuick 2.15
import QtQuick . Window 2.15
import QtQuick . Layouts 1.15
import QtQuick . Controls 2.15
2022-07-23 20:44:07 +03:00
import Alterator . DistInfo 1.0
2022-08-03 20:17:22 +03:00
import Alterator . DBusInterface 1.0
2022-07-08 18:54:15 +03:00
import shared 1.0
2022-07-11 14:47:26 +03:00
ScrollView {
id: view
2022-07-20 21:11:25 +03:00
objectName: "page"
2022-07-11 14:47:26 +03:00
2022-07-21 21:25:35 +03:00
NewInterface {
id: hostname
initialServiceName: "org.freedesktop.hostname1"
initialAdress: "/org/freedesktop/hostname1"
initialInterfaceName: "org.freedesktop.hostname1"
initialIsSessionBus : false
2022-07-26 19:58:21 +03:00
Component.onCompleted: {
2022-08-03 11:30:27 +03:00
console . log ( "completed" )
2022-07-26 19:58:21 +03:00
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
2022-07-27 20:10:18 +03:00
function fun ( args ) { console . log ( "abc" ) }
2022-07-26 19:58:21 +03:00
Component.onCompleted: {
logSignal . connect ( window . addRecord )
completed . connect ( hostname . onCompleted )
completed ( )
2022-07-27 20:10:18 +03:00
dbusConnect ( "PropertiesChanged" ,
"fun(QVariant)" )
2022-07-26 19:58:21 +03:00
}
2022-07-21 21:25:35 +03:00
}
2022-07-15 20:04:31 +03:00
2022-07-11 14:47:26 +03:00
anchors.fill: parent
2022-07-26 19:58:21 +03:00
2022-07-23 20:44:07 +03:00
ColumnLayout {
id: content
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
height: view . height
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
DistInfo { id: back }
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
TextWithHeader {
id: editionArea
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
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"
}
}
}
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
TextWithHeader {
id: systemArea
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
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>'
2022-07-28 18:04:54 +03:00
font.pointSize: 10
2022-07-23 20:44:07 +03:00
background: Rectangle {
2022-07-28 18:04:54 +03:00
color: Universal . theme === Universal . Light ? "white" : "black"
2022-07-23 20:44:07 +03:00
}
}
}
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
function getSysType ( ) { return "qwerty" }
}
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
TextWithHeader {
id: hostnameArea
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
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>'
2022-07-28 18:04:54 +03:00
font.pointSize: 10
2022-07-23 20:44:07 +03:00
background: Rectangle {
2022-07-28 18:04:54 +03:00
color: Universal . theme === Universal . Light ? "white" : "black"
2022-07-23 20:44:07 +03:00
}
}
}
}
2022-07-21 21:25:35 +03:00
2022-08-03 20:17:22 +03:00
Item { Layout.fillHeight: true }
2022-07-21 21:25:35 +03:00
2022-07-23 20:44:07 +03:00
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
2022-07-28 18:04:54 +03:00
font.pointSize: 10
background: Rectangle {
color: Universal . theme === Universal . Light ? "white" : "black"
border.color: Universal . theme === Universal . Light ? "white" : "black"
}
2022-07-23 20:44:07 +03:00
}
}
2022-07-11 14:47:26 +03:00
}