Skip to content
Snippets Groups Projects
Commit deb303c1 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-12590 - Remove network page

parent 1b5cfe1d
No related branches found
No related tags found
1 merge request!47QDS-12590 - Remove network page
Pipeline #70260 passed
......@@ -4,3 +4,5 @@ ui/*.qtds
ui/*.db-shm
ui/*.db-wal
ui/share.qrc
logcat.txt
output.junit.xml
......@@ -27,6 +27,8 @@ You can get the pre-built app from either [Google Play Store][google-play-link]
* 3rdparty: Required 3rd party libraries
* qtquickdesigner-components: QML components
* zxing-cpp: QR code decoding/encoding
* icons: App icons
* tests: Test files
## Building
......
......@@ -13,10 +13,29 @@ qt_add_executable(${PROJECT_NAME}
backend/dsconnector.cpp backend/dsconnector.h
backend/qrscanner.cpp backend/qrscanner.h
ui/main.qml
ui/resources.qrc
../3rdparty/zxing-cpp/example/ZXingQtReader.h
)
qt_add_resources(${PROJECT_NAME} "images"
PREFIX "/"
FILES
ui/content/images/appicon.png
ui/content/images/closed_eye.png
ui/content/images/open_eye.png
)
qt_add_resources(${PROJECT_NAME} "qml"
PREFIX "/"
FILES
ui/main.qml
ui/HomePage.qml
ui/Logs.qml
ui/Network.qml
ui/ExamplesPage.qml
ui/AboutHeader.qml
ui/SettingsPage.qml
)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt6::Core Qt6::Widgets
Qt6::Quick Qt6::Gui
......
<?xml version="1.0"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.qt.qtuiviewer"
android:installLocation="auto" android:versionCode="27" android:versionName="1.2">
android:installLocation="auto" android:versionCode="27" android:versionName="1.0.0">
<!-- %%INSERT_PERMISSIONS -->
<!-- %%INSERT_FEATURES -->
<supports-screens android:anyDensity="true" android:largeScreens="true"
......
......@@ -112,7 +112,7 @@ void DesignStudioConnector::updateIpv4Addr()
break;
}
}
emit networkStatusUpdated("\nLocal IP: " + m_ipv4Addr
emit networkStatusUpdated("Local IP: " + m_ipv4Addr
+ "\nWaiting for Design Studio to connect...");
}
......
......@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
QQuickView view;
view.engine()->rootContext()->setContextProperty("backend", backend);
view.setSource(QUrl(QStringLiteral("qrc:/main.qml")));
view.setSource(QUrl(QStringLiteral("qrc:/ui/main.qml")));
view.setResizeMode(QQuickView::SizeRootObjectToView);
view.showMaximized();
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtDesignStudio 4.3.2, 2024-02-26T09:55:47. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{ac7fba27-a706-4163-bcb3-981f191b8f80}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="qlonglong">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Replacement for &quot;Desktop Qt 5.15.5&quot;</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Replacement for &quot;Desktop Qt 5.15.5&quot;</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{8994bd34-5ed9-4c45-8c0a-94c8f33eca4a}</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Runtime</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.Qml</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.LastUsedLanguage">en</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
<value type="bool" key="QmlProjectManager.QmlRunConfiguration.UseMultiLanguage">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.X11Forwarding">/private/tmp/com.apple.launchd.ddnxVkgmc6/org.xquartz:0</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.1</variable>
<valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.6.0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.6.0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{63f87550-2541-4163-9631-08b7fea781da}</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">-1</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">QML Runtime</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmlProjectManager.QmlRunConfiguration.Qml</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.LastUsedLanguage">en</value>
<value type="QString" key="QmlProjectManager.QmlRunConfiguration.MainScript">CurrentFile</value>
<value type="bool" key="QmlProjectManager.QmlRunConfiguration.UseMultiLanguage">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.X11Forwarding">/private/tmp/com.apple.launchd.ddnxVkgmc6/org.xquartz:0</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="qlonglong">2</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>
......@@ -9,46 +9,109 @@ Item {
ColumnLayout {
anchors.fill: parent
Item {
id: item2
Layout.preferredWidth: 10
Layout.preferredHeight: 3
Layout.fillWidth: true
Layout.fillHeight: true
}
GridLayout{
id: gridLayout
Item {
id: item2
Layout.preferredWidth: 10
Layout.preferredHeight: 3
Layout.fillWidth: true
Layout.fillHeight: true
}
Text {
id: qrCodeStatus
text: {
if (backend.userHash() === '') {
return qsTr("No user is registered. To access your shared projects:\n\n1. Open the project with Design Studio (4.4 or later).\n2. Select File -> Share Application Online.\n3. Scan the QR code.")
}
Text {
id: qrCodeStatus
text: {
if (backend.userHash() === '') {
return qsTr("No user is registered. To access your shared projects:\n\n1. Open the project with Design Studio (4.4 or later).\n2. Select File -> Share Application Online.\n3. Scan the QR code.")
return qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
}
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Layout.fillWidth: true
Connections {
target: backend
function onUserHashChanged(){
qrCodeStatus.text = qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
}
}
}
return qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
Button {
id: scanQrCode
text: qsTr("Scan QR code")
onClicked: backend.scanQrCode()
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
}
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Layout.fillWidth: true
Connections {
target: backend
function onUserHashChanged(){
qrCodeStatus.text = qsTr("User registration is completed.\nScan a new QR code to access the shared project from a different user.");
Rectangle {
id: sep1
height: 2
color: 'black'
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
}
Rectangle {
id: sep2
height: 2
color: 'black'
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
}
Item {
id: item4
Layout.preferredWidth: 10
Layout.preferredHeight: 10
Layout.fillWidth: true
Layout.fillHeight: true
}
Text {
id: dsInstructions
text: "Create a connection to Qt Design Studio:
Goto File > Deploy Project to Android, and type in the following IP address:"
font.pixelSize: 12
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
Text {
id: ipAdress
text: "Waiting for backend to be initialized..."
font.pixelSize: 16
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
Layout.fillWidth: true
Connections {
target: backend
function onNetworkUpdated(newStatus){
ipAdress.text = newStatus
}
}
}
}
Button {
id: scanQrCode
text: qsTr("Scan QR code")
onClicked: backend.scanQrCode()
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
Item {
id: item5
Layout.preferredWidth: 10
Layout.preferredHeight: 10
Layout.fillWidth: true
Layout.fillHeight: true
}
}
Item {
id: item4
id: item6
Layout.preferredWidth: 10
Layout.preferredHeight: 10
Layout.fillWidth: true
......@@ -183,4 +246,65 @@ Item {
}
}
}
states: [
State {
name: "State1"
when: homePage.height >= 400
PropertyChanges {
target: gridLayout
columns: 1
}
PropertyChanges {
target: sep1
visible: false
}
PropertyChanges {
target: sep2
visible: false
}
PropertyChanges {
target: item5
visible: true
}
},
State {
name: "State2"
when: homePage.height <= 400
PropertyChanges {
target: item2
visible: false
}
PropertyChanges {
target: item4
visible: false
}
PropertyChanges {
target: sep1
visible: true
}
PropertyChanges {
target: sep2
visible: true
}
PropertyChanges {
target: item5
visible: false
}
PropertyChanges {
target: gridLayout
columns: 2
}
}
]
}
......@@ -114,10 +114,10 @@ Rectangle {
Layout.fillWidth: true
}
Network {
id: networkPage
Layout.fillWidth: true
}
// Network {
// id: networkPage
// Layout.fillWidth: true
// }
SettingsPage {
id: settingsPage
......@@ -142,8 +142,9 @@ Rectangle {
PropertyChanges {
target: qdsicon1
width: 132
height: 83
width: 0
height: 0
visible: false
}
PropertyChanges {
......@@ -167,89 +168,89 @@ Rectangle {
id: scrollview
anchors.fill: parent
ColumnLayout {
id: column
anchors.fill: drawer
anchors.rightMargin: 10
anchors.leftMargin: 10
width: Math.max(implicitWidth, drawer.availableWidth)
height: Math.max(implicitHeight, drawer.availableHeight)
TabButton {
id: home
text: qsTr("Home")
Layout.fillWidth: true
checked: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 0
drawer.close()
ColumnLayout {
id: column
anchors.fill: drawer
anchors.rightMargin: 10
anchors.leftMargin: 10
width: Math.max(implicitWidth, drawer.availableWidth)
height: Math.max(implicitHeight, drawer.availableHeight)
TabButton {
id: home
text: qsTr("Home")
Layout.fillWidth: true
checked: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 0
drawer.close()
}
}
}
TabButton {
id: examples
text: qsTr("Examples")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 1
drawer.close()
TabButton {
id: examples
text: qsTr("Examples")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 1
drawer.close()
}
}
}
TabButton {
id: logs
text: qsTr("Logs")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 2
drawer.close()
TabButton {
id: logs
text: qsTr("Logs")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 2
drawer.close()
}
}
}
TabButton {
id: network
text: qsTr("Network")
Layout.fillWidth: true
checkable: true
autoExclusive: true
visible: true;
onClicked: {
stackLayout.currentIndex = 3
drawer.close()
}
}
TabButton {
id: settings
text: qsTr("Settings")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 4
drawer.close()
// TabButton {
// id: network
// text: qsTr("Network")
// Layout.fillWidth: true
// checkable: true
// autoExclusive: true
// visible: true;
// onClicked: {
// stackLayout.currentIndex = 3
// drawer.close()
// }
// }
TabButton {
id: settings
text: qsTr("Settings")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 4
drawer.close()
}
}
}
TabButton {
id: about
text: qsTr("About")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 5
drawer.close()
TabButton {
id: about
text: qsTr("About")
Layout.fillWidth: true
checkable: true
autoExclusive: true
onClicked: {
stackLayout.currentIndex = 5
drawer.close()
}
}
}
}
}
}
Button {
......
<RCC>
<qresource prefix="/">
<file>content/images/appicon.png</file>
<file>content/images/closed_eye.png</file>
<file>content/images/open_eye.png</file>
<file>main.qml</file>
<file>HomePage.qml</file>
<file>Logs.qml</file>
<file>Network.qml</file>
<file>ExamplesPage.qml</file>
<file>AboutHeader.qml</file>
<file>SettingsPage.qml</file>
</qresource>
</RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment