summaryrefslogtreecommitdiffstats
path: root/basicsuite/Launcher Settings
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/Launcher Settings')
-rw-r--r--basicsuite/Launcher Settings/BrightnessController.qml8
-rw-r--r--basicsuite/Launcher Settings/PoweroffAction.qml8
-rw-r--r--basicsuite/Launcher Settings/RebootAction.qml8
-rw-r--r--basicsuite/Launcher Settings/description.txt1
-rw-r--r--basicsuite/Launcher Settings/main.qml119
-rw-r--r--basicsuite/Launcher Settings/preview_l.jpgbin0 -> 10743 bytes
6 files changed, 144 insertions, 0 deletions
diff --git a/basicsuite/Launcher Settings/BrightnessController.qml b/basicsuite/Launcher Settings/BrightnessController.qml
new file mode 100644
index 0000000..d4d2386
--- /dev/null
+++ b/basicsuite/Launcher Settings/BrightnessController.qml
@@ -0,0 +1,8 @@
+import QtDroid.Utils 1.0
+
+QtObject {
+ function setBrightness(value)
+ {
+ DroidUtils.setDisplayBrightness(value)
+ }
+}
diff --git a/basicsuite/Launcher Settings/PoweroffAction.qml b/basicsuite/Launcher Settings/PoweroffAction.qml
new file mode 100644
index 0000000..fd0e215
--- /dev/null
+++ b/basicsuite/Launcher Settings/PoweroffAction.qml
@@ -0,0 +1,8 @@
+import QtQuick.Controls 1.0
+import QtDroid.Utils 1.0
+
+Action
+{
+ text: "Power Off!"
+ onTriggered: DroidUtils.powerOffSystem()();
+}
diff --git a/basicsuite/Launcher Settings/RebootAction.qml b/basicsuite/Launcher Settings/RebootAction.qml
new file mode 100644
index 0000000..cdf84a5
--- /dev/null
+++ b/basicsuite/Launcher Settings/RebootAction.qml
@@ -0,0 +1,8 @@
+import QtQuick.Controls 1.0
+import QtDroid.Utils 1.0
+
+Action
+{
+ text: "Reboot"
+ onTriggered: DroidUtils.rebootSystem();
+}
diff --git a/basicsuite/Launcher Settings/description.txt b/basicsuite/Launcher Settings/description.txt
new file mode 100644
index 0000000..98ce6f6
--- /dev/null
+++ b/basicsuite/Launcher Settings/description.txt
@@ -0,0 +1 @@
+This demo uses the Qt Quick Controls to give a couple of options for the launcher itself.
diff --git a/basicsuite/Launcher Settings/main.qml b/basicsuite/Launcher Settings/main.qml
new file mode 100644
index 0000000..af64a26
--- /dev/null
+++ b/basicsuite/Launcher Settings/main.qml
@@ -0,0 +1,119 @@
+import QtQuick 2.0
+
+import QtQuick.Controls 1.0
+import QtQuick.Layouts 1.0
+
+Rectangle {
+ id: root;
+
+ gradient: Gradient {
+ GradientStop { position: 0; color: "white" }
+ GradientStop { position: 1; color: "lightgray" }
+ }
+
+ width: 1280
+ height: 800
+
+ property int margin: 10
+
+ Loader {
+ id: rebootActionLoader
+ source: "RebootAction.qml"
+ }
+
+ Loader {
+ id: poweroffActionLoader
+ source: "PoweroffAction.qml"
+ }
+
+ Loader {
+ id: brightnessControllerLoader
+ source: "BrightnessController.qml"
+ }
+
+ Flickable {
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.margins: margin
+ anchors.topMargin: 50
+ height: parent.height
+ width: mainLayout.width
+
+ contentHeight: mainLayout.height
+ contentWidth: mainLayout.width
+
+ ColumnLayout {
+ id: mainLayout
+
+ height: implicitHeight;
+ width: Math.min(root.width, root.height);
+
+ GroupBox {
+ id: powerOptions
+ title: "Power Options"
+
+ Layout.fillWidth: true
+
+ contentWidth: powerButtonColumn.implicitWidth
+ contentHeight: powerButtonColumn.implicitHeight
+
+ RowLayout {
+ id: powerButtonColumn
+
+ anchors.fill: parent
+
+ Button {
+ text: "Shut Down"
+ Layout.fillWidth: true
+ action: poweroffActionLoader.item;
+ enabled: action != undefined
+ }
+
+ Button {
+ text: "Reboot"
+ Layout.fillWidth: true
+ action: rebootActionLoader.item;
+ enabled: action != undefined
+ }
+ }
+
+ }
+
+ GroupBox {
+ id: displayOptions
+ title: "Display Options"
+
+ Layout.fillWidth: true
+
+ contentWidth: displayGrid.implicitWidth
+ contentHeight: displayGrid.implicitHeight
+
+ GridLayout {
+ id: displayGrid
+
+ rows: 2
+ flow: GridLayout.TopToBottom
+ anchors.fill: parent
+
+ Label { text: "Brightness: " }
+ Label { text: "Display FPS: " }
+
+ Slider {
+ maximumValue: 255
+ minimumValue: 1
+ value: 255
+ Layout.fillWidth: true
+ onValueChanged: {
+ if (brightnessControllerLoader.item != undefined) {
+ brightnessControllerLoader.item.setBrightness(value);
+ }
+ }
+ }
+ CheckBox {
+ onCheckedChanged: engine.fpsEnabled(checked);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/basicsuite/Launcher Settings/preview_l.jpg b/basicsuite/Launcher Settings/preview_l.jpg
new file mode 100644
index 0000000..bdfafee
--- /dev/null
+++ b/basicsuite/Launcher Settings/preview_l.jpg
Binary files differ