mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-31 17:42:55 +08:00
Fix QML interface for Raspberry Pi
This commit is contained in:
parent
6bbff5a976
commit
30659ea15d
@ -20,11 +20,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import Qt.labs.settings 1.1
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import SerialStudio 1.0
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.10
|
||||
|
||||
Repeater {
|
||||
id: root
|
||||
|
@ -20,8 +20,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12 as QtWindow
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10 as QtWindow
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
@ -63,7 +63,7 @@ QtWindow.Window {
|
||||
readonly property int handleSize: radius > 0 ? radius + shadowMargin + 10 : 0
|
||||
readonly property int radius: Cpp_ThemeManager.customWindowDecorations ?
|
||||
(((root.visibility === QtWindow.Window.Maximized &&
|
||||
maximizeEnabled) || isFullscreen) ? 0 : 10) : 0
|
||||
maximizeEnabled) || isFullscreen) ? 0 : 10) : 0
|
||||
|
||||
//
|
||||
// Visibility properties
|
||||
@ -77,10 +77,10 @@ QtWindow.Window {
|
||||
readonly property int customFlags: {
|
||||
// Setup frameless window flags
|
||||
var flags = Qt.Window |
|
||||
Qt.CustomizeWindowHint |
|
||||
Qt.FramelessWindowHint |
|
||||
Qt.WindowSystemMenuHint |
|
||||
Qt.WindowMinMaxButtonsHint
|
||||
Qt.CustomizeWindowHint |
|
||||
Qt.FramelessWindowHint |
|
||||
Qt.WindowSystemMenuHint |
|
||||
Qt.WindowMinMaxButtonsHint
|
||||
|
||||
//
|
||||
// The macOS window manager is able to generate shadows for Qt frameless
|
||||
@ -210,39 +210,6 @@ QtWindow.Window {
|
||||
anchors.margins: root.shadowMargin
|
||||
}
|
||||
|
||||
//
|
||||
// Handle for resizing the window
|
||||
// Note: this does not work on macOS, see the following article for more information
|
||||
// https://www.qt.io/blog/custom-window-decorations
|
||||
//
|
||||
DragHandler {
|
||||
id: resizeHandler
|
||||
target: null
|
||||
enabled: !Cpp_IsMac && Cpp_ThemeManager.customWindowDecorations
|
||||
grabPermissions: TapHandler.TakeOverForbidden
|
||||
onActiveChanged: {
|
||||
if (active) {
|
||||
const p = resizeHandler.centroid.position
|
||||
const b = root.handleSize
|
||||
let e = 0;
|
||||
|
||||
if (p.x < b)
|
||||
e |= Qt.LeftEdge
|
||||
|
||||
if (p.x >= width - b)
|
||||
e |= Qt.RightEdge
|
||||
|
||||
if (p.y < b)
|
||||
e |= Qt.TopEdge
|
||||
|
||||
if (p.y >= height - b)
|
||||
e |= Qt.BottomEdge
|
||||
|
||||
root.startSystemResize(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Global mouse area to set cursor shape while resizing
|
||||
//
|
||||
|
@ -20,8 +20,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@ -40,7 +40,7 @@ Item {
|
||||
(window.visibility !== Window.Maximized)
|
||||
|
||||
//
|
||||
// Right resize handle for macOS
|
||||
// Right resize handle
|
||||
//
|
||||
MouseArea {
|
||||
property bool dragging: false
|
||||
@ -54,7 +54,6 @@ Item {
|
||||
}
|
||||
|
||||
width: handleSize
|
||||
enabled: Cpp_IsMac
|
||||
onPressedChanged: dragging = pressed
|
||||
onPressed: lastMousePos = Qt.point(mouseX, mouseY)
|
||||
|
||||
@ -87,7 +86,6 @@ Item {
|
||||
}
|
||||
|
||||
width: handleSize
|
||||
enabled: Cpp_IsMac
|
||||
onPressedChanged: dragging = pressed
|
||||
onPressed: lastMousePos = Qt.point(mouseX, mouseY)
|
||||
|
||||
@ -131,7 +129,6 @@ Item {
|
||||
}
|
||||
|
||||
height: handleSize
|
||||
enabled: Cpp_IsMac
|
||||
onPressedChanged: dragging = pressed
|
||||
onPressed: lastMousePos = Qt.point(mouseX, mouseY)
|
||||
onMouseYChanged: {
|
||||
@ -235,7 +232,6 @@ Item {
|
||||
|
||||
width: handleSize
|
||||
height: handleSize
|
||||
enabled: Cpp_IsMac
|
||||
onPressedChanged: dragging = pressed
|
||||
onMouseXChanged: updateWindowPosition()
|
||||
onPressed: lastMousePos = Qt.point(mouseX, mouseY)
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
@ -176,34 +176,28 @@ Rectangle {
|
||||
}
|
||||
|
||||
//
|
||||
// Window drag handler
|
||||
// Window drag handler & maximize by double click
|
||||
//
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
enabled: Cpp_ThemeManager.customWindowDecorations
|
||||
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.CanTakeOverFromAnything
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
|
||||
onDoubleClicked: {
|
||||
if (root.maximizeEnabled)
|
||||
root.toggleMaximized()
|
||||
}
|
||||
|
||||
onPressedChanged: {
|
||||
if (pressed)
|
||||
window.startSystemMove()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Window maximize by double click
|
||||
//
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
enabled: Cpp_ThemeManager.customWindowDecorations
|
||||
onDoubleClicked: {
|
||||
if (root.maximizeEnabled)
|
||||
root.toggleMaximized()
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// macOS layout
|
||||
//
|
||||
|
@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.10
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
Widgets.Icon {
|
||||
|
@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.10
|
||||
|
||||
Image {
|
||||
id: root
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
import "../Dashboard" as DashboardItems
|
||||
|
@ -20,11 +20,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
import "SetupPanes" as SetupPanes
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../../Windows" as Windows
|
||||
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
Control {
|
||||
id: root
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
Control {
|
||||
id: root
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
Control {
|
||||
id: root
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../Widgets" as Widgets
|
||||
|
||||
@ -238,10 +238,10 @@ Control {
|
||||
height: parent.height
|
||||
Layout.fillWidth: true
|
||||
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.CanTakeOverFromAnything
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressedChanged: {
|
||||
if (pressed)
|
||||
window.startSystemMove()
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
MenuItem {
|
||||
id: root
|
||||
|
@ -20,8 +20,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
MenuBar {
|
||||
id: root
|
||||
@ -197,7 +197,7 @@ MenuBar {
|
||||
sequence: "f11"
|
||||
onTriggered: mainWindow.toggleFullscreen()
|
||||
text: mainWindow.isFullscreen ? qsTr("Exit full screen") :
|
||||
qsTr("Enter full screen")
|
||||
qsTr("Enter full screen")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.10
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
MenuBar {
|
||||
|
@ -20,8 +20,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -20,59 +20,59 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
DropArea {
|
||||
//
|
||||
// Show rectangle and set color based on file extension on drag enter
|
||||
//
|
||||
onEntered: {
|
||||
// Get file name & set color of rectangle accordingly
|
||||
if (drag.urls.length > 0) {
|
||||
var path = drag.urls[0].toString()
|
||||
if (path.endsWith(".json") || path.endsWith(".csv")) {
|
||||
drag.accept(Qt.LinkAction)
|
||||
dropRectangle.color = Qt.darker(palette.highlight, 1.4)
|
||||
}
|
||||
// Get file name & set color of rectangle accordingly
|
||||
if (drag.urls.length > 0) {
|
||||
var path = drag.urls[0].toString()
|
||||
if (path.endsWith(".json") || path.endsWith(".csv")) {
|
||||
drag.accept(Qt.LinkAction)
|
||||
dropRectangle.color = Qt.darker(palette.highlight, 1.4)
|
||||
}
|
||||
|
||||
// Invalid file name, show red rectangle
|
||||
else
|
||||
dropRectangle.color = Cpp_ThemeManager.alternativeHighlight
|
||||
// Invalid file name, show red rectangle
|
||||
else
|
||||
dropRectangle.color = Cpp_ThemeManager.alternativeHighlight
|
||||
|
||||
// Show drag&drop rectangle
|
||||
dropRectangle.opacity = 0.8
|
||||
}
|
||||
}
|
||||
// Show drag&drop rectangle
|
||||
dropRectangle.opacity = 0.8
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Open *.json & *.csv files on drag drop
|
||||
//
|
||||
onDropped: {
|
||||
// Hide rectangle
|
||||
dropRectangle.hide()
|
||||
// Hide rectangle
|
||||
dropRectangle.hide()
|
||||
|
||||
// Get dropped file URL and remove prefixed "file://"
|
||||
var path = drop.urls[0].toString()
|
||||
if (!Cpp_IsWin)
|
||||
path = path.replace(/^(file:\/{2})/,"");
|
||||
else
|
||||
path = path.replace(/^(file:\/{3})/,"");
|
||||
// Get dropped file URL and remove prefixed "file://"
|
||||
var path = drop.urls[0].toString()
|
||||
if (!Cpp_IsWin)
|
||||
path = path.replace(/^(file:\/{2})/,"");
|
||||
else
|
||||
path = path.replace(/^(file:\/{3})/,"");
|
||||
|
||||
// Unescape html codes like '%23' for '#'
|
||||
var cleanPath = decodeURIComponent(path);
|
||||
// Unescape html codes like '%23' for '#'
|
||||
var cleanPath = decodeURIComponent(path);
|
||||
|
||||
// Process JSON files
|
||||
if (cleanPath.endsWith(".json")) {
|
||||
Cpp_JSON_Generator.setOperationMode(0)
|
||||
Cpp_JSON_Generator.loadJsonMap(cleanPath)
|
||||
}
|
||||
// Process JSON files
|
||||
if (cleanPath.endsWith(".json")) {
|
||||
Cpp_JSON_Generator.setOperationMode(0)
|
||||
Cpp_JSON_Generator.loadJsonMap(cleanPath)
|
||||
}
|
||||
|
||||
// Process CSV files
|
||||
else if (cleanPath.endsWith(".csv"))
|
||||
Cpp_CSV_Player.openFile(cleanPath)
|
||||
}
|
||||
// Process CSV files
|
||||
else if (cleanPath.endsWith(".csv"))
|
||||
Cpp_CSV_Player.openFile(cleanPath)
|
||||
}
|
||||
|
||||
//
|
||||
// Hide drag & drop rectangle on drag exit
|
||||
|
@ -20,7 +20,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.10
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
@ -20,11 +20,11 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
import SerialStudio 1.0 as SerialStudio
|
||||
|
||||
Item {
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
Page {
|
||||
id: root
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../FramelessWindow" as FramelessWindow
|
||||
|
||||
@ -94,10 +94,10 @@ FramelessWindow.CustomWindow {
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.CanTakeOverFromAnything
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressedChanged: {
|
||||
if (pressed)
|
||||
root.startSystemMove()
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../FramelessWindow" as FramelessWindow
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "../FramelessWindow" as FramelessWindow
|
||||
|
||||
|
@ -20,12 +20,12 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
import "../FramelessWindow" as FramelessWindow
|
||||
|
||||
FramelessWindow.CustomWindow {
|
||||
@ -124,10 +124,10 @@ FramelessWindow.CustomWindow {
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.CanTakeOverFromAnything
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onPressedChanged: {
|
||||
if (pressed)
|
||||
root.startSystemMove()
|
||||
}
|
||||
}
|
||||
|
@ -20,12 +20,12 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../JsonEditor"
|
||||
import "../Widgets" as Widgets
|
||||
|
@ -20,12 +20,12 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../FramelessWindow" as FramelessWindow
|
||||
|
||||
@ -110,21 +110,6 @@ FramelessWindow.CustomWindow {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Window drag handler
|
||||
//
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
DragHandler {
|
||||
grabPermissions: TapHandler.TakeOverForbidden
|
||||
onActiveChanged: {
|
||||
if (active)
|
||||
root.startSystemMove()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Window controls
|
||||
//
|
||||
|
@ -20,12 +20,12 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Layouts 1.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import Qt.labs.settings 1.1
|
||||
import Qt.labs.settings 1.0
|
||||
|
||||
import "../Panes"
|
||||
import "../Windows"
|
||||
|
@ -20,9 +20,9 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Window 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Window 2.10
|
||||
import QtQuick.Controls 2.10
|
||||
|
||||
import "Windows" as Windows
|
||||
|
||||
|
@ -604,9 +604,7 @@ QString Widgets::Terminal::vt100Processing(const QString &data)
|
||||
//---------------------------------------------------------º-----------------------------------------
|
||||
|
||||
#define QTC_ASSERT(cond, action) \
|
||||
if (Q_LIKELY(cond)) \
|
||||
{ \
|
||||
} \
|
||||
if (Q_LIKELY(cond)) { } \
|
||||
else \
|
||||
{ \
|
||||
action; \
|
||||
@ -866,13 +864,13 @@ Widgets::AnsiEscapeCodeHandler::parseText(const FormattedText &input)
|
||||
{
|
||||
(code == RgbTextColor)
|
||||
? charFormat.setForeground(
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()))
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()))
|
||||
: charFormat.setBackground(
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()));
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()));
|
||||
setFormatScope(charFormat);
|
||||
}
|
||||
i += 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user