Improve UI
This commit is contained in:
		
							parent
							
								
									cff0316c0a
								
							
						
					
					
						commit
						028f492c32
					
				
					 1 changed files with 20 additions and 16 deletions
				
			
		
							
								
								
									
										42
									
								
								qml/Main.qml
									
										
									
									
									
								
							
							
						
						
									
										42
									
								
								qml/Main.qml
									
										
									
									
									
								
							|  | @ -22,12 +22,14 @@ ApplicationWindow { | |||
|             Layout.fillWidth: true | ||||
| 
 | ||||
|             ColumnLayout { | ||||
|                 anchors.fill: parent | ||||
|                 spacing: 10 | ||||
| 
 | ||||
|                 TextField { | ||||
|                     id: numberInput | ||||
|                     placeholderText: "Enter a number" | ||||
|                     // NOTE: We can't use the IntValidator here, since it doesn't support 64-bit values (long long) | ||||
|                     // Entering invalid numbers might cause unexpected behavior (will be fed to parseInt). | ||||
|                     Layout.fillWidth: true | ||||
|                     font.pixelSize: 16 | ||||
|                     onTextChanged: factorizationController.reset() | ||||
|  | @ -61,7 +63,9 @@ ApplicationWindow { | |||
|         GroupBox { | ||||
|             title: "Settings" | ||||
|             Layout.fillWidth: true | ||||
| 
 | ||||
|             ColumnLayout { | ||||
|                 anchors.fill: parent | ||||
|                 spacing: 10 | ||||
| 
 | ||||
|                 RowLayout { | ||||
|  | @ -97,30 +101,30 @@ ApplicationWindow { | |||
|             } | ||||
|         } | ||||
| 
 | ||||
|         GroupBox { | ||||
|             title: "Current Status" | ||||
|             Layout.fillWidth: true | ||||
| 
 | ||||
|             ColumnLayout { | ||||
|                 anchors.fill: parent | ||||
|                 spacing: 5 | ||||
| 
 | ||||
|                 Text { | ||||
|                     text: "Current Number (being factorized): " + factorizationController.curFactNumber | ||||
|                     font.pixelSize: 14 | ||||
|                 } | ||||
| 
 | ||||
|                 Text { | ||||
|                     text: "Current Factor: " + factorizationController.currentFactor | ||||
|                     font.pixelSize: 14 | ||||
|                 } | ||||
| 
 | ||||
|                 ProgressBar { | ||||
|                     Layout.fillWidth: true | ||||
|                     from: 0 | ||||
|                     to: 100 | ||||
|                     value: factorizationController.progress | ||||
|                 } | ||||
| 
 | ||||
|         GroupBox { | ||||
|             title: "Current Status" | ||||
|             Layout.fillWidth: true | ||||
|             ColumnLayout { | ||||
|                 spacing: 5 | ||||
| 
 | ||||
|                 Text { | ||||
|                     text: "Current Factor: " + factorizationController.currentFactor | ||||
|                     font.pixelSize: 14 | ||||
|                     Layout.alignment: Qt.AlignHCenter | ||||
|                 } | ||||
| 
 | ||||
|                 Text { | ||||
|                     text: "Current Number (being factorized): " + factorizationController.curFactNumber | ||||
|                     font.pixelSize: 14 | ||||
|                     Layout.alignment: Qt.AlignHCenter | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  | @ -137,7 +141,7 @@ ApplicationWindow { | |||
|         } | ||||
| 
 | ||||
|         Text { | ||||
|             text: factorizationController.useSqrtOptimization ? "Note: Only factors up to sqrt(n) are searched." : "Note: Searching all factors (slower)." | ||||
|             text: factorizationController.useSqrtOptimization ? "Note: Only factors up to sqrt(n) are searched." : "Warning: Searching all factors (inefficient)." | ||||
|             font.pixelSize: 12 | ||||
|             Layout.alignment: Qt.AlignHCenter | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue