summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--basicsuite/about-b2qt/AboutBoot2Qt.qml92
-rw-r--r--basicsuite/about-b2qt/Box.qml18
-rw-r--r--basicsuite/about-b2qt/ColouredTitle.qml54
-rw-r--r--basicsuite/about-b2qt/ContentText.qml2
-rw-r--r--basicsuite/about-b2qt/HighlightText.qml53
-rw-r--r--basicsuite/about-b2qt/Title.qml4
-rw-r--r--basicsuite/about-b2qt/main.qml2
-rw-r--r--basicsuite/about-b2qt/particle.pngbin861 -> 0 bytes
-rw-r--r--basicsuite/about-b2qt/particle_star2.pngbin0 -> 1178 bytes
-rw-r--r--basicsuite/about-b2qt/preview_l.jpgbin104274 -> 35883 bytes
-rw-r--r--basicsuite/camera/preview_l.jpgbin89642 -> 81157 bytes
-rw-r--r--basicsuite/canvas3d-planets/preview_l.jpgbin166465 -> 50048 bytes
-rw-r--r--basicsuite/enterprise-charts/preview_l.jpgbin22529 -> 27257 bytes
-rw-r--r--basicsuite/enterprise-dashboard/preview_l.jpgbin41808 -> 33626 bytes
-rw-r--r--basicsuite/enterprise-gallery/exclude.txt1
-rw-r--r--basicsuite/enterprise-gallery/preview_l.jpgbin33757 -> 30332 bytes
-rw-r--r--basicsuite/enterprise-qtdatavis3d/preview_l.jpgbin70669 -> 101747 bytes
-rw-r--r--basicsuite/graphicaleffects/preview_l.jpgbin103356 -> 80965 bytes
-rw-r--r--basicsuite/launchersettings/SettingTitle.qml60
-rw-r--r--basicsuite/launchersettings/SettingsButtonStyle.qml68
-rw-r--r--basicsuite/launchersettings/SettingsCheckBoxStyle.qml61
-rw-r--r--basicsuite/launchersettings/SettingsGroupBoxStyle.qml81
-rw-r--r--basicsuite/launchersettings/SettingsRadioButtonStyle.qml66
-rw-r--r--basicsuite/launchersettings/Spacer.qml33
-rw-r--r--basicsuite/launchersettings/WifiGroupBox.qml131
-rw-r--r--basicsuite/launchersettings/WifiNetworkList.qml188
-rw-r--r--basicsuite/launchersettings/images/Display_icon.pngbin0 -> 1217 bytes
-rw-r--r--basicsuite/launchersettings/images/Keyboard_Thumb_default.pngbin0 -> 14171 bytes
-rw-r--r--basicsuite/launchersettings/images/Keyboard_Thumb_retro.pngbin0 -> 58203 bytes
-rw-r--r--basicsuite/launchersettings/images/Keyboard_icon.pngbin0 -> 1471 bytes
-rw-r--r--basicsuite/launchersettings/images/Network_icon.pngbin0 -> 2327 bytes
-rw-r--r--basicsuite/launchersettings/images/Power_icon.pngbin0 -> 2065 bytes
-rw-r--r--basicsuite/launchersettings/images/button_default.pngbin1406 -> 0 bytes
-rw-r--r--basicsuite/launchersettings/images/button_pressed.pngbin1694 -> 0 bytes
-rw-r--r--basicsuite/launchersettings/images/groupbox.pngbin485 -> 0 bytes
-rw-r--r--basicsuite/launchersettings/main.qml480
-rw-r--r--basicsuite/launchersettings/preview_l.jpgbin75961 -> 43184 bytes
-rw-r--r--basicsuite/mediaplayer/preview_l.jpgbin65835 -> 65701 bytes
-rw-r--r--basicsuite/qt5-cinematicdemo/preview_l.jpgbin111174 -> 78757 bytes
-rw-r--r--basicsuite/qt5-everywhere/preview_l.jpgbin96425 -> 96897 bytes
-rw-r--r--basicsuite/sensors/exclude.txt12
-rw-r--r--basicsuite/textinput/ScrollBar.qml46
-rw-r--r--basicsuite/textinput/TextArea.qml58
-rw-r--r--basicsuite/textinput/TextBase.qml72
-rw-r--r--basicsuite/textinput/TextField.qml57
-rw-r--r--basicsuite/textinput/main.qml258
-rw-r--r--basicsuite/textinput/preview_l.jpgbin63111 -> 62623 bytes
-rw-r--r--basicsuite/webengine/preview_l.jpgbin66408 -> 42323 bytes
-rw-r--r--doc/b2qt-demos.qdoc2
-rw-r--r--doc/b2qt-demos.qdocconf10
-rw-r--r--doc/html-offline.qdocconf9
-rw-r--r--videos/Qt_EnterpriseEmbedded_1080p.mp4bin23057072 -> 0 bytes
-rw-r--r--videos/big-buck-bunny_trailer.webmbin2165175 -> 0 bytes
-rw-r--r--videos/introducing_qt5.mp4bin21588882 -> 0 bytes
-rw-r--r--wayland/democompositor/democompositor.pro19
-rw-r--r--wayland/democompositor/democompositor.qrc10
-rw-r--r--wayland/democompositor/main.cpp61
-rw-r--r--wayland/democompositor/processlauncher.cpp62
-rw-r--r--wayland/democompositor/processlauncher.h52
-rw-r--r--wayland/democompositor/qml/Chrome.qml198
-rw-r--r--wayland/democompositor/qml/LaunchButton.qml46
-rw-r--r--wayland/democompositor/qml/MyButton.qml106
-rw-r--r--wayland/democompositor/qml/Screen.qml249
-rw-r--r--wayland/democompositor/qml/TimedButton.qml122
-rw-r--r--wayland/democompositor/qml/main.qml84
65 files changed, 1759 insertions, 1168 deletions
diff --git a/basicsuite/about-b2qt/AboutBoot2Qt.qml b/basicsuite/about-b2qt/AboutBoot2Qt.qml
index 7033bb7..8fb0615 100644
--- a/basicsuite/about-b2qt/AboutBoot2Qt.qml
+++ b/basicsuite/about-b2qt/AboutBoot2Qt.qml
@@ -48,16 +48,15 @@ Column {
spacing: engine.smallFontSize() * 2
- property color qtlightgreen: '#80c342'
- property color qtmediumgreen: '#328930'
- property color qtdarkgreen: '#006325'
- property color qtdarkblue: '#14148c'
- property color qtlightblue: '#14aaff'
- property color qtpurple: '#ae32a0'
- property color qtred: '#b40000'
-
- ColouredTitle {
- text: "MEET Qt FOR DEVICE CREATION"
+ property color grayStroke: '#929495'
+ property color grayText: '#585a5c'
+ property color grayBackground: '#d3d3d3'
+ property color greenStroke: '#80c342'
+ property color greenText: '#5caa15'
+ property color greenBackground: '#5caa15'
+
+ Title {
+ text: "Meet Qt for Device Creation"
}
ContentText {
@@ -78,8 +77,8 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
spacing: 10
- Box{ text: "Cross-Platform Qt Libraries"; width: parent.width; accentColor: qtlightgreen }
- Box{ text: "Value-Add Components"; width: parent.width; accentColor: qtlightgreen }
+ Box{ text: "Cross-Platform Qt Libraries"; width: parent.width; }
+ Box{ text: "Value-Add Components"; width: parent.width; }
Row {
id: row1
@@ -87,7 +86,7 @@ Column {
width: parent.width
Box{ text: "Complete\nDevelopment Environment\nwith Qt Creator IDE";
- width: (row1.width - row1.spacing) / 2; height: column1.height; accentColor: qtmediumgreen }
+ width: (row1.width - row1.spacing) / 2; height: column1.height; }
Column {
id: column1
@@ -95,14 +94,14 @@ Column {
spacing: row1.spacing
- Box{ text: "Boot to Qt\nSoftware Stack\nfor HW"; accentColor: qtdarkblue; height: b2.height * 3 }
- Box{ id: b2; text: "Build-Your-Own-Stack Tooling"; accentColor: qtdarkblue; }
+ Box{ text: "Boot to Qt\nSoftware Stack\nfor HW"; borderColor: root.grayStroke; backgroundColor: root.grayBackground; textColor: root.grayText; height: b2.height * 3 }
+ Box{ id: b2; text: "Build-Your-Own-Stack Tooling"; borderColor: root.grayStroke; backgroundColor: root.grayBackground; textColor: root.grayText; }
}
}
} // end overview picture
- ColouredTitle {
- text: "POWER OF CROSS-PLATFORM Qt"
+ Title {
+ text: "Power of Cross-Platform Qt"
}
ContentText {
@@ -115,8 +114,9 @@ Column {
natively to desktop and mobile OS targets as well.</p>'
}
- HighlightText {
+ Text {
text: "Velvet-Like Native UIs, HTML5 or Both!"
+ font.pixelSize: engine.fontSize()
}
ContentText {
@@ -128,12 +128,13 @@ Column {
of both worlds!</p>'
}
- ColouredTitle {
- text: "SHORTER TIME-TO-MARKET"
+ Title {
+ text: "Shorter Time-to-Market"
}
- HighlightText {
+ Text {
text: "Full Embedded Development Environment"
+ font.pixelSize: engine.fontSize()
}
ContentText {
@@ -147,8 +148,9 @@ Column {
}
- HighlightText {
+ Text {
text: "Boot to Qt Software Stack -\nEmbedded Prototyping Couldn't Get Any Simpler!"
+ font.pixelSize: engine.fontSize()
}
Row {
@@ -171,17 +173,18 @@ Column {
Column {
spacing: 5
width: ( parent.width - parent.spacing ) / 2
- Box { text: "Application"; accentColor: qtpurple }
- Box { text: "Qt Framework"; accentColor: qtlightgreen }
- Box { text: "Linux Baselayer"; accentColor: qtdarkblue }
- Box { text: "Embedded Hardware"; accentColor: qtdarkblue }
+ Box { text: "Application"; }
+ Box { text: "Qt Framework"; }
+ Box { text: "Linux Baselayer"; }
+ Box { text: "Embedded Hardware"; }
}
}
- HighlightText {
+ Text {
text: "Value-Add Components - No Need to Re-Invent the Wheel!"
+ font.pixelSize: engine.fontSize()
}
ContentText {
width: parent.width
@@ -201,21 +204,18 @@ Column {
spacing: 10
width: parent.width * 0.4
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
text: "Virtual Keyboard"
}
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
text: "Dynamic and Static Charting"
}
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
@@ -225,20 +225,17 @@ Column {
Column {
spacing: 10
width: parent.width * 0.4
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
text: "3D Data Visualization"
}
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
text: "Qt Quick Compiler"
}
- HighlightText {
- color: qtlightgreen
+ Text {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: engine.smallFontSize()
text: "Additional Tooling"
@@ -246,8 +243,8 @@ Column {
}
} // end of "grid" layout
- ColouredTitle {
- text: "TRUSTED TECHNOLOGY PARTNER"
+ Title {
+ text: "Trusted Technology Partner"
}
ContentText {
width: parent.width
@@ -261,8 +258,8 @@ Column {
to help you pass all obstacles and reach your markets faster with outstanding quality.</p>'
}
- ColouredTitle {
- text: "GETTING STARTED WITH DEVELOPMENT"
+ Title {
+ text: "Getting Started With Development"
}
ContentText {
width: parent.width
@@ -270,10 +267,11 @@ Column {
free evaluation version of Qt for Device Creation with the Boot to Qt images
for common developer boards from</p>'
}
- HighlightText {
- text: "http://www.qt.io"
- color: qtpurple
- font.bold: true
+ Text {
+ text: "Visit Qt.io"
+ width: parent.width
+ color: root.greenText
+ font.pixelSize: engine.titleFontSize()
horizontalAlignment: Text.AlignHCenter
}
ContentText {
diff --git a/basicsuite/about-b2qt/Box.qml b/basicsuite/about-b2qt/Box.qml
index d86e62e..6b90107 100644
--- a/basicsuite/about-b2qt/Box.qml
+++ b/basicsuite/about-b2qt/Box.qml
@@ -41,29 +41,27 @@
import QtQuick 2.0
Rectangle {
- id: root
+ id: box
width: parent.width
height: label.font.pixelSize * 3
- radius: 4
-
antialiasing: true
property alias text: label.text;
- property color accentColor: "palegreen"
+ property color borderColor: '#80c342'
+ property color backgroundColor: "transparent"
+ property color textColor: '#5caa15'
- gradient: Gradient {
- GradientStop { position: 0; color: root.accentColor; }
- GradientStop { position: 1; color: Qt.darker(Qt.darker(root.accentColor)); }
- }
+ color: backgroundColor
+ border.color: borderColor
+ border.width: 2
Text {
id: label
font.pixelSize: engine.smallFontSize()
- font.bold: true;
- color: "white"
+ color: textColor
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
}
diff --git a/basicsuite/about-b2qt/ColouredTitle.qml b/basicsuite/about-b2qt/ColouredTitle.qml
deleted file mode 100644
index f243393..0000000
--- a/basicsuite/about-b2qt/ColouredTitle.qml
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Text {
-
- property color qtlightgreen: '#80c342'
-
- width: parent.width
- horizontalAlignment: Text.AlignHCenter
- wrapMode: Text.WordWrap
-
- font.pixelSize: engine.titleFontSize()
- font.bold: true
- color: qtlightgreen
-}
diff --git a/basicsuite/about-b2qt/ContentText.qml b/basicsuite/about-b2qt/ContentText.qml
index 70065d3..23815b5 100644
--- a/basicsuite/about-b2qt/ContentText.qml
+++ b/basicsuite/about-b2qt/ContentText.qml
@@ -41,7 +41,7 @@
import QtQuick 2.0
Text {
- color: "white"
+ color: "black"
font.pixelSize: engine.smallFontSize()
textFormat: Text.RichText
wrapMode: Text.WordWrap
diff --git a/basicsuite/about-b2qt/HighlightText.qml b/basicsuite/about-b2qt/HighlightText.qml
deleted file mode 100644
index c8620dc..0000000
--- a/basicsuite/about-b2qt/HighlightText.qml
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Text {
-
- property color qtlightblue: '#14aaff'
-
- width: parent.width
- horizontalAlignment: Text.AlignLeft
- wrapMode: Text.WordWrap
- font.pixelSize: engine.fontSize()
- font.bold: true
- color: qtlightblue
-}
diff --git a/basicsuite/about-b2qt/Title.qml b/basicsuite/about-b2qt/Title.qml
index 4a63f69..2f34331 100644
--- a/basicsuite/about-b2qt/Title.qml
+++ b/basicsuite/about-b2qt/Title.qml
@@ -42,7 +42,5 @@ import QtQuick 2.0
Text {
font.pixelSize: engine.titleFontSize()
- font.italic: true
- color: "white"
- anchors.horizontalCenter: parent.horizontalCenter
+ color: "black"
}
diff --git a/basicsuite/about-b2qt/main.qml b/basicsuite/about-b2qt/main.qml
index 8f5296b..e0d86ac 100644
--- a/basicsuite/about-b2qt/main.qml
+++ b/basicsuite/about-b2qt/main.qml
@@ -117,7 +117,7 @@ Item {
ImageParticle {
id: imageParticle
- source: "particle.png"
+ source: "particle_star2.png"
color: "#80c342"
alpha: 0
colorVariation: 0.3
diff --git a/basicsuite/about-b2qt/particle.png b/basicsuite/about-b2qt/particle.png
deleted file mode 100644
index 5c83896..0000000
--- a/basicsuite/about-b2qt/particle.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/about-b2qt/particle_star2.png b/basicsuite/about-b2qt/particle_star2.png
new file mode 100644
index 0000000..bb88c18
--- /dev/null
+++ b/basicsuite/about-b2qt/particle_star2.png
Binary files differ
diff --git a/basicsuite/about-b2qt/preview_l.jpg b/basicsuite/about-b2qt/preview_l.jpg
index 3b2c482..8542f86 100644
--- a/basicsuite/about-b2qt/preview_l.jpg
+++ b/basicsuite/about-b2qt/preview_l.jpg
Binary files differ
diff --git a/basicsuite/camera/preview_l.jpg b/basicsuite/camera/preview_l.jpg
index f949eb7..4f31922 100644
--- a/basicsuite/camera/preview_l.jpg
+++ b/basicsuite/camera/preview_l.jpg
Binary files differ
diff --git a/basicsuite/canvas3d-planets/preview_l.jpg b/basicsuite/canvas3d-planets/preview_l.jpg
index e7222d6..50ccd88 100644
--- a/basicsuite/canvas3d-planets/preview_l.jpg
+++ b/basicsuite/canvas3d-planets/preview_l.jpg
Binary files differ
diff --git a/basicsuite/enterprise-charts/preview_l.jpg b/basicsuite/enterprise-charts/preview_l.jpg
index 00deaf4..131cc8f 100644
--- a/basicsuite/enterprise-charts/preview_l.jpg
+++ b/basicsuite/enterprise-charts/preview_l.jpg
Binary files differ
diff --git a/basicsuite/enterprise-dashboard/preview_l.jpg b/basicsuite/enterprise-dashboard/preview_l.jpg
index c9785a0..7f1550f 100644
--- a/basicsuite/enterprise-dashboard/preview_l.jpg
+++ b/basicsuite/enterprise-dashboard/preview_l.jpg
Binary files differ
diff --git a/basicsuite/enterprise-gallery/exclude.txt b/basicsuite/enterprise-gallery/exclude.txt
new file mode 100644
index 0000000..0702cb5
--- /dev/null
+++ b/basicsuite/enterprise-gallery/exclude.txt
@@ -0,0 +1 @@
+all
diff --git a/basicsuite/enterprise-gallery/preview_l.jpg b/basicsuite/enterprise-gallery/preview_l.jpg
index d208b31..b151b30 100644
--- a/basicsuite/enterprise-gallery/preview_l.jpg
+++ b/basicsuite/enterprise-gallery/preview_l.jpg
Binary files differ
diff --git a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg
index 9220269..290546f 100644
--- a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg
+++ b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg
Binary files differ
diff --git a/basicsuite/graphicaleffects/preview_l.jpg b/basicsuite/graphicaleffects/preview_l.jpg
index 7f75ed5..fde1964 100644
--- a/basicsuite/graphicaleffects/preview_l.jpg
+++ b/basicsuite/graphicaleffects/preview_l.jpg
Binary files differ
diff --git a/basicsuite/launchersettings/SettingTitle.qml b/basicsuite/launchersettings/SettingTitle.qml
new file mode 100644
index 0000000..31becd3
--- /dev/null
+++ b/basicsuite/launchersettings/SettingTitle.qml
@@ -0,0 +1,60 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Enterprise Embedded.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.4
+
+RowLayout {
+ id: root
+ property alias iconSource: icon.source
+ property alias titleText: title.text
+ property alias smallText: additionalText.text
+
+ Layout.bottomMargin: engine.mm(6)
+ spacing: 0
+
+ Image {
+ id: icon
+ Layout.preferredWidth: mainLayout.width * .05
+ Layout.preferredHeight: width * sourceSize.width/sourceSize.height
+ source: ""
+ fillMode: Image.PreserveAspectFit
+ anchors.bottom: parent.bottom
+ }
+
+ Label {
+ id: title
+ text: "Display"
+ font.pixelSize: engine.titleFontSize() *.8
+ anchors.bottom: parent.bottom
+ Layout.leftMargin: mainLayout.defaultMargin * .5
+ Layout.preferredWidth: mainLayout.width * .5
+ }
+
+ Label {
+ id: additionalText
+ text: ""
+ font.pixelSize: engine.smallFontSize()
+ anchors.bottom: parent.bottom
+ Layout.fillWidth: true
+ elide: Label.ElideRight
+ }
+}
diff --git a/basicsuite/launchersettings/SettingsButtonStyle.qml b/basicsuite/launchersettings/SettingsButtonStyle.qml
deleted file mode 100644
index bebae48..0000000
--- a/basicsuite/launchersettings/SettingsButtonStyle.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-
-ButtonStyle {
- panel: Item {
- implicitHeight: engine.smallFontSize() * 2.4
- implicitWidth: engine.centimeter() * 5
-
- BorderImage {
- anchors.fill: parent
- antialiasing: true
- border.bottom: 8
- border.top: 8
- border.left: 8
- border.right: 8
- anchors.margins: control.pressed ? -4 : 0
- source: control.pressed ? "images/button_pressed.png" : "images/button_default.png"
- Text {
- text: control.text
- anchors.centerIn: parent
- color: "white"
- font.pixelSize: engine.smallFontSize()
- renderType: Text.NativeRendering
- }
- }
- }
-}
diff --git a/basicsuite/launchersettings/SettingsCheckBoxStyle.qml b/basicsuite/launchersettings/SettingsCheckBoxStyle.qml
deleted file mode 100644
index c7c55d0..0000000
--- a/basicsuite/launchersettings/SettingsCheckBoxStyle.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-
-CheckBoxStyle {
- indicator: Rectangle {
- implicitWidth: engine.mm(7)
- implicitHeight: engine.mm(7)
- radius: 10
- border.color: "black"
- border.width: 2
- Rectangle {
- visible: control.checked
- color: "#45b7e2"
- border.color: "darkblue"
- radius: 10
- anchors.margins: engine.mm(1)
- anchors.fill: parent
- }
- }
-}
diff --git a/basicsuite/launchersettings/SettingsGroupBoxStyle.qml b/basicsuite/launchersettings/SettingsGroupBoxStyle.qml
deleted file mode 100644
index c5c71b5..0000000
--- a/basicsuite/launchersettings/SettingsGroupBoxStyle.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-import QtQuick.Controls.Private 1.0
-
-// GroupBoxStyle currently is not available as a public API,
-// so we write our own by importing private Styles API.
-Style {
- // The margin from the content item to the groupbox
- padding {
- top: (control.title.length > 0 ? TextSingleton.implicitHeight : 0) + 30
- left: 8
- right: 8
- bottom: 8
- }
- // The groupbox frame
- property Component panel: Item {
- anchors.fill: parent
-
- Text {
- id: label
- anchors.bottom: borderImage.top
- anchors.margins: 2
- text: control.title
- font.pixelSize: engine.smallFontSize() * 1.1
- color: "white"
- renderType: Text.NativeRendering
- }
-
- BorderImage {
- id: borderImage
- anchors.fill: parent
- anchors.topMargin: padding.top - 7
- source: "images/groupbox.png"
- border.left: 4
- border.right: 4
- border.top: 4
- border.bottom: 4
- }
- }
-}
diff --git a/basicsuite/launchersettings/SettingsRadioButtonStyle.qml b/basicsuite/launchersettings/SettingsRadioButtonStyle.qml
deleted file mode 100644
index 9959ea1..0000000
--- a/basicsuite/launchersettings/SettingsRadioButtonStyle.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://qt.digia.com/
-**
-** This file is part of the examples of the Qt Enterprise Embedded.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.2
-import QtQuick.Controls 1.2
-import QtQuick.Controls.Styles 1.2
-
-RadioButtonStyle {
- indicator: Rectangle {
- implicitWidth: engine.mm(7)
- implicitHeight: engine.mm(7)
- radius: 40
- border.color: "black"
- border.width: 2
- Rectangle {
- anchors.fill: parent
- visible: control.checked
- color: "#45b7e2"
- border.color: "darkblue"
- radius: 40
- anchors.margins: engine.mm(1)
- }
- }
- label: Label {
- text: control.text
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
- }
-}
diff --git a/basicsuite/launchersettings/Spacer.qml b/basicsuite/launchersettings/Spacer.qml
new file mode 100644
index 0000000..be4c09d
--- /dev/null
+++ b/basicsuite/launchersettings/Spacer.qml
@@ -0,0 +1,33 @@
+/******************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Enterprise Embedded.
+**
+** $QT_BEGIN_LICENSE:COMM$
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** $QT_END_LICENSE$
+**
+******************************************************************************/
+import QtQuick 2.2
+
+Item {
+ width: parent.width
+ height: 50
+
+ Rectangle {
+ width: parent.width
+ height: 3
+ color: "#eeeeee"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+}
diff --git a/basicsuite/launchersettings/WifiGroupBox.qml b/basicsuite/launchersettings/WifiGroupBox.qml
index 5eab3f2..d2b93af 100644
--- a/basicsuite/launchersettings/WifiGroupBox.qml
+++ b/basicsuite/launchersettings/WifiGroupBox.qml
@@ -1,109 +1,110 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.2
-import QtQuick.Controls 1.2
+import QtQuick.Controls 1.4
import QtQuick.Layouts 1.0
import B2Qt.Wifi 1.0
ColumnLayout {
- anchors.fill: parent
-
- Binding {
- target: WifiManager
- property: "scanning"
- value: networkList.visible
- }
RowLayout {
- Button {
+ Label {
+ text: qsTr("Wi-Fi")
+ font.pixelSize: engine.titleFontSize() *.8
+ Layout.leftMargin: 0
+ Layout.preferredWidth: mainLayout.column1Width
+ }
+
+ Switch {
id: wifiOnOffButton
- Layout.fillWidth: true
- style: SettingsButtonStyle {}
- onClicked: {
- if (WifiManager.backendState === WifiManager.Running) {
+ Layout.bottomMargin: 0
+
+ onCheckedChanged: {
+ if (checked && WifiManager.backendState === WifiManager.NotRunning) {
+ WifiManager.start()
+ return
+ }
+
+ if (!checked && WifiManager.backendState === WifiManager.Running) {
if (networkList.visible)
networkList.visible = false
WifiManager.stop()
- } else if (WifiManager.backendState === WifiManager.NotRunning) {
- WifiManager.start()
}
}
function updateButtonText(backendState)
{
- if (backendState === WifiManager.Initializing)
- wifiOnOffButton.text = "Initializing..."
- if (backendState === WifiManager.Terminating)
- wifiOnOffButton.text = "Terminating..."
- if (backendState === WifiManager.NotRunning)
- wifiOnOffButton.text = "Switch On"
- if (backendState === WifiManager.Running)
- wifiOnOffButton.text = "Switch Off"
+ if (backendState === WifiManager.Initializing) {
+ wifiOnOffText.text = qsTr("Initializing...")
+ } else if (backendState === WifiManager.Terminating) {
+ wifiOnOffText.text = qsTr("Terminating...")
+ } else if (backendState === WifiManager.NotRunning) {
+ wifiOnOffText.text = qsTr("Off")
+ wifiOnOffButton.checked = false
+ } else if (backendState === WifiManager.Running) {
+ wifiOnOffText.text = qsTr("On")
+ wifiOnOffButton.checked = true
+ }
}
Component.onCompleted: updateButtonText(WifiManager.backendState)
+
Connections {
target: WifiManager
onBackendStateChanged: wifiOnOffButton.updateButtonText(backendState)
}
}
- Button {
- id: listNetworksButton
- Layout.fillWidth: true
- style: SettingsButtonStyle {}
- visible: WifiManager.backendState === WifiManager.Running
- text: networkList.visible ? "Hide wifi networks"
- : "List available wifi networks"
- onClicked: networkList.visible = !networkList.visible
+ Text {
+ id: wifiOnOffText
+ text: qsTr("%1%").arg(Math.round(brightnessSlider.value / brightnessSlider.maximumValue * 100))
+ font.pixelSize: engine.smallFontSize()
+ Layout.leftMargin: mainLayout.width * .05
}
}
+ Binding {
+ target: WifiManager
+ property: "scanning"
+ value: networkList.visible
+ }
+
+ Button {
+ id: listNetworksButton
+ Layout.leftMargin: mainLayout.column1Width
+ Layout.topMargin: engine.mm(6)
+ Layout.preferredWidth: mainLayout.width * .4
+ visible: WifiManager.backendState === WifiManager.Running
+ text: networkList.visible ? qsTr("Hide Wi-Fi networks")
+ : qsTr("List available Wi-Fi networks")
+ onClicked: networkList.visible = !networkList.visible
+ }
+
WifiNetworkList {
id: networkList
implicitHeight: engine.centimeter(7)
Layout.fillWidth: true
+ Layout.leftMargin: mainLayout.column1Width
visible: false
clip: true
}
}
-
diff --git a/basicsuite/launchersettings/WifiNetworkList.qml b/basicsuite/launchersettings/WifiNetworkList.qml
index b30d230..806b021 100644
--- a/basicsuite/launchersettings/WifiNetworkList.qml
+++ b/basicsuite/launchersettings/WifiNetworkList.qml
@@ -1,112 +1,98 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.2
-import QtQuick.Controls 1.2
+import QtQuick.Controls 1.4
import B2Qt.Wifi 1.0
Item {
+
Component {
id: listDelegate
+
Rectangle {
id: networkBox
property bool expanded: false
property bool isCurrentNetwork: WifiManager.currentSSID === ssid
property bool connected: isCurrentNetwork && WifiManager.networkState === WifiManager.Connected
property int notExpandedHeight: ssidLabel.height + bssidLabel.height + engine.mm(4)
- property int expandedHeight: notExpandedHeight + passwordInput.height + connectionButton.height + engine.mm(7)
- property int connectedExpandedHeight: notExpandedHeight + connectionButton.height + engine.mm(4)
- height: expanded ? (connected ? connectedExpandedHeight : expandedHeight) : notExpandedHeight
+ property int expandedHeight: notExpandedHeight + connectionButton.height + engine.mm(8)
+ height: expanded ? expandedHeight : notExpandedHeight
width: parent.width
clip: true
- color: "#5C5C5C"
- border.color: "black"
- border.width: 1
Component.onDestruction: if (expanded) networkView.expandedNetworkBox = null
onHeightChanged: if (expanded) networkView.positionViewAtIndex(index, ListView.Contain)
Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } }
- Text {
- id: ssidLabel
+ CheckBox {
+ id: connectedCheckBox
anchors.top: parent.top
anchors.left: parent.left
anchors.margins: engine.mm(1)
anchors.leftMargin: engine.mm(2)
+ checked: connected
+ }
+
+ Label {
+ id: ssidLabel
+ anchors.top: parent.top
+ anchors.left: connectedCheckBox.right
+ anchors.margins: engine.mm(1)
+ anchors.leftMargin: engine.mm(2)
font.pixelSize: engine.smallFontSize()
font.bold: true
- color: "#E6E6E6"
+ color: "black"
text: isCurrentNetwork ? ssid + networkView.networkStateText : ssid
Component.onCompleted: networkView.setNetworkStateText(WifiManager.networkState)
}
- Text {
+ Label {
id: bssidLabel
anchors.top: ssidLabel.bottom
- anchors.left: parent.left
+ anchors.left: connectedCheckBox.right
anchors.margins: engine.mm(1)
- anchors.leftMargin: engine.mm(6)
+ anchors.leftMargin: engine.mm(2)
text: bssid
- color: "#E6E6E6"
- font.pixelSize: ssidLabel.font.pixelSize * 0.8
+ color: "black"
+ font.pixelSize: ssidLabel.font.pixelSize
}
- Text {
+ Label {
id: flagsLabel
anchors.top: bssidLabel.top
- anchors.left: bssidLabel.right
- anchors.leftMargin: engine.mm(7)
- text: (supportsWPA2 ? "WPA2 " : "")
- + (supportsWPA ? "WPA " : "")
- + (supportsWEP ? "WEP " : "")
- + (supportsWPS ? "WPS " : "");
- color: "#E6E6E6"
- font.pixelSize: ssidLabel.font.pixelSize * 0.8
- font.italic: true
+ anchors.right: parent.right
+ text: (supportsWPA2 ? qsTr("WPA2 ") : "")
+ + (supportsWPA ? qsTr("WPA ") : "")
+ + (supportsWEP ? qsTr("WEP ") : "")
+ + (supportsWPS ? qsTr("WPS ") : "");
+ color: "black"
+ font.pixelSize: ssidLabel.font.pixelSize
+ font.bold: true
}
ProgressBar {
id: signalStrengthBar
height: engine.mm(3)
- width: networkBox.width * 0.5
+ width: networkBox.width * 0.25
anchors.margins: engine.mm(2)
anchors.right: parent.right
anchors.top: parent.top
@@ -136,25 +122,24 @@ Item {
TextField {
id: passwordInput
anchors.top: flagsLabel.bottom
- anchors.topMargin: engine.mm(3)
- anchors.horizontalCenter: parent.horizontalCenter
- width: parent.width * 0.36
- height: font.pixelSize * 2.4
- placeholderText: "Enter Password"
+ anchors.topMargin: engine.mm(6)
+ anchors.right: connectionButton.left
+ anchors.rightMargin: mainLayout.defaultMargin * .25
+ anchors.left: ssidLabel.left
+ placeholderText: qsTr("Enter Password")
visible: !connected
- font.pixelSize: engine.smallFontSize() * 0.8
+ font.pixelSize: engine.smallFontSize()
echoMode: TextInput.Password
inputMethodHints: Qt.ImhNoPredictiveText
}
Button {
id: connectionButton
- style: SettingsButtonStyle {}
- y: connected ? passwordInput.y
- : passwordInput.y + passwordInput.height + engine.mm(2)
- width: passwordInput.width
- anchors.horizontalCenter: parent.horizontalCenter
- text: connected ? "Disconnect" : "Connect"
+ width: parent.width * .4
+ anchors.right: parent.right
+ anchors.top: flagsLabel.bottom
+ anchors.topMargin: engine.mm(6)
+ text: connected ? qsTr("Disconnect") : qsTr("Connect")
onClicked: {
if (connected) {
WifiManager.disconnect()
@@ -179,34 +164,43 @@ Item {
id: config
}
- ListView {
- id: networkView
+ GroupBox {
anchors.fill: parent
- model: WifiManager.networks
- delegate: listDelegate
-
- property string networkStateText: ""
- property QtObject expandedNetworkBox: null
- property bool hasExpandedNetworkBox: expandedNetworkBox !== null
-
- function setNetworkStateText(networkState) {
- if (networkState === WifiManager.ObtainingIPAddress)
- networkView.networkStateText = " (obtaining ip..)"
- else if (networkState === WifiManager.DhcpRequestFailed)
- networkView.networkStateText = " (dhcp request failed)"
- else if (networkState === WifiManager.Connected)
- networkView.networkStateText = " (connected)"
- else if (networkState === WifiManager.Authenticating)
- networkView.networkStateText = " (authenticating..)"
- else if (networkState === WifiManager.HandshakeFailed)
- networkView.networkStateText = " (wrong password)"
- else if (networkState === WifiManager.Disconnected)
- networkView.networkStateText = ""
- }
- Connections {
- target: WifiManager
- onNetworkStateChanged: networkView.setNetworkStateText(networkState)
+ Item {
+ anchors.fill: parent
+ clip: true
+
+ ListView {
+ id: networkView
+ anchors.fill: parent
+ model: WifiManager.networks
+ delegate: listDelegate
+
+ property string networkStateText: ""
+ property QtObject expandedNetworkBox: null
+ property bool hasExpandedNetworkBox: expandedNetworkBox !== null
+
+ function setNetworkStateText(networkState) {
+ if (networkState === WifiManager.ObtainingIPAddress)
+ networkView.networkStateText = qsTr(" (obtaining ip..)")
+ else if (networkState === WifiManager.DhcpRequestFailed)
+ networkView.networkStateText = qsTr(" (dhcp request failed)")
+ else if (networkState === WifiManager.Connected)
+ networkView.networkStateText = qsTr(" (connected)")
+ else if (networkState === WifiManager.Authenticating)
+ networkView.networkStateText = qsTr(" (authenticating..)")
+ else if (networkState === WifiManager.HandshakeFailed)
+ networkView.networkStateText = qsTr(" (wrong password)")
+ else if (networkState === WifiManager.Disconnected)
+ networkView.networkStateText = ""
+ }
+
+ Connections {
+ target: WifiManager
+ onNetworkStateChanged: networkView.setNetworkStateText(networkState)
+ }
+ }
}
}
}
diff --git a/basicsuite/launchersettings/images/Display_icon.png b/basicsuite/launchersettings/images/Display_icon.png
new file mode 100644
index 0000000..1f6f80b
--- /dev/null
+++ b/basicsuite/launchersettings/images/Display_icon.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/Keyboard_Thumb_default.png b/basicsuite/launchersettings/images/Keyboard_Thumb_default.png
new file mode 100644
index 0000000..c251028
--- /dev/null
+++ b/basicsuite/launchersettings/images/Keyboard_Thumb_default.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/Keyboard_Thumb_retro.png b/basicsuite/launchersettings/images/Keyboard_Thumb_retro.png
new file mode 100644
index 0000000..bfbdc9b
--- /dev/null
+++ b/basicsuite/launchersettings/images/Keyboard_Thumb_retro.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/Keyboard_icon.png b/basicsuite/launchersettings/images/Keyboard_icon.png
new file mode 100644
index 0000000..1384a42
--- /dev/null
+++ b/basicsuite/launchersettings/images/Keyboard_icon.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/Network_icon.png b/basicsuite/launchersettings/images/Network_icon.png
new file mode 100644
index 0000000..808b632
--- /dev/null
+++ b/basicsuite/launchersettings/images/Network_icon.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/Power_icon.png b/basicsuite/launchersettings/images/Power_icon.png
new file mode 100644
index 0000000..1a038c0
--- /dev/null
+++ b/basicsuite/launchersettings/images/Power_icon.png
Binary files differ
diff --git a/basicsuite/launchersettings/images/button_default.png b/basicsuite/launchersettings/images/button_default.png
deleted file mode 100644
index 6d6cfd9..0000000
--- a/basicsuite/launchersettings/images/button_default.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/launchersettings/images/button_pressed.png b/basicsuite/launchersettings/images/button_pressed.png
deleted file mode 100644
index ab78b6e..0000000
--- a/basicsuite/launchersettings/images/button_pressed.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/launchersettings/images/groupbox.png b/basicsuite/launchersettings/images/groupbox.png
deleted file mode 100644
index 98585ee..0000000
--- a/basicsuite/launchersettings/images/groupbox.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/launchersettings/main.qml b/basicsuite/launchersettings/main.qml
index f609724..dc63487 100644
--- a/basicsuite/launchersettings/main.qml
+++ b/basicsuite/launchersettings/main.qml
@@ -1,60 +1,38 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.2
-import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
-import QtQuick.Controls.Styles 1.2
-import QtQuick.Enterprise.VirtualKeyboard.Settings 1.2
+import QtQuick.Controls 1.4
+import QtQuick.Enterprise.VirtualKeyboard.Settings 2.0
import B2Qt.Wifi 1.0
import B2Qt.Utils 1.0
Rectangle {
anchors.fill: parent
- color: "#212126"
-
+ color: "white"
Flickable {
anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: engine.mm(5)
+ anchors.horizontalCenter: parent.horizontalCenter
height: parent.height
width: parent.width
contentHeight: mainLayout.height + engine.centimeter(2)
@@ -66,273 +44,291 @@ Rectangle {
id: mainLayout
width: Math.min(engine.screenWidth(), engine.screenHeight())
height: implicitHeight
- anchors.left: parent.left
- anchors.right: parent.right
- spacing: engine.mm(4)
+ anchors.horizontalCenter: parent.horizontalCenter
- GroupBox {
- id: powerOptions
- title: "Power"
- Layout.fillWidth: true
- style: SettingsGroupBoxStyle {}
- implicitWidth: 0
- height: implicitHeight
+ property int defaultMargin: width * .1
+ property int column1Width: width * .25
- RowLayout {
- anchors.fill: parent
+ Label {
+ text: qsTr("Demo Launcher Settings")
+ font.pixelSize: engine.titleFontSize()
+ Layout.topMargin: height
+ Layout.bottomMargin: height
+ }
- Button {
- style: SettingsButtonStyle {}
- text: "Shut Down"
- Layout.fillWidth: true
- onClicked: B2QtDevice.powerOff();
- }
+ SettingTitle {
+ titleText: qsTr("Network")
+ iconSource: "images/Network_icon.png"
+ smallText: qsTr("Current hostname: %1").arg(B2QtDevice.hostname)
+ }
- Button {
- style: SettingsButtonStyle {}
- text: "Reboot"
- Layout.fillWidth: true
- onClicked: B2QtDevice.reboot();
+ GridLayout {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ Layout.bottomMargin: engine.mm(3)
+ columns: 3
+ rows: 3
+
+ Label {
+ text: qsTr("Change Hostname:")
+ font.pixelSize: engine.smallFontSize()
+ Layout.preferredWidth: mainLayout.column1Width
+ Layout.leftMargin: mainLayout.defaultMargin
+ }
+
+ TextField {
+ id: hostname
+ text: B2QtDevice.hostname
+ placeholderText: qsTr("Enter hostname")
+ font.pixelSize: engine.smallFontSize()
+ inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhNoPredictiveText
+ Layout.fillWidth: true
+ Layout.rightMargin: mainLayout.defaultMargin * .25
+ onAccepted: {
+ Qt.inputMethod.commit()
+ Qt.inputMethod.hide()
+ B2QtDevice.setHostname(hostname.text)
+ hostname.focus = false
}
}
- }
- GroupBox {
- id: displayOptions
- title: "Display"
- style: SettingsGroupBoxStyle {}
- Layout.fillWidth: true
- implicitWidth: 0
- height: implicitHeight
+ Button {
+ id: hostnameButton
- GridLayout {
- rows: 2
- flow: GridLayout.TopToBottom
- anchors.fill: parent
-
- Label {
- text: "Brightness: "
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
- }
+ anchors.right: parent.right
+ text: qsTr("Change")
- Label {
- text: "Display FPS: "
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
- }
+ onClicked: hostname.accepted()
+ }
- Slider {
- id: brightnessSlider
- maximumValue: 255
- minimumValue: 1
- Layout.fillWidth: true
- value: B2QtDevice.displayBrightness
- style: SliderStyle {
- handle: Rectangle {
- anchors.centerIn: parent
- color: "white"
- border.color: "gray"
- border.width: 2
- width: engine.mm(6)
- height: engine.mm(6)
- radius: 20
- }
- }
- }
+ Label {
+ text: qsTr("IP Address:")
+ Layout.preferredWidth: parent.width * .2
+ font.pixelSize: engine.smallFontSize()
+ Layout.leftMargin: mainLayout.defaultMargin
+ }
- CheckBox {
- style: SettingsCheckBoxStyle {}
- checked: engine.fpsEnabled
- onCheckedChanged: engine.fpsEnabled = checked
- }
+ Label {
+ text: B2QtDevice.ipAddress
+ font.pixelSize: engine.smallFontSize()
}
}
- GroupBox {
- id: vkbOptions
- title: "Virtual Keyboard Style"
- style: SettingsGroupBoxStyle {}
+ ColumnLayout {
+ id: wifiOptions
Layout.fillWidth: true
+ Layout.leftMargin: mainLayout.defaultMargin
+ visible: false
- function updateVKBStyle(styleRadioButton) {
- VirtualKeyboardSettings.styleName = styleRadioButton.text.toLowerCase()
+ function createWifiGroupBox()
+ {
+ if (WifiDevice.wifiSupported()) {
+ var component = Qt.createComponent("WifiGroupBox.qml")
+ var wifi = component.createObject(wifiOptions)
+ if (wifi) {
+ wifiOptions.visible = true
+ } else {
+ print("Error creating WifiGroupBox")
+ }
+ }
}
+ Component.onCompleted: wifiOptions.createWifiGroupBox()
+ }
+
+ Spacer {}
+
+ SettingTitle {
+ id: vKBSettingsTitle
+ titleText: qsTr("Virtual Keyboard Style")
+ iconSource: "images/Keyboard_icon.png"
+ smallText: qsTr("Preview:")
+ }
+
+ RowLayout {
+ id: row1
+ spacing: 0
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ GridLayout {
+ id: vKBStyleSelection
+ anchors.left: parent.left
+ anchors.right: parent.horizontalCenter
+ columns: 2
+ rows: 2
+
+ function updateVKBStyle(style) {
+ VirtualKeyboardSettings.styleName = style.toLowerCase()
+ }
- Row {
- spacing: engine.mm(6)
ExclusiveGroup { id: vkbStyleGroup }
+
+ Label {
+ text: qsTr("Default")
+ Layout.preferredWidth: mainLayout.column1Width
+ font.pixelSize: engine.smallFontSize()
+ Layout.leftMargin: mainLayout.defaultMargin
+ }
+
RadioButton {
id: defaultStyle
- style: SettingsRadioButtonStyle {}
- text: "Default"
exclusiveGroup: vkbStyleGroup
- onClicked: vkbOptions.updateVKBStyle(defaultStyle)
+ checked: VirtualKeyboardSettings.styleName === "default"
+ onClicked: vKBStyleSelection.updateVKBStyle("default")
+ }
+
+ Label {
+ text: qsTr("Retro")
+ Layout.preferredWidth: mainLayout.column1Width
+ font.pixelSize: engine.smallFontSize()
+ Layout.leftMargin: mainLayout.defaultMargin
}
+
RadioButton {
id: retroStyle
- style: SettingsRadioButtonStyle {}
- text: "Retro"
exclusiveGroup: vkbStyleGroup
- onClicked: vkbOptions.updateVKBStyle(retroStyle)
+ checked: VirtualKeyboardSettings.styleName === "retro"
+ onClicked: vKBStyleSelection.updateVKBStyle("retro")
}
}
+ Image {
+ id: vKBPreviewThumbnail
+ anchors.right: parent.right
+ Layout.preferredWidth: mainLayout.width *.4
+ Layout.leftMargin: mainLayout.defaultMargin
+ source: VirtualKeyboardSettings.styleName === "retro" ?
+ "images/Keyboard_Thumb_retro.png" :
+ "images/Keyboard_Thumb_default.png"
+
+ fillMode: Image.PreserveAspectFit
+ }
+ }
+
+ Spacer {}
+
+ SettingTitle {
+ titleText: qsTr("Display")
+ iconSource: "images/Display_icon.png"
+ }
+
+ GridLayout {
+ id: gridLayout
+ anchors.left: parent.left
+ anchors.right: parent.right
+ columns: 3
+ rows: 3
+
+ Label {
+ text: qsTr("Brightness:")
+ font.pixelSize: engine.smallFontSize()
+ Layout.preferredWidth: mainLayout.column1Width
+ Layout.leftMargin: mainLayout.defaultMargin
+ }
+
+ Slider {
+ id: brightnessSlider
+ maximumValue: 255
+ minimumValue: 1
+ Layout.preferredWidth: physicalSizeSlider.width
+ value: B2QtDevice.displayBrightness
+ }
+
Binding {
target: B2QtDevice
property: "displayBrightness"
value: brightnessSlider.value
}
- Component.onCompleted: {
- if (VirtualKeyboardSettings.styleName == "default")
- defaultStyle.checked = true
- if (VirtualKeyboardSettings.styleName == "retro")
- retroStyle.checked = true
+ Text {
+ text: qsTr("%1%").arg(Math.round(brightnessSlider.value / brightnessSlider.maximumValue * 100))
+ font.pixelSize: engine.smallFontSize()
+ Layout.leftMargin: mainLayout.width * .05
+ }
+
+ Label {
+ text: qsTr("Display FPS:")
+ font.pixelSize: engine.smallFontSize()
+ Layout.preferredWidth: parent.width * .2
+ Layout.leftMargin: mainLayout.defaultMargin
+ }
+
+ CheckBox {
+ checked: engine.fpsEnabled
+ onCheckedChanged: engine.fpsEnabled = checked
}
}
- GroupBox {
- id: networkOptions
- title: "Network"
- style: SettingsGroupBoxStyle {}
- Layout.fillWidth: true
- implicitWidth: 0
- height: implicitHeight
+ Rectangle {
+ anchors.left: parent.left
+ anchors.leftMargin: mainLayout.defaultMargin
+ anchors.right: parent.right
+ height: advancedDisplaySettings.height + engine.mm(6)
+ color: "#efefef"
GridLayout {
- rows: 2
+ id: advancedDisplaySettings
+ anchors { left: parent.left; top:parent.top; right: parent.right }
+ anchors.margins: engine.mm(3)
columns: 3
- flow: GridLayout.TopToBottom
- anchors.fill: parent
+ rows: 3
Label {
- text: "Hostname: "
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
+ text: qsTr("Physical Screen Size:")
+ font.pixelSize: engine.smallFontSize()
+ wrapMode: Text.WordWrap
+ Layout.preferredWidth: mainLayout.width * .25 - advancedDisplaySettings.anchors.margins
}
- Label {
- text: "IP address: "
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
+ Slider {
+ id: physicalSizeSlider
+ maximumValue: 60
+ minimumValue: 4
+ Layout.fillWidth: true
+ value: B2QtDevice.physicalScreenSizeInch
}
- TextField {
- id: hostname
- text: B2QtDevice.hostname
- placeholderText: "Enter hostname"
+ Text {
+ text: qsTr("%1 inches").arg(Math.round(physicalSizeSlider.value))
font.pixelSize: engine.smallFontSize()
- inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhNoPredictiveText
- Layout.fillWidth: true
- Layout.preferredHeight: font.pixelSize * 2.4
- onAccepted: {
- Qt.inputMethod.commit()
- Qt.inputMethod.hide()
- B2QtDevice.setHostname(hostname.text)
- hostname.focus = false
- }
+ Layout.preferredWidth: mainLayout.width * .1
+ Layout.leftMargin: mainLayout.width * .05
}
Label {
- text: B2QtDevice.ipAddress
+ text: qsTr("Override\n(needs restart):")
font.pixelSize: engine.smallFontSize()
- color: "white"
- Layout.columnSpan: 2
+ wrapMode: Text.WordWrap
+ Layout.preferredWidth: mainLayout.width * .25 - advancedDisplaySettings.anchors.margins
}
- Button {
- id: hostnameButton
- style: SettingsButtonStyle {}
- text: "Change hostname"
- onClicked: hostname.accepted()
+ CheckBox {
+ checked: B2QtDevice.physicalScreenSizeOverride
+ onCheckedChanged: B2QtDevice.physicalScreenSizeOverride = checked
}
}
}
- GroupBox {
- id: dpiOptions
- title: "Physical screen size"
- style: SettingsGroupBoxStyle {}
- Layout.fillWidth: true
- implicitWidth: 0
- height: implicitHeight
-
- GridLayout {
- rows: 2
- columns: 2
- anchors.fill: parent
-
- RowLayout {
- Layout.columnSpan: 2
- Label {
- text: "Override (needs restart)"
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
- }
- CheckBox {
- id: physSizeCb
- style: SettingsCheckBoxStyle {}
- checked: B2QtDevice.physicalScreenSizeOverride
- onCheckedChanged: B2QtDevice.physicalScreenSizeOverride = checked
- }
- }
+ Spacer {}
- Label {
- visible: physSizeCb.checked
- text: "Size: " + physSizeSlider.value + " inches"
- font.pixelSize: engine.smallFontSize() * 0.8
- color: "white"
- }
-
- Slider {
- visible: physSizeCb.checked
- id: physSizeSlider
- maximumValue: 60
- minimumValue: 4
- Layout.fillWidth: true
- value: B2QtDevice.physicalScreenSizeInch
- stepSize: 1
- style: SliderStyle {
- handle: Rectangle {
- anchors.centerIn: parent
- color: "white"
- border.color: "gray"
- border.width: 2
- width: engine.mm(6)
- height: engine.mm(6)
- radius: 20
- }
- }
- }
- Binding {
- target: B2QtDevice
- property: "physicalScreenSizeInch"
- value: physSizeSlider.value
- }
- }
+ SettingTitle {
+ titleText: qsTr("Power")
+ iconSource: "images/Power_icon.png"
}
- GroupBox {
- id: wifiOptions
- title: "Wifi"
- style: SettingsGroupBoxStyle {}
- Layout.fillWidth: true
- visible: false
+ RowLayout {
+ spacing: mainLayout.defaultMargin *.25
- function createWifiGroupBox()
- {
- if (WifiDevice.wifiSupported()) {
- var component = Qt.createComponent("WifiGroupBox.qml")
- var wifi = component.createObject(wifiOptions.contentItem)
- if (wifi)
- wifiOptions.visible = true
- else
- print("Error creating WifiGroupBox")
- }
+ Button {
+ text: qsTr("Shut Down")
+ Layout.leftMargin: mainLayout.defaultMargin
+ onClicked: B2QtDevice.powerOff();
}
- Component.onCompleted: wifiOptions.createWifiGroupBox()
+ Button {
+ text: qsTr("Reboot")
+ onClicked: B2QtDevice.reboot();
+ }
}
}
}
diff --git a/basicsuite/launchersettings/preview_l.jpg b/basicsuite/launchersettings/preview_l.jpg
index f4d34b5..4cdb7c5 100644
--- a/basicsuite/launchersettings/preview_l.jpg
+++ b/basicsuite/launchersettings/preview_l.jpg
Binary files differ
diff --git a/basicsuite/mediaplayer/preview_l.jpg b/basicsuite/mediaplayer/preview_l.jpg
index c526f33..f6cc262 100644
--- a/basicsuite/mediaplayer/preview_l.jpg
+++ b/basicsuite/mediaplayer/preview_l.jpg
Binary files differ
diff --git a/basicsuite/qt5-cinematicdemo/preview_l.jpg b/basicsuite/qt5-cinematicdemo/preview_l.jpg
index 99ce26a..9665216 100644
--- a/basicsuite/qt5-cinematicdemo/preview_l.jpg
+++ b/basicsuite/qt5-cinematicdemo/preview_l.jpg
Binary files differ
diff --git a/basicsuite/qt5-everywhere/preview_l.jpg b/basicsuite/qt5-everywhere/preview_l.jpg
index 055e887..8351f1f 100644
--- a/basicsuite/qt5-everywhere/preview_l.jpg
+++ b/basicsuite/qt5-everywhere/preview_l.jpg
Binary files differ
diff --git a/basicsuite/sensors/exclude.txt b/basicsuite/sensors/exclude.txt
index 97ac9e7..3945bcb 100644
--- a/basicsuite/sensors/exclude.txt
+++ b/basicsuite/sensors/exclude.txt
@@ -1,10 +1,2 @@
-android-beaglebone
-android-iMX6
-linux-iMX6
-linux-raspberrypi
-linux-beagleboard
-linux-beaglebone
-linux-imx6qsabresd
-linux-apalis-imx6
-linux-tibidabo
-linux-colibri-vf
+all
+
diff --git a/basicsuite/textinput/ScrollBar.qml b/basicsuite/textinput/ScrollBar.qml
index 1f2f90e..daabc0b 100644
--- a/basicsuite/textinput/ScrollBar.qml
+++ b/basicsuite/textinput/ScrollBar.qml
@@ -1,43 +1,23 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.0
diff --git a/basicsuite/textinput/TextArea.qml b/basicsuite/textinput/TextArea.qml
index c54273e..b876196 100644
--- a/basicsuite/textinput/TextArea.qml
+++ b/basicsuite/textinput/TextArea.qml
@@ -1,46 +1,26 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded..
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.0
-import QtQuick.Enterprise.VirtualKeyboard 1.1
+import QtQuick.Enterprise.VirtualKeyboard 2.0
TextBase {
id: textArea
@@ -59,9 +39,13 @@ TextBase {
x: 8
y: (index+1)*editor.cursorRectangle.height+6
height: 1; width: textArea.width-24
- color: Qt.rgba(1.0, 1.0, 1.0, 0.5)
+ color: "#D6D6D6"
}
}
+ MouseArea {
+ anchors.fill: parent
+ onClicked: textEdit.forceActiveFocus()
+ }
TextEdit {
id: textEdit
@@ -71,14 +55,14 @@ TextBase {
y: 6
focus: true
- color: "#EEEEEE"
+ color: "#2B2C2E"
wrapMode: TextEdit.Wrap
cursorVisible: activeFocus
height: Math.max(implicitHeight, 60)
font.pixelSize: textArea.fontPixelSize
selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5)
selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8)
+ selectByMouse: true
anchors { left: parent.left; right: parent.right; margins: 12 }
- onActiveFocusChanged: if (!activeFocus) deselect()
}
}
diff --git a/basicsuite/textinput/TextBase.qml b/basicsuite/textinput/TextBase.qml
index 68dc8d7..3c85490 100644
--- a/basicsuite/textinput/TextBase.qml
+++ b/basicsuite/textinput/TextBase.qml
@@ -1,46 +1,26 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.0
-import QtQuick.Enterprise.VirtualKeyboard 1.1
+import QtQuick.Enterprise.VirtualKeyboard 2.0
FocusScope {
id: textBase
@@ -52,7 +32,6 @@ FocusScope {
property int enterKeyAction: EnterKeyAction.None
property string enterKeyText
property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || editor.text.length > 0 || editor.inputMethodComposing
- property alias mouseParent: mouseArea.parent
implicitHeight: editor.height + 12
@@ -67,34 +46,19 @@ FocusScope {
// background
radius: 5.0
anchors.fill: parent
- color: Qt.rgba(1.0, 1.0, 1.0, 0.2)
- border { width: editor.activeFocus ? 2 : 0; color: "#CCCCCC" }
+ color: "#FFFFFF"
+ border { width: 1; color: editor.activeFocus ? "#5CAA15" : "#BDBEBF" }
}
Text {
id: previewText
y: 8
- color: "#CCCCCC"
+ clip: true
+ color: "#a0a1a2"
visible: previewTextActive
text: textBase.previewText
font.pixelSize: 28
anchors { left: parent.left; right: parent.right; margins: 12 }
}
- MouseArea {
- id: mouseArea
-
- z: 1
- parent: textBase
- anchors.fill: parent
- onClicked: {
- if (editor.inputMethodComposing)
- Qt.inputMethod.commit()
- var positionInEditor = mapToItem(editor, mouseX, mouseY)
- var cursorPosition = editor.positionAt(positionInEditor.x, positionInEditor.y)
- editor.cursorPosition = cursorPosition
- editor.forceActiveFocus()
- Qt.inputMethod.show()
- }
- }
}
diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml
index f09d851..65998c5 100644
--- a/basicsuite/textinput/TextField.qml
+++ b/basicsuite/textinput/TextField.qml
@@ -1,46 +1,26 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.0
-import QtQuick.Enterprise.VirtualKeyboard 1.1
+import QtQuick.Enterprise.VirtualKeyboard 2.0
TextBase {
id: textField
@@ -55,7 +35,6 @@ TextBase {
property int passwordMaskDelay: 1000
editor: textInput
- mouseParent: flickable
Flickable {
id: flickable
@@ -78,14 +57,14 @@ TextBase {
y: 6
focus: true
- color: "#EEEEEE"
+ color: "#2B2C2E"
cursorVisible: activeFocus
passwordCharacter: "\u2022"
font.pixelSize: textField.fontPixelSize
- selectionColor: Qt.rgba(1.0, 1.0, 1.0, 0.5)
- selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8)
+ selectionColor: Qt.rgba(0.0, 0.0, 0.0, 0.15)
+ selectedTextColor: color
+ selectByMouse: true
width: Math.max(flickable.width, implicitWidth)-2
- onActiveFocusChanged: if (!activeFocus) deselect()
Binding {
target: textInput
diff --git a/basicsuite/textinput/main.qml b/basicsuite/textinput/main.qml
index 77855e4..b2a8364 100644
--- a/basicsuite/textinput/main.qml
+++ b/basicsuite/textinput/main.qml
@@ -1,148 +1,136 @@
-/****************************************************************************
+/******************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: For any questions to Digia, please use the contact form at
-** http://www.qt.io
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
-** This file is part of the examples of the Qt Enterprise Embedded.
+** This file is part of the Qt Enterprise Embedded.
**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
+** $QT_BEGIN_LICENSE:COMM$
**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** $QT_END_LICENSE$
**
-****************************************************************************/
+******************************************************************************/
import QtQuick 2.0
-import QtQuick.Enterprise.VirtualKeyboard 1.1
-
-Flickable {
- id: flickable
-
- property real scrollMarginVertical: 20
-
- anchors.fill: parent
- contentWidth: content.width
- contentHeight: content.height
- interactive: contentHeight > height
- flickableDirection: Flickable.VerticalFlick
- children: ScrollBar {}
-
- MouseArea {
- id: content
-
- width: flickable.width
- height: textEditors.height + 24
-
- onClicked: focus = true
-
- Column {
- id: textEditors
- spacing: 15
- x: 12; y: 12
- width: parent.width - 26
-
- Text {
- color: "#EEEEEE"
- text: "Tap fields to enter text"
- anchors.horizontalCenter: parent.horizontalCenter
- font.pixelSize: 22
- }
- TextField {
- width: parent.width
- previewText: "One line field"
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: passwordField.focus = true
- }
- TextField {
- id: passwordField
-
- width: parent.width
- echoMode: TextInput.Password
- previewText: "Password field"
- inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: upperCaseField.focus = true
- }
- TextField {
- id: upperCaseField
-
- width: parent.width
- previewText: "Upper case field"
- inputMethodHints: Qt.ImhUppercaseOnly
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: lowerCaseField.focus = true
- }
- TextField {
- id: lowerCaseField
-
- width: parent.width
- previewText: "Lower case field"
- inputMethodHints: Qt.ImhLowercaseOnly
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: phoneNumberField.focus = true
- }
- TextField {
- id: phoneNumberField
-
- validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ }
- width: parent.width
- previewText: "Phone number field"
- inputMethodHints: Qt.ImhDialableCharactersOnly
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: formattedNumberField.focus = true
- }
- TextField {
- id: formattedNumberField
-
- width: parent.width
- previewText: "Formatted number field"
- inputMethodHints: Qt.ImhFormattedNumbersOnly
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: digitsField.focus = true
- }
- TextField {
- id: digitsField
-
- width: parent.width
- previewText: "Digits only field"
- inputMethodHints: Qt.ImhDigitsOnly
- enterKeyAction: EnterKeyAction.Next
- onEnterKeyClicked: textArea.focus = true
- }
- TextArea {
- id: textArea
-
- width: parent.width
- previewText: "Multiple lines field"
- height: Math.max(206, implicitHeight)
+import QtQuick.Window 2.2
+import QtQuick.Enterprise.VirtualKeyboard 2.0
+import QtQuick.Enterprise.VirtualKeyboard.Settings 2.0
+
+Rectangle {
+ width: 1280
+ height: 720
+ color: "#F6F6F6"
+
+ Flickable {
+ id: flickable
+
+ property real scrollMarginVertical: 20
+
+ anchors.fill: parent
+ contentWidth: content.width
+ contentHeight: content.height
+ flickableDirection: Flickable.VerticalFlick
+ children: ScrollBar {}
+
+ MouseArea {
+ id: content
+
+ width: flickable.width
+ height: textEditors.height + 24
+
+ onClicked: focus = true
+
+ Column {
+ id: textEditors
+ spacing: 15
+ x: 12; y: 12
+ width: parent.width - 26
+
+ Text {
+ color: "#565758"
+ text: "Tap fields to enter text"
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pixelSize: 22
+ }
+ TextField {
+ width: parent.width
+ previewText: "One line field"
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: passwordField.focus = true
+ }
+ TextField {
+ id: passwordField
+
+ width: parent.width
+ echoMode: TextInput.Password
+ previewText: "Password field"
+ inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhPreferLowercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: upperCaseField.focus = true
+ }
+ TextField {
+ id: upperCaseField
+
+ width: parent.width
+ previewText: "Upper case field"
+ inputMethodHints: Qt.ImhUppercaseOnly
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: lowerCaseField.focus = true
+ }
+ TextField {
+ id: lowerCaseField
+
+ width: parent.width
+ previewText: "Lower case field"
+ inputMethodHints: Qt.ImhLowercaseOnly
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: phoneNumberField.focus = true
+ }
+ TextField {
+ id: phoneNumberField
+
+ validator: RegExpValidator { regExp: /^[0-9\+\-\#\*\ ]{6,}$/ }
+ width: parent.width
+ previewText: "Phone number field"
+ inputMethodHints: Qt.ImhDialableCharactersOnly
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: formattedNumberField.focus = true
+ }
+ TextField {
+ id: formattedNumberField
+
+ width: parent.width
+ previewText: "Formatted number field"
+ inputMethodHints: Qt.ImhFormattedNumbersOnly
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: digitsField.focus = true
+ }
+ TextField {
+ id: digitsField
+
+ width: parent.width
+ previewText: "Digits only field"
+ inputMethodHints: Qt.ImhDigitsOnly
+ enterKeyAction: EnterKeyAction.Next
+ onEnterKeyClicked: textArea.focus = true
+ }
+ TextArea {
+ id: textArea
+
+ width: parent.width
+ previewText: "Multiple lines field"
+ height: Math.max(206, implicitHeight)
+ }
}
}
}
}
+
diff --git a/basicsuite/textinput/preview_l.jpg b/basicsuite/textinput/preview_l.jpg
index d0d0833..8d308cf 100644
--- a/basicsuite/textinput/preview_l.jpg
+++ b/basicsuite/textinput/preview_l.jpg
Binary files differ
diff --git a/basicsuite/webengine/preview_l.jpg b/basicsuite/webengine/preview_l.jpg
index 9474ed3..0be221a 100644
--- a/basicsuite/webengine/preview_l.jpg
+++ b/basicsuite/webengine/preview_l.jpg
Binary files differ
diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc
index 0bf772d..84309d6 100644
--- a/doc/b2qt-demos.qdoc
+++ b/doc/b2qt-demos.qdoc
@@ -19,7 +19,7 @@
/*!
\page index.html
- \title Qt 5.5 for Device Creation Examples and Demos
+ \title Qt 5.6 for Device Creation Examples and Demos
\SDK has a number of examples and demos. These are included in the
\B2Q images, available in the launcher that is run by default at
diff --git a/doc/b2qt-demos.qdocconf b/doc/b2qt-demos.qdocconf
index 9b42787..dde8219 100644
--- a/doc/b2qt-demos.qdocconf
+++ b/doc/b2qt-demos.qdocconf
@@ -5,8 +5,8 @@ outputencoding = UTF-8
sourceencoding = UTF-8
project = QtforDeviceCreationDemos
-description = Qt 5.5 for Device Creation Examples and Demos
-version = 5.5.1
+description = Qt 5.6 for Device Creation Examples and Demos
+version = 5.6.0
sourcedirs = .
imagedirs += images
@@ -21,9 +21,9 @@ exampledirs = ../basicsuite
qhp.projects = QtforDeviceCreationDemos
qhp.QtforDeviceCreationDemos.file = b2qt-demos.qhp
-qhp.QtforDeviceCreationDemos.namespace = com.digia.b2qt-demos.551
+qhp.QtforDeviceCreationDemos.namespace = com.digia.b2qt-demos.560
qhp.QtforDeviceCreationDemos.virtualFolder = b2qt-demos
-qhp.QtforDeviceCreationDemos.indexTitle = Qt 5.5 for Device Creation Examples and Demos
+qhp.QtforDeviceCreationDemos.indexTitle = Qt 5.6 for Device Creation Examples and Demos
qhp.QtforDeviceCreationDemos.indexRoot =
qhp.QtforDeviceCreationDemos.subprojects = demos
@@ -35,4 +35,4 @@ manifestmeta.b2qt.names = "QtforDeviceCreationDemos/*"
macro.B2Q = "Boot to Qt"
macro.SDK = "Qt for Device Creation"
-navigation.landingpage = "Qt 5.5 for Device Creation Examples and Demos"
+navigation.landingpage = "Qt 5.6 for Device Creation Examples and Demos"
diff --git a/doc/html-offline.qdocconf b/doc/html-offline.qdocconf
index 1488996..e490c1b 100644
--- a/doc/html-offline.qdocconf
+++ b/doc/html-offline.qdocconf
@@ -10,16 +10,15 @@ HTML.footer = \
"</div> \n" \
"<div class=\"footer\">\n" \
" <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2014 Digia Plc and/or its\n" \
- " subsidiaries.</p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2016 The Qt Company.</p>\n" \
" <p>\n" \
" Licensees holding valid Qt Commercial licenses may use this document in\n" \
" accordance with the Qt Commercial License Agreement provided with the\n" \
" Software or, alternatively, in accordance with the terms contained in a\n" \
- " written agreement between you and Digia.<\p>\n" \
+ " written agreement between you and The Qt Company.<\p>\n" \
" <p>\n" \
- " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
+ " Qt and respective logos are trademarks of The Qt Company \n" \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
+ " href=\"http://www.qt.io/terms-conditions/#section-3\">Privacy Policy</a></p>\n" \
"</div>\n"
diff --git a/videos/Qt_EnterpriseEmbedded_1080p.mp4 b/videos/Qt_EnterpriseEmbedded_1080p.mp4
deleted file mode 100644
index 993eb5c..0000000
--- a/videos/Qt_EnterpriseEmbedded_1080p.mp4
+++ /dev/null
Binary files differ
diff --git a/videos/big-buck-bunny_trailer.webm b/videos/big-buck-bunny_trailer.webm
deleted file mode 100644
index 6a17395..0000000
--- a/videos/big-buck-bunny_trailer.webm
+++ /dev/null
Binary files differ
diff --git a/videos/introducing_qt5.mp4 b/videos/introducing_qt5.mp4
deleted file mode 100644
index c7cc2da..0000000
--- a/videos/introducing_qt5.mp4
+++ /dev/null
Binary files differ
diff --git a/wayland/democompositor/democompositor.pro b/wayland/democompositor/democompositor.pro
new file mode 100644
index 0000000..f3e31de
--- /dev/null
+++ b/wayland/democompositor/democompositor.pro
@@ -0,0 +1,19 @@
+QT += gui qml
+
+SOURCES += \
+ main.cpp \
+ processlauncher.cpp
+
+OTHER_FILES = \
+ qml/main.qml \
+ qml/Screen.qml \
+ qml/Chrome.qml \
+ qml/LaunchButton.qml \
+ qml/MyButton.qml \
+ qml/TimedButton.qml
+
+RESOURCES += democompositor.qrc
+
+HEADERS += \
+ processlauncher.h
+
diff --git a/wayland/democompositor/democompositor.qrc b/wayland/democompositor/democompositor.qrc
new file mode 100644
index 0000000..0e924a9
--- /dev/null
+++ b/wayland/democompositor/democompositor.qrc
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/main.qml</file>
+ <file>qml/Screen.qml</file>
+ <file>qml/Chrome.qml</file>
+ <file>qml/MyButton.qml</file>
+ <file>qml/LaunchButton.qml</file>
+ <file>qml/TimedButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/wayland/democompositor/main.cpp b/wayland/democompositor/main.cpp
new file mode 100644
index 0000000..f7a0810
--- /dev/null
+++ b/wayland/democompositor/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QUrl>
+#include <QtCore/QDebug>
+
+#include <QtGui/QGuiApplication>
+#include <QtQml/qqml.h>
+#include <QtQml/QQmlApplicationEngine>
+#include "processlauncher.h"
+
+static void registerTypes()
+{
+ qmlRegisterType<WaylandProcessLauncher>("com.theqtcompany.wlprocesslauncher", 1, 0, "ProcessLauncher");
+}
+
+
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ qputenv("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1");
+ registerTypes();
+ QQmlApplicationEngine appEngine(QUrl("qrc:///qml/main.qml"));
+
+ return app.exec();
+}
diff --git a/wayland/democompositor/processlauncher.cpp b/wayland/democompositor/processlauncher.cpp
new file mode 100644
index 0000000..48db12c
--- /dev/null
+++ b/wayland/democompositor/processlauncher.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "processlauncher.h"
+
+#include <QProcess>
+
+WaylandProcessLauncher::WaylandProcessLauncher(QObject *parent)
+ : QObject(parent)
+{
+}
+
+WaylandProcessLauncher::~WaylandProcessLauncher()
+{
+}
+
+void WaylandProcessLauncher::launch(const QString &program)
+{
+ QProcess *process = new QProcess(this);
+ connect(process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
+ process, &QProcess::deleteLater);
+ connect(process, &QProcess::errorOccurred, &QProcess::deleteLater);
+
+ QStringList arguments;
+ arguments << "-platform" << "wayland";
+ process->start(program, arguments);
+
+}
+
diff --git a/wayland/democompositor/processlauncher.h b/wayland/democompositor/processlauncher.h
new file mode 100644
index 0000000..506ee0d
--- /dev/null
+++ b/wayland/democompositor/processlauncher.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PROCESSLAUNCHER_H
+#define PROCESSLAUNCHER_H
+
+#include <QObject>
+
+class WaylandProcessLauncher : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit WaylandProcessLauncher(QObject *parent = 0);
+ ~WaylandProcessLauncher();
+ Q_INVOKABLE void launch(const QString &program);
+};
+
+#endif // PROCESSLAUNCHER_H
diff --git a/wayland/democompositor/qml/Chrome.qml b/wayland/democompositor/qml/Chrome.qml
new file mode 100644
index 0000000..9a7132c
--- /dev/null
+++ b/wayland/democompositor/qml/Chrome.qml
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtWayland.Compositor 1.0
+import QtGraphicalEffects 1.0
+
+Rectangle {
+ border.width: 1
+ border.color: "#102080"
+ color: "#1337af"
+ id: rootChrome
+ property alias surface: surfaceItem.surface
+ property alias valid: surfaceItem.valid
+ property alias explicitlyHidden: surfaceItem.explicitlyHidden
+ property alias shellSurface: surfaceItem.shellSurface
+
+ property alias destroyAnimation : destroyAnimationImpl
+
+ property int marginWidth : 5
+ property int titlebarHeight : 25
+
+ Item {
+ anchors.margins: 1
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: titlebarHeight
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(0, height)
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "steelblue" }
+ GradientStop { position: 1.0; color: "#1337af" }
+ }
+ }
+ }
+
+ function requestSize(w, h) {
+ surfaceItem.requestSize(Qt.size(w - 2 * marginWidth, h - titlebarHeight - marginWidth))
+ }
+
+ function toggleVisible() {
+ surfaceItem.explicitlyHidden = ! surfaceItem.explicitlyHidden
+ defaultOutput.relayout()
+ }
+
+ Behavior on x {
+ NumberAnimation { duration: 300 }
+ }
+ Behavior on y {
+ NumberAnimation { duration: 300 }
+ }
+ Behavior on width {
+ NumberAnimation { duration: 300 }
+ }
+ Behavior on height {
+ NumberAnimation { duration: 300 }
+ }
+
+ SequentialAnimation {
+ id: destroyAnimationImpl
+ ParallelAnimation {
+ NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 }
+ NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 }
+ }
+ NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 }
+ ScriptAction { script: { rootChrome.destroy(); } }
+ }
+
+ transform: [
+ Scale {
+ id:scaleTransform
+ origin.x: rootChrome.width / 2
+ origin.y: rootChrome.height / 2
+
+ }
+ ]
+
+
+ WaylandQuickItem {
+ id: surfaceItem
+
+ anchors.fill: parent
+ anchors.margins: marginWidth
+ anchors.topMargin: titlebarHeight
+
+ property bool dead: false
+ property bool valid: false
+ property bool explicitlyHidden: false
+ property var shellSurface: ShellSurface {
+ }
+
+
+ sizeFollowsSurface: false
+
+ onSurfaceDestroyed: {
+ view.bufferLock = true;
+ x = 0
+ y = 0
+ rootChrome.destroyAnimation.start();
+ valid = false
+ dead = true
+ }
+
+ onValidChanged: comp.defaultOutput.relayout()
+
+ function requestSize(size) {
+ //console.log("requesting size: " + size)
+ shellSurface.sendConfigure(size, ShellSurface.DefaultEdge)
+ }
+
+ onExplicitlyHiddenChanged: {
+ state = explicitlyHidden ? "HIDDEN" : "SHOWN"
+ }
+
+ state: "SHOWN"
+
+ states: [
+ State {
+ name: "SHOWN"
+ PropertyChanges {
+ target: rootChrome
+ visible: true
+ }
+ },
+ State {
+ name: "HIDDEN"
+ PropertyChanges {
+ target: rootChrome
+ x: 0
+ y: 0
+ width: 0
+ height: 0
+ //visible: false
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "SHOWN"
+ to: "HIDDEN"
+ SequentialAnimation {
+
+ PauseAnimation {duration: 300}
+
+ PropertyAction {target: rootChrome; property: "visible"; value: false}
+ ScriptAction {script: rootChrome.requestSize(0,0)}
+ }
+ }
+ ]
+
+ Connections {
+ target: surface
+ onSizeChanged: {
+ valid = !surfaceItem.dead && !surface.cursorSurface && surface.size.width > 0 && surface.size.height > 0
+ //console.log(shellSurface.title + " surface size: " + surface.size + " curs: " + surface.cursorSurface + " valid: " + valid)
+ }
+ }
+
+ }
+
+}
diff --git a/wayland/democompositor/qml/LaunchButton.qml b/wayland/democompositor/qml/LaunchButton.qml
new file mode 100644
index 0000000..a5b1fbc
--- /dev/null
+++ b/wayland/democompositor/qml/LaunchButton.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+MyButton {
+ property string executable
+ text.text: "Uninitialized"
+ text.elide: Text.ElideRight
+ text.maximumLineCount: 1
+
+ onTriggered: launcher.launch(executable)
+}
diff --git a/wayland/democompositor/qml/MyButton.qml b/wayland/democompositor/qml/MyButton.qml
new file mode 100644
index 0000000..c0ac2bb
--- /dev/null
+++ b/wayland/democompositor/qml/MyButton.qml
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Item {
+ //property alias color: rect.color
+ property alias text: buttonText
+ signal triggered()
+ signal alternateTrigger()
+ signal slideTrigger()
+ property bool enableAlternate: false
+ property bool enableSlide: false
+ property bool longPressed: false
+
+ property color buttonColor: "lightgray"
+ Rectangle {
+ id: rect
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ radius: 10
+ color: (enableSlide && mouser.drag.active) ? "#df3f1f" : mouser.containsPress ? (longPressed ? "#3faf1f" : "steelblue") : buttonColor
+
+ Text {
+ anchors.margins: 10
+ id: buttonText
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.right: parent.right
+ text: "[Uninitialized]"
+ }
+ }
+
+ MouseArea {
+ id: mouser
+ anchors.fill: parent
+
+ onPressed: {
+ if (enableSlide) {
+ rect.anchors.left = undefined
+ rect.anchors.right = undefined
+ }
+ }
+
+ onPressAndHold: if (enableAlternate) parent.longPressed = true
+ onReleased: {
+ if (enableSlide && drag.active) {
+ //console.log("drag end: " + rect.x + " w: " + rect.width)
+ if (rect.x > rect.width || rect.x < -rect.width*3/4)
+ parent.slideTrigger()
+ } else if (containsMouse) {
+ //console.log("clicked " + mouse.wasHeld + " alt " + enableAlternate)
+ if (mouse.wasHeld && enableAlternate)
+ parent.alternateTrigger()
+ else
+ parent.triggered()
+ }
+
+ rect.anchors.left = parent.left
+ rect.anchors.right = parent.right
+ parent.longPressed = false
+ }
+
+ drag.target: rect
+ drag.threshold: 5
+ drag.axis: Drag.XAxis
+ //drag.maximumX: 0
+ drag.minimumX: 0
+ }
+}
diff --git a/wayland/democompositor/qml/Screen.qml b/wayland/democompositor/qml/Screen.qml
new file mode 100644
index 0000000..9ab3557
--- /dev/null
+++ b/wayland/democompositor/qml/Screen.qml
@@ -0,0 +1,249 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Window 2.2
+import QtWayland.Compositor 1.0
+
+import com.theqtcompany.wlprocesslauncher 1.0
+
+
+WaylandOutput {
+ id: output
+ property alias surfaceArea: background
+ property var windowList: [ ]
+ property int hiddenWindowCount
+
+ window: Window {
+ id: screen
+
+ //flags: Qt.FramelessWindowHint
+
+ property QtObject output
+
+ width: 1024
+ height: 760
+ visible: true
+
+ ProcessLauncher {
+ id: launcher
+ }
+
+ Rectangle {
+ id: sidebar
+
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+
+ property int sidebarWidth : 150
+
+ width: sidebarWidth
+
+ color: "#6f6d75"
+
+ Column {
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ z: 1
+ padding: 5
+ spacing: 5
+ Repeater {
+ model: windowList
+ MyButton {
+ id: winButton
+ enableAlternate: true
+ enableSlide: true
+ property QtObject winItem: modelData
+
+ height: 30
+ width: sidebar.width - 10
+
+ buttonColor: winItem.explicitlyHidden ? "#8f8f9f" : "lightgray"
+
+ text.maximumLineCount: 1
+ text.text: modelData.shellSurface.title.length > 0 ? modelData.shellSurface.title : "Untitled"
+ text.elide: Text.ElideRight
+ onTriggered: {
+ winItem.toggleVisible()
+ }
+ onAlternateTrigger: {
+ //console.log("alt " + winItem + " : " + winItem.shellSurface.surface)
+ setFullscreen(winItem)
+
+ }
+ onSlideTrigger: {
+ //console.log("slide " + winItem + " : " + winItem.shellSurface.surface)
+ winItem.shellSurface.surface.client.close()
+ }
+ }
+ }
+ Item {
+ height: 20
+ visible: true
+ }
+ MyButton {
+ height: 50
+ width: sidebar.width - 10
+ buttonColor: enabled ? "#6fdf7f" : "lightgray"
+ enabled: windowList.length > 0 && hiddenWindowCount > 0
+ text.color: enabled ? "black" : "gray"
+ text.text: "Show all"
+ onTriggered: setFullscreen(null)
+ }
+ }
+
+
+ Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ padding: 5
+ spacing: 5
+
+
+ LaunchButton {
+ height: 30
+ width: sidebar.width - 10
+ text.text: "Launch wiggly"
+ executable: "/tmp/wiggly"
+ }
+ LaunchButton {
+ height: 30
+ width: sidebar.width - 10
+ text.text: "Launch analog clock"
+ executable: "/tmp/analogclock"
+ }
+ LaunchButton {
+ height: 30
+ width: sidebar.width - 10
+ text.text: "Launch digital clock"
+ executable: "/tmp/digitalclock"
+ }
+ TimedButton {
+ //visible: false
+ height: 50
+ width: sidebar.width - 10
+ text: "Quit"
+ onTriggered: Qt.quit()
+ }
+ }
+ }
+
+
+ WaylandMouseTracker {
+ id: mouseTracker
+ anchors.top: parent.top
+ anchors.left: sidebar.right
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ enableWSCursor: true
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ color: "#8f8d95"
+ onWidthChanged: output.relayout()
+ onHeightChanged: output.relayout()
+ }
+ }
+ }
+
+ function setFullscreen(obj) {
+ var n = windowList.length
+ for (var i = 0; i < n; i++) {
+ var child = windowList[i]
+ child.explicitlyHidden = !(obj === null || child === obj)
+ }
+
+ relayout();
+ }
+
+ function relayout() {
+ var ch = []
+ var vc = []
+ var nn = surfaceArea.children.length
+ var i = 0;
+ var foundFS = false
+ var nh = 0;
+ for (i = 0; i < nn; i++) {
+ var child = surfaceArea.children[i]
+ var surf = child.surface
+ //var valid = child.valid
+ //surf.size.width > 0 && surf.size.height > 0 && !surf.cursorSurface && child.visible
+ //console.log(i + " " + child +" valid " + child.valid)
+ //console.log("surf: " + surf)
+ if (child.valid) {
+ ch.push(child)
+ //console.log(child + " " + child.shellSurface.title)
+ if (!child.explicitlyHidden)
+ vc.push(child)
+ else
+ nh++
+ }
+ }
+ windowList = ch
+ hiddenWindowCount = nh
+//console.log("fsw: " + fullscreenWindow + " found: " + foundFS)
+
+ var n = vc.length
+ var ny = Math.round(Math.sqrt(n))
+ var nx = Math.ceil(n/ny)
+ var extra = nx*ny - n
+ //console.log(n + ": " + nx + " * " + ny + " extra: " + extra)
+
+ var w = surfaceArea.width / nx;
+ var x = 0;
+ i = 0;
+ for (var ix = 0; ix < nx; ix++) {
+ var nny = (ix < nx - extra) ? ny : ny - 1;
+ var h = surfaceArea.height / nny;
+ var y = 0;
+ for (var iy = 0; iy < nny; iy++) {
+
+ vc[i].x = x
+ vc[i].y = y
+ vc[i].width = w
+ vc[i].height = h
+ vc[i].requestSize(w,h)
+ vc[i].state = "SHOWN"
+ y += h
+ i++
+ }
+ x += w
+ }
+ }
+}
diff --git a/wayland/democompositor/qml/TimedButton.qml b/wayland/democompositor/qml/TimedButton.qml
new file mode 100644
index 0000000..012875a
--- /dev/null
+++ b/wayland/democompositor/qml/TimedButton.qml
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Rectangle {
+ id: theButton
+
+ radius: 10
+ color: "lightgray"
+
+ property alias text: buttonText.text
+ signal triggered()
+
+ property int percent : 0
+ state: "UNPRESSED"
+
+ states: [
+ State {
+ name: "UNPRESSED"
+ },
+ State {
+ name: "PRESSED"
+ }
+ ]
+
+ transitions: [ Transition {
+ from: "UNPRESSED"
+ to: "PRESSED"
+ NumberAnimation {
+ target: theButton
+ property: "percent"
+ to: 100
+ duration: 1500
+ }
+ },
+ Transition {
+ from: "PRESSED"
+ to: "UNPRESSED"
+ NumberAnimation {
+ target: theButton
+ property: "percent"
+ to: 0
+ duration: 100
+ }
+ }
+ ]
+ Rectangle {
+ radius: 10
+ color: "red"
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: parent.width * percent / 100
+ visible: percent > 0
+ }
+
+ Text {
+ id: buttonText
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 10
+ text: "[Uninitialized]"
+ }
+
+ MouseArea {
+ id: mouser
+ anchors.fill: parent
+
+ Timer {
+ id: timer
+ interval: 1000
+ }
+
+ onPressed: parent.state = "PRESSED"
+
+ onReleased: {
+ if (containsMouse && parent.percent >= 100) {
+ parent.triggered()
+ }
+ parent.state = "UNPRESSED"
+ }
+
+ onPositionChanged: {
+ parent.state = containsMouse ? "PRESSED" : "UNPRESSED"
+ }
+ }
+}
diff --git a/wayland/democompositor/qml/main.qml b/wayland/democompositor/qml/main.qml
new file mode 100644
index 0000000..9b91023
--- /dev/null
+++ b/wayland/democompositor/qml/main.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the examples of Qt for Device Creation.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtWayland.Compositor 1.0
+
+WaylandCompositor {
+ id: comp
+
+ property var primarySurfacesArea: null
+
+ Screen {
+ compositor: comp
+ }
+
+ Component {
+ id: chromeComponent
+ Chrome {
+ }
+ }
+
+ Component {
+ id: surfaceComponent
+ WaylandSurface {
+ }
+ }
+
+ extensions: [
+ Shell {
+ id: defaultShell
+
+
+ onCreateShellSurface: {
+ var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "surface": surface } );
+ item.shellSurface.initialize(defaultShell, surface, client, id);
+ }
+
+ Component.onCompleted: {
+ initialize();
+ }
+ }
+ ]
+
+ onCreateSurface: {
+ var surface = surfaceComponent.createObject(comp, { } );
+ surface.initialize(comp, client, id, version);
+ }
+ onSurfaceCreated: {
+ defaultOutput.relayout()
+ }
+}