work in progress
This commit is contained in:
parent
b0d963054d
commit
e041c72337
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 7.0.2, 2022-07-08T13:31:19. -->
|
||||
<!-- Written by QtCreator 7.0.2, 2022-07-09T16:25:26. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{45a71af6-65bb-4af1-a2df-6ab519c8565c}</value>
|
||||
<value type="QByteArray">{055df76c-eb5f-479b-9e45-f478a706e6f9}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@ -77,15 +77,12 @@
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">2</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">0</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="CppEditor.QuickFix">
|
||||
<value type="bool" key="UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
@ -94,7 +91,7 @@
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{0d1d96e7-0317-4f7a-a513-68284676b112}</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f0d093c2-ceeb-4303-9c63-b1e5c487b907}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
@ -107,7 +104,7 @@
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/build</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/new_alterator/build</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
@ -153,7 +150,7 @@
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/build-new_alterator-Desktop-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
@ -197,7 +194,7 @@
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/build-new_alterator-Desktop-RelWithDebInfo</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
@ -241,7 +238,7 @@
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/SMB.BASEALT.RU/kozyrevid/work/build-new_alterator-Desktop-MinSizeRel</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/yura/work/build-new_alterator-Desktop-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
@ -297,15 +294,12 @@
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">new_alterator</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.new_alterator</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">new_alterator</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/SMB.BASEALT.RU/kozyrevid/work/new_alterator/build</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
@ -5,68 +5,83 @@ import QtQuick.Controls 2.15
|
||||
import ru.basealt.DistInfoBack 1.0
|
||||
import shared 1.0
|
||||
|
||||
ColumnLayout{
|
||||
DistInfoBack{id: back}
|
||||
|
||||
TextWithHeader{
|
||||
id: editionArea
|
||||
ScrollView {
|
||||
id: view
|
||||
|
||||
headerS: "ALT edition"
|
||||
keys: ["Kernel version", "OS version", ifDiffK()]
|
||||
vals: [back.getKernel(), back.getInstalledOS(), ifDiffV()]
|
||||
n: 3
|
||||
comp: Component{
|
||||
Image {
|
||||
sourceSize.width: 100
|
||||
sourceSize.height: 100
|
||||
source: "../resources/wiki_logo.svg"
|
||||
anchors.fill: parent
|
||||
ColumnLayout{
|
||||
id: content
|
||||
|
||||
DistInfoBack{id: back}
|
||||
|
||||
TextWithHeader{
|
||||
id: editionArea
|
||||
|
||||
Layout.preferredWidth: currentPage.width
|
||||
headerS: "ALT edition"
|
||||
keys: ["Kernel version", "OS version", ifDiffK()]
|
||||
vals: [back.getKernel(), back.getInstalledOS(), ifDiffV()]
|
||||
n: 3
|
||||
comp: Component{
|
||||
Image {
|
||||
sourceSize.width: 100
|
||||
sourceSize.height: 100
|
||||
source: "../resources/wiki_logo.svg"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ifDiffK(){
|
||||
return back.getInstalledOS() === back.getOS() ? "" : "Updated to"
|
||||
}
|
||||
function ifDiffV(){
|
||||
return back.getInstalledOS() === back.getOS() ? "" : back.getOS()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TextWithHeader {
|
||||
id: systemArea
|
||||
|
||||
Layout.minimumWidth: currentPage.width
|
||||
headerS: "System"
|
||||
keys: ["Chassis", "Vendor", "Device name", "Processor", "RAM", "GPU"]
|
||||
vals: [back.getChassis(), back.getVendor(), back.getDevice(), back.getProcessor(), back.getRAM(), getSysType()]
|
||||
n: 6
|
||||
comp: Component{
|
||||
Button{
|
||||
text: "More information"
|
||||
}
|
||||
}
|
||||
|
||||
function getRAM(){return "cba"}
|
||||
function getSysType(){return "qwerty"}
|
||||
}
|
||||
|
||||
TextWithHeader{
|
||||
id: hostnameArea
|
||||
|
||||
Layout.minimumWidth: currentPage.width
|
||||
headerS: "Computer name, domain..."
|
||||
keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
||||
vals: [back.getHostname(), back.getRealm(), back.getRole(), back.getWorkgroup()]
|
||||
n: 4
|
||||
comp: Component{
|
||||
Button{
|
||||
text: "Domain settings"
|
||||
}
|
||||
}
|
||||
|
||||
function getProcessor(){return "abc"}
|
||||
function getRAM(){return "cba"}
|
||||
function getSysType(){return "qwerty"}
|
||||
}
|
||||
|
||||
Item {Layout.fillHeight: true}
|
||||
|
||||
TextArea{
|
||||
text: "Project's cite: .\t Report bugs here: "
|
||||
}
|
||||
|
||||
function ifDiffK(){
|
||||
return back.getInstalledOS() === back.getOS() ? "" : "Updated to"
|
||||
}
|
||||
function ifDiffV(){
|
||||
return back.getInstalledOS() === back.getOS() ? "" : back.getOS()
|
||||
}
|
||||
}
|
||||
|
||||
TextWithHeader {
|
||||
id: systemArea
|
||||
|
||||
Layout.fillWidth: true
|
||||
headerS: "System"
|
||||
keys: ["Chassis", "Vendor", "Device name", "Processor", "RAM", "GPU"]
|
||||
vals: [back.getChassis(), back.getVendor(), back.getDevice(), back.getProcessor(), back.getRAM(), getSysType()]
|
||||
n: 6
|
||||
comp: Component{
|
||||
Button{
|
||||
text: "More information"
|
||||
}
|
||||
}
|
||||
|
||||
function getRAM(){return "cba"}
|
||||
function getSysType(){return "qwerty"}
|
||||
}
|
||||
|
||||
TextWithHeader{
|
||||
id: hostnameArea
|
||||
|
||||
headerS: "Computer name, domain..."
|
||||
keys: ["Hostname", "Realm", "Domain role", "Workgroup"]
|
||||
vals: [back.getHostname(), back.getRealm(), back.getRole(), back.getWorkgroup()]
|
||||
n: 4
|
||||
comp: Component{
|
||||
Button{
|
||||
text: "Domain settings"
|
||||
}
|
||||
}
|
||||
|
||||
function getProcessor(){return "abc"}
|
||||
function getRAM(){return "cba"}
|
||||
function getSysType(){return "qwerty"}
|
||||
}
|
||||
|
||||
Item {Layout.fillHeight: true}
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ import Qt.labs.qmlmodels 1.0
|
||||
import QtQml 2.15
|
||||
|
||||
Rectangle{
|
||||
id: rect
|
||||
|
||||
property var keys
|
||||
property var vals
|
||||
property string headerS
|
||||
@ -28,7 +30,7 @@ Rectangle{
|
||||
TextArea{
|
||||
id: header
|
||||
|
||||
text: qsTr(headerS)
|
||||
text: qsTr(headerS) + content.width
|
||||
font.pointSize: 12
|
||||
}
|
||||
|
||||
@ -61,6 +63,9 @@ Rectangle{
|
||||
id: val
|
||||
|
||||
text: vals[index]
|
||||
}
|
||||
|
||||
Item{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
@ -51,9 +51,16 @@ QString AlteratorDistInfo::getProcessor(){
|
||||
return "";
|
||||
if (!clp.waitForFinished())
|
||||
return "";
|
||||
QByteArray result = clp.readAll();
|
||||
QString res = result;
|
||||
return res.mid(res.indexOf("model name") + 12, res.indexOf("stepping") - res.indexOf("model name") - 13);
|
||||
QString result = clp.readAll();
|
||||
QStringRef res = &result;
|
||||
res = res.right(res.size() - res.indexOf("model name"));
|
||||
res = res.left(res.indexOf("\n"));
|
||||
res = res.right(res.size() - res.indexOf(": ") - 2);
|
||||
QStringRef cores = &result;
|
||||
cores = cores.right(cores.size() - cores.indexOf("cpu cores"));
|
||||
cores = cores.left(cores.indexOf("\n"));
|
||||
cores = cores.right(cores.size() - cores.indexOf(": ") - 2);
|
||||
return res.toString() + " " + QChar(0x00D7) + " " + QString::number(cores.toInt());
|
||||
}
|
||||
|
||||
QString AlteratorDistInfo::getRAM(){
|
||||
@ -63,21 +70,17 @@ QString AlteratorDistInfo::getRAM(){
|
||||
return "";
|
||||
if (!clp.waitForFinished())
|
||||
return "";
|
||||
QByteArray result = clp.readAll();
|
||||
QString res = result;
|
||||
return res.mid(res.indexOf("MemTotal") + 16, res.indexOf("MemFree") - res.indexOf("MemTotal") - 17);
|
||||
QString result = clp.readAll();
|
||||
QStringRef res = &result;
|
||||
res = res.right(res.size() - res.indexOf("MemTotal"));
|
||||
res = res.left(res.indexOf("\n"));
|
||||
res = res.left(res.lastIndexOf(" "));
|
||||
res = res.right(res.size() - res.lastIndexOf(" "));
|
||||
return QString::number(res.toDouble() / 1024 / 1024, 'f', 3) + " Gb";
|
||||
}
|
||||
|
||||
QString AlteratorDistInfo::getHostname(){
|
||||
QProcess clp;
|
||||
clp.start("cat", QStringList() << "/proc/meminfo");
|
||||
if (!clp.waitForStarted())
|
||||
return "";
|
||||
if (!clp.waitForFinished())
|
||||
return "";
|
||||
QByteArray result = clp.readAll();
|
||||
QString res = result;
|
||||
return res.mid(res.indexOf("MemTotal") + 16, res.indexOf("MemFree") - res.indexOf("MemTotal") - 17);
|
||||
return DBusInterface->property("Hostname").toString();
|
||||
}
|
||||
|
||||
QString AlteratorDistInfo::getRealm(){
|
||||
|
Loading…
Reference in New Issue
Block a user