Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Bensuperpc <[email protected]>
  • Loading branch information
bensuperpc committed Dec 23, 2023
1 parent 76009d9 commit 0c0d86e
Show file tree
Hide file tree
Showing 43 changed files with 1,369 additions and 1,738 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ if (Qt${QT_VERSION_MAJOR}_FOUND)
VERSION 1.0
QML_FILES
qml/responsive.qml
qml/responsiveOrg.qml
qml/GTA_SA.qml
qml/main.qml
qml/home.qml qml/image.qml
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Bensuperpc
Copyright (c) 2021 Bensuperpc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 11 additions & 0 deletions qml/about.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ Page {
CustomMenuSeparator {
color: window.Material.dividerColor
}
HorizontalLabelDelegateMenu {
leftText: "OS"
rightText: AppSingleton.osType()
}
HorizontalLabelDelegateMenu {
leftText: "OS version"
rightText: AppSingleton.osTypeFull()
}
CustomMenuSeparator {
color: window.Material.dividerColor
}
HorizontalLabelDelegateMenu {
leftText: "Compiler"
rightText: AppSingleton.compilerName()
Expand Down
146 changes: 0 additions & 146 deletions qml/home.qml
Original file line number Diff line number Diff line change
Expand Up @@ -50,152 +50,6 @@ Page {
title: qsTr("QML/C++ binding")
anchors.fill: parent
padding: 6

ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
clip: true
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
//Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
ComboBox {
id: comboBox
model: AppSingleton.bencTypeList
currentIndex: AppSingleton.getBencTypeIndex()
implicitContentWidthPolicy: ComboBox.WidestTextWhenCompleted

onActivated: {
AppSingleton.setBencTypeIndex(
this.currentIndex)
}
}

//Binding {
// target: AppSingleton
// property: "bencTypeList"
// value: comboBox.model
// delayed: true
//}
Button {
text: "Run"
onClicked: AppSingleton.run()
}
}

RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
TextField {
id: textField_test
text: AppSingleton.textBoxValue
inputMethodHints: Qt.ImhNoPredictiveText
}
Binding {
target: AppSingleton
property: "textBoxValue"
value: textField_test.text
delayed: true
}
TextField {
id: textField_test2
text: AppSingleton.textBoxValue
inputMethodHints: Qt.ImhNoPredictiveText
}
Binding {
target: AppSingleton
property: "textBoxValue"
value: textField_test2.text
delayed: true
}
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
ColumnLayout {
Layout.fillWidth: true
RowLayout {
Layout.fillWidth: true
ButtonGroup {
id: childGroup
exclusive: false
checkState: parentBox.checkState
}

CheckBox {
id: parentBox
text: qsTr("All")
checkState: childGroup.checkState
onToggled: {
AppSingleton.setBenchUnsignedInteger64(
this.checked)
AppSingleton.setBenchUnsignedInteger32(
this.checked)
}
}

CheckBox {
text: qsTr("uint64_t")
ButtonGroup.group: childGroup
checked: AppSingleton.getBenchUnsignedInteger64()
onToggled: {
AppSingleton.setBenchUnsignedInteger64(
this.checked)
}
}

CheckBox {
text: qsTr("uint32_t")
ButtonGroup.group: childGroup
checked: AppSingleton.getBenchUnsignedInteger32()
onToggled: {
AppSingleton.setBenchUnsignedInteger32(
this.checked)
}
}
}
RowLayout {
CheckBox {
text: qsTr("uint16_t")
ButtonGroup.group: childGroup
checked: AppSingleton.getBenchUnsignedInteger16()
onToggled: {
AppSingleton.setBenchUnsignedInteger16(
this.checked)
}
}
CheckBox {
text: qsTr("uint8_t")
ButtonGroup.group: childGroup
checked: AppSingleton.getBenchUnsignedInteger8()
onToggled: {
AppSingleton.setBenchUnsignedInteger8(
this.checked)
}
}
}
}
}

RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
MyLabel {
id: mylabel
}
Label {
id: helloWorldLabel
text: qsTr("Hello World from QML!")
Component.onCompleted: {
mylabel.setMyObject(helloWorldLabel)
}

function myQMLFunction(message) {
return message + message
}
}
}
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ ApplicationWindow {
//property bool inPortrait: window.width < window.height

// List all pages and names
property var drawerPageFile: ["responsive.qml", "responsiveOrg.qml", "home.qml", "graphic.qml", "table.qml", "image.qml", "swipe.qml", "GTA_SA.qml", "settings.qml"]
property var drawerPageName: ["Responsive", "responsiveOrg", "Home", "Graphic", "Table", "Image", "Swipe", "GTA_SA", "Settings"]
property var drawerPageFile: ["responsive.qml", "home.qml", "graphic.qml", "table.qml", "image.qml", "swipe.qml", "GTA_SA.qml", "settings.qml"]
property var drawerPageName: ["Responsive", "Home", "Graphic", "Table", "Image", "Swipe", "GTA_SA", "Settings"]
property int currentPageIndex: 0

header: ToolBar {
Expand Down
106 changes: 0 additions & 106 deletions qml/responsiveOrg.qml

This file was deleted.

Loading

0 comments on commit 0c0d86e

Please sign in to comment.