From 82671c1cb36a0406e5a90a92dd17dedff02b206a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 16:57:59 +0200 Subject: Doc: Fix umount instructions umount /media/* will not work if the stuff is automounted under /media/username. Try to unmount in both places. Change-Id: Icdb212e81ff04d6efe4ac0885c733e63a48fe316 Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 8969292..21fd1f0 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -495,7 +495,7 @@ \endcode \li Run device/boundary/mksdcard.sh: \code - ~/bd-android$ sudo umount /media/* + ~/bd-android$ sudo umount /media/* /media/$USER/* ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/XXX ~/bd-android$ sync \endcode -- cgit v1.2.3 From eaad2e769b37755a95ef030744ff39becc74472b Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 16:52:17 +0200 Subject: Doc: 32-bit support libs are only needed on 64-bit systems Change-Id: I5e22dff017a7a7f0efb5f0798c4a2f675d5d8efd Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 21fd1f0..04c41a4 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -133,10 +133,10 @@ \target Installing 32-bit Support Libraries \section1 1. Installing 32-bit Support Libraries - Some of the build tools in \B2Q are 32-bit programs, and they - require that support libraries for running 32-bit code are present - in the system. To install the required packages in Ubuntu, use the - following command in a terminal: + Some of the build tools in \B2Q are 32-bit programs, and on 64-bit + systems they require that support libraries for running 32-bit + code are present in the system. To install the required packages + in Ubuntu, use the following command in a terminal: \code sudo apt-get install g++-multilib ia32-libs -- cgit v1.2.3 From 1bf40bf81992559737c21d9bd922a378487f0067 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 16:50:57 +0200 Subject: Doc: SurfaceFlinger may be running. Remove it. Change-Id: I8a34ee4092fa0a368a801ed826ce324f5d3e1ce3 Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 04c41a4..0283f23 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -101,7 +101,7 @@ \b{\B2QA} tries to strip down the Android stack to the bare minimum, relying only on basic Linux features. The majority of the Android stack, such as - \e{SurfaceFlinger} or \e{DalvikVM} is not running in \B2Q, + \e{Dalvik virtual machine} is not running in \B2Q, resulting in faster startup times, lower memory consumption and overall better performance. -- cgit v1.2.3 From 50c37d9e095a2cbf0f7b40ce6f0041684b05b813 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 17:08:25 +0200 Subject: Doc: Make deploy.sh executable to be safe For some reason the deploy.sh I got was not executable. The safest is to update the documentation with a chmod +x step. Change-Id: I68400429426031992d614aac135a263768284a56 Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 0283f23..be8c8b0 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -518,6 +518,7 @@ Then, upgrade the micro-SD Card with \B2QA: \code + chmod +x /Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX \endcode -- cgit v1.2.3 From 8b72d8990033af83b7b44871d5af3e61c965fc72 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 16:01:59 +0200 Subject: Enhance the docs about window limitations and input devices Task-number: QTRD-2421 Task-number: QTRD-2429 Change-Id: Ie47053f20d8587a84925d41e5a62cbd9ca88cbb4 Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index be8c8b0..341dfac 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -594,16 +594,23 @@ /Tools/b2qt/adb remount \endcode - In the \c{appcontroller.conf} file, the input devices are + In the \c{appcontroller.conf} file the input devices are specified by the lines similar to these: \code env=QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event0 \endcode - The mouse pointer can be turned on and off by removing or adding this line: - \code - env=QT_QPA_EGLFS_HIDECURSOR=1 - \endcode + Usually there is no need to change this setting. USB input devices like + keyboards and mice are automatically recognized. The mouse pointer is shown + automatically if a mouse is connected. + + Note however that hotplugging may not work, meaning that the input + devices, like keyboard and mouse, have to be connected at boot + time. + + On some devices, for example the i.MX6 Sabre Lite, the touchscreen device is + specified explicitly in QT_QPA_GENERIC_PLUGINS. This is necessary because + the automatic device discovery would fail to find the touchscreen. \section1 Booting to a Custom Application @@ -777,6 +784,16 @@ Note that hotplugging does not currently work; any input device must be present at boot time to be recognized. + \section2 Application stops with \e{EGLFS: OpenGL windows cannot be mixed with others.} + + In OpenGL and Qt Quick 2 applications there can only be one + fullscreen window existing at a time. Trying to create another + OpenGL window or trying to mix an OpenGL window with raster ones + will abort the application with the message shown above. + + For raster (software rendered, e.g. QtWidget or QPainter-based + content) windows there is no such limitation. + \section2 I cannot edit the contents of appcontroller.conf on the device The file system where this file is located may be mounted as read-only. -- cgit v1.2.3 From 7281b8851573c325a72da008245d54e06516e2d2 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 11 Oct 2013 11:46:45 +0300 Subject: Doc: Add documentation for raspberry Pi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If57154ba74595a1f52802d81908d333924319e7d Reviewed-by: Topi Reiniö Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt-post-install-setup.qdocinc | 24 ++++++++++ src/doc/src/b2qt.qdoc | 69 +++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index 4733aa8..8d1a58c 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -41,6 +41,7 @@ To do so, connect your device to your computer via USB and launch Qt Creator (\B2Q IDE). Then, +//! [steps for device kit] \list 1 \li Go to \b{Tools > Options > Build & Run > Kits} \li Select one of the predefined Kits starting with \e{Boot2Qt...} @@ -48,5 +49,28 @@ \li Select the correct device in the \b{Device} combobox. \li Click \b{Ok}. \endlist +//! [steps for device kit] //! [configuring device kit] + +//! [configuring network device] + After the hardware has been prepared, there are final steps required + to set up the development tools in Qt Creator for your device. + + To do so, connect your device to network via ethernet cable and launch + Qt Creator (\B2Q IDE). Then, + + \list 1 + \li Go to \b{Tools > Options > Devices} + \li Click \b{Add...} + \li Select \b{Boot2Qt Device} and Click \b{Start Wizart} + \li Fill in name of the device and network address. Device address can be seen from + \e{Launcher Settings} when device is running \B2Q demo + \li Click \b{Finish}. + \endlist + + You also have to configure the right device to be used for each \b{Kit}. + + \include b2qt-post-install-setup.qdocinc steps for device kit + +//! [configuring network device] */ diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 341dfac..2489a54 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -33,6 +33,7 @@ \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} + \li \l{Preparing Raspberry Pi}{Raspberry Pi (embedded Linux)} \endlist \li \b {\l{Building and Running an Example}} \li \b {\l{Customization}} @@ -232,6 +233,7 @@ \li \l{Nexus 7 (embedded Android)} \li \l{Sabre Lite i.MX 6 (embedded Android)} \li \l{BeagleBoard-xM (embedded Android and Linux)} + \li \l{Raspberry Pi (embedded Linux)} \endlist If you are only using the emulator, you can skip this step @@ -541,6 +543,73 @@ See \l{Building and Running an Example} */ +/*! + \target Raspberry Pi (embedded Linux) + \page b2qt-preparing-hardware-rasberrypi.html + \title Preparing Raspberry Pi + \previouspage b2qt-installation-guide.html + \nextpage b2qt-building-and-running.html + + When using a \l{http://www.raspberrypi.org/}{Raspberry Pi} as a + development device, following steps are required to prepare it for + \B2Q. + + \note \b{It is important that the steps in this section are repeated + every time after updating the \B2Q SDK.} + + The images containing \B2Q stack for Raspberry Pi is included in the SDK, + ready to be copied to a micro-SD card. + + \section1 Preparing a Micro-SD Card + + For \B2QL, a card of at least 512MB capacity is sufficient. + + Plug the micro-SD card/reader into the development host PC and use + the following command to find out its device path + (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}): + + \code + df -h + \endcode + + Alternatively, if the micro-SD card is unformatted, run the following + command immediately after inserting the card to see its device + path: + + \code + dmesg | tail + \endcode + + Now make sure the micro-SD card is not mounted: + + \code + umount /dev/XXX + \endcode + + \section1 Installing the \B2Q Image + + Write the image to the micro-SD card: + + \code + cd + Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX + \endcode + + \warning \b{Make very sure you select the right device. Selecting the wrong + one can result in a wiped hard drive}. + + After the image has been deployed, power up the device and confirm that it shows + a \B2Q welcome screen and/or demo. + + \section1 Configuring a Device Kit in Qt Creator + + \include b2qt-post-install-setup.qdocinc configuring network device + + \b {You are now ready to start developing for your device!} + + See \l{Building and Running an Example} +*/ + /*! \page b2qt-building-and-running.html \title Building and Running an Example -- cgit v1.2.3 From 84732e0ef58b3ed8d06f688d4076757ac2dfbb82 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 16:48:45 +0200 Subject: Doc: Update Android version in introduction Change-Id: Iba58ead0f1529dd458026dd88a22448d7f504b67 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 2489a54..be4b8ba 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -50,7 +50,7 @@ two different operating systems: \list - \li \b{\B2QA} places Qt on top of an Android (version 4.0 or 4.1) + \li \b{\B2QA} places Qt on top of an Android (version 4.1 or higher) kernel/baselayer. \li \b{\B2QL} places Qt on top of an Linux kernel/baselayer, built -- cgit v1.2.3 From 58099ab120d14f8c37636bfe61392fadd3a6d617 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 11 Oct 2013 18:09:51 +0200 Subject: Doc: Add some words about deployment paths It's very nice that new projects generated by Creator deploy properly but we really need to say a few words about running existing projects (for example Qt's own examples). The Qt examples, say shadereffects from qtdeclarative, won't deploy by default since target.path is garbage. It has to be manually updated to /data/user/qt/whatever. Document this. Change-Id: I8d09c091d449b8b4ad519210a938f9b56195bb60 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index be4b8ba..c5808b8 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -636,6 +636,28 @@ connected device. \li To build and run the project, click \inlineimage qtcreator-run.png \endlist + + \section1 Setting up an already existing project for deployment + + The projects generated by Qt Creator will always have the correct settings + for deployment on the device or emulator. Existing projects may need some + changes however. + + As a general rule, application binaries and content (like QML files) are + deployed under /data/user/qt/. This means that deployment + settings in .pro files like the following: + + \code + target.path = ... + INSTALLS += target + \endcode + + should be migrated to + + \code + target.path = /data/user/qt/ + INSTALLS += target + \endcode */ /*! -- cgit v1.2.3 From 57f8992447ce305485e1ba58c010d050b86656bf Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 14 Oct 2013 09:32:43 +0300 Subject: Docs: linux deploy script requires sudo Change-Id: I7f39eeb3fc9b5733260ca79b98203ccc785cc280 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index c5808b8..d7fafb5 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -413,7 +413,7 @@ \li \b{\B2QL} \code cd - Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/XXX + sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/XXX \endcode \endlist @@ -592,7 +592,7 @@ \code cd - Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX + sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX \endcode \warning \b{Make very sure you select the right device. Selecting the wrong -- cgit v1.2.3 From 439ed058c0285033e41330bd51ada939d18dff6b Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 14 Oct 2013 13:20:45 +0300 Subject: Revert "Doc: Make deploy.sh executable to be safe" Instead of documenting workaround, bug was fixed. Change-Id: I79130b0e9e06ca708bafe408e918569fe73accfa Reviewed-by: Laszlo Agocs --- src/doc/src/b2qt.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index d7fafb5..694dcc5 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -520,8 +520,8 @@ Then, upgrade the micro-SD Card with \B2QA: \code - chmod +x /Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh - /Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX + cd + Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX \endcode \warning \b{Make very sure you select the right device. Selecting the wrong -- cgit v1.2.3 From 395e7ff2a25216988b43aa310261b0e4204e1b7c Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 11 Oct 2013 16:50:10 +0200 Subject: [Doc] Update "Installing Proprietary Drivers" section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1f20b9ebe2a9dd3ab2d10314bed618d14f1e1d03 Reviewed-by: Topi Reiniö Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 694dcc5..059338d 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -299,15 +299,13 @@ \section1 Installing Proprietary Drivers - Download the proprietary drivers for your Nexus 7 - \l{https://developers.google.com/android/nexus/drivers#grouperjdq39}{here}. - - \note Make sure you have read the license terms at the beginning of the - driver download page. - - Select the links in the \b{Graphics}, \b{Camera, Sensors, DRM} and \b{Orientation Sensor} rows from the table - \e{"Nexus 7 (Wi-Fi) binaries for Android 4.2.2"}, download and save the files - to the installation directory of the \B2Q SDK. + Download the proprietary drivers for your Nexus 7. The following script will download the third + party drivers from \l{https://developers.google.com/android/nexus/drivers#grouperjdq39} + {https://developers.google.com/android/nexus/drivers#grouperjdq39} + \code + cd + ./Boot2Qt-1.0/nexus7-eAndroid/images/download.sh + \endcode \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" will work with the current Boot to Qt image. @@ -315,25 +313,24 @@ and is connected to the computer via USB. Then, follow these steps to update the Nexus 7: + \note Make sure you have read the license terms enclosed in each individual extractor \list 1 - \li Extract the downloaded files, and run the extracted installers. For example, + \li Run the driver extractors: \code - cd - tar xf nvidia-grouper-jdq39-738059f9.tgz + cd Boot2Qt-1.0/nexus7-eAndroid/images/drivers ./extract-nvidia-grouper.sh - tar xf asus-grouper-jdq39-b6907aa5.tgz ./extract-asus-grouper.sh - tar xf invensense-grouper-jdq39-28df082f.tgz ./extract-invensense-grouper.sh + cd - \endcode \li Find out the serial number of the connected Nexus 7 device: \code - /Tools/b2qt/adb devices + ./Tools/b2qt/adb devices \endcode \li Deploy the drivers to your device using the following command: \code - /Boot2Qt-1.0/nexus7-eAndroid/images/deploy.sh + ./Boot2Qt-1.0/nexus7-eAndroid/images/deploy.sh \endcode \endlist -- cgit v1.2.3 From e7724d5a213aa0bb6c4d50a9f9fc7cab2f6cb3cd Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 11 Oct 2013 11:56:52 +0200 Subject: Doc: Rewrite instructions for finding out SD card device path Rewrite the instructions and move them to a separate qdocinc file. Also move the warning about potential HDD-wipe to this step, as that's when you have to pay attention to it. Change-Id: I812ceca23c26587876c9ea66049b72fcce8561c9 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 81 +------------------------- src/doc/src/detect-sd-card-device-name.qdocinc | 27 +++++++++ 2 files changed, 30 insertions(+), 78 deletions(-) create mode 100644 src/doc/src/detect-sd-card-device-name.qdocinc diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 059338d..978d6b9 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -372,27 +372,7 @@ For \B2QA, a micro-SD card of at least 2GB capacity is needed. For \B2QL, a card of at least 512MB capacity is sufficient. - Plug the micro-SD card/reader into the development host PC and use - the following command to find out its device path - (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}): - - \code - df -h - \endcode - - Alternatively, if the micro-SD card is unformatted, run the following - command immediately after inserting the card to see its device - path: - - \code - dmesg | tail - \endcode - - Now make sure the micro-SD card is not mounted: - - \code - umount /dev/XXX - \endcode + \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the \B2Q Image @@ -414,9 +394,6 @@ \endcode \endlist - \warning \b{Make very sure you select the right device. Selecting the wrong - one can result in a wiped hard drive}. - After the image has been deployed, power up the device and confirm that it shows a \B2Q welcome screen and/or demo. @@ -454,27 +431,7 @@ For \B2QA, a micro-SD card of at least 4GB capacity is needed. - Plug the micro-SD card/reader into the development host PC and use - the following command to find out its device path - (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}): - - \code - df -h - \endcode - - Alternatively, if the micro-SD card is unformatted, run the following - command immediately after inserting the card to see its device - path: - - \code - dmesg | tail - \endcode - - Next, make sure the micro-SD card is not mounted: - - \code - umount /dev/XXX - \endcode + \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the Android image @@ -500,12 +457,6 @@ \endcode \endlist - Make sure to replace the device path (\c{"/dev/XXX"}) with your micro-SD - card's device path that was found in the previous step. - - \warning \b{Make very sure you select the right device. Selecting the wrong - one can result in a wiped hard drive.} - \section1 Installing the \B2QA Image Make sure you have the required tools installed in your development machine: @@ -521,9 +472,6 @@ Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX \endcode - \warning \b{Make very sure you select the right device. Selecting the wrong - one can result in a wiped hard drive}. - After the installation is complete, power up the device and confirm that it shows a \B2Q welcome screen and/or demo. @@ -561,27 +509,7 @@ For \B2QL, a card of at least 512MB capacity is sufficient. - Plug the micro-SD card/reader into the development host PC and use - the following command to find out its device path - (i.e. \c{/dev/XXX}, where \c{XXX} typically is \c{sdb}): - - \code - df -h - \endcode - - Alternatively, if the micro-SD card is unformatted, run the following - command immediately after inserting the card to see its device - path: - - \code - dmesg | tail - \endcode - - Now make sure the micro-SD card is not mounted: - - \code - umount /dev/XXX - \endcode + \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the \B2Q Image @@ -592,9 +520,6 @@ sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX \endcode - \warning \b{Make very sure you select the right device. Selecting the wrong - one can result in a wiped hard drive}. - After the image has been deployed, power up the device and confirm that it shows a \B2Q welcome screen and/or demo. diff --git a/src/doc/src/detect-sd-card-device-name.qdocinc b/src/doc/src/detect-sd-card-device-name.qdocinc new file mode 100644 index 0000000..825be80 --- /dev/null +++ b/src/doc/src/detect-sd-card-device-name.qdocinc @@ -0,0 +1,27 @@ +/*! +//! [instructions] + Plug the micro-SD card or reader into the development host PC, + and use the following command to find out its device name: + + \code + lsblk -d + \endcode + + Removable devices such as SD cards have a value '1' in + the \e RM column. + + \warning \b{Make very sure you select the right device. Selecting + the wrong one can result in a wiped hard drive}. + + Typical device names for SD cards include \c {sdb} and + \c {mmcblk0}. The full device path is \c {/dev/} followed by + the name. Replace \b XXX with the device name in below + instructions. + + Now make sure the micro-SD card is not mounted: + + \code + umount /dev/XXX + \endcode +//! [instructions] +*/ -- cgit v1.2.3 From e38a3dc3a660eb36f519d37496763bbef24cdd50 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 14 Oct 2013 11:45:08 +0200 Subject: Doc: Update the usage of SDK / Boot to Qt names - Create a macro for Qt for Embedded Enterprise SDK - Readability: Use italics for the long platform-specific Boot to Qt names to separate them from the rest of the text - Update information about installation file naming, default install path Change-Id: Iee27da56d378846803bf193c15b9b76766533a25 Reviewed-by: Eirik Aavitsland --- src/doc/config/b2qt.qdocconf | 5 +-- src/doc/src/b2qt-post-install-setup.qdocinc | 4 +-- src/doc/src/b2qt.qdoc | 48 ++++++++++++++--------------- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 60bb88e..f82faf6 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -27,6 +27,7 @@ qhp.B2Qt.subprojects.manual.indexTitle = Boot to Qt Introduction qhp.B2Qt.subprojects.manual.type = manual macro.B2Q = "Boot to Qt" -macro.B2QA = "Boot to Qt for embedded Android" -macro.B2QL = "Boot to Qt for embedded Linux" +macro.SDK = "Qt for Embedded Enterprise SDK" +macro.B2QA = "\\e {Boot to Qt for embedded Android}" +macro.B2QL = "\\e {Boot to Qt for embedded Linux}" diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index 8d1a58c..e18f076 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -39,7 +39,7 @@ You have to configure the right device to be used for each \b{Kit}. To do so, connect your device to your computer via USB and launch - Qt Creator (\B2Q IDE). Then, + Qt Creator. Then, //! [steps for device kit] \list 1 @@ -57,7 +57,7 @@ to set up the development tools in Qt Creator for your device. To do so, connect your device to network via ethernet cable and launch - Qt Creator (\B2Q IDE). Then, + Qt Creator. Then, \list 1 \li Go to \b{Tools > Options > Devices} diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 978d6b9..e06bef7 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -44,7 +44,7 @@ \section1 What is \B2Q? - \b{\B2Q} is a light-weight UI stack for embedded systems, based on the + \e{\b{\B2Q}} is a light-weight UI stack for embedded systems, based on the \l{http://qt.digia.com/}{Qt Framework} by Digia, offering an elegant means of developing beautiful and performant embedded devices. It supports two different operating systems: @@ -61,8 +61,10 @@ hardware configurations. \B2Q support is not limited to the devices used as reference platforms, it can be made to run on a variety of hardware. - \B2Q SDK provides a complete software development package for - creating applications on embedded devices. It comes with + \section1 \SDK + + \SDK includes the \B2Q stack, providing a complete software development + package for creating applications on embedded devices. It comes with the Qt Creator IDE with preconfigured build targets for hardware platforms as well as an \l{Emulator}{emulator}. @@ -94,7 +96,7 @@ \image b2qt-vs-qt-for-android.png - \b{Qt for Android} is a port of the Qt Framework to be used for application + \e{\b{Qt for Android}} is a port of the Qt Framework to be used for application development on the Android platform. Its purpose is to enable development of applications that can run on Android devices. For developers writing applications for the Android ecosystem, Qt for Android is the right choice. @@ -117,7 +119,7 @@ \previouspage index.html \nextpage b2qt-preparing-hardware.html - \e{IMPORTANT: The \B2Q SDK requires the following installation steps to be followed closely.} + \e{IMPORTANT: The \SDK requires the following installation steps to be followed closely.} In case of problems, see the \l{Troubleshooting} information and the \l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/} @@ -126,10 +128,10 @@ \target Requirements for Development Host \section1 0. Requirements for Development Host - A 64-bit Linux system is required to install and use \B2Q - SDK. Instructions in this documentation assume Ubuntu Linux 64-bit - 12.04 LTS or later. Other Linux distributions may work, but have - not been tested. C/C++ build essentials must be installed. + A 64-bit Linux system is required to install and use \SDK. Instructions + in this documentation assume Ubuntu Linux 64-bit 12.04 LTS or later. + Other Linux distributions may work, but have not been tested. C/C++ build + essentials must be installed. \target Installing 32-bit Support Libraries \section1 1. Installing 32-bit Support Libraries @@ -167,12 +169,11 @@ \li Change both the lower and upper address bounds to 192.168.56.101. \endlist - \section1 3. Installing the \B2Q SDK + \section1 3. Installing the \SDK - If you have not already installed the \B2Q SDK, do it as follows. + If you have not already installed the SDK, do it as follows. - After downloading the \B2Q SDK binary installer (the file named - something like \c{Boot2QtSDK-evaluation-64bit-2013xxxxxx}), + After downloading the binary installer for the SDK, make sure it is executable either by \list @@ -183,11 +184,10 @@ Run the installer and follow its instructions. - The installer will let you select a directory where the entire, - self-contained \B2Q SDK will be installed. In the rest of this - documentation, that directory is referred to as - \c{}. By default, it is - \tt{/home/\e{yourusername}/Boot2QtSDK}. + The installer will let you select a directory where the SDK will be + installed. In the rest of this documentation, that directory is referred + to as \b{\c{}}. The default installation directory is + \tt{~/Qt}. \target Installing Boot to Qt on Target Devices \section1 4. Install \B2Q on Target Devices @@ -271,7 +271,7 @@ \section1 Updating a Nexus 7 with \B2Q Images \note \b{It is important that the steps in this section are repeated - every time after updating the \B2Q SDK.} + every time after updating the \SDK.} An unlocked Nexus 7 device can now be updated with a \B2Q image. @@ -307,7 +307,7 @@ ./Boot2Qt-1.0/nexus7-eAndroid/images/download.sh \endcode - \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" will work with the current Boot to Qt image. + \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" will work with the current \B2Q image. Make sure your Nexus 7 is powered up, is \e{not} in fastboot mode, and is connected to the computer via USB. @@ -362,7 +362,7 @@ \B2Q. \note \b{It is important that the steps in this section are repeated - every time after updating the \B2Q SDK.} + every time after updating the \SDK.} The images containing \B2Q stack for BeagleBoard-xM is included in the SDK, ready to be copied to a micro-SD card. @@ -377,7 +377,7 @@ \section1 Installing the \B2Q Image The commands used in this step vary depending on whether you are developing - for \B2QA or embedded Linux. + for embedded Android or embedded Linux. Write the image to the micro-SD card: @@ -422,7 +422,7 @@ to prepare it for \B2QA. \note \b{It is important that the steps in this section are repeated - every time after updating the \B2Q SDK.} + every time after updating the \SDK.} The images containing \B2Q stack for Sabre Lite i.MX 6 is included in the SDK, ready to be copied to a micro-SD card. @@ -457,7 +457,7 @@ \endcode \endlist - \section1 Installing the \B2QA Image + \section1 Installing the \B2Q Image Make sure you have the required tools installed in your development machine: -- cgit v1.2.3 From 7e032439d71a730fd9354cc66508669e94db8201 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 15 Oct 2013 12:29:52 +0200 Subject: Doc: Update documentation version to 1.0.0 Updates the version from Technology Preview 2 to 1.0.0. Change-Id: Idaf89ffe60f28795d7b326ed696f01362f0f6063 Reviewed-by: Eirik Aavitsland --- src/doc/config/b2qt.qdocconf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index f82faf6..7e4bd1a 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -5,8 +5,8 @@ outputencoding = UTF-8 sourceencoding = UTF-8 project = Boot2Qt -description = Boot to Qt Technology Preview 2 Documentation -version = tp2 +description = Boot to Qt Documentation +version = 1.0.0 sourcedirs = ../src imagedirs += ../images @@ -16,9 +16,9 @@ sources.fileextensions = "*.qdoc" qhp.projects = B2Qt qhp.B2Qt.file = b2qt.qhp -qhp.B2Qt.namespace = com.digia.b2qt.tp2 +qhp.B2Qt.namespace = com.digia.b2qt.100 qhp.B2Qt.virtualFolder = b2qt -qhp.B2Qt.indexTitle = Boot to Qt Technology Preview 2 +qhp.B2Qt.indexTitle = Boot to Qt Documentation qhp.B2Qt.indexRoot = qhp.B2Qt.subprojects = manual -- cgit v1.2.3 From 28658cad21b654039424025fadfddbe7974b24f0 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 15 Oct 2013 12:36:07 +0200 Subject: Doc: Document Model B as the supported version of Raspberry Pi Change-Id: Iec1c3873a6fa125529ec07ae503dd971fec68c4f Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e06bef7..e2f6d43 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -33,7 +33,7 @@ \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} - \li \l{Preparing Raspberry Pi}{Raspberry Pi (embedded Linux)} + \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} \endlist \li \b {\l{Building and Running an Example}} \li \b {\l{Customization}} @@ -233,7 +233,7 @@ \li \l{Nexus 7 (embedded Android)} \li \l{Sabre Lite i.MX 6 (embedded Android)} \li \l{BeagleBoard-xM (embedded Android and Linux)} - \li \l{Raspberry Pi (embedded Linux)} + \li \l{Raspberry Pi Model B (embedded Linux)} \endlist If you are only using the emulator, you can skip this step @@ -489,7 +489,7 @@ */ /*! - \target Raspberry Pi (embedded Linux) + \target Raspberry Pi Model B (embedded Linux) \page b2qt-preparing-hardware-rasberrypi.html \title Preparing Raspberry Pi \previouspage b2qt-installation-guide.html @@ -499,15 +499,19 @@ development device, following steps are required to prepare it for \B2Q. + Note that Ethernet networking is required to connect the device to Qt Creator. + This means that the support is currently limited to Raspberry Pi Model B which + includes an Ethernet port. + \note \b{It is important that the steps in this section are repeated - every time after updating the \B2Q SDK.} + every time after updating the \SDK.} The images containing \B2Q stack for Raspberry Pi is included in the SDK, ready to be copied to a micro-SD card. \section1 Preparing a Micro-SD Card - For \B2QL, a card of at least 512MB capacity is sufficient. + An SD card of at least 512MB capacity is sufficient. \include detect-sd-card-device-name.qdocinc instructions @@ -693,19 +697,19 @@ \li Android 4.0+ compatible hardware \endlist - For the technology preview release, the following devices have - been used as reference and are tested to work: + The following devices have been used as reference and are tested to work: \list \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7} \li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)} + \li \l{http://www.raspberrypi.org/faqs}{Raspberry Pi Model B} \endlist \section1 Supported Development Environment - The development environment supported in \B2Q Technology Preview - release is Ubuntu Linux 64-bit (12.04 LTS or 12.10). See the - \l{Requirements for Development Host}. + The development environment supported by \B2Q is Ubuntu Linux 64-bit (12.04 LTS or 12.10). + + \sa {Requirements for Development Host} */ -- cgit v1.2.3 From cbe56833d10077804e1a88af85819e75eee6db3e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 14 Oct 2013 15:03:56 +0200 Subject: Add qt_hw_init launched from qt_init.sh This application is launched once during boot, from qt_init.sh. Change-Id: I76b39319d1777cd1e8cb068c734588b84f2c0062 Reviewed-by: Eirik Aavitsland --- src/qt_hw_init/main.cpp | 26 ++++++++++++++++++++++++++ src/qt_hw_init/qt_hw_init.pro | 10 ++++++++++ src/src.pro | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/qt_hw_init/main.cpp create mode 100644 src/qt_hw_init/qt_hw_init.pro diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp new file mode 100644 index 0000000..2ee8749 --- /dev/null +++ b/src/qt_hw_init/main.cpp @@ -0,0 +1,26 @@ +#include "../utils/qdroidutils.h" + +static void setMaxVolume(QDroidUtils *utils) +{ + utils->setMasterVolume(100); + utils->setMasterMute(false); + utils->setStreamVolume(QDroidUtils::SystemAudioStream, 100); + utils->setStreamVolume(QDroidUtils::MusicAudioStream, 100); + utils->setStreamVolume(QDroidUtils::NotificationAudioStream, 100); + utils->setStreamVolume(QDroidUtils::EnforcedAudibleAudioStream, 100); +} + +static void setDisplayBrightness(QDroidUtils *utils) +{ + utils->setDisplayBrightness(255); +} + +int main(int, char *[]) +{ + QDroidUtils utils; + + setMaxVolume(&utils); + setDisplayBrightness(&utils); + + return 0; +} diff --git a/src/qt_hw_init/qt_hw_init.pro b/src/qt_hw_init/qt_hw_init.pro new file mode 100644 index 0000000..879e450 --- /dev/null +++ b/src/qt_hw_init/qt_hw_init.pro @@ -0,0 +1,10 @@ +TEMPLATE = app +TARGET = qt_hw_init +QT -= gui +QT += droidutils + +SOURCES += main.cpp + +LIBS += -lQt5DroidUtils + +load(qt_tool) diff --git a/src/src.pro b/src/src.pro index ec4314f..3670d42 100644 --- a/src/src.pro +++ b/src/src.pro @@ -7,4 +7,4 @@ SUBDIRS += \ plugins \ -android: SUBDIRS += doppelganger +android: SUBDIRS += doppelganger qt_hw_init -- cgit v1.2.3 From 0048bdabca4635b403da538d7745d69245ac9de3 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 16 Oct 2013 09:59:13 +0200 Subject: Doc: Various minor fixes Change-Id: I2d00db1985a50021af704f8f52c1fd78cadc9536 Reviewed-by: Laszlo Agocs --- src/doc/src/b2qt.qdoc | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e2f6d43..b7a696c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -440,7 +440,7 @@ Devices Android Jellybean i.MX6 images} (registration required). Use the following commands to create a micro-SD card containing the - dowloaded image: + downloaded image: \list \li Extract the downloaded package @@ -553,7 +553,7 @@ \list 1 \li Open \b{File > New File or Project}, select - \b{Qt Quick 2 Application (Built-in Types)} and click \b{Next}. + \b{Qt Quick 2 Application (Built-in Types)} and click \b{Choose...}. \li In \b{Kit Selection} dialog, select the kit(s) for your devices. You can also select the emulator kit to test running the project in the emulator. @@ -563,22 +563,25 @@ \li To build and run the project, click \inlineimage qtcreator-run.png \endlist - \section1 Setting up an already existing project for deployment + \section1 Setting Up an Already Existing Project for Deployment The projects generated by Qt Creator will always have the correct settings - for deployment on the device or emulator. Existing projects may need some - changes however. + for deployment on the device or emulator. However, existing projects may + need some changes. - As a general rule, application binaries and content (like QML files) are - deployed under /data/user/qt/. This means that deployment - settings in .pro files like the following: + As a general rule, application binaries and resources (such as QML files and + images) are deployed under \c {/data/user/qt/} directory. + Therefore, the \c path variable for \c INSTALLS target(s) need to be adjusted + accordingly in .pro files: + + For example, the following: \code target.path = ... INSTALLS += target \endcode - should be migrated to + should be migrated to: \code target.path = /data/user/qt/ @@ -626,7 +629,7 @@ time. On some devices, for example the i.MX6 Sabre Lite, the touchscreen device is - specified explicitly in QT_QPA_GENERIC_PLUGINS. This is necessary because + specified explicitly in \c QT_QPA_GENERIC_PLUGINS. This is necessary because the automatic device discovery would fail to find the touchscreen. \section1 Booting to a Custom Application @@ -724,14 +727,14 @@ \section1 General Issues - \section2 I have a problem deploying/launching the application in Qt Creator + \section2 I have problems deploying/launching the application in Qt Creator Check if the device is properly connected to the PC via USB. See \l{Connectivity Issues}. If using the emulator, see \l{Installing VirtualBox}{Configuring VirtualBox}. - \section2 I have a problem deploying/launching a Qt or Qt Declarative example application + \section2 I have problems deploying/launching a Qt or Qt Quick example application Because of a technical peculiarity in \c{qmake}, it is not possible to get correct deployment setup for any application that @@ -741,7 +744,7 @@ outside the Qt source tree, and open this copy of the example application instead. - \section2 I have a problem launching or running applications on hardware after updating \B2Q SDK + \section2 I have problems launching or running applications on hardware after updating the SDK Remember to repeat the process of updating also your device with the latest version of \B2Q. See \l{Installing Boot to Qt on Target Devices}. @@ -803,13 +806,13 @@ \section2 Application stops with \e{EGLFS: OpenGL windows cannot be mixed with others.} - In OpenGL and Qt Quick 2 applications there can only be one + OpenGL and Qt Quick 2 applications can only have one fullscreen window existing at a time. Trying to create another - OpenGL window or trying to mix an OpenGL window with raster ones - will abort the application with the message shown above. + OpenGL window, or trying to mix an OpenGL window with a raster one + will display the above message and abort the application. - For raster (software rendered, e.g. QtWidget or QPainter-based - content) windows there is no such limitation. + \note For raster windows (software rendered content based on QWidget or + QPainter), there is no such limitation. \section2 I cannot edit the contents of appcontroller.conf on the device -- cgit v1.2.3 From 31e1b113dfa2220cbc18d224cf4a0144d2a9591f Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 16 Oct 2013 15:06:51 +0200 Subject: Doc: Adding title to navigation bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3d3719fc028fa9ef54e45d8d9697f5e6b5913594 Reviewed-by: Topi Reiniö --- src/doc/config/b2qt.qdocconf | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 7e4bd1a..8758381 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -31,3 +31,4 @@ macro.SDK = "Qt for Embedded Enterprise SDK" macro.B2QA = "\\e {Boot to Qt for embedded Android}" macro.B2QL = "\\e {Boot to Qt for embedded Linux}" +navigation.landingpage = "Boot to Qt Introduction" -- cgit v1.2.3 From adaa8544b8c358786f7a106e1c243a0e561cb6b7 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 16 Oct 2013 16:01:00 +0200 Subject: Doc: Remove confusing umount command from i.MX6 instructions The SD card was unmounted already in the 'Preparing a Micro-SD Card' step, trying to do it again will print out an error. Task-number: QTRD-2446 Change-Id: I71e50a12d0ebef6b7936fab4ed2ab1c87f7b4a9f Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index b7a696c..d0f708c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -451,7 +451,6 @@ \endcode \li Run device/boundary/mksdcard.sh: \code - ~/bd-android$ sudo umount /media/* /media/$USER/* ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/XXX ~/bd-android$ sync \endcode -- cgit v1.2.3 From 7b09f72dcc5f8c0f3a698af420fcb35ad697da88 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 17 Oct 2013 14:05:58 +0300 Subject: Fix correct path for adb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5825068acc3fd65cec67f4a0b71de732326286b9 Reviewed-by: Pasi Petäjäjärvi --- src/doc/src/b2qt-post-install-setup.qdocinc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index e18f076..4b99672 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -17,7 +17,7 @@ this shell command: \code - /targets/android-utils/bin/adb devices + /Tools/b2qt/adb devices \endcode The output should be a list of connected android devices, -- cgit v1.2.3 From 5c15d009309c62646165e074ed49f86c073bf30b Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 16:01:30 +0200 Subject: Add error handling to existing audio functions Change-Id: Icb7113f1a251b076f49c052bebee3fbd2e6139e8 Reviewed-by: Yoann Lopes --- src/utils/qdroidutils.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 31ed09c..9a5d18d 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -1,5 +1,6 @@ #include "qdroidutils.h" #include +#include #ifdef Q_OS_ANDROID_NO_SDK #include @@ -55,8 +56,11 @@ void QDroidUtils::powerOffSystem() void QDroidUtils::setMasterVolume(int volume) { #ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; volume = qBound(0, volume, 100); - android::AudioSystem::setMasterVolume(android::AudioSystem::linearToLog(volume)); + rc = android::AudioSystem::setMasterVolume(android::AudioSystem::linearToLog(volume)); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while setting audio properties."; #endif } @@ -70,7 +74,10 @@ void QDroidUtils::setMasterVolume(int volume) void QDroidUtils::setMasterMute(bool mute) { #ifdef Q_OS_ANDROID_NO_SDK - android::AudioSystem::setMasterMute(mute); + android::status_t rc; + rc = android::AudioSystem::setMasterMute(mute); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while setting audio properties."; #endif } @@ -118,9 +125,12 @@ void QDroidUtils::setMasterMute(bool mute) void QDroidUtils::setStreamVolume(AudioStreamType streamType, int volume) { #ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; volume = qBound(0, volume, 100); - android::AudioSystem::setStreamVolume(audio_stream_type_t(streamType), + rc = android::AudioSystem::setStreamVolume(audio_stream_type_t(streamType), android::AudioSystem::linearToLog(volume), 0); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while setting audio properties."; #endif } @@ -133,7 +143,10 @@ void QDroidUtils::setStreamVolume(AudioStreamType streamType, int volume) void QDroidUtils::setStreamMute(AudioStreamType streamType, bool mute) { #ifdef Q_OS_ANDROID_NO_SDK - android::AudioSystem::setStreamMute(audio_stream_type_t(streamType), mute); + android::status_t rc; + rc = android::AudioSystem::setStreamMute(audio_stream_type_t(streamType), mute); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while setting audio properties."; #endif } -- cgit v1.2.3 From 0693d097c487a2ec83e62d1e5a5bbd8e99bd31f4 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 16:02:00 +0200 Subject: Add getter functions for audio levels Change-Id: Icba2c03d946768b43503b167890e6d826e4fecc6 Reviewed-by: Yoann Lopes --- src/utils/qdroidutils.cpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++ src/utils/qdroidutils.h | 5 +++++ 2 files changed, 56 insertions(+) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 9a5d18d..4d05937 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -238,3 +238,54 @@ bool QDroidUtils::setHostname(QString hostname) #endif return true; } + +float QDroidUtils::masterVolume() const +{ + + qDebug() << android::AudioSystem::NUM_STREAM_TYPES; + + float volume = NAN; +#ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; + rc = android::AudioSystem::getMasterVolume(&volume); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while getting audio properties."; +#endif + return volume; +} + +bool QDroidUtils::masterMute() const +{ + bool mute = false; +#ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; + rc = android::AudioSystem::getMasterMute(&mute); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while getting audio properties."; +#endif + return mute; +} + +float QDroidUtils::streamVolume(AudioStreamType stream) const +{ + float volume = NAN; +#ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; + rc = android::AudioSystem::getStreamVolume(audio_stream_type_t(stream), &volume, 0); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while getting audio properties."; +#endif + return volume; +} + +bool QDroidUtils::streamMute(AudioStreamType stream) const +{ + bool mute = false; +#ifdef Q_OS_ANDROID_NO_SDK + android::status_t rc; + rc = android::AudioSystem::getStreamMute(audio_stream_type_t(stream), &mute); + if (rc != android::NO_ERROR) + qWarning() << Q_FUNC_INFO << "Error while getting audio properties."; +#endif + return mute; +} diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h index 7f37f70..339a529 100644 --- a/src/utils/qdroidutils.h +++ b/src/utils/qdroidutils.h @@ -41,6 +41,11 @@ public Q_SLOTS: void setStreamVolume(AudioStreamType stream, int volume); void setStreamMute(AudioStreamType stream, bool mute); + float masterVolume() const; + bool masterMute() const; + float streamVolume(AudioStreamType stream) const; + bool streamMute(AudioStreamType stream) const; + bool setDisplayBrightness(quint8 value); QString getIPAddress(); -- cgit v1.2.3 From 417869ebae545c707b4e8bc2b0bc503760009df4 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 16:02:27 +0200 Subject: Show audio level before and after change Change-Id: I0a63b2abec22308fb522e2c1c8347e4cc45ad424 Reviewed-by: Yoann Lopes --- src/qt_hw_init/main.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp index 2ee8749..9fb810a 100644 --- a/src/qt_hw_init/main.cpp +++ b/src/qt_hw_init/main.cpp @@ -1,4 +1,5 @@ #include "../utils/qdroidutils.h" +#include static void setMaxVolume(QDroidUtils *utils) { @@ -15,12 +16,32 @@ static void setDisplayBrightness(QDroidUtils *utils) utils->setDisplayBrightness(255); } +static void showValues(QDroidUtils *utils) +{ + qDebug() << "Master volume:" << utils->masterVolume(); + qDebug() << "Master mute:" << utils->masterMute(); + qDebug() << "System audio volume:" << utils->streamVolume(QDroidUtils::SystemAudioStream); + qDebug() << "System audio mute:" << utils->streamMute(QDroidUtils::SystemAudioStream); + qDebug() << "Music audio volume:" << utils->streamVolume(QDroidUtils::MusicAudioStream); + qDebug() << "Music audio mute:" << utils->streamMute(QDroidUtils::MusicAudioStream); + qDebug() << "Notification audio volume:" << utils->streamVolume(QDroidUtils::NotificationAudioStream); + qDebug() << "Notification audio mute:" << utils->streamMute(QDroidUtils::NotificationAudioStream); + qDebug() << "EnforcedAudible audio volume:" << utils->streamVolume(QDroidUtils::EnforcedAudibleAudioStream); + qDebug() << "EnforcedAudible audio mute:" << utils->streamMute(QDroidUtils::EnforcedAudibleAudioStream); +} + int main(int, char *[]) { QDroidUtils utils; + qDebug() << "Audio settings before change:"; + showValues(&utils); + setMaxVolume(&utils); setDisplayBrightness(&utils); + qDebug() << "Audio settings after change:"; + showValues(&utils); + return 0; } -- cgit v1.2.3 From 87ae0a3cccbbbb915458a3ca79a97486e6f8f331 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 17 Oct 2013 16:31:28 +0200 Subject: Remove invalid debug code Change-Id: Ic93149e453eb9890304816f77b1461e4f4968280 Reviewed-by: Laszlo Agocs --- src/utils/qdroidutils.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 4d05937..f2194c4 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -241,9 +241,6 @@ bool QDroidUtils::setHostname(QString hostname) float QDroidUtils::masterVolume() const { - - qDebug() << android::AudioSystem::NUM_STREAM_TYPES; - float volume = NAN; #ifdef Q_OS_ANDROID_NO_SDK android::status_t rc; -- cgit v1.2.3 From 600056668b9d0970465e3302dc6f9ffec11091b7 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 17 Oct 2013 15:58:25 +0200 Subject: Doc: Use Qt Enterprise Embedded as the product name - Update the documentation to use 'Qt Enterprise Embedded' as the product / SDK name. - Update the html files to use prefix 'qee' instead of 'b2qt'. - Remove discussion about 'SDK', only use the above name Change-Id: Icc7e326df98e6f3053869e4aa3b8aa2ab446ecbc Reviewed-by: Eirik Aavitsland --- src/doc/config/b2qt.qdocconf | 16 +-- src/doc/src/b2qt-post-install-setup.qdocinc | 2 +- src/doc/src/b2qt.qdoc | 152 ++++++++++++++-------------- 3 files changed, 84 insertions(+), 86 deletions(-) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 8758381..781e102 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -4,8 +4,8 @@ naturallanguage = en_US outputencoding = UTF-8 sourceencoding = UTF-8 -project = Boot2Qt -description = Boot to Qt Documentation +project = QtEnterpriseEmbedded +description = Qt Enterprise Embedded Documentation version = 1.0.0 sourcedirs = ../src @@ -18,16 +18,16 @@ qhp.projects = B2Qt qhp.B2Qt.file = b2qt.qhp qhp.B2Qt.namespace = com.digia.b2qt.100 qhp.B2Qt.virtualFolder = b2qt -qhp.B2Qt.indexTitle = Boot to Qt Documentation +qhp.B2Qt.indexTitle = Qt Enterprise Embedded Documentation qhp.B2Qt.indexRoot = -qhp.B2Qt.subprojects = manual -qhp.B2Qt.subprojects.manual.title = Boot to Qt Introduction -qhp.B2Qt.subprojects.manual.indexTitle = Boot to Qt Introduction -qhp.B2Qt.subprojects.manual.type = manual +qhp.B2Qt.subprojects = manual +qhp.B2Qt.subprojects.manual.title = Qt Enterprise Embedded +qhp.B2Qt.subprojects.manual.indexTitle = Qt Enterprise Embedded +qhp.B2Qt.subprojects.manual.type = manual macro.B2Q = "Boot to Qt" -macro.SDK = "Qt for Embedded Enterprise SDK" +macro.SDK = "Qt Enterprise Embedded" macro.B2QA = "\\e {Boot to Qt for embedded Android}" macro.B2QL = "\\e {Boot to Qt for embedded Linux}" diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index 4b99672..194f16d 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -17,7 +17,7 @@ this shell command: \code - /Tools/b2qt/adb devices + /Tools/b2qt/adb devices \endcode The output should be a list of connected android devices, diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index d0f708c..03a1c75 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -16,10 +16,10 @@ ****************************************************************************/ /*! - \contentspage{index.html}{Boot to Qt} + \contentspage{index.html}{Qt Enterprise Embedded} \page index.html - \nextpage b2qt-installation-guide.html - \title Boot to Qt Introduction + \nextpage qee-installation-guide.html + \title Qt Enterprise Embedded \e{\b{IMPORTANT:} Make sure to follow the \l{Installation Guide} closely!} @@ -27,20 +27,26 @@ \section1 Contents \list - \li \b {\l{Installation Guide}} - \li \b {\l{Preparing Hardware}} + \li \l{Installation Guide} + \li \l{Preparing Hardware} \list \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} \endlist - \li \b {\l{Building and Running an Example}} - \li \b {\l{Customization}} - \li \b {\l{Supported Platforms}} - \li \b {\l{Troubleshooting}} + \li \l{Building and Running an Example} + \li \l{Customization} + \li \l{Supported Platforms} + \li \l{Troubleshooting} \endlist + \section1 About \SDK + + \SDK includes the \B2Q stack, providing a complete software development + package for creating applications on embedded devices. It comes with + the Qt Creator IDE with preconfigured build targets for hardware + platforms as well as an \l{Emulator}{emulator}. \section1 What is \B2Q? @@ -61,14 +67,6 @@ hardware configurations. \B2Q support is not limited to the devices used as reference platforms, it can be made to run on a variety of hardware. - \section1 \SDK - - \SDK includes the \B2Q stack, providing a complete software development - package for creating applications on embedded devices. It comes with - the Qt Creator IDE with preconfigured build targets for hardware - platforms as well as an \l{Emulator}{emulator}. - - \section1 About Qt \l{http://qt.digia.com/}{Qt} is a full development framework with tools @@ -114,16 +112,16 @@ */ /*! - \page b2qt-installation-guide.html + \page qee-installation-guide.html \title Installation Guide \previouspage index.html - \nextpage b2qt-preparing-hardware.html + \nextpage qee-preparing-hardware.html - \e{IMPORTANT: The \SDK requires the following installation steps to be followed closely.} + \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} In case of problems, see the \l{Troubleshooting} information and the \l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/} - {Boot to Qt Known Issues} page. + {Qt Enterprise Embedded Known Issues} page. \target Requirements for Development Host \section1 0. Requirements for Development Host @@ -136,7 +134,7 @@ \target Installing 32-bit Support Libraries \section1 1. Installing 32-bit Support Libraries - Some of the build tools in \B2Q are 32-bit programs, and on 64-bit + Some of the build tools in \SDK are 32-bit programs, and on 64-bit systems they require that support libraries for running 32-bit code are present in the system. To install the required packages in Ubuntu, use the following command in a terminal: @@ -148,7 +146,7 @@ \target Installing VirtualBox \section1 2. Installing VirtualBox - The emulator in \B2Q relies on VirtualBox virtualization software. You can + The \B2Q emulator in \SDK relies on VirtualBox virtualization software. You can download it from \l{https://www.virtualbox.org/wiki/Linux_Downloads} or install it from the command line with the following command: @@ -169,12 +167,11 @@ \li Change both the lower and upper address bounds to 192.168.56.101. \endlist - \section1 3. Installing the \SDK + \section1 3. Installing \SDK - If you have not already installed the SDK, do it as follows. + If you have not already installed \SDK, do it as follows. - After downloading the binary installer for the SDK, - make sure it is executable either by + After downloading the binary installer, make sure it is executable either by \list \li Using \c{chmod +x } command, or @@ -184,9 +181,9 @@ Run the installer and follow its instructions. - The installer will let you select a directory where the SDK will be + The installer will let you select a directory where \SDK will be installed. In the rest of this documentation, that directory is referred - to as \b{\c{}}. The default installation directory is + to as \b{\c{}}. The default installation directory is \tt{~/Qt}. \target Installing Boot to Qt on Target Devices @@ -220,10 +217,10 @@ */ /*! - \page b2qt-preparing-hardware.html + \page qee-preparing-hardware.html \title Preparing Hardware - \previouspage b2qt-installation-guide.html - \nextpage b2qt-building-and-running.html + \previouspage qee-installation-guide.html + \nextpage qee-building-and-running.html Before deploying and testing your Qt application on hardware, the target device needs to be flashed with an image that contains the @@ -242,10 +239,10 @@ /*! \target Nexus 7 (embedded Android) - \page b2qt-preparing-hardware-nexus-7.html + \page qee-preparing-hardware-nexus-7.html \title Preparing Nexus 7 - \previouspage b2qt-installation-guide.html - \nextpage b2qt-building-and-running.html + \previouspage qee-installation-guide.html + \nextpage qee-building-and-running.html When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7} as a development device, following steps are required to prepare it for @@ -262,7 +259,7 @@ \li Start the Nexus up in \e{fastboot} mode: Press the power button for a second, and then keep the Volume Down key pressed, until you see a screen with a green robot with its front panel open. Note: If you get the ordinary startup screen instead, just power it down and try again. \li On the development host, give the command \code - sudo /Tools/b2qt/fastboot oem unlock + sudo /Tools/b2qt/fastboot oem unlock \endcode The Nexus screen will ask if you want to unlock the bootloader. Press power button to confirm. \li Wait a few seconds, and check that the text line stating the \c{LOCK STATE} now says \c{UNLOCKED}. @@ -271,7 +268,7 @@ \section1 Updating a Nexus 7 with \B2Q Images \note \b{It is important that the steps in this section are repeated - every time after updating the \SDK.} + every time after updating \SDK.} An unlocked Nexus 7 device can now be updated with a \B2Q image. @@ -282,7 +279,7 @@ device, using the following commands in the order they are listed: \code - cd + cd sudo ./Tools/b2qt/fastboot flash boot Boot2Qt-1.0/nexus7-eAndroid/images/boot.img sudo ./Tools/b2qt/fastboot flash system Boot2Qt-1.0/nexus7-eAndroid/images/system.img sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-1.0/nexus7-eAndroid/images/data.img @@ -303,7 +300,7 @@ party drivers from \l{https://developers.google.com/android/nexus/drivers#grouperjdq39} {https://developers.google.com/android/nexus/drivers#grouperjdq39} \code - cd + cd ./Boot2Qt-1.0/nexus7-eAndroid/images/download.sh \endcode @@ -352,17 +349,17 @@ /*! \target BeagleBoard-xM (embedded Android and Linux) - \page b2qt-preparing-hardware-beagleboard.html + \page qee-preparing-hardware-beagleboard.html \title Preparing BeagleBoard-xM - \previouspage b2qt-installation-guide.html - \nextpage b2qt-building-and-running.html + \previouspage qee-installation-guide.html + \nextpage qee-building-and-running.html When using a \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} as a development device, following steps are required to prepare it for \B2Q. \note \b{It is important that the steps in this section are repeated - every time after updating the \SDK.} + every time after updating \SDK.} The images containing \B2Q stack for BeagleBoard-xM is included in the SDK, ready to be copied to a micro-SD card. @@ -384,12 +381,12 @@ \list \li \b{\B2QA} \code - cd + cd sudo dd if=Boot2Qt-1.0/beagleboard-eAndroid/images/sdcard.img of=/dev/XXX bs=1M \endcode \li \b{\B2QL} \code - cd + cd sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/XXX \endcode \endlist @@ -412,9 +409,9 @@ /*! \target Sabre Lite i.MX 6 (embedded Android) - \page b2qt-preparing-hardware-imx6.html + \page qee-preparing-hardware-imx6.html \title Preparing Sabre Lite i.MX 6 - \previouspage b2qt-installation-guide.html + \previouspage qee-installation-guide.html When using a \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Sabre @@ -422,7 +419,7 @@ to prepare it for \B2QA. \note \b{It is important that the steps in this section are repeated - every time after updating the \SDK.} + every time after updating \SDK.} The images containing \B2Q stack for Sabre Lite i.MX 6 is included in the SDK, ready to be copied to a micro-SD card. @@ -467,7 +464,7 @@ Then, upgrade the micro-SD Card with \B2QA: \code - cd + cd Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX \endcode @@ -489,10 +486,10 @@ /*! \target Raspberry Pi Model B (embedded Linux) - \page b2qt-preparing-hardware-rasberrypi.html + \page qee-preparing-hardware-rasberrypi.html \title Preparing Raspberry Pi - \previouspage b2qt-installation-guide.html - \nextpage b2qt-building-and-running.html + \previouspage qee-installation-guide.html + \nextpage qee-building-and-running.html When using a \l{http://www.raspberrypi.org/}{Raspberry Pi} as a development device, following steps are required to prepare it for @@ -503,7 +500,7 @@ includes an Ethernet port. \note \b{It is important that the steps in this section are repeated - every time after updating the \SDK.} + every time after updating \SDK.} The images containing \B2Q stack for Raspberry Pi is included in the SDK, ready to be copied to a micro-SD card. @@ -519,7 +516,7 @@ Write the image to the micro-SD card: \code - cd + cd sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX \endcode @@ -536,12 +533,12 @@ */ /*! - \page b2qt-building-and-running.html + \page qee-building-and-running.html \title Building and Running an Example - \previouspage b2qt-installation-guide.html - \nextpage b2qt-customization.html + \previouspage qee-installation-guide.html + \nextpage qee-customization.html - Once the installation and configuration steps for the SDK and the + Once the installation and configuration steps for \SDK and the target device(s) are completed, it's time to test the setup. First, make sure your device is powered up and connected to the @@ -589,10 +586,10 @@ */ /*! - \page b2qt-customization.html + \page qee-customization.html \title Customization - \previouspage b2qt-building-and-running.html - \nextpage b2qt-supported-platforms.html + \previouspage qee-building-and-running.html + \nextpage qee-supported-platforms.html \section1 Environment and Input @@ -610,7 +607,7 @@ remounted read-write to allow modification. The following command does that: \code - /Tools/b2qt/adb remount + /Tools/b2qt/adb remount \endcode In the \c{appcontroller.conf} file the input devices are @@ -639,7 +636,7 @@ To remove your application from the default startup use the following command: \code - /Tools/b2qt/adb shell appcontroller --remove-default + /Tools/b2qt/adb shell appcontroller --remove-default \endcode \section1 Switching Between Portrait and Landscape Views @@ -681,15 +678,16 @@ */ /*! - \page b2qt-supported-platforms.html + \page qee-supported-platforms.html \title Supported Platforms - \previouspage b2qt-customization.html - \nextpage b2qt-troubleshooting.html + \previouspage qee-customization.html + \nextpage qee-troubleshooting.html \section1 Supported Target Devices - \B2Q can be made to run on hardware that has support for - the Android operating system, version 4.0 or later. + The \B2Q stack can be made to run on a variety of hardware. \B2QA + requires hardware that has support for the Android operating system, + version 4.0 or later. Approximate minimal hardware requirements for running \B2Q are: \list @@ -709,20 +707,20 @@ \section1 Supported Development Environment - The development environment supported by \B2Q is Ubuntu Linux 64-bit (12.04 LTS or 12.10). + The development environment supported by \SDK is Ubuntu Linux 64-bit (12.04 LTS or 12.10). \sa {Requirements for Development Host} */ /*! - \page b2qt-troubleshooting.html + \page qee-troubleshooting.html \title Troubleshooting - \previouspage b2qt-supported-platforms.html + \previouspage qee-supported-platforms.html \note An updated version of this information may be available in the Digia customer portal. - See also \b{\l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/}{Boot to Qt Known Issues}.} + See also \b{\l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/}{Qt Enterprise Embedded Known Issues}.} \section1 General Issues @@ -765,8 +763,8 @@ download the correct file for your device. Unpack it, and then \code - /Tools/b2qt/adb reboot bootloader - /Tools/b2qt/fastboot -w update .zip + /Tools/b2qt/adb reboot bootloader + /Tools/b2qt/fastboot -w update .zip \endcode \section2 How do I shut down the Nexus 7? @@ -777,7 +775,7 @@ Otherwise, make sure the Nexus 7 is connected to your PC with USB, and run the following command in a terminal: \code - /Tools/b2qt/adb shell reboot -p + /Tools/b2qt/adb shell reboot -p \endcode Alternatively, press and hold the power button for 10 @@ -793,7 +791,7 @@ The following command shows the system log: \code - /Tools/b2qt/adb logcat + /Tools/b2qt/adb logcat \endcode \section2 Mouse or touch input does not work @@ -832,7 +830,7 @@ devices: \code - /Tools/b2qt/adb devices + /Tools/b2qt/adb devices \endcode \section2 What is the user and password to access my embedded Linux device -- cgit v1.2.3 From dc0dc3fae6cbeadef05ed10c0d0197f9f00a76a8 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 18 Oct 2013 12:18:03 +0200 Subject: Doc: Reintroduce i.MX6-eLinux setup instructions Change-Id: Ibe167ff7949e50dfd22a8f45fc6fd3dc2739a86a Reviewed-by: Andy Nichols --- src/doc/src/b2qt.qdoc | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 03a1c75..1822921 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -31,7 +31,7 @@ \li \l{Preparing Hardware} \list \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)} - \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android)} + \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android and Linux)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} \endlist @@ -228,7 +228,7 @@ \list \li \l{Nexus 7 (embedded Android)} - \li \l{Sabre Lite i.MX 6 (embedded Android)} + \li \l{Sabre Lite i.MX 6 (embedded Android and Linux)} \li \l{BeagleBoard-xM (embedded Android and Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} \endlist @@ -408,7 +408,7 @@ */ /*! - \target Sabre Lite i.MX 6 (embedded Android) + \target Sabre Lite i.MX 6 (embedded Android and Linux) \page qee-preparing-hardware-imx6.html \title Preparing Sabre Lite i.MX 6 \previouspage qee-installation-guide.html @@ -416,22 +416,26 @@ When using a \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Sabre Lite i.MX 6} as a development device, following steps are required - to prepare it for \B2QA. + to prepare it for \B2Q. \note \b{It is important that the steps in this section are repeated every time after updating \SDK.} - The images containing \B2Q stack for Sabre Lite i.MX 6 is included in the SDK, - ready to be copied to a micro-SD card. + The images containing the \B2Q stack for Sabre Lite i.MX 6 are included + in the SDK, ready to be copied to a micro-SD card. \section1 Preparing a Micro-SD Card - For \B2QA, a micro-SD card of at least 4GB capacity is needed. + For \B2QA, a micro-SD card of at least 4GB capacity is needed. For \B2QL, + a card of at least 512MB capacity is sufficient. \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the Android image + \e{If installing} \B2QL, \e{you can skip this step and proceed to} + \l{Installing the Boot to Qt Image}. + Download the package \e{imx6-jb-20130628.tar.gz} from \l{http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/}{Boundary Devices Android Jellybean i.MX6 images} (registration required). @@ -461,12 +465,21 @@ sudo apt-get install u-boot-tools \endcode - Then, upgrade the micro-SD Card with \B2QA: + Then, upgrade the micro-SD Card with \B2Q. Use one of the commands below, + depending on whether you're developing for embedded Android or Linux: - \code - cd - Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX - \endcode + \list + \li \b{\B2QA} + \code + cd + Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX + \endcode + \li \b{\B2QL} + \code + cd + Boot2Qt-1.0/iMX6-eLinux/images/deploy.sh /dev/XXX + \endcode + \endlist After the installation is complete, power up the device and confirm that it shows a \B2Q welcome screen and/or demo. -- cgit v1.2.3 From 9b55e06ac99cc06594ed973d2bb7cbfd46b31162 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 18 Oct 2013 15:21:44 +0200 Subject: Doc: Add troubleshooting sections for emulator connectivity Change-Id: I167aa827d594d143a5c86dcf31324ac4e64675ac Reviewed-by: Laszlo Agocs --- src/doc/src/b2qt.qdoc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 1822921..21187cf 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -846,6 +846,37 @@ /Tools/b2qt/adb devices \endcode + \section2 The emulator cannot connect to the internet + + By default, the Virtualbox is configured to use host-only network, so external + connections do not work in the emulator. + + You may be able to enable internet connectivity with another + virtual network adapter in NAT mode by adapting + \l{http://askubuntu.com/questions/293816/in-virtualbox-how-do-i-set-up-host-only-virtual-machines-that-can-access-the-in}{these} + instructions. + + \section2 The emulator is stuck in 'Waiting for display data' or fails to start properly + + Check the output of the following command: + + \code + /Tools/b2qt/adb devices + \endcode + + If the emulator (192.168.56.101) is not listed there, try connecting to it: + + \code + /Tools/b2qt/adb connect 192.168.56.101 + \endcode + + If the emulator is already listed, try disconnecting it: + \code + /Tools/b2qt/adb disconnect 192.168.56.101 + \endcode + + And then close the emulator and retry. + \section2 What is the user and password to access my embedded Linux device Embedded Linux devices can be accessed using user \c{root} and an empty password. -- cgit v1.2.3 From 0a774cd83d57f47c15603baa002c08b6353ea1fe Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 18 Oct 2013 15:31:12 +0200 Subject: Doc: remove URLs to Known Issues page Change-Id: Ida9153a36f60a9001b44e854a4e8467d2f3629ad Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 21187cf..e2cec14 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -120,8 +120,8 @@ \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} In case of problems, see the \l{Troubleshooting} information and the - \l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/} - {Qt Enterprise Embedded Known Issues} page. + Known Issues in Qt Enterprise Embedded product page in Digia customer + portal. \target Requirements for Development Host \section1 0. Requirements for Development Host @@ -731,9 +731,8 @@ \title Troubleshooting \previouspage qee-supported-platforms.html - \note An updated version of this information may be available in the Digia customer portal. - - See also \b{\l{http://qt.digia.com/en/Product/Boot-to-Qt/Boot-to-Qt-Known-Issues/}{Qt Enterprise Embedded Known Issues}.} + \note An updated version of this information may be available in Digia customer portal, + see Known Issues in Qt Enterprise Embedded product page. \section1 General Issues -- cgit v1.2.3 From bfc709b616320dc2a68f7ddb866d77aa8a503d68 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 21 Oct 2013 18:57:47 +0200 Subject: Fix scheduling_policy service for Android 4.2.2. Change-Id: Ia27c7e7e0f36b3e9bc7c37aeb77c897ce46bedfe Reviewed-by: Eirik Aavitsland --- src/doppelganger/schedulingpolicyservice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doppelganger/schedulingpolicyservice.cpp b/src/doppelganger/schedulingpolicyservice.cpp index 641ddc4..27483e0 100644 --- a/src/doppelganger/schedulingpolicyservice.cpp +++ b/src/doppelganger/schedulingpolicyservice.cpp @@ -12,7 +12,7 @@ enum { }; #define PRIORITY_MIN 1 -#define PRIORITY_MAX 2 +#define PRIORITY_MAX 3 SchedulingPolicyService::SchedulingPolicyService() { -- cgit v1.2.3 From 663c9851fe367e8c2bdf8bc37e64b9e1668e3fe2 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 21 Oct 2013 19:02:31 +0200 Subject: Fix sound on Nexus 7. A behavior change in the HW audio driver for 4.2.2 causes the audio routing to never be set up automatically. Set the audio orientation to force the HW driver to set up audio routing. Task-number: QTRD-2472 Change-Id: I6f76aa299d0bc89c7061c7074dc5780e62045f0a Reviewed-by: Eirik Aavitsland --- src/qt_hw_init/main.cpp | 23 +++-------------------- src/utils/qdroidutils.cpp | 22 ++++++++++++++++++++++ src/utils/qdroidutils.h | 9 +++++++++ src/utils/utils.pro | 2 +- 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp index 9fb810a..3419c21 100644 --- a/src/qt_hw_init/main.cpp +++ b/src/qt_hw_init/main.cpp @@ -3,6 +3,9 @@ static void setMaxVolume(QDroidUtils *utils) { + // Set the audio orientation to something to force the HW driver to reconfigure + // audio routing (workaround for bug on Nexus 7) + utils->setOrientationForAudioSystem(QDroidUtils::LandscapeAudioOrientation); utils->setMasterVolume(100); utils->setMasterMute(false); utils->setStreamVolume(QDroidUtils::SystemAudioStream, 100); @@ -16,32 +19,12 @@ static void setDisplayBrightness(QDroidUtils *utils) utils->setDisplayBrightness(255); } -static void showValues(QDroidUtils *utils) -{ - qDebug() << "Master volume:" << utils->masterVolume(); - qDebug() << "Master mute:" << utils->masterMute(); - qDebug() << "System audio volume:" << utils->streamVolume(QDroidUtils::SystemAudioStream); - qDebug() << "System audio mute:" << utils->streamMute(QDroidUtils::SystemAudioStream); - qDebug() << "Music audio volume:" << utils->streamVolume(QDroidUtils::MusicAudioStream); - qDebug() << "Music audio mute:" << utils->streamMute(QDroidUtils::MusicAudioStream); - qDebug() << "Notification audio volume:" << utils->streamVolume(QDroidUtils::NotificationAudioStream); - qDebug() << "Notification audio mute:" << utils->streamMute(QDroidUtils::NotificationAudioStream); - qDebug() << "EnforcedAudible audio volume:" << utils->streamVolume(QDroidUtils::EnforcedAudibleAudioStream); - qDebug() << "EnforcedAudible audio mute:" << utils->streamMute(QDroidUtils::EnforcedAudibleAudioStream); -} - int main(int, char *[]) { QDroidUtils utils; - qDebug() << "Audio settings before change:"; - showValues(&utils); - setMaxVolume(&utils); setDisplayBrightness(&utils); - qDebug() << "Audio settings after change:"; - showValues(&utils); - return 0; } diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index f2194c4..da443c9 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -45,6 +45,28 @@ void QDroidUtils::powerOffSystem() qWarning("powerOff returned"); } +void QDroidUtils::setOrientationForAudioSystem(AudioOrientation orientation) +{ +#ifdef Q_OS_ANDROID_NO_SDK + QString orientationString = QStringLiteral("undefined"); + switch (orientation) { + case LandscapeAudioOrientation: + orientationString = QStringLiteral("landscape"); + break; + case PortraitAudioOrientation: + orientationString = QStringLiteral("portrait"); + break; + case SquareAudioOrientation: + orientationString = QStringLiteral("square"); + break; + default: + break; + } + android::AudioSystem::setParameters(0, android::String8(QStringLiteral("orientation=%2") + .arg(orientationString).toLatin1().constData())); +#endif +} + /*! * Sets the master volume to \a volume. * The volume can range from 0 to 100 and is linear. diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h index 339a529..b0f9061 100644 --- a/src/utils/qdroidutils.h +++ b/src/utils/qdroidutils.h @@ -8,6 +8,13 @@ class Q_DECL_EXPORT QDroidUtils : public QObject Q_OBJECT Q_ENUMS(AudioStreamType) public: + enum AudioOrientation { + LandscapeAudioOrientation, + PortraitAudioOrientation, + SquareAudioOrientation, + UndefinedAudioOrientation, + }; + enum AudioStreamType { DefaultAudioStream = -1, VoiceCallAudioStream = 0, @@ -36,6 +43,8 @@ public Q_SLOTS: void rebootSystem(); void powerOffSystem(); + void setOrientationForAudioSystem(AudioOrientation orientation); + void setMasterVolume(int volume); void setMasterMute(bool mute); void setStreamVolume(AudioStreamType stream, int volume); diff --git a/src/utils/utils.pro b/src/utils/utils.pro index 5711337..a15231f 100644 --- a/src/utils/utils.pro +++ b/src/utils/utils.pro @@ -11,7 +11,7 @@ QT = core network MODULE = droidutils load(qt_module) -android: LIBS += -lmedia -lhardware -lcutils +android: LIBS += -lmedia -lhardware -lcutils -lutils HEADERS += \ $$PWD/qdroidutils.h -- cgit v1.2.3 From 9d3f20ff59c6d0868464681697cf5699ed09526f Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 14 Nov 2013 09:23:28 +0100 Subject: Make it clean where to configure the network settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7f03d3734e9b1f7761614a01c6a43e288fef544d Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e2cec14..dde3f18 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -156,7 +156,8 @@ \b{Configuring VirtualBox} - Open VirtualBox network settings: Select \b{File > Preferences...} + Open the VirtualBox user interface. + Open the network settings: Select \b{File > Preferences...} and click on the \b{Network} tab. Create a new network named \e{vboxnet0} and edit its properties: -- cgit v1.2.3 From 67e2838be9799821e0ac605ea5177e660e4be925 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Mon, 18 Nov 2013 13:20:52 +0100 Subject: Doc: Add note about firewall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifad434e8b9c17b11f1aee2bd608293cdb09c597a Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index dde3f18..7c643a6 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -168,6 +168,9 @@ \li Change both the lower and upper address bounds to 192.168.56.101. \endlist + Configure your system firewall to allow TCP and UDP packets between your host and + the virtual machine. + \section1 3. Installing \SDK If you have not already installed \SDK, do it as follows. -- cgit v1.2.3 From d050b4ae6ce92ada4105adaba664e9ab3cd2506c Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 22 Oct 2013 12:46:28 +0200 Subject: Doc: Updated navigation bar landing page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Landing page title changed to "Qt Enterprise Embedded" Change-Id: I07121d510fda8c8b5f2e8db527a08c4a4b39431c Reviewed-by: Topi Reiniö --- src/doc/config/b2qt.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 781e102..830d44b 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -31,4 +31,4 @@ macro.SDK = "Qt Enterprise Embedded" macro.B2QA = "\\e {Boot to Qt for embedded Android}" macro.B2QL = "\\e {Boot to Qt for embedded Linux}" -navigation.landingpage = "Boot to Qt Introduction" +navigation.landingpage = "Qt Enterprise Embedded" -- cgit v1.2.3 From bd9e9d0d12536b26adf8ee212dadc4b939871dfe Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Thu, 21 Nov 2013 13:40:22 +0100 Subject: Doc: Match QtCreator 3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I99a4a09ccc3eb0ef0efddf38691f070e9e36d3c1 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 7c643a6..2e85688 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -566,7 +566,9 @@ \list 1 \li Open \b{File > New File or Project}, select - \b{Qt Quick 2 Application (Built-in Types)} and click \b{Choose...}. + \b{Qt Quick 2 Application} and click \b{Choose...}. + \li Choose a location for your new project. + \li In \b{Qt Quick Component Set} dialog, select \b{Qt Quick 2.0}. \li In \b{Kit Selection} dialog, select the kit(s) for your devices. You can also select the emulator kit to test running the project in the emulator. -- cgit v1.2.3 From 9c0ce6cd0cdced483152d631163da4c313daf0b5 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 22 Oct 2013 14:07:56 +0200 Subject: Doc: Change html prefixes again Change prefixes from 'qee' to 'qtee'. Change-Id: I82da3a811cb1b4fa888d46f208881a8461abfe54 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e2cec14..e1e3b4b 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -18,7 +18,7 @@ /*! \contentspage{index.html}{Qt Enterprise Embedded} \page index.html - \nextpage qee-installation-guide.html + \nextpage qtee-installation-guide.html \title Qt Enterprise Embedded \e{\b{IMPORTANT:} Make sure to follow the \l{Installation Guide} @@ -112,10 +112,10 @@ */ /*! - \page qee-installation-guide.html + \page qtee-installation-guide.html \title Installation Guide \previouspage index.html - \nextpage qee-preparing-hardware.html + \nextpage qtee-preparing-hardware.html \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} @@ -217,10 +217,10 @@ */ /*! - \page qee-preparing-hardware.html + \page qtee-preparing-hardware.html \title Preparing Hardware - \previouspage qee-installation-guide.html - \nextpage qee-building-and-running.html + \previouspage qtee-installation-guide.html + \nextpage qtee-building-and-running.html Before deploying and testing your Qt application on hardware, the target device needs to be flashed with an image that contains the @@ -239,10 +239,10 @@ /*! \target Nexus 7 (embedded Android) - \page qee-preparing-hardware-nexus-7.html + \page qtee-preparing-hardware-nexus-7.html \title Preparing Nexus 7 - \previouspage qee-installation-guide.html - \nextpage qee-building-and-running.html + \previouspage qtee-installation-guide.html + \nextpage qtee-building-and-running.html When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7} as a development device, following steps are required to prepare it for @@ -349,10 +349,10 @@ /*! \target BeagleBoard-xM (embedded Android and Linux) - \page qee-preparing-hardware-beagleboard.html + \page qtee-preparing-hardware-beagleboard.html \title Preparing BeagleBoard-xM - \previouspage qee-installation-guide.html - \nextpage qee-building-and-running.html + \previouspage qtee-installation-guide.html + \nextpage qtee-building-and-running.html When using a \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} as a development device, following steps are required to prepare it for @@ -409,9 +409,9 @@ /*! \target Sabre Lite i.MX 6 (embedded Android and Linux) - \page qee-preparing-hardware-imx6.html + \page qtee-preparing-hardware-imx6.html \title Preparing Sabre Lite i.MX 6 - \previouspage qee-installation-guide.html + \previouspage qtee-installation-guide.html When using a \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Sabre @@ -499,10 +499,10 @@ /*! \target Raspberry Pi Model B (embedded Linux) - \page qee-preparing-hardware-rasberrypi.html + \page qtee-preparing-hardware-rasberrypi.html \title Preparing Raspberry Pi - \previouspage qee-installation-guide.html - \nextpage qee-building-and-running.html + \previouspage qtee-installation-guide.html + \nextpage qtee-building-and-running.html When using a \l{http://www.raspberrypi.org/}{Raspberry Pi} as a development device, following steps are required to prepare it for @@ -546,10 +546,10 @@ */ /*! - \page qee-building-and-running.html + \page qtee-building-and-running.html \title Building and Running an Example - \previouspage qee-installation-guide.html - \nextpage qee-customization.html + \previouspage qtee-installation-guide.html + \nextpage qtee-customization.html Once the installation and configuration steps for \SDK and the target device(s) are completed, it's time to test the setup. @@ -599,10 +599,10 @@ */ /*! - \page qee-customization.html + \page qtee-customization.html \title Customization - \previouspage qee-building-and-running.html - \nextpage qee-supported-platforms.html + \previouspage qtee-building-and-running.html + \nextpage qtee-supported-platforms.html \section1 Environment and Input @@ -691,10 +691,10 @@ */ /*! - \page qee-supported-platforms.html + \page qtee-supported-platforms.html \title Supported Platforms - \previouspage qee-customization.html - \nextpage qee-troubleshooting.html + \previouspage qtee-customization.html + \nextpage qtee-troubleshooting.html \section1 Supported Target Devices @@ -727,9 +727,9 @@ */ /*! - \page qee-troubleshooting.html + \page qtee-troubleshooting.html \title Troubleshooting - \previouspage qee-supported-platforms.html + \previouspage qtee-supported-platforms.html \note An updated version of this information may be available in Digia customer portal, see Known Issues in Qt Enterprise Embedded product page. -- cgit v1.2.3 From 40fdfebd2ceff38b9edd32f063bf6218e156e462 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 22 Oct 2013 15:02:26 +0200 Subject: Doc: Add license information page Discuss the product licensing and third-party license info. Change-Id: I750f95f57a006ee23c342d15a915710caee510da Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e1e3b4b..3fc385b 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -38,6 +38,7 @@ \li \l{Building and Running an Example} \li \l{Customization} \li \l{Supported Platforms} + \li \l{License Information} \li \l{Troubleshooting} \endlist @@ -694,7 +695,7 @@ \page qtee-supported-platforms.html \title Supported Platforms \previouspage qtee-customization.html - \nextpage qtee-troubleshooting.html + \nextpage qtee-licenses.html \section1 Supported Target Devices @@ -726,6 +727,31 @@ */ +/*! + \page qtee-licenses.html + \title License Information + \previouspage qtee-supported-platforms.html + \nextpage qtee-troubleshooting.html + + \section1 Licensing + + \SDK is licensed under the Qt Enterprise commercial license. For more information, + see \l {http://qt.digia.com/licensing}. Evaluation licenses are also available, + see \l {http://qt.digia.com/Products/Qt-Enterprise-Embedded}. + + \section1 3rd Party Software Licenses + + The third-party licenses used in \SDK are listed in the file + \c {/Licenses/ThirdPartySoftware_Listing.txt}. + + \section2 Embedded Android Images + + The embedded Android platform is built from the \e {Android Open Source Project}, + source code available at \l {http://android.googlesource.com/}. The open + source licenses and notices are collected into the file + \c {/etc/NOTICE.html.gz} in the target images. +*/ + /*! \page qtee-troubleshooting.html \title Troubleshooting -- cgit v1.2.3 From 27d1ec0a2f4f5d2ee21c9b275ccdd70391eebe16 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 22 Oct 2013 14:14:03 +0200 Subject: Doc: Clarify Supported Nexus 7 model We support the Nexus 7 model from 2012. Change-Id: Icd61b3b5bb15de16b086ae174487cdca26f023c9 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 3fc385b..4b8b437 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -30,7 +30,7 @@ \li \l{Installation Guide} \li \l{Preparing Hardware} \list - \li \l{Preparing Nexus 7}{Nexus 7 (embedded Android)} + \li \l{Preparing Nexus 7}{Nexus 7 (2012) (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android and Linux)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} @@ -228,7 +228,7 @@ \B2Q stack. These steps vary from device to device: \list - \li \l{Nexus 7 (embedded Android)} + \li \l{Nexus 7 (2012) (embedded Android)} \li \l{Sabre Lite i.MX 6 (embedded Android and Linux)} \li \l{BeagleBoard-xM (embedded Android and Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} @@ -239,13 +239,13 @@ */ /*! - \target Nexus 7 (embedded Android) + \target Nexus 7 (2012) (embedded Android) \page qtee-preparing-hardware-nexus-7.html \title Preparing Nexus 7 \previouspage qtee-installation-guide.html \nextpage qtee-building-and-running.html - When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7} as a + When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7 (2012)} as a development device, following steps are required to prepare it for \B2Q. @@ -713,7 +713,7 @@ The following devices have been used as reference and are tested to work: \list - \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7} + \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7 (2012)} \li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)} \li \l{http://www.raspberrypi.org/faqs}{Raspberry Pi Model B} -- cgit v1.2.3 From c03fcde202a0dea22e753b3a380081415861d9da Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 22 Nov 2013 12:04:18 +0100 Subject: Add license headers Add an Enterprise License header to source files. Change-Id: I373886dade31ce00d4c10c64ebaf8ba226d5a62d Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt-post-install-setup.qdocinc | 18 ++++++++++++++++++ src/doc/src/b2qt.qdoc | 20 +++++++++++--------- src/doc/src/detect-sd-card-device-name.qdocinc | 18 ++++++++++++++++++ src/doppelganger/main.cpp | 18 ++++++++++++++++++ src/doppelganger/permissioncontroller.cpp | 18 ++++++++++++++++++ src/doppelganger/permissioncontroller.h | 18 ++++++++++++++++++ src/doppelganger/schedulingpolicyservice.cpp | 18 ++++++++++++++++++ src/doppelganger/schedulingpolicyservice.h | 18 ++++++++++++++++++ src/imports/nativemedia/SurfaceTexture.cpp | 18 ++++++++++++++++++ src/imports/nativemedia/SurfaceTexture.h | 18 ++++++++++++++++++ src/imports/nativemedia/main.cpp | 18 ++++++++++++++++++ src/imports/nativemedia/omx.cpp | 18 ++++++++++++++++++ src/imports/nativemedia/omxmodule.cpp | 18 ++++++++++++++++++ src/imports/nativemedia/omxnode.cpp | 18 ++++++++++++++++++ src/imports/nativemedia/omxnode.h | 18 ++++++++++++++++++ src/imports/nativemedia/omxplayer.h | 18 ++++++++++++++++++ src/imports/nativemedia/test.qml | 18 ++++++++++++++++++ src/imports/utils/plugin.cpp | 18 ++++++++++++++++++ src/imports/wifi/pluginmain.cpp | 18 ++++++++++++++++++ src/imports/wifi/qwifimanager.cpp | 18 ++++++++++++++++++ src/imports/wifi/qwifimanager.h | 18 ++++++++++++++++++ src/imports/wifi/qwifinetwork.cpp | 18 ++++++++++++++++++ src/imports/wifi/qwifinetwork.h | 18 ++++++++++++++++++ src/imports/wifi/qwifinetworklist.cpp | 18 ++++++++++++++++++ src/imports/wifi/qwifinetworklist.h | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidaccelerometer.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidaccelerometer.h | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidambientlightsensor.cpp | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidambientlightsensor.h | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidbasesensor.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidbasesensor.h | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidgyroscope.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidgyroscope.h | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidlight.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidlight.h | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidmagnetometer.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidmagnetometer.h | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidrotationsensor.cpp | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidrotationsensor.h | 18 ++++++++++++++++++ .../sensors/eandroid/eandroidsensordevice.cpp | 18 ++++++++++++++++++ src/plugins/sensors/eandroid/eandroidsensordevice.h | 18 ++++++++++++++++++ src/qt_hw_init/main.cpp | 18 ++++++++++++++++++ src/utils/qdroidutils.cpp | 18 ++++++++++++++++++ src/utils/qdroidutils.h | 18 ++++++++++++++++++ 44 files changed, 785 insertions(+), 9 deletions(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index 194f16d..c4fe4a2 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ /*! //! [setting up usb access] On Ubuntu Linux you have to grant your development user access to diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4b8b437..dd71d52 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1,17 +1,19 @@ /**************************************************************************** ** -** Copyright (c) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ ** -** Qt and Qt logos are trademarks of of Digia Corporation in Finland and/or -** other countries worldwide. All other trademarks are property of their -** respective owners. +** This file is part of Qt Enterprise Embedded. ** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. ** -** Licensees holding valid Qt Commercial licenses may use this document in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in a -** written agreement between you and Digia. -** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ ** ****************************************************************************/ diff --git a/src/doc/src/detect-sd-card-device-name.qdocinc b/src/doc/src/detect-sd-card-device-name.qdocinc index 825be80..e7601c9 100644 --- a/src/doc/src/detect-sd-card-device-name.qdocinc +++ b/src/doc/src/detect-sd-card-device-name.qdocinc @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ /*! //! [instructions] Plug the micro-SD card or reader into the development host PC, diff --git a/src/doppelganger/main.cpp b/src/doppelganger/main.cpp index 9255576..6813b75 100644 --- a/src/doppelganger/main.cpp +++ b/src/doppelganger/main.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include #include "permissioncontroller.h" diff --git a/src/doppelganger/permissioncontroller.cpp b/src/doppelganger/permissioncontroller.cpp index 06d1729..15f2313 100644 --- a/src/doppelganger/permissioncontroller.cpp +++ b/src/doppelganger/permissioncontroller.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "permissioncontroller.h" #include diff --git a/src/doppelganger/permissioncontroller.h b/src/doppelganger/permissioncontroller.h index 74aeb10..2e95f79 100644 --- a/src/doppelganger/permissioncontroller.h +++ b/src/doppelganger/permissioncontroller.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef PERMISSIONCONTROLLER_H #define PERMISSIONCONTROLLER_H diff --git a/src/doppelganger/schedulingpolicyservice.cpp b/src/doppelganger/schedulingpolicyservice.cpp index 27483e0..4b80739 100644 --- a/src/doppelganger/schedulingpolicyservice.cpp +++ b/src/doppelganger/schedulingpolicyservice.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "schedulingpolicyservice.h" #include diff --git a/src/doppelganger/schedulingpolicyservice.h b/src/doppelganger/schedulingpolicyservice.h index 377265d..6ea12d9 100644 --- a/src/doppelganger/schedulingpolicyservice.h +++ b/src/doppelganger/schedulingpolicyservice.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef SCHEDULINGPOLICYSERVICE_H #define SCHEDULINGPOLICYSERVICE_H diff --git a/src/imports/nativemedia/SurfaceTexture.cpp b/src/imports/nativemedia/SurfaceTexture.cpp index c973079..0d1cc00 100644 --- a/src/imports/nativemedia/SurfaceTexture.cpp +++ b/src/imports/nativemedia/SurfaceTexture.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) #include "SurfaceTexture_4_1.cpp" #else diff --git a/src/imports/nativemedia/SurfaceTexture.h b/src/imports/nativemedia/SurfaceTexture.h index efc49c8..2df4391 100644 --- a/src/imports/nativemedia/SurfaceTexture.h +++ b/src/imports/nativemedia/SurfaceTexture.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) #include "SurfaceTexture_4_1.h" #else diff --git a/src/imports/nativemedia/main.cpp b/src/imports/nativemedia/main.cpp index 66775f6..a0727cf 100644 --- a/src/imports/nativemedia/main.cpp +++ b/src/imports/nativemedia/main.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include void initializeOMX(); diff --git a/src/imports/nativemedia/omx.cpp b/src/imports/nativemedia/omx.cpp index 15307df..72d6eaa 100644 --- a/src/imports/nativemedia/omx.cpp +++ b/src/imports/nativemedia/omx.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include #include diff --git a/src/imports/nativemedia/omxmodule.cpp b/src/imports/nativemedia/omxmodule.cpp index e8737ce..1a5637f 100644 --- a/src/imports/nativemedia/omxmodule.cpp +++ b/src/imports/nativemedia/omxmodule.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "omxnode.h" #include diff --git a/src/imports/nativemedia/omxnode.cpp b/src/imports/nativemedia/omxnode.cpp index c333622..60fbb44 100644 --- a/src/imports/nativemedia/omxnode.cpp +++ b/src/imports/nativemedia/omxnode.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "omxnode.h" #include diff --git a/src/imports/nativemedia/omxnode.h b/src/imports/nativemedia/omxnode.h index 22bbb4a..d83b8fc 100644 --- a/src/imports/nativemedia/omxnode.h +++ b/src/imports/nativemedia/omxnode.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef OMXNODE_H #define OMXNODE_H diff --git a/src/imports/nativemedia/omxplayer.h b/src/imports/nativemedia/omxplayer.h index 17544c1..827cb79 100644 --- a/src/imports/nativemedia/omxplayer.h +++ b/src/imports/nativemedia/omxplayer.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef OMXPLAYER_H #define OMXPLAYER_H diff --git a/src/imports/nativemedia/test.qml b/src/imports/nativemedia/test.qml index 8bbd4ce..2db3256 100644 --- a/src/imports/nativemedia/test.qml +++ b/src/imports/nativemedia/test.qml @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ import QtQuick 2.0 import QtAndroidOmx 1.0 diff --git a/src/imports/utils/plugin.cpp b/src/imports/utils/plugin.cpp index 4b3f6e1..6e53aee 100644 --- a/src/imports/utils/plugin.cpp +++ b/src/imports/utils/plugin.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include #include diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index c9dac53..58aa590 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "qwifimanager.h" #include diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 1ba3d64..b2b9363 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "qwifimanager.h" #include diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h index 5fd74f5..59f2b44 100644 --- a/src/imports/wifi/qwifimanager.h +++ b/src/imports/wifi/qwifimanager.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef QWIFIMANAGER_H #define QWIFIMANAGER_H diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp index 5de8711..5b74301 100644 --- a/src/imports/wifi/qwifinetwork.cpp +++ b/src/imports/wifi/qwifinetwork.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "qwifinetwork.h" QWifiNetwork::QWifiNetwork() diff --git a/src/imports/wifi/qwifinetwork.h b/src/imports/wifi/qwifinetwork.h index 8bcb410..e287d7e 100644 --- a/src/imports/wifi/qwifinetwork.h +++ b/src/imports/wifi/qwifinetwork.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef QWIFINETWORK_H #define QWIFINETWORK_H diff --git a/src/imports/wifi/qwifinetworklist.cpp b/src/imports/wifi/qwifinetworklist.cpp index e7fa92d..2e1500b 100644 --- a/src/imports/wifi/qwifinetworklist.cpp +++ b/src/imports/wifi/qwifinetworklist.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "qwifinetworklist.h" #include diff --git a/src/imports/wifi/qwifinetworklist.h b/src/imports/wifi/qwifinetworklist.h index f6e134c..f9727f3 100644 --- a/src/imports/wifi/qwifinetworklist.h +++ b/src/imports/wifi/qwifinetworklist.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef QWIFINETWORKLIST_H #define QWIFINETWORKLIST_H diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp index 1837990..b73b9b6 100644 --- a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp +++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include EAndroidAccelerometer::EAndroidAccelerometer(int type, QSensor *sensor) diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.h b/src/plugins/sensors/eandroid/eandroidaccelerometer.h index f3c618d..1eaa8f9 100644 --- a/src/plugins/sensors/eandroid/eandroidaccelerometer.h +++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDACCELEROMETER_H #define EANDROIDACCELEROMETER_H diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp index 212733c..e1f285f 100644 --- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "eandroidambientlightsensor.h" EAndroidAmbientLightSensor::EAndroidAmbientLightSensor(int type, QSensor *sensor) diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h index 632164d..55aacba 100644 --- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h +++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDAMBIENTLIGHTSENSOR_H #define EANDROIDAMBIENTLIGHTSENSOR_H diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp index f21961c..005759b 100644 --- a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include #include diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.h b/src/plugins/sensors/eandroid/eandroidbasesensor.h index 4e282df..af3d6ea 100644 --- a/src/plugins/sensors/eandroid/eandroidbasesensor.h +++ b/src/plugins/sensors/eandroid/eandroidbasesensor.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDBASESENSOR_H #define EANDROIDBASESENSOR_H diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp index 601415f..c3b838e 100644 --- a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp +++ b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "eandroidgyroscope.h" #include diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.h b/src/plugins/sensors/eandroid/eandroidgyroscope.h index 65c531f..5ee53b8 100644 --- a/src/plugins/sensors/eandroid/eandroidgyroscope.h +++ b/src/plugins/sensors/eandroid/eandroidgyroscope.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDGYROSCOPE_H #define EANDROIDGYROSCOPE_H diff --git a/src/plugins/sensors/eandroid/eandroidlight.cpp b/src/plugins/sensors/eandroid/eandroidlight.cpp index f9cce98..3f292e8 100644 --- a/src/plugins/sensors/eandroid/eandroidlight.cpp +++ b/src/plugins/sensors/eandroid/eandroidlight.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include EAndroidLight::EAndroidLight(int type, QSensor *sensor) diff --git a/src/plugins/sensors/eandroid/eandroidlight.h b/src/plugins/sensors/eandroid/eandroidlight.h index 3929dea..7317763 100644 --- a/src/plugins/sensors/eandroid/eandroidlight.h +++ b/src/plugins/sensors/eandroid/eandroidlight.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDLIGHT_H #define EANDROIDLIGHT_H diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp index 8747d45..6f14e7e 100644 --- a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp +++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "eandroidmagnetometer.h" EAndroidMagnetometer::EAndroidMagnetometer(int type, QSensor *sensor) diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.h b/src/plugins/sensors/eandroid/eandroidmagnetometer.h index 5cb3842..3cc1715 100644 --- a/src/plugins/sensors/eandroid/eandroidmagnetometer.h +++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDMAGNETOMETER_H #define EANDROIDMAGNETOMETER_H diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp index 0d9bfde..93d520a 100644 --- a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "eandroidrotationsensor.h" #include diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.h b/src/plugins/sensors/eandroid/eandroidrotationsensor.h index 6139001..9499ae2 100644 --- a/src/plugins/sensors/eandroid/eandroidrotationsensor.h +++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDROTATIONSENSOR_H #define EANDROIDROTATIONSENSOR_H diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp index 7e4caed..c8e5912 100644 --- a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp +++ b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include EventReaderThread::EventReaderThread(EAndroidSensorDevice *device) : diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.h b/src/plugins/sensors/eandroid/eandroidsensordevice.h index b34580e..fcf022a 100644 --- a/src/plugins/sensors/eandroid/eandroidsensordevice.h +++ b/src/plugins/sensors/eandroid/eandroidsensordevice.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef EANDROIDSENSORDEVICE_H #define EANDROIDSENSORDEVICE_H diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp index 3419c21..ba9f49b 100644 --- a/src/qt_hw_init/main.cpp +++ b/src/qt_hw_init/main.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "../utils/qdroidutils.h" #include diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index da443c9..2a9c94c 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #include "qdroidutils.h" #include #include diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h index b0f9061..9d833bb 100644 --- a/src/utils/qdroidutils.h +++ b/src/utils/qdroidutils.h @@ -1,3 +1,21 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ #ifndef QDROIDUTILS_H #define QDROIDUTILS_H -- cgit v1.2.3 From 6571cbdc59025b54de648f1d87d3578a4612d962 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 5 Dec 2013 14:09:51 +0100 Subject: Doc: move overview info to a new topic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some information from the Qt Enterprise Embedded site to explain the basic concepts that the reader will encounter in the installation chapter. Change-Id: I0d6ed724bb1e502850035744ac099f9ca9546b1a Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 86 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 24 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index dd71d52..0bb03b5 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -20,15 +20,25 @@ /*! \contentspage{index.html}{Qt Enterprise Embedded} \page index.html - \nextpage qtee-installation-guide.html + \nextpage qtee-overview.html \title Qt Enterprise Embedded + \SDK provides a fully-integrated solution to get you started immediately + with software development on your embedded device with a tailored user + experience for embedded Linux and embedded Android. \SDK contains the tools + you need for fast, easy, and fully-integrated embedded device application + development. It comes with \B2Q, a light-weight UI stack for embedded + systems, and the Qt Creator integrated development environment (IDE) with + preconfigured build targets for hardware platforms, as well as an emulator + for testing the applications. + \e{\b{IMPORTANT:} Make sure to follow the \l{Installation Guide} closely!} \section1 Contents \list + \li \l{About Qt Enterprise Embedded} \li \l{Installation Guide} \li \l{Preparing Hardware} \list @@ -43,27 +53,59 @@ \li \l{License Information} \li \l{Troubleshooting} \endlist +*/ - \section1 About \SDK - - \SDK includes the \B2Q stack, providing a complete software development - package for creating applications on embedded devices. It comes with - the Qt Creator IDE with preconfigured build targets for hardware - platforms as well as an \l{Emulator}{emulator}. +/*! + \contentspage{index.html}{Qt Enterprise Embedded} + \page qtee-overview.html + \previouspage index.html + \nextpage qtee-installation-guide.html - \section1 What is \B2Q? + \title About Qt Enterprise Embedded - \e{\b{\B2Q}} is a light-weight UI stack for embedded systems, based on the - \l{http://qt.digia.com/}{Qt Framework} by Digia, offering an elegant - means of developing beautiful and performant embedded devices. It supports - two different operating systems: + \SDK has two main parts: \list - \li \b{\B2QA} places Qt on top of an Android (version 4.1 or higher) - kernel/baselayer. + \li Development environment that is installed on a Linux development + desktop by using an online installer. + \li \B2Q + \endlist - \li \b{\B2QL} places Qt on top of an Linux kernel/baselayer, built - using Yocto 1.4 'Dylan' release. + \section1 About the Development Environment + + The development is done with the Qt Enterprise libraries and device + deployment can be done with one click directly from Qt Creator to a device + connected via USB. Alternatively, you can deploy the application locally + directly to the \B2Q Emulator that is running the full target software stack + as in the device. + + As with any Qt based application, the same application can be deployed to + desktop and mobile OS targets as well. + + \section1 About \B2Q + + \e{\b{\B2Q}} is a light-weight, Qt-optimized, full software stack for + embedded systems that is installed into the actual target device. This is + done by flashing the device’s memory card or device's internal memory + directly with a pre-built image that comes with the development environment. + + \B2Q supports two different operating systems: + + \list + \li \b{\B2QA} where the software stack is based on the Android Kernel + (version 4.1 or higher) and selected middleware. It includes a lean + software stack where Qt/QML replaces the top Java graphical layer + and removes the Zygote process layer as well the Android home screen + enabling better and faster development where modern UIs are at the + forefront. + + \li \b{\B2QL} where the software stack is using the traditional embedded + Linux kernel built with the Yocto Poky reference system (Yocto 1.4 + \e Dylan release). Because of its Yocto compliance, the Embedded + Linux variant is designed for great customization possibilities. + It contains only components required in the embedded device, + resulting in smaller image sizes while keeping valuable development + tools available. \endlist Both versions have been tested and verified on a number of different @@ -74,7 +116,7 @@ \l{http://qt.digia.com/}{Qt} is a full development framework with tools designed to streamline the creation of applications and user interfaces - for desktop, embedded and mobile platforms. + for desktop, embedded, and mobile platforms. \list \li \b{Qt Framework} - intuitive APIs for C++ @@ -88,8 +130,8 @@ \endlist With Qt, you can reuse code efficiently to target multiple platforms - with one code base. The modular C++ class library and developer tools - enables developers to create applications for one platform and easily + with one code base. The modular C++ class library and development tools + enable developers to create applications for one platform and easily build and run to deploy also on other platforms. @@ -108,16 +150,12 @@ \e{Dalvik virtual machine} is not running in \B2Q, resulting in faster startup times, lower memory consumption and overall better performance. - - \b{\B2QL} is build from scratch using Yocto 1.4 tools - to contain only components required in the embedded device, resulting - in smaller image sizes while keeping valuable development tools available. */ /*! \page qtee-installation-guide.html \title Installation Guide - \previouspage index.html + \previouspage qtee-overview.html \nextpage qtee-preparing-hardware.html \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} -- cgit v1.2.3 From 62e3601a82c60cfa41c3b7b6981c3f6bdca7d546 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 5 Dec 2013 14:52:52 +0100 Subject: Doc: move related sections together in TOC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Place License Information last. Change-Id: If5122f5bf0c9aeee544fe999cb44442729f26abe Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 0bb03b5..378f092 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -40,6 +40,7 @@ \list \li \l{About Qt Enterprise Embedded} \li \l{Installation Guide} + \li \l{Supported Platforms} \li \l{Preparing Hardware} \list \li \l{Preparing Nexus 7}{Nexus 7 (2012) (embedded Android)} @@ -49,9 +50,8 @@ \endlist \li \l{Building and Running an Example} \li \l{Customization} - \li \l{Supported Platforms} - \li \l{License Information} \li \l{Troubleshooting} + \li \l{License Information} \endlist */ @@ -156,7 +156,7 @@ \page qtee-installation-guide.html \title Installation Guide \previouspage qtee-overview.html - \nextpage qtee-preparing-hardware.html + \nextpage qtee-supported-platforms.html \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} @@ -260,7 +260,7 @@ /*! \page qtee-preparing-hardware.html \title Preparing Hardware - \previouspage qtee-installation-guide.html + \previouspage qtee-supported-platforms.html \nextpage qtee-building-and-running.html Before deploying and testing your Qt application on hardware, the @@ -589,7 +589,7 @@ /*! \page qtee-building-and-running.html \title Building and Running an Example - \previouspage qtee-installation-guide.html + \previouspage qtee-preparing-hardware.html \nextpage qtee-customization.html Once the installation and configuration steps for \SDK and the @@ -643,7 +643,7 @@ \page qtee-customization.html \title Customization \previouspage qtee-building-and-running.html - \nextpage qtee-supported-platforms.html + \nextpage qtee-troubleshooting.html \section1 Environment and Input @@ -734,8 +734,8 @@ /*! \page qtee-supported-platforms.html \title Supported Platforms - \previouspage qtee-customization.html - \nextpage qtee-licenses.html + \previouspage qtee-installation-guide.html + \nextpage qtee-preparing-hardware.html \section1 Supported Target Devices @@ -770,8 +770,7 @@ /*! \page qtee-licenses.html \title License Information - \previouspage qtee-supported-platforms.html - \nextpage qtee-troubleshooting.html + \previouspage qtee-troubleshooting.html \section1 Licensing @@ -795,7 +794,8 @@ /*! \page qtee-troubleshooting.html \title Troubleshooting - \previouspage qtee-supported-platforms.html + \previouspage qtee-customization.html + \nextpage qtee-licenses.html \note An updated version of this information may be available in Digia customer portal, see Known Issues in Qt Enterprise Embedded product page. -- cgit v1.2.3 From 8b3b2a9f1ad81a8c94874eefe92d59eec7ed1d53 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 12 Nov 2013 16:05:53 +0100 Subject: Fix compilation with gnustl on eAndroid Change-Id: I8ade110ad1869e9fbad28a73a57939ad986ceb17 Reviewed-by: Eirik Aavitsland --- src/utils/qdroidutils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index f2194c4..81a50ed 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -1,6 +1,7 @@ #include "qdroidutils.h" #include #include +#include #ifdef Q_OS_ANDROID_NO_SDK #include -- cgit v1.2.3 From f4e22adea13f4d9b0fbbe1c407aacb9d5584dd97 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 9 Dec 2013 09:58:08 +0100 Subject: Doc: edit the installation instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove excessive formatting as it reduces readability. Use numbered lists to describe processes. Use active voice instead of passive voice. Edit for grammar and style. Change-Id: I1e5f9636c57898ea09633167e022a3195a2967d6 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt-post-install-setup.qdocinc | 55 +++++++++++---------- src/doc/src/b2qt.qdoc | 76 +++++++++++++++-------------- 2 files changed, 69 insertions(+), 62 deletions(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index c4fe4a2..d1a6f08 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -18,54 +18,57 @@ ****************************************************************************/ /*! //! [setting up usb access] - On Ubuntu Linux you have to grant your development user access to - plugged in devices. This is done by creating a new \e{udev} rule - that allows access to the device via USB. First, run the following - command in a shell: + On Ubuntu Linux, the development user account must have access to plugged in + devices. To allow the development user access to the device via USB, create + a new \e{udev} rule: + + \list 1 + + \li Run the following command in a shell: \code echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="udev-acl"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules \endcode - Now connect the running device to the development host with a USB - cable. (If already connected, disconnect and reconnect the USB - cable after running the command above). + \li Connect the running device to the development host with a USB + cable. If the device is already connected, disconnect and reconnect the USB + cable after running the command above. - On \B2QA, you can confirm that the connection is working by running - this shell command: + \li On \B2QA, you can confirm that the connection is working by running + the following shell command: \code /Tools/b2qt/adb devices \endcode - The output should be a list of connected android devices, - identified with a serial number and a name. Note that the emulator - may be listed as well, its serial number will be its IP and port - number (\c{192.168.56.101:5555}). If your device is missing from + The output should be a list of connected Android devices, + identified with a serial number and a name. If your device is missing from the list, or the serial number is \c{??????}, the connection is - not working properly. If so, check that the device is powered up, - and that the USB cable has been disconnected and reconnected. + not working properly. Check that the device is powered up, and disconnect + and reconnect the USB cable. + + The emulator may be listed as well. Its serial number is its IP and the port + number: \c{192.168.56.101:5555}. + \endlist The system log files \c{/var/log/udev} and \c{/var/log/syslog} may provide relevant information in case of connection problems. //! [setting up usb access] //! [configuring device kit] - After the hardware has been prepared, there is one final step required - to set up the development tools in Qt Creator for your device. - - You have to configure the right device to be used for each \b{Kit}. - - To do so, connect your device to your computer via USB and launch - Qt Creator. Then, + After you have prepared the hardware, you must perform one final step + to set up the development tools in Qt Creator for your device. That is, + you must configure the correct device to be used for each build and run + \e{kit}. Connect your device to the development host via USB and launch + Qt Creator. In Qt Creator: //! [steps for device kit] \list 1 - \li Go to \b{Tools > Options > Build & Run > Kits} - \li Select one of the predefined Kits starting with \e{Boot2Qt...} + \li Select \b{Tools > Options > Build & Run > Kits}. + \li Select one of the predefined kits starting with \e{Boot2Qt...} that matches the type of your device. - \li Select the correct device in the \b{Device} combobox. - \li Click \b{Ok}. + \li Select the correct device in the \b{Device} field. + \li Select \b{OK}. \endlist //! [steps for device kit] //! [configuring device kit] diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 378f092..f682f13 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -158,14 +158,15 @@ \previouspage qtee-overview.html \nextpage qtee-supported-platforms.html - \e{IMPORTANT: \SDK requires the following installation steps to be followed closely.} + To successfully set up \SDK, you must closely follow the instructions in + this section and perform all the described tasks. In case of problems, see the \l{Troubleshooting} information and the - Known Issues in Qt Enterprise Embedded product page in Digia customer + \e {Known Issues} on the Qt Enterprise Embedded product page in the Digia customer portal. \target Requirements for Development Host - \section1 0. Requirements for Development Host + \section1 Requirements for Development Host A 64-bit Linux system is required to install and use \SDK. Instructions in this documentation assume Ubuntu Linux 64-bit 12.04 LTS or later. @@ -176,8 +177,8 @@ \section1 1. Installing 32-bit Support Libraries Some of the build tools in \SDK are 32-bit programs, and on 64-bit - systems they require that support libraries for running 32-bit - code are present in the system. To install the required packages + systems they require support libraries for running 32-bit code. To install + the required packages in Ubuntu, use the following command in a terminal: \code @@ -195,56 +196,60 @@ sudo apt-get install virtualbox \endcode - \b{Configuring VirtualBox} + To configure VirtualBox: - Open VirtualBox network settings: Select \b{File > Preferences...} - and click on the \b{Network} tab. Create a new network named - \e{vboxnet0} and edit its properties: - - \list - \li Change IPv4 address to 192.168.56.1 and IPv4 network mask to 255.255.255.0. - \li Check \b{Enable Server} in \b{DCHP Server} tab. - \li Change server address to 192.168.56.1. - \li Change both the lower and upper address bounds to 192.168.56.101. + \list 1 + \li Start the VirtualBox user interface. + \li Select \b{File > Preferences} > \b{Network} to open VirtualBox + network settings. + \li Create a new network named \e{vboxnet0} and edit its properties: + + \list 1 + \li Change the IPv4 address to \c{192.168.56.1} and the IPv4 network + mask to \c{255.255.255.0}. + \li In the \b{DCHP Server} tab, select the \b{Enable Server} check + box. + \li Change the server address to \c{192.168.56.1}. + \li Change both the lower and upper address bounds to + \c{192.168.56.101}. + \endlist \endlist \section1 3. Installing \SDK - If you have not already installed \SDK, do it as follows. + \list 1 - After downloading the binary installer, make sure it is executable either by + \li Download the binary \SDK installer, and make sure it is executable + by using one of the following methods: \list - \li Using \c{chmod +x } command, or - \li Right-clicking on the file, selecting \b{Properties}, and checking - \b{Allow executing file as program} on the \b{Permissions} tab. + \li Enter the \c{chmod +x } command. + \li Right-click the file, and select \b{Properties} > + \b{Permissions} > \b{Allow executing file as program}. \endlist - Run the installer and follow its instructions. + \li Run the installer and follow its instructions. + + \endlist The installer will let you select a directory where \SDK will be - installed. In the rest of this documentation, that directory is referred + installed. In this documentation, the installation directory is referred to as \b{\c{}}. The default installation directory is \tt{~/Qt}. \target Installing Boot to Qt on Target Devices \section1 4. Install \B2Q on Target Devices - \e{If targeting only the emulator, this step may be skipped} + \e{If you target only the emulator, you can skip this step.} - Before deploying and testing your Qt application on hardware, the - target device needs to be flashed with an image that contains the - \B2Q stack. These steps vary from device to device. See the - following chapter and follow the instructions specific to - your device. - - \list - \li \l {Preparing Hardware} - \endlist + Before you can deploy and test your Qt application on hardware, you must + flash the target device with an image that contains the + \B2Q stack. The steps vary from device to device. Follow the instructions + specific to your device in \l {Preparing Hardware}. \section1 5. Setting up USB Access to Embedded Devices - \e{If targeting only the emulator, this step may be skipped} + \e{If you target only the emulator, you can skip this step.} \include b2qt-post-install-setup.qdocinc setting up usb access @@ -252,9 +257,8 @@ \include b2qt-post-install-setup.qdocinc configuring device kit - \b {You are now ready to start developing for your device!} - - See \l{Building and Running an Example} + You are now ready to start developing for your device. + For more information, see \l{Building and Running an Example}. */ /*! -- cgit v1.2.3 From 8beaad9609ce1bf51069450b2a95117b957c1e2f Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 9 Dec 2013 12:56:07 +0100 Subject: Doc: edit the supported devices topic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the capitalization of units of measurement and use spaces between the units and the numbers. Edit the leading sentence to the list of supported devices. Change-Id: I440a55f855d687ce46d3188373a4624b775529a0 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index f682f13..a11a561 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -749,13 +749,13 @@ Approximate minimal hardware requirements for running \B2Q are: \list - \li 256Mb of RAM - \li 500Mhz CPU, 1Ghz preferred for 60 FPS velvet-smooth UI + \li 256 MB of RAM + \li 500 MHz CPU, 1 GHz preferred for 60-FPS velvet-smooth UI \li OpenGL ES 2.0 support \li Android 4.0+ compatible hardware \endlist - The following devices have been used as reference and are tested to work: + \B2Q has been tested to work on the following reference devices: \list \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7 (2012)} \li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} -- cgit v1.2.3 From 5160df08e58a7901eb0836649184afcc9d492b05 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 9 Dec 2013 13:00:27 +0100 Subject: Doc: edit troubleshooting topic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edit for grammar and style. Use QDoc commands consistently. Change-Id: I2faf83811632b1640b504f538a714d0d7a9243b6 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index a11a561..c6a7769 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -801,17 +801,18 @@ \previouspage qtee-customization.html \nextpage qtee-licenses.html - \note An updated version of this information may be available in Digia customer portal, - see Known Issues in Qt Enterprise Embedded product page. + \note An updated version of this information may be available in the Digia + customer portal, in the \e{Known Issues} section on the \SDK product page. \section1 General Issues \section2 I have problems deploying/launching the application in Qt Creator - Check if the device is properly connected to the PC via USB. + Check that the device is properly connected to the development host via USB + or Ethernet (depending on the device). See \l{Connectivity Issues}. - If using the emulator, see \l{Installing VirtualBox}{Configuring VirtualBox}. + If using the emulator, see \l{Installing VirtualBox}. \section2 I have problems deploying/launching a Qt or Qt Quick example application @@ -831,8 +832,8 @@ \section2 Booting Sabre Lite i.MX 6 stops with \e {6x_bootscript not found} error Check the U-Boot version number. It should start with either \c{2012} or \c{2013}. - If it is \c{2009.xx}, an upgrade of the bootloader is required. See information and - instructions here: + If it is \c{2009.xx}, an upgrade of the bootloader is required. For more + information, see: \list \li \l http://boundarydevices.com/6q_bootscript/ @@ -841,8 +842,9 @@ \section2 How do I restore my Nexus 7 to factory settings? - Goto \l{https://developers.google.com/android/nexus/images} and - download the correct file for your device. Unpack it, and then + Go to \l{https://developers.google.com/android/nexus/images} and + download the correct file for your device. Unpack it, and then enter the + following commands: \code /Tools/b2qt/adb reboot bootloader @@ -851,10 +853,10 @@ \section2 How do I shut down the Nexus 7? - If the \B2Q demo launcher is running, start the "Launcher - Settings" app, and press the "Power Off" button. + If the \B2Q demo launcher is running, start the \b {Launcher + Settings} app, and press the power button to power off the device. - Otherwise, make sure the Nexus 7 is connected to your PC with USB, and run + Otherwise, make sure the Nexus 7 is connected to the development host, and run the following command in a terminal: \code /Tools/b2qt/adb shell reboot -p @@ -865,7 +867,8 @@ \section2 Trying to build for the emulator target fails with error message \e{make: i686-android-linux-g++: Command not found} - You need to install proper libraries in order to run 32-bit programs in 64-bit Linux operating system. + You need to install support libraries in order to run 32-bit programs in a + 64-bit Linux operating system. See \l{Installing 32-bit Support Libraries}. @@ -880,7 +883,7 @@ See \l{Customization}. - Note that hotplugging does not currently work; any input device + \note Hotplugging does not currently work, and therefore, any input device must be present at boot time to be recognized. \section2 Application stops with \e{EGLFS: OpenGL windows cannot be mixed with others.} @@ -906,7 +909,7 @@ \section2 adb fails with "error: more than one device and emulator" - You have to specify which android device you want \c{adb} to talk + You have to specify which Android device you want \c{adb} to talk to, using adb's \c{-s } option. Use the following command to find to see the serial number of the connected devices: @@ -915,17 +918,17 @@ /Tools/b2qt/adb devices \endcode - \section2 The emulator cannot connect to the internet + \section2 The emulator cannot connect to the Internet - By default, the Virtualbox is configured to use host-only network, so external + By default, the VirtualBox is configured to use a host-only network, so external connections do not work in the emulator. - You may be able to enable internet connectivity with another + You may be able to enable Internet connectivity with another virtual network adapter in NAT mode by adapting \l{http://askubuntu.com/questions/293816/in-virtualbox-how-do-i-set-up-host-only-virtual-machines-that-can-access-the-in}{these} instructions. - \section2 The emulator is stuck in 'Waiting for display data' or fails to start properly + \section2 The emulator is stuck in \e{Waiting for display data} or fails to start properly Check the output of the following command: @@ -946,7 +949,7 @@ And then close the emulator and retry. - \section2 What is the user and password to access my embedded Linux device + \section2 What are the user and password to access my embedded Linux device? Embedded Linux devices can be accessed using user \c{root} and an empty password. -- cgit v1.2.3 From d3fc80299709a9a872acacfc7cc2c9a8934ec53b Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 9 Dec 2013 16:35:37 +0100 Subject: Doc: edited the customization topic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edited for style and grammar. Change-Id: I57a9f72db0300c475b752a20bb613caa9a41b570 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index c6a7769..704600e 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -656,30 +656,29 @@ {/system/bin/appcontroller.conf} in embedded Android devices and in \c{/etc/appcontroller.conf} in embedded Linux devices. - This file can be customized if targeting a hardware device that - has different input devices than what the \B2Q stack is configured + You can customize this file if you target a hardware device that + has other input devices than the ones that the \B2Q stack is configured for by default. - Note that on some devices, the root file system (where this file - resides) is mounted read-only at boot time. It needs to be - remounted read-write to allow modification. The following command - does that: + On some devices, the root file system (where this file + resides) is mounted read-only at boot time. To allow modification, + remount it read-write by entering the following command: \code /Tools/b2qt/adb remount \endcode - In the \c{appcontroller.conf} file the input devices are + In the \c{appcontroller.conf} file, the input devices are specified by the lines similar to these: \code env=QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event0 \endcode - Usually there is no need to change this setting. USB input devices like - keyboards and mice are automatically recognized. The mouse pointer is shown + Usually, you do not need to change this setting. USB input devices, such as + keyboards and mice, are automatically recognized. The mouse pointer is shown automatically if a mouse is connected. - Note however that hotplugging may not work, meaning that the input - devices, like keyboard and mouse, have to be connected at boot + However, hotplugging may not work, which means that the input + devices, such as a keyboard and mouse, have to be connected at boot time. On some devices, for example the i.MX6 Sabre Lite, the touchscreen device is @@ -688,18 +687,21 @@ \section1 Booting to a Custom Application - After you have deployed your own application to the device it will be launched instead - of the \B2Q demo launcher on boot. To prevent this behavior you have to remove - this step from the build steps of your project's run configuration. + After you have deployed your own application to the device, it will be + launched on boot, instead of the \B2Q demo launcher. To prevent this + behavior, remove the \b {Make this application the default one} step from + the \b{Run Settings} for your project in the Qt Creator \b Projects mode. - To remove your application from the default startup use the following command: + To remove your application from the default startup, use the following + command: \code /Tools/b2qt/adb shell appcontroller --remove-default \endcode \section1 Switching Between Portrait and Landscape Views - Depending on a device screen dimensions and application requirements it might be desirable + Depending on device screen dimensions and application requirements, it might + be desirable to change the default view orientation. The following example shows how to rotate your application in QML. -- cgit v1.2.3 From 11daeacb2580a36e8cf267d370d7f40195a16e58 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 9 Dec 2013 12:34:22 +0100 Subject: Doc: edit the building and running topi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edit for grammar and style. Change-Id: I61bdbd5dbd4adc8badfe7e5aebe0c43f2a7a875e Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 704600e..7a96856 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -596,19 +596,17 @@ \previouspage qtee-preparing-hardware.html \nextpage qtee-customization.html - Once the installation and configuration steps for \SDK and the - target device(s) are completed, it's time to test the setup. - - First, make sure your device is powered up and connected to the - development host via USB. - - Then, follow these steps to create and run a simple \l{Qt Quick} - application on the device: + After you complete the installation and configuration steps for \SDK and the + target devices, you can test the setup by creating a simple \l{Qt Quick} + application and running it on the device: \list 1 - \li Open \b{File > New File or Project}, select - \b{Qt Quick 2 Application (Built-in Types)} and click \b{Choose...}. - \li In \b{Kit Selection} dialog, select the kit(s) for your + \li Make sure that your device is powered up and connected to the + development host. + \li In Qt Creator, select \b{File > New File or Project} > + \b Applications > \b{Qt Quick 2 Application (Built-in Types)} > + \b{Choose}. + \li In the \b{Kit Selection} dialog, select the kits for your devices. You can also select the emulator kit to test running the project in the emulator. \li Click \b{Next} and finish the wizard. @@ -619,23 +617,23 @@ \section1 Setting Up an Already Existing Project for Deployment - The projects generated by Qt Creator will always have the correct settings + The projects generated by Qt Creator always have the correct settings for deployment on the device or emulator. However, existing projects may need some changes. As a general rule, application binaries and resources (such as QML files and - images) are deployed under \c {/data/user/qt/} directory. - Therefore, the \c path variable for \c INSTALLS target(s) need to be adjusted - accordingly in .pro files: + images) are deployed to the \c {/data/user/qt/} directory. + Therefore, the \c path variable for the \c INSTALLS targets needs to be adjusted + accordingly in .pro files. - For example, the following: + For example, change the following \c target.path value: \code target.path = ... INSTALLS += target \endcode - should be migrated to: + to: \code target.path = /data/user/qt/ -- cgit v1.2.3 From c56c9bc0107bced7635bc93edd8521f415e005c7 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 10 Dec 2013 12:26:21 +0100 Subject: Doc: edit the sections about preparing devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edit for grammar and style. Use standard wording in lists. Use active voice instead of passive voide. Use lists for all processes. Use the term "SD card" everywhere instead of "micro-SD card". Replace XXX with . Change-Id: Ie300dac911b42120de5e236676aa7b43c39f27d7 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt-post-install-setup.qdocinc | 23 ++- src/doc/src/b2qt.qdoc | 185 +++++++++++++------------ src/doc/src/detect-sd-card-device-name.qdocinc | 16 +-- 3 files changed, 114 insertions(+), 110 deletions(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index d1a6f08..ef93b3f 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -74,22 +74,21 @@ //! [configuring device kit] //! [configuring network device] - After the hardware has been prepared, there are final steps required - to set up the development tools in Qt Creator for your device. - - To do so, connect your device to network via ethernet cable and launch - Qt Creator. Then, + After you have prepared the hardware, you must set up the development tools + in Qt Creator for your device. Connect your device to the network via an + Ethernet cable and launch Qt Creator. In Qt Creator: \list 1 - \li Go to \b{Tools > Options > Devices} - \li Click \b{Add...} - \li Select \b{Boot2Qt Device} and Click \b{Start Wizart} - \li Fill in name of the device and network address. Device address can be seen from - \e{Launcher Settings} when device is running \B2Q demo - \li Click \b{Finish}. + \li Select \b{Tools > Options > Devices > Add}. + \li Select \b{Boot2Qt Device} > \b{Start Wizard}. + \li Enter the device name and network address. You can check the device + address in the \e{Launcher Settings} when the device is running the + \B2Q demo. + \li Select \b{Finish}. \endlist - You also have to configure the right device to be used for each \b{Kit}. + You also have to configure the correct device to be used for each build and + run \e{kit}: \include b2qt-post-install-setup.qdocinc steps for device kit diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 7a96856..4169cff 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -267,8 +267,8 @@ \previouspage qtee-supported-platforms.html \nextpage qtee-building-and-running.html - Before deploying and testing your Qt application on hardware, the - target device needs to be flashed with an image that contains the + Before you can deploy and test your Qt application on hardware, you must + flash the target device with an image that contains the \B2Q stack. These steps vary from device to device: \list @@ -278,7 +278,7 @@ \li \l{Raspberry Pi Model B (embedded Linux)} \endlist - If you are only using the emulator, you can skip this step + If you use only the emulator, you can skip this step and continue straight to \l {Building and Running an Example}. */ @@ -289,39 +289,45 @@ \previouspage qtee-installation-guide.html \nextpage qtee-building-and-running.html - When using a \l{http://www.google.com/nexus/7/specs/}{Nexus 7 (2012)} as a - development device, following steps are required to prepare it for + Take the following steps to prepare a + \l{http://www.google.com/nexus/7/specs/}{Nexus 7 (2012)} for \B2Q. \section1 Unlocking Nexus 7 Bootloader - The Nexus 7 Bootloader has to be unlocked to allow custom software - to be installed. This has to be done only once. + You must unlock the Nexus 7 Bootloader to be able to install custom + software. You need to do this only once. \list 1 \li Power down the device. - \li Connect it to the development host with a USB cable. - \li Start the Nexus up in \e{fastboot} mode: Press the power button for a second, and then keep the Volume Down key pressed, until you see a screen with a green robot with its front panel open. Note: If you get the ordinary startup screen instead, just power it down and try again. - \li On the development host, give the command + \li Connect the device to the development host with a USB cable. + \li To start the Nexus up in \e{fastboot} mode, press the power button + for a second, and then keep the \b {Volume Down} key pressed down, + until you see a screen with a green robot with its front panel open. + \note If the ordinary startup screen appears instead, power down the + device and try again. + \li On the development host, enter the following command: \code sudo /Tools/b2qt/fastboot oem unlock \endcode - The Nexus screen will ask if you want to unlock the bootloader. Press power button to confirm. + \li Press the power button to confirm that you want to unlock the + bootloader when the prompt appears on the Nexus screen. \li Wait a few seconds, and check that the text line stating the \c{LOCK STATE} now says \c{UNLOCKED}. \endlist \section1 Updating a Nexus 7 with \B2Q Images - \note \b{It is important that the steps in this section are repeated - every time after updating \SDK.} + \note It is important that you repeat the steps in this section after you + update \SDK. - An unlocked Nexus 7 device can now be updated with a \B2Q image. + To update an unlocked Nexus 7 device with a \B2Q image: - To do so, first make sure that the device is in \e{fastboot} mode - (see above), and connected to the development host via USB. + \list 1 + \li Make sure that the device is in \e{fastboot} mode and that it is + connected to the development host via USB. - Then, re-flash the \e{boot}, \e{system}, and \e{userdata} partitions on the - device, using the following commands in the order they are listed: + \li Re-flash the \e{boot}, \e{system}, and \e{userdata} partitions on the + device, by entering the following commands in the following order: \code cd @@ -330,18 +336,21 @@ sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-1.0/nexus7-eAndroid/images/data.img \endcode - Once the flashing is completed successfully, reboot the device: + \li Once the flashing is completed successfully, reboot the device: \code sudo ./Tools/b2qt/fastboot reboot \endcode - \note Until the next step is performed, the Nexus 7 will not - boot correctly (the screen will only show the "Google" logo). + \endlist + + \note You must install proprietary drivers for the Nexus 7 to boot + correctly. Until then, the screen will only show the "Google" logo, + instead of the \B2Q welcome screen or demo. \section1 Installing Proprietary Drivers - Download the proprietary drivers for your Nexus 7. The following script will download the third + Download the proprietary drivers for your Nexus 7. The following script downloads the third party drivers from \l{https://developers.google.com/android/nexus/drivers#grouperjdq39} {https://developers.google.com/android/nexus/drivers#grouperjdq39} \code @@ -349,15 +358,14 @@ ./Boot2Qt-1.0/nexus7-eAndroid/images/download.sh \endcode - \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" will work with the current \B2Q image. - - Make sure your Nexus 7 is powered up, is \e{not} in fastboot mode, - and is connected to the computer via USB. + \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" works with the + current \B2Q image. - Then, follow these steps to update the Nexus 7: - \note Make sure you have read the license terms enclosed in each individual extractor + To install the drivers to Nexus 7: \list 1 + \li Power up the device and connect it to the development host via USB. + Also check that the device is \e{not} in fastboot mode. \li Run the driver extractors: \code cd Boot2Qt-1.0/nexus7-eAndroid/images/drivers @@ -366,18 +374,20 @@ ./extract-invensense-grouper.sh cd - \endcode + \note Carefully read the license terms enclosed in each individual + extractor. \li Find out the serial number of the connected Nexus 7 device: \code ./Tools/b2qt/adb devices \endcode - \li Deploy the drivers to your device using the following command: + \li Deploy the drivers to your device: \code ./Boot2Qt-1.0/nexus7-eAndroid/images/deploy.sh \endcode \endlist - After the installation is complete, power up the device and confirm that it shows - a \B2Q welcome screen and/or demo. + After the installation is complete, power up the device and check that + the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -387,9 +397,8 @@ \include b2qt-post-install-setup.qdocinc configuring device kit - \b {You are now ready to start developing for your device!} - - See \l{Building and Running an Example} + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. */ /*! @@ -399,20 +408,20 @@ \previouspage qtee-installation-guide.html \nextpage qtee-building-and-running.html - When using a \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} as a - development device, following steps are required to prepare it for + Take the following steps to prepare a \l{http://beagleboard.org/hardware-xM} + {BeagleBoard-xM} for \B2Q. - \note \b{It is important that the steps in this section are repeated - every time after updating \SDK.} + \note It is important that you repeat the steps in this section after you + update \SDK. - The images containing \B2Q stack for BeagleBoard-xM is included in the SDK, - ready to be copied to a micro-SD card. + The images containing \B2Q stack for BeagleBoard-xM are included in \SDK, + ready to be copied to an SD card. - \section1 Preparing a Micro-SD Card + \section1 Preparing an SD Card - For \B2QA, a micro-SD card of at least 2GB capacity is needed. For \B2QL, - a card of at least 512MB capacity is sufficient. + For \B2QA, an SD card of at least 2 GB capacity is needed. For \B2QL, + a card of at least 512 MB capacity is sufficient. \include detect-sd-card-device-name.qdocinc instructions @@ -421,23 +430,23 @@ The commands used in this step vary depending on whether you are developing for embedded Android or embedded Linux. - Write the image to the micro-SD card: + To write the image to the SD card: \list \li \b{\B2QA} \code cd - sudo dd if=Boot2Qt-1.0/beagleboard-eAndroid/images/sdcard.img of=/dev/XXX bs=1M + sudo dd if=Boot2Qt-1.0/beagleboard-eAndroid/images/sdcard.img of=/dev/ bs=1M \endcode \li \b{\B2QL} \code cd - sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/XXX + sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/ \endcode \endlist - After the image has been deployed, power up the device and confirm that it shows - a \B2Q welcome screen and/or demo. + After the image has been deployed, power up the device and check that + the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -447,9 +456,8 @@ \include b2qt-post-install-setup.qdocinc configuring device kit - \b {You are now ready to start developing for your device!} - - See \l{Building and Running an Example} + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. */ /*! @@ -458,21 +466,20 @@ \title Preparing Sabre Lite i.MX 6 \previouspage qtee-installation-guide.html - When using a + Take the following steps to prepare a \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Sabre - Lite i.MX 6} as a development device, following steps are required - to prepare it for \B2Q. + Lite i.MX 6} for \B2Q. - \note \b{It is important that the steps in this section are repeated - every time after updating \SDK.} + \note It is important that you repeat the steps in this section after you + update \SDK. The images containing the \B2Q stack for Sabre Lite i.MX 6 are included - in the SDK, ready to be copied to a micro-SD card. + in \SDK, ready to be copied to an SD card. - \section1 Preparing a Micro-SD Card + \section1 Preparing an SD Card - For \B2QA, a micro-SD card of at least 4GB capacity is needed. For \B2QL, - a card of at least 512MB capacity is sufficient. + For \B2QA, an SD card of at least 4 GB capacity is needed. For \B2QL, + a card of at least 512 MB capacity is sufficient. \include detect-sd-card-device-name.qdocinc instructions @@ -485,11 +492,11 @@ \l{http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/}{Boundary Devices Android Jellybean i.MX6 images} (registration required). - Use the following commands to create a micro-SD card containing the + Use the following commands to create an SD card containing the downloaded image: - \list - \li Extract the downloaded package + \list 1 + \li Extract the downloaded package: \code ~/$ mkdir bd-android ~/$ cd bd-android @@ -497,7 +504,7 @@ \endcode \li Run device/boundary/mksdcard.sh: \code - ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/XXX + ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/ ~/bd-android$ sync \endcode \endlist @@ -510,24 +517,24 @@ sudo apt-get install u-boot-tools \endcode - Then, upgrade the micro-SD Card with \B2Q. Use one of the commands below, - depending on whether you're developing for embedded Android or Linux: + Then, upgrade the SD card with \B2Q. Use one of the commands below, + depending on whether you are developing for embedded Android or Linux: \list \li \b{\B2QA} \code cd - Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/XXX + Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/ \endcode \li \b{\B2QL} \code cd - Boot2Qt-1.0/iMX6-eLinux/images/deploy.sh /dev/XXX + Boot2Qt-1.0/iMX6-eLinux/images/deploy.sh /dev/ \endcode \endlist - After the installation is complete, power up the device and confirm that it shows - a \B2Q welcome screen and/or demo. + After the installation is complete, power up the device and check that + the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -537,9 +544,8 @@ \include b2qt-post-install-setup.qdocinc configuring device kit - \b {You are now ready to start developing for your device!} - - See \l{Building and Running an Example} + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. */ /*! @@ -549,45 +555,44 @@ \previouspage qtee-installation-guide.html \nextpage qtee-building-and-running.html - When using a \l{http://www.raspberrypi.org/}{Raspberry Pi} as a - development device, following steps are required to prepare it for + Take the following steps to prepare a \l{http://www.raspberrypi.org/} + {Raspberry Pi} for \B2Q. - Note that Ethernet networking is required to connect the device to Qt Creator. - This means that the support is currently limited to Raspberry Pi Model B which + \note Ethernet networking is required to connect the device to Qt Creator. + This means that the support is currently limited to Raspberry Pi Model B, which includes an Ethernet port. - \note \b{It is important that the steps in this section are repeated - every time after updating \SDK.} + \note It is important that you repeat the steps in this section after you + update \SDK. - The images containing \B2Q stack for Raspberry Pi is included in the SDK, - ready to be copied to a micro-SD card. + The image containing \B2Q stack for Raspberry Pi is included in the SDK, + ready to be copied to an SD card. - \section1 Preparing a Micro-SD Card + \section1 Preparing an SD Card - An SD card of at least 512MB capacity is sufficient. + An SD card of at least 512 MB capacity is sufficient. \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the \B2Q Image - Write the image to the micro-SD card: + To write the image to the SD card: \code cd - sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/XXX + sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/ \endcode - After the image has been deployed, power up the device and confirm that it shows - a \B2Q welcome screen and/or demo. + After the image has been deployed, power up the device and check that + the \B2Q welcome screen and/or demo appear. \section1 Configuring a Device Kit in Qt Creator \include b2qt-post-install-setup.qdocinc configuring network device - \b {You are now ready to start developing for your device!} - - See \l{Building and Running an Example} + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. */ /*! diff --git a/src/doc/src/detect-sd-card-device-name.qdocinc b/src/doc/src/detect-sd-card-device-name.qdocinc index e7601c9..40d7f51 100644 --- a/src/doc/src/detect-sd-card-device-name.qdocinc +++ b/src/doc/src/detect-sd-card-device-name.qdocinc @@ -18,28 +18,28 @@ ****************************************************************************/ /*! //! [instructions] - Plug the micro-SD card or reader into the development host PC, + Plug in the SD card or reader to the development host, and use the following command to find out its device name: \code lsblk -d \endcode - Removable devices such as SD cards have a value '1' in + Removable devices such as SD cards have the value '1' in the \e RM column. - \warning \b{Make very sure you select the right device. Selecting - the wrong one can result in a wiped hard drive}. + \warning Make sure to select the correct device, because selecting + the wrong one can result in a wiped hard drive. Typical device names for SD cards include \c {sdb} and \c {mmcblk0}. The full device path is \c {/dev/} followed by - the name. Replace \b XXX with the device name in below - instructions. + the name. - Now make sure the micro-SD card is not mounted: + To make sure that the SD card is not mounted, enter the following + command, where is the device name: \code - umount /dev/XXX + umount /dev/ \endcode //! [instructions] */ -- cgit v1.2.3 From 46a143c9fef70647a1d06ce4fc1b9ef85e796bc9 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 10 Dec 2013 14:11:04 +0100 Subject: Doc: unify punctuation of list items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the period from the end of the first list item for consistency. Change-Id: I8926473a804be175c50ddf2dd0923bcc8e98c37c Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4169cff..a6515e4 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -67,7 +67,7 @@ \list \li Development environment that is installed on a Linux development - desktop by using an online installer. + desktop by using an online installer \li \B2Q \endlist -- cgit v1.2.3 From 59649939d06664d722046cd54e0933c5b402e9a9 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 10 Dec 2013 14:33:36 +0100 Subject: Doc: use power off/on consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarify the options to power off Nexus 7. Change-Id: I13fe92c6cdc00d9033a603edd2bde334aacf8a77 Reviewed-by: Rainer Keller Reviewed-by: Topi Reiniö --- src/doc/src/b2qt-post-install-setup.qdocinc | 2 +- src/doc/src/b2qt.qdoc | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index ef93b3f..d5c55cf 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -44,7 +44,7 @@ The output should be a list of connected Android devices, identified with a serial number and a name. If your device is missing from the list, or the serial number is \c{??????}, the connection is - not working properly. Check that the device is powered up, and disconnect + not working properly. Check that the device is powered on, and disconnect and reconnect the USB cable. The emulator may be listed as well. Its serial number is its IP and the port diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index a6515e4..61635d6 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -299,12 +299,12 @@ software. You need to do this only once. \list 1 - \li Power down the device. + \li Power off the device. \li Connect the device to the development host with a USB cable. \li To start the Nexus up in \e{fastboot} mode, press the power button for a second, and then keep the \b {Volume Down} key pressed down, until you see a screen with a green robot with its front panel open. - \note If the ordinary startup screen appears instead, power down the + \note If the ordinary startup screen appears instead, power off the device and try again. \li On the development host, enter the following command: \code @@ -364,7 +364,7 @@ To install the drivers to Nexus 7: \list 1 - \li Power up the device and connect it to the development host via USB. + \li Power on the device and connect it to the development host via USB. Also check that the device is \e{not} in fastboot mode. \li Run the driver extractors: \code @@ -386,7 +386,7 @@ \endcode \endlist - After the installation is complete, power up the device and check that + After the installation is complete, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -445,7 +445,7 @@ \endcode \endlist - After the image has been deployed, power up the device and check that + After the image has been deployed, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -533,7 +533,7 @@ \endcode \endlist - After the installation is complete, power up the device and check that + After the installation is complete, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -584,7 +584,7 @@ sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/ \endcode - After the image has been deployed, power up the device and check that + After the image has been deployed, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Configuring a Device Kit in Qt Creator @@ -606,7 +606,7 @@ application and running it on the device: \list 1 - \li Make sure that your device is powered up and connected to the + \li Make sure that your device is powered on and connected to the development host. \li In Qt Creator, select \b{File > New File or Project} > \b Applications > \b{Qt Quick 2 Application (Built-in Types)} > @@ -859,7 +859,7 @@ \section2 How do I shut down the Nexus 7? If the \B2Q demo launcher is running, start the \b {Launcher - Settings} app, and press the power button to power off the device. + Settings} app, and select \b {Shut Down} to power off the device. Otherwise, make sure the Nexus 7 is connected to the development host, and run the following command in a terminal: @@ -867,6 +867,9 @@ /Tools/b2qt/adb shell reboot -p \endcode + If the device is in the fastboot mode, use the volume button to display the + \b {Power off} option and press the power button to power off the device. + Alternatively, press and hold the power button for 10 seconds. This will force a reboot. -- cgit v1.2.3 From bdc860eef15403f929df449a9c04f4e612bab46e Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Fri, 10 Jan 2014 14:14:54 +0100 Subject: Remove virtual keyboard Change-Id: I2e28ef84e5c71c46924fd2b62bc9b199a0c6c7a9 Reviewed-by: Eirik Aavitsland --- src/imports/imports.pro | 2 +- src/imports/virtualkeyboard/Keyboard.qml | 242 ---------------- .../virtualkeyboard/components/AlternativeKeys.qml | 122 -------- .../virtualkeyboard/components/AutoScroller.qml | 115 -------- .../virtualkeyboard/components/BackspaceKey.qml | 54 ---- src/imports/virtualkeyboard/components/BaseKey.qml | 77 ----- .../components/ChangeLanguageKey.qml | 52 ---- .../components/CharacterPreviewBubble.qml | 87 ------ .../virtualkeyboard/components/EnterKey.qml | 74 ----- .../virtualkeyboard/components/HideKeyboardKey.qml | 53 ---- src/imports/virtualkeyboard/components/Icon.qml | 64 ----- .../virtualkeyboard/components/InputEngine.qml | 179 ------------ src/imports/virtualkeyboard/components/Key.qml | 64 ----- .../virtualkeyboard/components/NumberKey.qml | 47 ---- .../virtualkeyboard/components/PressedKey.qml | 66 ----- .../virtualkeyboard/components/ShiftKey.qml | 73 ----- .../virtualkeyboard/components/SpaceKey.qml | 63 ----- .../virtualkeyboard/components/SymbolModeKey.qml | 50 ---- src/imports/virtualkeyboard/images/arrow.png | Bin 264 -> 0 bytes src/imports/virtualkeyboard/images/backspace.png | Bin 515 -> 0 bytes src/imports/virtualkeyboard/images/enter.png | Bin 584 -> 0 bytes .../virtualkeyboard/images/hidekeyboard.png | Bin 251 -> 0 bytes src/imports/virtualkeyboard/images/keypad.png | Bin 14899 -> 0 bytes src/imports/virtualkeyboard/images/shift.png | Bin 310 -> 0 bytes src/imports/virtualkeyboard/images/space.png | Bin 240 -> 0 bytes src/imports/virtualkeyboard/layouts/ar_AR.qml | 85 ------ src/imports/virtualkeyboard/layouts/en_GB.qml | 184 ------------ src/imports/virtualkeyboard/layouts/fi_FI.qml | 203 -------------- src/imports/virtualkeyboard/layouts/numbers.qml | 103 ------- src/imports/virtualkeyboard/layouts/symbols.qml | 186 ------------- .../declarativeinputcontext.cpp | 309 --------------------- .../platforminputcontext/declarativeinputcontext.h | 149 ---------- .../platforminputcontext/platforminputcontext.cpp | 162 ----------- .../platforminputcontext/platforminputcontext.h | 89 ------ .../platforminputcontext/platforminputcontext.json | 3 - .../platforminputcontext/platforminputcontext.pro | 21 -- .../platforminputcontext/plugin.cpp | 85 ------ src/imports/virtualkeyboard/qmldir | 2 - src/imports/virtualkeyboard/qmlmodule.pro | 34 --- src/imports/virtualkeyboard/virtualkeyboard.pro | 2 - 40 files changed, 1 insertion(+), 3100 deletions(-) delete mode 100644 src/imports/virtualkeyboard/Keyboard.qml delete mode 100644 src/imports/virtualkeyboard/components/AlternativeKeys.qml delete mode 100644 src/imports/virtualkeyboard/components/AutoScroller.qml delete mode 100644 src/imports/virtualkeyboard/components/BackspaceKey.qml delete mode 100644 src/imports/virtualkeyboard/components/BaseKey.qml delete mode 100644 src/imports/virtualkeyboard/components/ChangeLanguageKey.qml delete mode 100644 src/imports/virtualkeyboard/components/CharacterPreviewBubble.qml delete mode 100644 src/imports/virtualkeyboard/components/EnterKey.qml delete mode 100644 src/imports/virtualkeyboard/components/HideKeyboardKey.qml delete mode 100644 src/imports/virtualkeyboard/components/Icon.qml delete mode 100644 src/imports/virtualkeyboard/components/InputEngine.qml delete mode 100644 src/imports/virtualkeyboard/components/Key.qml delete mode 100644 src/imports/virtualkeyboard/components/NumberKey.qml delete mode 100644 src/imports/virtualkeyboard/components/PressedKey.qml delete mode 100644 src/imports/virtualkeyboard/components/ShiftKey.qml delete mode 100644 src/imports/virtualkeyboard/components/SpaceKey.qml delete mode 100644 src/imports/virtualkeyboard/components/SymbolModeKey.qml delete mode 100644 src/imports/virtualkeyboard/images/arrow.png delete mode 100644 src/imports/virtualkeyboard/images/backspace.png delete mode 100644 src/imports/virtualkeyboard/images/enter.png delete mode 100644 src/imports/virtualkeyboard/images/hidekeyboard.png delete mode 100644 src/imports/virtualkeyboard/images/keypad.png delete mode 100644 src/imports/virtualkeyboard/images/shift.png delete mode 100644 src/imports/virtualkeyboard/images/space.png delete mode 100644 src/imports/virtualkeyboard/layouts/ar_AR.qml delete mode 100644 src/imports/virtualkeyboard/layouts/en_GB.qml delete mode 100644 src/imports/virtualkeyboard/layouts/fi_FI.qml delete mode 100644 src/imports/virtualkeyboard/layouts/numbers.qml delete mode 100644 src/imports/virtualkeyboard/layouts/symbols.qml delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.cpp delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.h delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.cpp delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.h delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.json delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.pro delete mode 100644 src/imports/virtualkeyboard/platforminputcontext/plugin.cpp delete mode 100644 src/imports/virtualkeyboard/qmldir delete mode 100644 src/imports/virtualkeyboard/qmlmodule.pro delete mode 100644 src/imports/virtualkeyboard/virtualkeyboard.pro diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 0802ad0..92eddcd 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -SUBDIRS = utils virtualkeyboard +SUBDIRS = utils diff --git a/src/imports/virtualkeyboard/Keyboard.qml b/src/imports/virtualkeyboard/Keyboard.qml deleted file mode 100644 index c626dbc..0000000 --- a/src/imports/virtualkeyboard/Keyboard.qml +++ /dev/null @@ -1,242 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import "components" -import Boot2Qt.InputContext 1.0 -import Qt.labs.folderlistmodel 2.0 - -Image { - id: keyboard - - property var activeKey: 0 - property int localeIndex: 1 - property string locale: layoutsModel.count > 0 ? layoutsModel.get(localeIndex, "fileBaseName") : "en_GB" - property bool active: Qt.inputMethod.visible - property bool uppercased: uppercaseOnly ? true : (lowercaseOnly ? false : InputContext.shift || InputContext.capsLock) - property bool uppercaseOnly: InputContext.inputMethodHints & Qt.ImhUppercaseOnly - property bool lowercaseOnly: InputContext.inputMethodHints & Qt.ImhLowercaseOnly - property bool numberMode: InputContext.inputMethodHints & (Qt.ImhDialableCharactersOnly | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly) - property bool symbolMode - - z: 1 - source: "images/keypad.png" - fillMode: Image.Stretch - width: parent.width - height: keyboardLayout.height+10 - y: Qt.inputMethod.visible ? parent.height - height : parent.height - visible: Qt.inputMethod.visible || Qt.inputMethod.animating; - - onLocaleChanged: InputContext.setLocale(locale) - onUppercasedChanged: if (Qt.inputMethod.visible) InputContext.handleUppercasing(uppercased) - - function changeInputLanguage() { - localeIndex = (localeIndex+1) % layoutsModel.count - } - - Behavior on y { - SequentialAnimation { - ScriptAction { - script: { - if (Qt.inputMethod.visible) { - keyboard.symbolMode = false - InputContext.handleUppercasing(uppercased) - } - InputContext.setAnimating(true) - } - } - NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } - ScriptAction { script: InputContext.setAnimating(false) } - } - } - AutoScroller {} - FolderListModel { - id: layoutsModel - folder: "layouts" - nameFilters: ["*_*.qml"] - } - PressedKey {} - InputEngine { id: inputEngine } - AlternativeKeys { id: alternativeKeys } - Timer { id: releaseInaccuracyTimer; interval: 500 } - CharacterPreviewBubble { enabled: keyboardMouse.pressed && !alternativeKeys.active } - Binding { - target: InputContext - property: "keyboardRectangle" - value: Qt.rect(keyboard.x, keyboard.y, keyboard.width, keyboard.height) - } - Column { - id: keyboardLayout - anchors.centerIn: parent - Loader { - active: false - visible: keyboard.symbolMode && !keyboard.numberMode - source: "layouts/symbols.qml" - onVisibleChanged: if (visible) active = true - Component.onCompleted: if (visible) active = true - anchors.horizontalCenter: parent.horizontalCenter - } - Loader { - active: false - visible: keyboard.numberMode - source: "layouts/numbers.qml" - onVisibleChanged: if (visible) active = true - Component.onCompleted: if (visible) active = true - anchors.horizontalCenter: parent.horizontalCenter - } - Loader { - visible: !keyboard.symbolMode && !keyboard.numberMode - source: "layouts/" + keyboard.locale +".qml" - } - } - MouseArea { - id: keyboardMouse - - property var initialKey - property var previousKey - property bool dragSymbolMode - property real pressAndHoldMargin: 6 - property real releaseMargin: 18 - - anchors.fill: keyboardLayout - - function press(key) { - if (key && key.enabled) { - if (key.key != Qt.Key_unknown || key.text.length > 0) - inputEngine.sendKeyPress(key.key, keyboard.uppercased ? key.text.toUpperCase() : key.text, keyboard.uppercased ? Qt.ShiftModifier : 0, key.repeat) - } - } - function release(key) { - if (key && key.enabled) { - if (key.key != Qt.Key_unknown || key.text.length > 0) - inputEngine.sendKeyRelease(key.key, keyboard.uppercased ? key.text.toUpperCase() : key.text, keyboard.uppercased ? Qt.ShiftModifier : 0) - key.clicked() - } else if (initialKey !== undefined) // rollback - InputContext.preeditText = InputContext.preeditText.substr(0, InputContext.preeditText.length-1) - } - function click(key) { - if (key && key.enabled) { - if (key.key != Qt.Key_unknown || key.text.length > 0) - inputEngine.sendKeyClick(key.key, keyboard.uppercased ? key.text.toUpperCase() : key.text, keyboard.uppercased ? Qt.ShiftModifier : 0, key.repeat) - key.clicked() - } - } - function setActiveKey(activeKey) { - if (keyboard.activeKey) - keyboard.activeKey.active = false - keyboard.activeKey = activeKey - if (keyboard.activeKey) - keyboard.activeKey.active = true - } - function keyOnMouse(mx, my) { - var parentItem = keyboardLayout - var child = parentItem.childAt(mx, my) - while (child != null) { - var position = parentItem.mapToItem(child, mx, my) - mx = position.x; my = position.y - parentItem = child - child = parentItem.childAt(mx, my) - if (child && child.key != undefined) - return child - } - return undefined - } - function hitInitialKey(mouseX, mouseY, margin) { - if (!initialKey) - return false - var position = initialKey.mapFromItem(keyboardMouse, mouseX, mouseY) - return (position.x > -margin - && position.y > -margin - && position.x < initialKey.width + margin - && position.y < initialKey.height + margin) - } - function reset() { - alternativeKeys.close() - previousKey = keyboard.activeKey - setActiveKey(0) - if (dragSymbolMode) - keyboard.symbolMode = false - dragSymbolMode = false - } - - onPressed: { - releaseInaccuracyTimer.start() - initialKey = keyOnMouse(mouseX, mouseY) - setActiveKey(initialKey ? initialKey : 0) - press(initialKey) - } - onPositionChanged: { - if (alternativeKeys.active) { - alternativeKeys.move(mouseX) - } else { - var key = keyOnMouse(mouseX, mouseY) - if (key !== keyboard.activeKey) { - setActiveKey(key ? key : 0) - } - } - } - onPressAndHold: { - var key = hitInitialKey(mouseX, mouseY, pressAndHoldMargin) ? initialKey : keyboard.activeKey - if (key != undefined && key == initialKey) { - alternativeKeys.open(key) - if (!alternativeKeys.active && key.key == Qt.Key_Context1) { - dragSymbolMode = true - keyboard.symbolMode = true - } - } - } - onClicked: {} - onReleased: { - var key = keyOnMouse(mouseX, mouseY) - if (alternativeKeys.active) { - alternativeKeys.move(mouseX) - alternativeKeys.clicked() - } else if (dragSymbolMode) { - var key = keyOnMouse(mouseX, mouseY) - release(initialKey) - click(key) - } else { - release(releaseInaccuracyTimer.running && hitInitialKey(mouseX, mouseY, releaseMargin) ? initialKey : keyOnMouse(mouseX, mouseY)) - } - reset() - } - onCanceled: reset() - } -} diff --git a/src/imports/virtualkeyboard/components/AlternativeKeys.qml b/src/imports/virtualkeyboard/components/AlternativeKeys.qml deleted file mode 100644 index 2465fa5..0000000 --- a/src/imports/virtualkeyboard/components/AlternativeKeys.qml +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Rectangle { - property bool active: activeKey != null - property string keys - property int primaryKeyCode - property var activeKey: null - property real keyWidth: 36 - property real keyMargin: 5 - - z: 1 - radius: 4 - height: 60 - parent: keyboard - visible: active - width: keyRow.width - - signal clicked - - onClicked: { - if (active) - inputEngine.sendKeyRelease(primaryKeyCode, - keyboard.uppercased ? activeKey.text.toUpperCase() : activeKey.text, - keyboard.uppercased ? Qt.ShiftModifier : 0) - } - - function open(key) { - keys = key.alternativeKeys - primaryKeyCode = key.key - if (keys.length > 0) { - var position = keyboard.mapFromItem(key, 0, -23) - var primaryKeyIndex = 0 - while (primaryKeyIndex < keys.length) { - if (keys.charAt(primaryKeyIndex) == key.text) { - break - } - primaryKeyIndex++ - } - if (primaryKeyIndex == keys.length) { - console.log("AlternativeKeys: active key \"" + key.text + "\" not found in alternativeKeys \"" + keys + ".\"") - primaryKeyIndex = 0 - } - x = Math.min(Math.max(keyMargin, position.x-primaryKeyIndex*keyWidth+(key.width-keyWidth)/2-1), keyboard.width-width-keyMargin) - y = Math.min(position.y-height+keyMargin, keyboard.height-height-keyMargin) - activeKey = keyRow.children[primaryKeyIndex] - arrow.x = mapFromItem(key, key.width/2, 0).x - arrow.width/2 - } - } - function close() { - activeKey = null - } - function move(mouseX) { - var oldKey = activeKey - activeKey = keyRow.children[Math.max(0, Math.min(keys.length-1, Math.floor((mouseX-keyRow.x-x)/keyWidth)))] - } - - Image { - id: arrow - source: "../images/arrow.png" - anchors.top: parent.bottom - } - Row { - id: keyRow - anchors.centerIn: parent - Repeater { - model: keys.length - Text { - id: key - color: activeKey === key ? "#f04b67" : "black" - width: keyWidth - height: keyWidth + 5 - text: keys.charAt(index) - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - font { - pixelSize: 40 - capitalization: keyboard.uppercased ? Font.AllUppercase : Font.MixedCase - } - } - } - } -} diff --git a/src/imports/virtualkeyboard/components/AutoScroller.qml b/src/imports/virtualkeyboard/components/AutoScroller.qml deleted file mode 100644 index bbdc5da..0000000 --- a/src/imports/virtualkeyboard/components/AutoScroller.qml +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 - -Item { - property var innerFlickable - property var outerFlickable - property var inputItem: Qt.inputMethod.inputItem - - onInputItemChanged: { - if (inputItem) { - var parent_ = inputItem.parent - while (parent_) { - if (parent_.maximumFlickVelocity) { - if (innerFlickable) { - outerFlickable = parent_ - break - } else { - innerFlickable = parent_ - } - } - parent_ = parent_.parent - } - delayedLoading.triggered() - } - } - - function ensureVisible(flickable) { - if (Qt.inputMethod.visible && inputItem && flickable && flickable.visible && flickable.interactive) { - - var verticallyFlickable = (flickable.flickableDirection == Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection == Flickable.VerticalFlick - || (flickable.flickableDirection == Flickable.AutoFlickDirection && flickable.contentHeight > flickable.height)) - var horizontallyFlickable = (flickable.flickableDirection == Flickable.HorizontalAndVerticalFlick || flickable.flickableDirection == Flickable.HorizontalFlick - || (flickable.flickableDirection == Flickable.AutoFlickDirection && flickable.contentWidth > flickable.width)) - - if (!verticallyFlickable && !horizontallyFlickable) - return - - var cursorRectangle = flickable.contentItem.mapFromItem(inputItem, inputItem.cursorRectangle.x, inputItem.cursorRectangle.y) - - var oldContentY = flickable.contentY - if (verticallyFlickable) { - var scrollMarginVertical = (flickable && flickable.scrollMarginVertical) ? flickable.scrollMarginVertical : 10 - if (flickable.contentY >= cursorRectangle.y - scrollMarginVertical) - flickable.contentY = Math.max(0, cursorRectangle.y - scrollMarginVertical) - else if (flickable.contentY + flickable.height <= cursorRectangle.y + inputItem.cursorRectangle.height + scrollMarginVertical) - flickable.contentY = Math.min(flickable.contentHeight - flickable.height, cursorRectangle.y + inputItem.cursorRectangle.height - flickable.height + scrollMarginVertical) - } - if (horizontallyFlickable) { - var scrollMarginHorizontal = (flickable && flickable.scrollMarginHorizontal) ? flickable.scrollMarginHorizontal : 10 - if (flickable.contentX >= cursorRectangle.x - scrollMarginHorizontal) - flickable.contentX = Math.max(0, cursorRectangle.x - scrollMarginHorizontal) - else if (flickable.contentX + flickable.width <= cursorRectangle.x + inputItem.cursorRectangle.width + scrollMarginHorizontal) - flickable.contentX = Math.min(flickable.contentWidth - flickable.width, cursorRectangle.x + inputItem.cursorRectangle.width - flickable.width + scrollMarginHorizontal) - } - } - } - Timer { - id: delayedLoading - interval: 10 - onTriggered: { - ensureVisible(innerFlickable) - ensureVisible(outerFlickable) - } - } - Connections { - ignoreUnknownSignals: true - target: Qt.inputMethod.inputItem && Qt.inputMethod.animating ? Qt.inputMethod : null - onKeyboardRectangleChanged: delayedLoading.triggered() - } - Connections { - ignoreUnknownSignals: true - target: Qt.inputMethod.inputItem && Qt.inputMethod.inputItem.activeFocus ? Qt.inputMethod.inputItem : null - onCursorRectangleChanged: delayedLoading.triggered() - } -} diff --git a/src/imports/virtualkeyboard/components/BackspaceKey.qml b/src/imports/virtualkeyboard/components/BackspaceKey.qml deleted file mode 100644 index 760372c..0000000 --- a/src/imports/virtualkeyboard/components/BackspaceKey.qml +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -BaseKey { - key: Qt.Key_Backspace - width: 47 - repeat: true - functionKey: true - Icon { - invert: pressed - opacity: parent.enabled ? 1.0 : 0.6 - source: "../images/backspace.png" - anchors { centerIn: parent; verticalCenterOffset: 1 } - } -} diff --git a/src/imports/virtualkeyboard/components/BaseKey.qml b/src/imports/virtualkeyboard/components/BaseKey.qml deleted file mode 100644 index 3f982c6..0000000 --- a/src/imports/virtualkeyboard/components/BaseKey.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Item { - id: keyItem - - property string text - property string displayText: text - property string alternativeKeys - property int key: Qt.Key_unknown - property bool active - property bool repeat - property bool highlighted - property bool functionKey - property bool showPreview: !functionKey - property bool enabled: true - property bool pressed: enabled && active - property color textColor: pressed ? "#EEEEEE" : (enabled ? "black" : "black") - - width: 31 - height: 55 - z: pressed ? 1 : 0 - y: pressed ? 1 : 0 - scale: pressed ? (width > 40 ? 0.98 : 0.96) : 1.0 - - signal clicked - - Rectangle { - id: background - - z: -1 - radius: 4 - visible: !pressed - opacity: highlighted ? 0.6 : 0.2 - color: keyItem.enabled ? "#EEEEEE" : "black" - anchors { fill: parent; topMargin: 3; bottomMargin: 3; leftMargin: 2; rightMargin: 2 } - } -} diff --git a/src/imports/virtualkeyboard/components/ChangeLanguageKey.qml b/src/imports/virtualkeyboard/components/ChangeLanguageKey.qml deleted file mode 100644 index d6c89d3..0000000 --- a/src/imports/virtualkeyboard/components/ChangeLanguageKey.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -BaseKey { - functionKey: true - Text { - text: keyboard.locale.split("_")[0] - color: textColor - font { pixelSize: 16; capitalization: Font.AllUppercase } - anchors { centerIn: parent; verticalCenterOffset: parent.textPixelSize > 35 ? 2 : 0 } - } - onClicked: keyboard.changeInputLanguage() -} diff --git a/src/imports/virtualkeyboard/components/CharacterPreviewBubble.qml b/src/imports/virtualkeyboard/components/CharacterPreviewBubble.qml deleted file mode 100644 index db0abdd..0000000 --- a/src/imports/virtualkeyboard/components/CharacterPreviewBubble.qml +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Rectangle { - property bool enabled - property bool sideBackground - property real sideMargin: 46 - property real sideBackgroundOffset: 10 - property var activeKey: keyboard.activeKey - - z: 1 - radius: 4 - height: 60 - width: Math.max(previewCharacter.width+20, 55) - visible: false - parent: keyboard - opacity: (activeKey && enabled) ? 1.0 : 0.0 - - onActiveKeyChanged: { - visible = activeKey && activeKey.showPreview - if (activeKey) { - previewCharacter.text = activeKey.text - var position = keyboard.mapFromItem(activeKey, activeKey.width/2, 10) - var onLeft = position.x < sideMargin - var onRight = position.x > keyboard.width - sideMargin - x = position.x - width/2 - + (onLeft ? sideBackgroundOffset : 0) - - (onRight ? sideBackgroundOffset : 0) - y = position.y - height - 25 - arrow.anchors.horizontalCenterOffset = onLeft ? -sideBackgroundOffset - : (onRight ? sideBackgroundOffset : 0) - } - } - Image { - id: arrow - source: "../images/arrow.png" - anchors { top: parent.bottom; horizontalCenter: parent.horizontalCenter } - } - Text { - id: previewCharacter - color: "black" - font { - pixelSize: previewCharacter.text.length == 1 ? 50 : 40 - capitalization: keyboard.uppercased ? Font.AllUppercase : Font.MixedCase - } - anchors { centerIn: parent; verticalCenterOffset: -2 } - } -} diff --git a/src/imports/virtualkeyboard/components/EnterKey.qml b/src/imports/virtualkeyboard/components/EnterKey.qml deleted file mode 100644 index d321e34..0000000 --- a/src/imports/virtualkeyboard/components/EnterKey.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -BaseKey { - - property string enterKeyText: Qt.inputMethod.inputItem ? Qt.inputMethod.inputItem.enterKeyText : "" - - width: 78 - text: "\n" - key: Qt.Key_Return - functionKey: true - highlighted: enabled && enterKeyText.length > 0 - enabled: Qt.inputMethod.inputItem ? Qt.inputMethod.inputItem.enterKeyEnabled : true - - Icon { - invert: pressed - visible: enterKeyText.length == 0 - source: "../images/enter.png" - anchors { centerIn: parent; verticalCenterOffset: 2 } - } - Text { - visible: enterKeyText.length > 0 - text: enterKeyText - fontSizeMode: Text.HorizontalFit - color: textColor - font { pixelSize: 20; capitalization: Font.AllUppercase } - horizontalAlignment: Text.AlignHCenter - anchors { - left: parent.left - right: parent.right - verticalCenter: parent.verticalCenter - margins: 5 - } - } -} diff --git a/src/imports/virtualkeyboard/components/HideKeyboardKey.qml b/src/imports/virtualkeyboard/components/HideKeyboardKey.qml deleted file mode 100644 index 411307a..0000000 --- a/src/imports/virtualkeyboard/components/HideKeyboardKey.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -BaseKey { - functionKey: true - onClicked: { - Qt.inputMethod.hide(); - } - Icon { - invert: pressed - source: "../images/hidekeyboard.png" - anchors { centerIn: parent; verticalCenterOffset: 4 } - } -} diff --git a/src/imports/virtualkeyboard/components/Icon.qml b/src/imports/virtualkeyboard/components/Icon.qml deleted file mode 100644 index 089090d..0000000 --- a/src/imports/virtualkeyboard/components/Icon.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -ShaderEffect { - property bool invert - property alias source: image.source - property variant texture: Image { id: image } - - width: image.implicitWidth - height: image.implicitHeight - - fragmentShader: " - uniform bool invert; - uniform lowp float qt_Opacity; - uniform lowp sampler2D texture; - varying highp vec2 qt_TexCoord0; - void main() { - lowp vec4 color = texture2D(texture, qt_TexCoord0) * qt_Opacity; - if (invert) - gl_FragColor = vec4(vec3(1.0) - color.rgb, 1.0) * color.a; - else - gl_FragColor = color; - } - " -} diff --git a/src/imports/virtualkeyboard/components/InputEngine.qml b/src/imports/virtualkeyboard/components/InputEngine.qml deleted file mode 100644 index b47f9ed..0000000 --- a/src/imports/virtualkeyboard/components/InputEngine.qml +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 - -Item { - property int lastKey - property string sentenceEndingCharacters: ".;!?" - - Timer { - // key repeater - repeat: true - interval: 600 - running: keyboard.activeKey !== 0 && keyboard.activeKey.repeat - - onRunningChanged: if (!running) interval = 600 - onTriggered: { - interval = 150 - keyboardMouse.click(keyboard.activeKey) - } - } - Timer { - id: multiTapTimer - - property int index - - interval: 1200 - onTriggered: { - index = 0 - InputContext.commit(InputContext.preeditText) - } - } - Item { - id: shiftHandling - - property bool autoCapitalization: !(InputContext.inputMethodHints & (Qt.ImhNoAutoUppercase | Qt.ImhUppercaseOnly - | Qt.ImhLowercaseOnly | Qt.ImhEmailCharactersOnly - | Qt.ImhUrlCharactersOnly | Qt.ImhDialableCharactersOnly - | Qt.ImhFormattedNumbersOnly | Qt.ImhDigitsOnly)) - function reset() { - if (Qt.inputMethod.inputItem) { - var preferUpperCase = InputContext.inputMethodHints & Qt.ImhPreferUppercase - InputContext.shift = preferUpperCase - InputContext.capsLock = preferUpperCase - } - } - function autoCapitalize() { - if (!Qt.inputMethod.inputItem || !autoCapitalization || InputContext.capsLock) - return - var preferLowerCase = InputContext.inputMethodHints & Qt.ImhPreferLowercase - if (InputContext.cursorPosition == 0) - InputContext.shift = !preferLowerCase - else { - var text = (InputContext.surroundingText + InputContext.preeditText).substr(0, InputContext.cursorPosition).trim() - if (text.length == 0) - InputContext.shift = !preferLowerCase - else if (text.length > 1 && sentenceEndingCharacters.indexOf(text.charAt(text.length-1)) >= 0) - InputContext.shift = !preferLowerCase - else - InputContext.shift = false - } - } - Timer { - id: delayedLoading - interval: 10 - onTriggered: { - shiftHandling.reset() - shiftHandling.autoCapitalize() - } - } - Connections { - target: InputContext - onInputMethodHintsChanged: delayedLoading.restart() - onFocusEditorChanged: { - keyboard.symbolMode = false - delayedLoading.restart() - } - onPreeditTextChanged: { - if (shiftHandling.autoCapitalization && !InputContext.capsLock) - InputContext.shift = false - } - onCursorPositionChanged: shiftHandling.autoCapitalize() - } - } - function sendKeyClick(key, text, modifiers) { - sendKeyPress(key, text, modifiers) - sendKeyRelease(key, text, modifiers) - } - function sendKeyPress(key, text, modifiers) { - lastKey = key - } - function sendKeyRelease(key, text, modifiers) { - var accept = false - switch (key) { - case Qt.Key_Enter: - case Qt.Key_Return: - break - case Qt.Key_Space: - InputContext.commit(" ") - var text = InputContext.surroundingText.trim() - if (sentenceEndingCharacters.indexOf(text.charAt(text.length-1)) >= 0) - keyboard.symbolMode = false - accept = true - break - case Qt.Key_Tab: - case Qt.Key_Backspace: - if (InputContext.cursorPosition > 0) { - if (InputContext.selectedText.length == 0) - InputContext.commit("", -1, 1) - else - InputContext.commit("") - } - break - default: - if (key === Qt.Key_Asterisk && InputContext.inputMethodHints & Qt.ImhDialableCharactersOnly) { - if (key != lastKey) { - multiTapTimer.index = 0 - InputContext.commit(InputContext.preeditText) - multiTapTimer.running = false - } - multiTapTimer.index = multiTapTimer.running ? (multiTapTimer.index+1) % text.length : 0 - var character = text.charAt(multiTapTimer.index) - if (multiTapTimer.running) - InputContext.preeditText = InputContext.preeditText.substr(0, InputContext.preeditText.length - 1) + character - else - InputContext.preeditText += character - multiTapTimer.restart() - } else if (multiTapTimer.running) { - InputContext.commit(InputContext.preeditText) - multiTapTimer.stop() - } - if (!multiTapTimer.running) - InputContext.commit(text) - accept = true - break - } - if (!accept) { - InputContext.sendKeyClick(key, text, modifiers) - } - } -} diff --git a/src/imports/virtualkeyboard/components/Key.qml b/src/imports/virtualkeyboard/components/Key.qml deleted file mode 100644 index b2d08b3..0000000 --- a/src/imports/virtualkeyboard/components/Key.qml +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 - -BaseKey { - id: keyItem - - property bool uppercased - property int textPixelSize: 24 - - Component.onCompleted: InputContext.registerCharacterKey(keyItem) - Component.onDestruction: InputContext.unregisterCharacterKey(keyItem) - - Text { - id: text - - text: displayText - color: textColor - anchors { centerIn: parent; verticalCenterOffset: pressed ? 1 : 0 } - font { - pixelSize: textPixelSize - capitalization: uppercased ? Font.AllUppercase : Font.MixedCase - } - } -} diff --git a/src/imports/virtualkeyboard/components/NumberKey.qml b/src/imports/virtualkeyboard/components/NumberKey.qml deleted file mode 100644 index f521f7f..0000000 --- a/src/imports/virtualkeyboard/components/NumberKey.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Key { - width: 77 - showPreview: false - textPixelSize: 38 -} diff --git a/src/imports/virtualkeyboard/components/PressedKey.qml b/src/imports/virtualkeyboard/components/PressedKey.qml deleted file mode 100644 index 1f2925d..0000000 --- a/src/imports/virtualkeyboard/components/PressedKey.qml +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Item { - property bool active - property var activeKey: keyboard.activeKey - - visible: active - - onActiveKeyChanged: { - var activeKey = keyboard.activeKey - active = activeKey !== 0 && activeKey.enabled - if (active) { - var position = parent.mapFromItem(activeKey, 0, 0) - width = activeKey.width - height = activeKey.height - x = position.x - y = position.y + 1 - } - } - - Rectangle { - radius: 6 - color: "#f13c57" - anchors { fill: parent; topMargin: 3; bottomMargin: 3; leftMargin: 2; rightMargin: 2 } - } -} diff --git a/src/imports/virtualkeyboard/components/ShiftKey.qml b/src/imports/virtualkeyboard/components/ShiftKey.qml deleted file mode 100644 index 16f463f..0000000 --- a/src/imports/virtualkeyboard/components/ShiftKey.qml +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 - -BaseKey { - id: shiftKey - width: 47 - key: Qt.Key_Shift - enabled: !keyboard.uppercaseOnly && !keyboard.lowercaseOnly - visible: enabled - highlighted: InputContext.capsLock - functionKey: true - property bool shiftChanged: true - onClicked: { - if (InputContext.inputMethodHints & Qt.ImhNoAutoUppercase) { - InputContext.capsLock = !InputContext.capsLock - InputContext.shift = !InputContext.shift - } else { - InputContext.capsLock = !InputContext.capsLock && (InputContext.shift && !shiftChanged) - InputContext.shift = InputContext.capsLock || !InputContext.shift ? true : false - shiftChanged = false - } - } - Connections { - target: keyboard - onUppercasedChanged: shiftKey.shiftChanged = true - } - Icon { - invert: pressed - smooth: shiftKey.pressed - anchors.centerIn: parent - source: "../images/shift.png" - } -} diff --git a/src/imports/virtualkeyboard/components/SpaceKey.qml b/src/imports/virtualkeyboard/components/SpaceKey.qml deleted file mode 100644 index d9a8a4e..0000000 --- a/src/imports/virtualkeyboard/components/SpaceKey.qml +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Key { - id: spaceKey - - text: " " - repeat: true - width: keyboard.symbolMode ? 124 : 93 - showPreview: false - key: Qt.Key_Space - - Rectangle { - color: pressed ? "white" : "black" - height: 4 - visible: spaceKey.displayText === " " - width: parent.width-30 - anchors { - horizontalCenter: spaceKey.horizontalCenter - bottom: spaceKey.bottom - bottomMargin: 18 - } - } -} diff --git a/src/imports/virtualkeyboard/components/SymbolModeKey.qml b/src/imports/virtualkeyboard/components/SymbolModeKey.qml deleted file mode 100644 index d18447c..0000000 --- a/src/imports/virtualkeyboard/components/SymbolModeKey.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 - -Key { - width: 78 - key: Qt.Key_Context1 - displayText: "&123" - textPixelSize: 20 - functionKey: true - onClicked: keyboard.symbolMode = !keyboard.symbolMode -} diff --git a/src/imports/virtualkeyboard/images/arrow.png b/src/imports/virtualkeyboard/images/arrow.png deleted file mode 100644 index 8d01aa2..0000000 Binary files a/src/imports/virtualkeyboard/images/arrow.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/backspace.png b/src/imports/virtualkeyboard/images/backspace.png deleted file mode 100644 index 4141872..0000000 Binary files a/src/imports/virtualkeyboard/images/backspace.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/enter.png b/src/imports/virtualkeyboard/images/enter.png deleted file mode 100644 index c611ebe..0000000 Binary files a/src/imports/virtualkeyboard/images/enter.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/hidekeyboard.png b/src/imports/virtualkeyboard/images/hidekeyboard.png deleted file mode 100644 index aecdfe5..0000000 Binary files a/src/imports/virtualkeyboard/images/hidekeyboard.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/keypad.png b/src/imports/virtualkeyboard/images/keypad.png deleted file mode 100644 index fd8fa55..0000000 Binary files a/src/imports/virtualkeyboard/images/keypad.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/shift.png b/src/imports/virtualkeyboard/images/shift.png deleted file mode 100644 index eded926..0000000 Binary files a/src/imports/virtualkeyboard/images/shift.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/images/space.png b/src/imports/virtualkeyboard/images/space.png deleted file mode 100644 index 4a5e847..0000000 Binary files a/src/imports/virtualkeyboard/images/space.png and /dev/null differ diff --git a/src/imports/virtualkeyboard/layouts/ar_AR.qml b/src/imports/virtualkeyboard/layouts/ar_AR.qml deleted file mode 100644 index dc7c6d9..0000000 --- a/src/imports/virtualkeyboard/layouts/ar_AR.qml +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 -import "../components" - -Column { - property var keys: ["ضصقفغعهخحج", "شسيبلاتنمك", "ظطذدزوةث"] - Row { - anchors.horizontalCenter: parent.horizontalCenter - Repeater { - model: keys[0].length - Key { - text: keys[0][index] - textPixelSize: index > 1 ? 24 : 22 - } - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Repeater { - model: keys[1].length - Key { - text: keys[1][index] - textPixelSize: index > 0 ? 24 : 23 - } - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Repeater { - model: keys[2].length - Key { - text: keys[2][index] - } - } - BackspaceKey { width: 62 } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - SymbolModeKey {} - ChangeLanguageKey {} - SpaceKey {} - HideKeyboardKey {} - EnterKey {} - } -} diff --git a/src/imports/virtualkeyboard/layouts/en_GB.qml b/src/imports/virtualkeyboard/layouts/en_GB.qml deleted file mode 100644 index 5fb34be..0000000 --- a/src/imports/virtualkeyboard/layouts/en_GB.qml +++ /dev/null @@ -1,184 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 -import "../components" - -Column { - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: Qt.Key_Q - text: "q" - } - Key { - key: Qt.Key_W - text: "w" - } - Key { - key: Qt.Key_E - text: "e" - alternativeKeys: "êeëèé" - } - Key { - key: Qt.Key_R - text: "r" - alternativeKeys: "ŕrř" - } - Key { - key: Qt.Key_T - text: "t" - alternativeKeys: "ţtŧť" - } - Key { - key: Qt.Key_Y - text: "y" - alternativeKeys: "ÿyýŷ" - } - Key { - key: Qt.Key_U - text: "u" - alternativeKeys: "űūũûüuùú" - } - Key { - key: Qt.Key_I - text: "i" - alternativeKeys: "îïīĩiìí" - } - Key { - key: Qt.Key_O - text: "o" - alternativeKeys: "œøõôöòóo" - } - Key { - key: Qt.Key_P - text: "p" - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: Qt.Key_A - text: "a" - alternativeKeys: "aäåãâàá" - } - Key { - key: Qt.Key_S - text: "s" - alternativeKeys: "šsşś" - } - Key { - key: Qt.Key_D - text: "d" - alternativeKeys: "đdƌď" - } - Key { - key: Qt.Key_F - text: "f" - } - Key { - key: Qt.Key_G - text: "g" - alternativeKeys: "ġǥgģǧĝğ" - } - Key { - key: Qt.Key_H - text: "h" - } - Key { - key: Qt.Key_J - text: "j" - } - Key { - key: Qt.Key_K - text: "k" - } - Key { - key: Qt.Key_L - text: "l" - alternativeKeys: "ĺŀłļľl" - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - ShiftKey {} - Key { - key: Qt.Key_Z - text: "z" - alternativeKeys: "zžż" - } - Key { - key: Qt.Key_X - text: "x" - } - Key { - key: Qt.Key_C - text: "c" - alternativeKeys: "çcċčć" - } - Key { - key: Qt.Key_V - text: "v" - } - Key { - key: Qt.Key_B - text: "b" - } - Key { - key: Qt.Key_N - text: "n" - alternativeKeys: "ņńnň" - } - Key { - key: Qt.Key_M - text: "m" - } - BackspaceKey {} - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - SymbolModeKey {} - ChangeLanguageKey {} - SpaceKey {} - HideKeyboardKey {} - EnterKey {} - } -} diff --git a/src/imports/virtualkeyboard/layouts/fi_FI.qml b/src/imports/virtualkeyboard/layouts/fi_FI.qml deleted file mode 100644 index db1d644..0000000 --- a/src/imports/virtualkeyboard/layouts/fi_FI.qml +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import Boot2Qt.InputContext 1.0 -import "../components" - -Column { - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: Qt.Key_Q - text: "q" - } - Key { - key: Qt.Key_W - text: "w" - } - Key { - key: Qt.Key_E - text: "e" - alternativeKeys: "êeëèé" - } - Key { - key: Qt.Key_R - text: "r" - alternativeKeys: "ŕrř" - } - Key { - key: Qt.Key_T - text: "t" - alternativeKeys: "ţtŧť" - } - Key { - key: Qt.Key_Y - text: "y" - alternativeKeys: "ÿyýŷ" - } - Key { - key: Qt.Key_U - text: "u" - alternativeKeys: "űūũûüuùú" - } - Key { - key: Qt.Key_I - text: "i" - alternativeKeys: "îïīĩiìí" - } - Key { - key: Qt.Key_O - text: "o" - alternativeKeys: "œøõôöòóo" - } - Key { - key: Qt.Key_P - text: "p" - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: Qt.Key_A - text: "a" - alternativeKeys: "aäåãâàá" - width: 28 - } - Key { - key: Qt.Key_S - text: "s" - alternativeKeys: "šsşś" - width: 28 - } - Key { - key: Qt.Key_D - text: "d" - alternativeKeys: "đdƌď" - width: 28 - } - Key { - key: Qt.Key_F - text: "f" - width: 28 - } - Key { - key: Qt.Key_G - text: "g" - alternativeKeys: "ġgģǧĝğ" - width: 28 - } - Key { - key: Qt.Key_H - text: "h" - width: 28 - } - Key { - key: Qt.Key_J - text: "j" - width: 28 - } - Key { - key: Qt.Key_K - text: "k" - width: 28 - } - Key { - key: Qt.Key_L - text: "l" - alternativeKeys: "ĺŀłļľl" - width: 28 - } - Key { - key: Qt.Key_Adiaeresis - text: "ä" - width: 28 - } - Key { - key: Qt.Key_Odiaeresis - text: "ö" - width: 28 - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - ShiftKey {} - Key { - key: Qt.Key_Z - text: "z" - alternativeKeys: "zžż" - } - Key { - key: Qt.Key_X - text: "x" - } - Key { - key: Qt.Key_C - text: "c" - alternativeKeys: "çcċčć" - } - Key { - key: Qt.Key_V - text: "v" - } - Key { - key: Qt.Key_B - text: "b" - } - Key { - key: Qt.Key_N - text: "n" - alternativeKeys: "ņńnň" - } - Key { - key: Qt.Key_M - text: "m" - } - BackspaceKey {} - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - SymbolModeKey {} - ChangeLanguageKey {} - SpaceKey {} - HideKeyboardKey {} - EnterKey {} - } -} diff --git a/src/imports/virtualkeyboard/layouts/numbers.qml b/src/imports/virtualkeyboard/layouts/numbers.qml deleted file mode 100644 index 7d47066..0000000 --- a/src/imports/virtualkeyboard/layouts/numbers.qml +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import ".." -import "../components" -import Boot2Qt.InputContext 1.0 - -Column { - Row { - Repeater { - model: 3 - NumberKey { key: Qt.Key_1 + index; text: 1 + index } - } - BackspaceKey { width: 78 } - } - Row { - Repeater { - model: 3 - NumberKey { key: Qt.Key_4 + index; text: 4 + index } - } - SpaceKey { - width: 78 - displayText: "_" - } - } - Row { - Repeater { - model: 3 - NumberKey { key: Qt.Key_7 + index; text: 7 + index } - } - HideKeyboardKey { width: 78 } - } - Row { - NumberKey { - key: Qt.Key_Asterisk - displayText: "*+" - text: "*+" - textPixelSize: 40 - visible: InputContext.inputMethodHints & Qt.ImhDialableCharactersOnly - } - NumberKey { - key: Qt.Key_0 - text: "0" - width: InputContext.inputMethodHints & Qt.ImhDigitsOnly ? 270 : (InputContext.inputMethodHints & Qt.ImhFormattedNumbersOnly ? 180 : 77) - textPixelSize: 38 - } - NumberKey { - id: signKey - text: "#" - key: Qt.Key_NumberSign - visible: !(InputContext.inputMethodHints & Qt.ImhDigitsOnly) - states: State { - when: InputContext.inputMethodHints & Qt.ImhFormattedNumbersOnly - PropertyChanges { - target: signKey - - text: "." - key: Qt.Key_Period - enabled: InputContext.surroundingText.indexOf(".") == -1 - } - } - } - EnterKey { width: 78 } - } -} diff --git a/src/imports/virtualkeyboard/layouts/symbols.qml b/src/imports/virtualkeyboard/layouts/symbols.qml deleted file mode 100644 index f4c8293..0000000 --- a/src/imports/virtualkeyboard/layouts/symbols.qml +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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 -import "../components" - -Column { - property bool secondPage - onVisibleChanged: if (!visible) secondPage = false - - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: secondPage ? Qt.Key_unknown : Qt.Key_1 - text: secondPage ? ":)" : "1" - textPixelSize: secondPage ? 20 : 24 - } - Key { - key: secondPage ? Qt.Key_unknown : Qt.Key_2 - text: secondPage ? ":D" : "2" - textPixelSize: secondPage ? 20 : 24 - } - Key { - key: secondPage ? Qt.Key_Dollar : Qt.Key_3 - text: secondPage ? ":(" : "3" - textPixelSize: secondPage ? 20 : 24 - } - Key { - key: secondPage ? Qt.Key_yen : Qt.Key_4 - text: secondPage ? "<3": "4" - textPixelSize: secondPage ? 18 : 24 - } - Key { - key: Qt.Key_5 - text: secondPage ? "½" : "5" - } - Key { - key: secondPage ? Qt.Key_Percent : Qt.Key_6 - text: secondPage ? "%": "6" - } - Key { - key: secondPage ? Qt.Key_Less : Qt.Key_7 - text: secondPage ? "<": "7" - } - Key { - key: secondPage ? Qt.Key_Greater : Qt.Key_8 - text: secondPage ? ">" : "8" - } - Key { - key: secondPage ? Qt.Key_BracketLeft : Qt.Key_9 - text: secondPage ? "[" : "9" - } - Key { - key: secondPage ? Qt.Key_BracketRight : Qt.Key_0 - text: secondPage ? "]" : "0" - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - key: secondPage ? Qt.Key_AsciiTilde : Qt.Key_At - text: secondPage ? "~" : "@" - } - Key { - key: secondPage ? Qt.Key_Agrave : Qt.Key_Asterisk - text: secondPage ? "`" : "*" - } - Key { - key: secondPage ? Qt.Key_AsciiCircum : Qt.Key_NumberSign - text: secondPage ? "^" : "#" - } - Key { - key: secondPage ? Qt.Key_Bar : Qt.Key_Plus - text: secondPage ? "|" : "+" - } - Key { - key: secondPage ? Qt.Key_Underscore : Qt.Key_Minus - text: secondPage ? "_" : "-" - } - Key { - key: secondPage ? Qt.Key_section : Qt.Key_Equal - text: secondPage ? "§" : "=" - } - Key { - key: secondPage ? Qt.Key_BraceLeft : Qt.Key_ParenLeft - text: secondPage ? "{" : "(" - } - Key { - key: secondPage ? Qt.Key_BraceRight : Qt.Key_ParenRight - text: secondPage ? "}" : ")" - } - Key { - key: secondPage ? Qt.Key_questiondown : Qt.Key_Question - text: secondPage ? "¿" : "?" - } - Key { - key: secondPage ? Qt.Key_exclamdown : Qt.Key_Apostrophe - text: secondPage ? "¡" : "!" - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - Key { - width: 47 - displayText: secondPage ? " 2/2" : " 1/2" - textPixelSize: 20 - functionKey: true - onClicked: secondPage = !secondPage - } - Key { - key: secondPage ? Qt.Key_guillemotleft : Qt.Key_Period - text: secondPage ? '«' : "." - } - Key { - key: secondPage ? Qt.Key_guillemotright : Qt.Key_Comma - text: secondPage ? '»' : "," - } - Key { - key: secondPage ? Qt.Key_QuoteDbl : Qt.Key_Slash - text: secondPage ? '"' : "/" - } - Key { - key: secondPage ? Qt.Key_unknown : Qt.Key_Backslash - text: secondPage ? '“' : "\\" - } - Key { - key: secondPage ? Qt.Key_unknown : Qt.Key_Exclam - text: secondPage ? '”' : "'" - } - Key { - key: secondPage ? Qt.Key_unknown : Qt.Key_Colon - text: secondPage ? '„' : ":" - } - Key { - key: secondPage ? Qt.Key_Ampersand : Qt.Key_Semicolon - text: secondPage ? "&" : ";" - } - BackspaceKey { - - } - } - Row { - anchors.horizontalCenter: parent.horizontalCenter - SymbolModeKey { displayText: "ABC" } - SpaceKey {} - HideKeyboardKey {} - EnterKey {} - } -} diff --git a/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.cpp b/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.cpp deleted file mode 100644 index bf55f9b..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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$ -** -****************************************************************************/ - -#include "platforminputcontext.h" -#include "declarativeinputcontext.h" - -#include -#include -#include -#include -#include -#include - -DeclarativeInputContext::DeclarativeInputContext(PlatformInputContext *parent) : - QObject(parent), m_inputContext(parent), m_inputMethodVisible(false), m_focus(false), - m_shift(false), m_capsLock(false), m_cursorPosition(0), m_inputMethodHints(0) -{ - if (m_inputContext) - m_inputContext->setDeclarativeContext(this); -} - -DeclarativeInputContext::~DeclarativeInputContext() -{ - if (m_inputContext) - m_inputContext->setDeclarativeContext(0); - m_characterKeys.clear(); -} - -bool DeclarativeInputContext::inputMethodVisible() const -{ - return m_inputMethodVisible; -} - -void DeclarativeInputContext::setInputMethodVisibleProperty(bool visible) -{ - if (m_inputMethodVisible != visible) { - m_inputMethodVisible = visible; - emit inputMethodVisibleChanged(); - } -} - -bool DeclarativeInputContext::focus() const -{ - return m_focus; -} - -void DeclarativeInputContext::setFocus(bool enable) -{ - if (m_focus != enable) { - m_focus = enable; - emit focusChanged(); - } - emit focusEditorChanged(); -} - -bool DeclarativeInputContext::shift() const -{ - return m_shift; -} - -void DeclarativeInputContext::setShift(bool enable) -{ - if (m_shift != enable) { - m_shift = enable; - emit shiftChanged(); - } -} - -bool DeclarativeInputContext::capsLock() const -{ - return m_capsLock; -} - -void DeclarativeInputContext::setCapsLock(bool enable) -{ - if (m_capsLock != enable) { - m_capsLock = enable; - emit capsLockChanged(); - } -} - -int DeclarativeInputContext::cursorPosition() const -{ - return m_cursorPosition; -} - -Qt::InputMethodHints DeclarativeInputContext::inputMethodHints() const -{ - return m_inputMethodHints; -} - -QString DeclarativeInputContext::preeditText() const -{ - return m_preeditText; -} - -void DeclarativeInputContext::setPreeditText(const QString &text) -{ - if (text != m_preeditText) - sendPreedit(text); -} - -QString DeclarativeInputContext::surroundingText() const -{ - return m_surroundingText; -} - -QString DeclarativeInputContext::selectedText() const -{ - return m_selectedText; -} - -QRectF DeclarativeInputContext::cursorRectangle() const -{ - return m_cursorRectangle; -} - -void DeclarativeInputContext::sendKeyClick(int key, const QString &text, int modifiers) -{ - if (m_focus && m_inputContext) { - QKeyEvent pressEvent(QEvent::KeyPress, key, Qt::KeyboardModifiers(modifiers), text); - QKeyEvent releaseEvent(QEvent::KeyRelease, key, Qt::KeyboardModifiers(modifiers), text); - - m_inputContext->sendKeyEvent(&pressEvent); - m_inputContext->sendKeyEvent(&releaseEvent); - } -} - -void DeclarativeInputContext::sendPreedit(const QString &text, int cursor) -{ - const QString preedit = m_preeditText; - m_preeditText = text; - - if (m_inputContext) { - QList attributes; - - if (cursor >= 0 && cursor <= text.length()) { - attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, cursor, text.length(), QVariant())); - } else { - cursor = text.length(); - } - - QTextCharFormat textFormat; - textFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline); - attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat, 0, text.length(), textFormat)); - - QInputMethodEvent event(text, attributes); - m_inputContext->sendEvent(&event); - } - - if (m_preeditText != preedit) - emit preeditTextChanged(); -} - -void DeclarativeInputContext::commit() -{ - commit(m_preeditText); -} - -void DeclarativeInputContext::commit(const QString &text, int replacementStart, int replacementLength) -{ - bool preeditChanged = !m_preeditText.isEmpty(); - m_preeditText.clear(); - - if (m_inputContext) { - QInputMethodEvent inputEvent; - inputEvent.setCommitString(text, replacementStart, replacementLength); - m_inputContext->sendEvent(&inputEvent); - } - - if (preeditChanged) - emit preeditTextChanged(); -} - -void DeclarativeInputContext::clear() -{ - bool preeditChanged = !m_preeditText.isEmpty(); - m_preeditText.clear(); - - QInputMethodEvent event; - m_inputContext->sendEvent(&event); - - if (preeditChanged) - emit preeditTextChanged(); -} - -void DeclarativeInputContext::setAnimating(bool animating) -{ - if (m_inputContext && m_inputContext->m_animating != animating) { - m_inputContext->m_animating = animating; - m_inputContext->emitAnimatingChanged(); - } -} - -void DeclarativeInputContext::setKeyboardRectangle(QRectF rectangle) -{ - if (m_inputContext && m_inputContext->m_keyboardRect != rectangle) { - m_inputContext->m_keyboardRect = rectangle; - m_inputContext->emitKeyboardRectChanged(); - } -} - -QRectF DeclarativeInputContext::keyboardRectangle() const -{ - return m_inputContext->m_keyboardRect; -} - -void DeclarativeInputContext::setLocale(QString name) -{ - if (m_inputContext && m_inputContext->m_locale.name() != name) { - m_inputContext->m_locale = QLocale(name); - m_inputContext->emitLocaleChanged(); - if (m_inputContext->m_inputDirection != m_inputContext->m_locale.textDirection()) { - m_inputContext->m_inputDirection = m_inputContext->m_locale.textDirection(); - m_inputContext->emitInputDirectionChanged(m_inputContext->m_inputDirection); - } - } -} - -void DeclarativeInputContext::update(Qt::InputMethodQueries queries) -{ - Q_UNUSED(queries); - - // fetch - Qt::InputMethodHints inputMethodHints = Qt::InputMethodHints(m_inputContext->inputMethodQuery(Qt::ImHints).toInt()); - int cursorPosition = m_inputContext->inputMethodQuery(Qt::ImCursorPosition).toInt(); - QRectF cursorRectangle = qApp->inputMethod()->cursorRectangle(); - QString surroundingText = m_inputContext->inputMethodQuery(Qt::ImSurroundingText).toString(); - QString selectedText = m_inputContext->inputMethodQuery(Qt::ImCurrentSelection).toString(); - - // check against changes - bool newInputMethodHints = inputMethodHints != m_inputMethodHints; - bool newSurroundingText = surroundingText != m_surroundingText; - bool newSelectedTextChange = selectedText != m_selectedText; - bool newCursorPosition = cursorPosition != m_cursorPosition; - bool newCursorRectangle = cursorRectangle != m_cursorRectangle; - - // update - m_inputMethodHints = inputMethodHints; - m_surroundingText = surroundingText; - m_selectedText = selectedText; - m_cursorPosition = cursorPosition; - m_cursorRectangle = cursorRectangle; - - // notify - if (newInputMethodHints) - emit inputMethodHintsChanged(); - if (newSurroundingText) - emit surroundingTextChanged(); - if (newSelectedTextChange) - emit selectedTextChanged(); - if (newCursorPosition) - emit cursorPositionChanged(); - if (newCursorRectangle) - emit cursorRectangleChanged(); -} - -void DeclarativeInputContext::registerCharacterKey(QQuickItem *key) -{ - m_characterKeys.append(key); -} - -void DeclarativeInputContext::unregisterCharacterKey(QQuickItem *key) -{ - m_characterKeys.removeOne(key); -} - -void DeclarativeInputContext::handleUppercasing(bool uppercased) -{ - foreach(QQuickItem* key, m_characterKeys) - key->setProperty("uppercased", uppercased); -} diff --git a/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.h b/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.h deleted file mode 100644 index cb695ab..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/declarativeinputcontext.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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$ -** -****************************************************************************/ - -#ifndef DECLARATIVEINPUTCONTEXT_H -#define DECLARATIVEINPUTCONTEXT_H - -#include -#include -#include -#include - -class PlatformInputContext; -class QQuickItem; - -class DeclarativeInputContext : public QObject -{ - Q_OBJECT - Q_PROPERTY(bool inputMethodVisible READ inputMethodVisible NOTIFY inputMethodVisibleChanged) - Q_PROPERTY(bool focus READ focus NOTIFY focusChanged) - Q_PROPERTY(bool shift READ shift WRITE setShift NOTIFY shiftChanged) - Q_PROPERTY(bool capsLock READ capsLock WRITE setCapsLock NOTIFY capsLockChanged) - Q_PROPERTY(int cursorPosition READ cursorPosition NOTIFY cursorPositionChanged) - Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints NOTIFY inputMethodHintsChanged) - Q_PROPERTY(QString preeditText READ preeditText WRITE setPreeditText NOTIFY preeditTextChanged) - Q_PROPERTY(QString surroundingText READ surroundingText NOTIFY surroundingTextChanged) - Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged) - Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) - Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle WRITE setKeyboardRectangle NOTIFY keyboardRectangleChanged) - -public: - explicit DeclarativeInputContext(PlatformInputContext *parent = 0); - ~DeclarativeInputContext(); - - bool inputMethodVisible() const; - void setInputMethodVisibleProperty(bool visible); - - bool focus() const; - void setFocus(bool enable); - - bool shift() const; - void setShift(bool enable); - - bool capsLock() const; - void setCapsLock(bool enable); - - int cursorPosition() const; - - Qt::InputMethodHints inputMethodHints() const; - - QString preeditText() const; - void setPreeditText(const QString &text); - - QString surroundingText() const; - - QString selectedText() const; - - QRectF cursorRectangle() const; - - QRectF keyboardRectangle() const; - Q_INVOKABLE void setKeyboardRectangle(QRectF rectangle); - - Q_INVOKABLE void sendKeyClick(int key, const QString &text, int modifiers = 0); - Q_INVOKABLE void sendPreedit(const QString &text, int cursor = -1); - - Q_INVOKABLE void commit(); - Q_INVOKABLE void commit(const QString &text, int replacementStart = 0, int replacementEnd = 0); - - Q_INVOKABLE void clear(); - - Q_INVOKABLE void setAnimating(bool animating); - Q_INVOKABLE void setLocale(QString name); - - void update(Qt::InputMethodQueries queries); - - Q_INVOKABLE void registerCharacterKey(QQuickItem * key); - Q_INVOKABLE void unregisterCharacterKey(QQuickItem * key); - Q_INVOKABLE void handleUppercasing(bool uppercased); - -signals: - void inputMethodVisibleChanged(); - void focusChanged(); - void preeditTextChanged(); - void surroundingTextChanged(); - void selectedTextChanged(); - void cursorPositionChanged(); - void inputMethodHintsChanged(); - void focusEditorChanged(); - void shiftChanged(); - void capsLockChanged(); - void cursorRectangleChanged(); - void keyboardRectangleChanged(); - -private: - void updateInputMethodValues(); - - PlatformInputContext *m_inputContext; - bool m_inputMethodVisible; - bool m_focus; - bool m_shift; - bool m_capsLock; - int m_cursorPosition; - Qt::InputMethodHints m_inputMethodHints; - QString m_preeditText; - QString m_surroundingText; - QString m_selectedText; - QRectF m_cursorRectangle; - QList m_characterKeys; -}; - -QML_DECLARE_TYPE(DeclarativeInputContext) - -#endif diff --git a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.cpp b/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.cpp deleted file mode 100644 index a73a15a..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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$ -** -****************************************************************************/ - -#include "platforminputcontext.h" -#include "declarativeinputcontext.h" - -#include -#include -#include -#include - -PlatformInputContext::PlatformInputContext() : - m_declarativeContext(0), m_animating(false), m_visible(false), - m_focusObject(0), m_locale("en_GB"), m_inputDirection(Qt::LeftToRight) -{ -} - -PlatformInputContext::~PlatformInputContext() -{ -} - -bool PlatformInputContext::isValid() const -{ - return true; -} - -bool PlatformInputContext::isAnimating() const -{ - return m_animating; -} - -bool PlatformInputContext::isInputPanelVisible() const -{ - return m_visible; -} - -QRectF PlatformInputContext::keyboardRect() const -{ - return m_keyboardRect; -} - -QLocale PlatformInputContext::locale() const -{ - return m_locale; -} - -Qt::LayoutDirection PlatformInputContext::inputDirection() const -{ - return m_inputDirection; -} - -void PlatformInputContext::reset() -{ - if (m_declarativeContext) - m_declarativeContext->commit(); -} - -void PlatformInputContext::update(Qt::InputMethodQueries queries) -{ - if (m_declarativeContext) - m_declarativeContext->update(queries); -} - -void PlatformInputContext::showInputPanel() { - if (!m_visible) { - m_visible = true; - if (m_declarativeContext) { - m_declarativeContext->setInputMethodVisibleProperty(true); - } - emitInputPanelVisibleChanged(); - } -} - -void PlatformInputContext::hideInputPanel() { - if (m_visible) { - m_visible = false; - if (m_declarativeContext) { - m_declarativeContext->setInputMethodVisibleProperty(false); - } - emitInputPanelVisibleChanged(); - } -} - -void PlatformInputContext::setFocusObject(QObject *object) -{ - m_focusObject = object; - bool enabled = false; - if (m_focusObject) { - QInputMethodQueryEvent event(Qt::ImEnabled); - sendEvent(&event); - enabled = event.value(Qt::ImEnabled).toBool(); - } - if (m_declarativeContext) { - bool focus = (object != 0 && enabled); - m_declarativeContext->setFocus(focus); - if (focus) - m_declarativeContext->update(Qt::ImQueryAll); - else - hideInputPanel(); - } -} - -void PlatformInputContext::sendEvent(QEvent *event) -{ - if (m_focusObject) - QGuiApplication::sendEvent(m_focusObject, event); -} - -void PlatformInputContext::sendKeyEvent(QKeyEvent *event) -{ - if (qApp && qApp->focusWindow()) - QGuiApplication::sendEvent(qApp->focusWindow(), event); -} - -QVariant PlatformInputContext::inputMethodQuery(Qt::InputMethodQuery query) -{ - QInputMethodQueryEvent event(query); - sendEvent(&event); - return event.value(query); -} - -void PlatformInputContext::setDeclarativeContext(DeclarativeInputContext *context) -{ - m_declarativeContext = context; -} diff --git a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.h b/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.h deleted file mode 100644 index bcfae44..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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$ -** -****************************************************************************/ - -#ifndef PLATFORMINPUTCONTEXT_H -#define PLATFORMINPUTCONTEXT_H - -#include -#include -#include -#include - -class DeclarativeInputContext; -class PlatformInputContext : public QPlatformInputContext -{ - Q_OBJECT -public: - explicit PlatformInputContext(); - ~PlatformInputContext(); - - // from QPlatformInputContext - virtual bool isValid() const; - virtual bool isAnimating() const; - virtual bool isInputPanelVisible() const; - virtual QRectF keyboardRect() const; - virtual QLocale locale() const; - virtual Qt::LayoutDirection inputDirection() const; - - void reset(); - void update(Qt::InputMethodQueries queries); - virtual void showInputPanel(); - virtual void hideInputPanel(); - virtual void setFocusObject(QObject *object); - -protected: - void sendEvent(QEvent *event); - void sendKeyEvent(QKeyEvent *event); - QVariant inputMethodQuery(Qt::InputMethodQuery query); - void setDeclarativeContext(DeclarativeInputContext *context); - -protected: - friend class DeclarativeInputContext; - - DeclarativeInputContext *m_declarativeContext; - bool m_animating; - bool m_visible; - QRectF m_keyboardRect; - QPointer m_focusObject; - QLocale m_locale; - Qt::LayoutDirection m_inputDirection; -}; - -#endif diff --git a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.json b/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.json deleted file mode 100644 index 266da3c..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Keys": [ "b2qtinputcontext" ] -} diff --git a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.pro b/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.pro deleted file mode 100644 index e2288fe..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/platforminputcontext.pro +++ /dev/null @@ -1,21 +0,0 @@ -TEMPLATE = lib -TARGET = b2qtinputcontextplugin -TARGETPATH = $$[QT_INSTALL_PLUGINS]/platforminputcontexts - -target.path = $$TARGETPATH - -QT += quick gui gui-private - -CONFIG += plugin - -SOURCES += platforminputcontext.cpp \ - declarativeinputcontext.cpp \ - plugin.cpp - -HEADERS += platforminputcontext.h \ - declarativeinputcontext.h - -OTHER_FILES = $$$PWD/platforminputcontext.json - -INSTALLS += target -OTHER += platforminputcontext.json diff --git a/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp b/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp deleted file mode 100644 index 3b67024..0000000 --- a/src/imports/virtualkeyboard/platforminputcontext/plugin.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $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 Nokia Corporation 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$ -** -****************************************************************************/ - -#include -#include -#include - -#include "platforminputcontext.h" -#include "declarativeinputcontext.h" - -static PlatformInputContext *platformInputContext = 0; - -static QObject *createInputContextModule(QQmlEngine *engine, QJSEngine *scriptEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(scriptEngine); - return new DeclarativeInputContext(platformInputContext); -} - -class PlatformInputContextPlugin : public QPlatformInputContextPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "platforminputcontext.json") - -public: - QStringList keys() const; - QPlatformInputContext *create(const QString&, const QStringList&); -}; - -QStringList PlatformInputContextPlugin::keys() const -{ - return QStringList(QStringLiteral("b2qtinputcontext")); -} - -QPlatformInputContext *PlatformInputContextPlugin::create(const QString& system, const QStringList& paramList) -{ - Q_UNUSED(paramList); - - qDebug("created..."); - - qmlRegisterSingletonType("Boot2Qt.InputContext", 1, 0, "InputContext", createInputContextModule); - - if (system.compare(system, QStringLiteral("b2qtinputcontext"), Qt::CaseInsensitive) == 0) - platformInputContext = new PlatformInputContext; - return platformInputContext; -} - -#include "plugin.moc" diff --git a/src/imports/virtualkeyboard/qmldir b/src/imports/virtualkeyboard/qmldir deleted file mode 100644 index 10e8915..0000000 --- a/src/imports/virtualkeyboard/qmldir +++ /dev/null @@ -1,2 +0,0 @@ -module Qt.labs.virtualkeyboard -Keyboard 1.0 Keyboard.qml diff --git a/src/imports/virtualkeyboard/qmlmodule.pro b/src/imports/virtualkeyboard/qmlmodule.pro deleted file mode 100644 index 008a9be..0000000 --- a/src/imports/virtualkeyboard/qmlmodule.pro +++ /dev/null @@ -1,34 +0,0 @@ -TARGETPATH = "Qt/labs/virtualkeyboard" - -QML_FILES = \ - images/shift.png \ - images/space.png \ - images/backspace.png \ - images/arrow.png \ - images/enter.png \ - images/keypad.png \ - images/hidekeyboard.png \ - components/AutoScroller.qml \ - components/InputEngine.qml \ - components/HideKeyboardKey.qml \ - components/NumberKey.qml \ - components/CharacterPreviewBubble.qml \ - components/SymbolModeKey.qml \ - components/ChangeLanguageKey.qml \ - components/SpaceKey.qml \ - components/Icon.qml \ - components/BaseKey.qml \ - components/Key.qml \ - components/ShiftKey.qml \ - components/EnterKey.qml \ - components/AlternativeKeys.qml \ - components/PressedKey.qml \ - components/BackspaceKey.qml \ - Keyboard.qml \ - layouts/symbols.qml \ - layouts/numbers.qml \ - layouts/ar_AR.qml \ - layouts/en_GB.qml \ - layouts/fi_FI.qml \ - -load(qml_module) diff --git a/src/imports/virtualkeyboard/virtualkeyboard.pro b/src/imports/virtualkeyboard/virtualkeyboard.pro deleted file mode 100644 index bedd662..0000000 --- a/src/imports/virtualkeyboard/virtualkeyboard.pro +++ /dev/null @@ -1,2 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += platforminputcontext qmlmodule.pro -- cgit v1.2.3 From 5980f4bff613e109375d3d841b2891847011074d Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 7 Jan 2014 13:44:16 +0100 Subject: List the strongest access point when ssid equal List only the strongest access point when sensing several access points within the same network. Change-Id: I58bf3083058f6e1c8a0c353b20d731672e64aefc Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifinetworklist.cpp | 46 +++++++++++++++++++---------------- src/imports/wifi/qwifinetworklist.h | 2 +- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/imports/wifi/qwifinetworklist.cpp b/src/imports/wifi/qwifinetworklist.cpp index e7fa92d..8ded5fd 100644 --- a/src/imports/wifi/qwifinetworklist.cpp +++ b/src/imports/wifi/qwifinetworklist.cpp @@ -14,7 +14,6 @@ QWifiNetworkList::QWifiNetworkList(QWifiManager *manager) { } - QHash QWifiNetworkList::roleNames() const { QHash names; @@ -27,8 +26,6 @@ QHash QWifiNetworkList::roleNames() const return names; } - - QVariant QWifiNetworkList::data(const QModelIndex &index, int role) const { QWifiNetwork *n = m_networks.at(index.row()); @@ -42,15 +39,15 @@ QVariant QWifiNetworkList::data(const QModelIndex &index, int role) const case ID_NETWORK: return QVariant::fromValue((QObject *) n); } - qDebug("QWifiNetworkList::data(), undefined role: %d\n", role); + qWarning("QWifiNetworkList::data(), undefined role: %d\n", role); return QVariant(); } -QWifiNetwork *QWifiNetworkList::networkForBSSID(const QByteArray &bssid, int *pos) +QWifiNetwork *QWifiNetworkList::networkForSSID(const QByteArray &ssid, int *pos) { for (int i=0; ibssid() == bssid) { + if (m_networks.at(i)->ssid() == ssid) { if (pos) *pos = i; return m_networks.at(i); @@ -59,37 +56,48 @@ QWifiNetwork *QWifiNetworkList::networkForBSSID(const QByteArray &bssid, int *po return 0; } - void QWifiNetworkList::parseScanResults(const QByteArray &results) { QList lines = results.split('\n'); - QSet bssids; + QSet sensibleNetworks; for (int i=1; i info = lines.at(i).split('\t'); if (info.size() < 5 || info.at(4).isEmpty() || info.at(0).isEmpty()) continue; - bssids.insert(info.at(0)); int pos = 0; - QWifiNetwork *existing = networkForBSSID(info.at(0), &pos); - if (!existing) { + if (!sensibleNetworks.contains(info.at(4))) + sensibleNetworks.insert(info.at(4)); + QWifiNetwork *existingNetwork = networkForSSID(info.at(4), &pos); + if (!existingNetwork) { QWifiNetwork *network = new QWifiNetwork(); network->setBssid(info.at(0)); network->setFlags(info.at(3)); + // signal strength is in dBm network->setSignalStrength(info.at(2).toInt()); network->setSsid(info.at(4)); beginInsertRows(QModelIndex(), m_networks.size(), m_networks.size()); m_networks << network; endInsertRows(); - } else { - existing->setSignalStrength(info.at(2).toInt()); - dataChanged(createIndex(pos, 0), createIndex(pos, 0)); + // ssids are the same, compare bssids.. + if (existingNetwork->bssid() == info.at(0)) { + // same access point, simply update the signal strength + existingNetwork->setSignalStrength(info.at(2).toInt()); + dataChanged(createIndex(pos, 0), createIndex(pos, 0)); + } else if (existingNetwork->signalStrength() < info.at(2).toInt()) { + // replace with a stronger access point within the same network + m_networks.at(pos)->setBssid(info.at(0)); + m_networks.at(pos)->setFlags(info.at(3)); + m_networks.at(pos)->setSignalStrength(info.at(2).toInt()); + m_networks.at(pos)->setSsid(info.at(4)); + dataChanged(createIndex(pos, 0), createIndex(pos, 0)); + } } } - - for (int i=0; ibssid())) { + // remove networks that have gone out of range + for (int i = 0; i < m_networks.size(); ++i) { + if (!sensibleNetworks.contains(m_networks.at(i)->ssid())) { beginRemoveRows(QModelIndex(), i, i); delete m_networks.takeAt(i); endRemoveRows(); @@ -97,10 +105,6 @@ void QWifiNetworkList::parseScanResults(const QByteArray &results) ++i; } } - -// for (int i=0; ibssid() << m_networks.at(i)->ssid() << m_networks.at(i)->flags() << m_networks.at(i)->signalStrength(); -// } } diff --git a/src/imports/wifi/qwifinetworklist.h b/src/imports/wifi/qwifinetworklist.h index f6e134c..d223bc9 100644 --- a/src/imports/wifi/qwifinetworklist.h +++ b/src/imports/wifi/qwifinetworklist.h @@ -18,7 +18,7 @@ public: void parseScanResults(const QByteArray &data); - QWifiNetwork *networkForBSSID(const QByteArray &bssid, int *pos); + QWifiNetwork *networkForSSID(const QByteArray &ssid, int *pos); int rowCount(const QModelIndex &) const { return m_networks.size(); } QVariant data(const QModelIndex &index, int role) const; -- cgit v1.2.3 From 95a00d27cda8b8bea27192f7ee9eb2b5ae6eb405 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 20 Jan 2014 15:34:28 +0100 Subject: Introducing QConnectivityDaemon This change enables ethernet support on embedded android and provides DHCP info for other processes. Now we can simply plugin an ethernet cable and start browsing a network, for this we use netd events - netd is a network manager daemon, it opens android's "reserved" unix domain socket on /dev/socket/netd and listens for connections and commands. QConnectivityDaemon listens for DHCP requests on android's "reserved" socket /dev/socket/qconnectivity which can be used by other processes to do dhcp requests on different network interfaces (wifi, bluetooth, etc.). QConnectivityDaemon uses line-oriented protocol and expects requests to be "\n" terminated. Change-Id: I6d52619d27685650a155141bf09191e5a56914df Reviewed-by: Eirik Aavitsland --- src/qconnectivity/main.cpp | 381 ++++++++++++++++++++++++++++++++++++ src/qconnectivity/qconnectivity.pro | 13 ++ src/src.pro | 2 +- 3 files changed, 395 insertions(+), 1 deletion(-) create mode 100644 src/qconnectivity/main.cpp create mode 100644 src/qconnectivity/qconnectivity.pro diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp new file mode 100644 index 0000000..a02658a --- /dev/null +++ b/src/qconnectivity/main.cpp @@ -0,0 +1,381 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ +#include +#include +#include + +#include +#include +#include +#include +#include + +// Code values come from android/system/netd/ResponseCode.h +static const int InterfaceChange = 600; + +static const char UNIQUE_HOSTNAME[] = "net.hostname"; + +static bool QT_CONNECTIVITY_DEBUG = !qgetenv("QT_CONNECTIVITY_DEBUG").isEmpty(); +static bool QT_USE_EXPIRED_LEASE = !qgetenv("QT_USE_EXPIRED_LEASE").isEmpty(); + +// sanity check a renewal time, lower value than +// this might indicate a badly configured DHCP server +static int MIN_RENEWAL_TIME_SECS = 300; // 5 min + +#define ETH_INTERFACE "eth0" + +// this function is defined in android/system/core/libnetutils/dhcp_utils.c +extern "C" { +int dhcp_do_request_renew(const char *ifname, + const char *ipaddr, + const char *gateway, + uint32_t *prefixLength, + const char *dns1, + const char *dns2, + const char *server, + uint32_t *lease, + const char *vendorInfo); +} + +class LeaseTimer; +class QConnectivityDaemon : public QObject +{ + Q_OBJECT +public: + QConnectivityDaemon(); + +protected: + void setHostnamePropery(const char *interface) const; + void sendCommand(const char *command) const; + void handleInterfaceChange(const QList &message); + bool startDhcp(bool renew, const char *interface); + void stopDhcp(const char *interface); + bool ethernetSupported() const; + +protected slots: + void handleNetdEvent(); + void handleRequest(); + void handleNewConnection(); + void sendReply(QLocalSocket *requester, const QByteArray &reply) const; + void updateLease(); + void handleError(QLocalSocket::LocalSocketError /*socketError*/) const; + +private: + friend class LeaseTimer; + QLocalSocket *m_netdSocket; + // currently used to listen for requests from Qt Wifi library, + // in future can be used also for Bluetooth and etc. + QLocalServer *m_serverSocket; + bool m_linkUp; + LeaseTimer *m_leaseTimer; +}; + +class LeaseTimer : public QTimer +{ + Q_OBJECT +public: + LeaseTimer(QConnectivityDaemon *daemon) : m_daemon(daemon) {} + + void setInterface(const QByteArray &interface) + { + if (m_ifc.isEmpty()) { + m_ifc = interface; + } else { + // for example when user switches from eth0 to wlan0, we + // stop DHCP on the previous interface + if (m_ifc != interface) { + m_daemon->stopDhcp(m_ifc.constData()); + m_ifc = interface; + } + } + } + + QByteArray interface() const { return m_ifc; } + +private: + QConnectivityDaemon *m_daemon; + QByteArray m_ifc; +}; + +QConnectivityDaemon::QConnectivityDaemon() + : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0) +{ + if (QT_CONNECTIVITY_DEBUG) qDebug() << "starting QConnectivityDaemon..."; + + m_leaseTimer = new LeaseTimer(this); + m_leaseTimer->setSingleShot(true); + connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease())); + + if (ethernetSupported()) { + int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (netdFd != -1) { + m_netdSocket = new QLocalSocket(this); + m_netdSocket->setSocketDescriptor(netdFd); + connect(m_netdSocket, SIGNAL(readyRead()), this, SLOT(handleNetdEvent())); + connect(m_netdSocket, SIGNAL(error(QLocalSocket::LocalSocketError)), + this, SLOT(handleError(QLocalSocket::LocalSocketError))); + // down-up sequence generates "linkstate" events, which we can use to setup + // our daemon on initial startup or on daemon restarts + stopDhcp(ETH_INTERFACE); + sendCommand("0 interface setcfg " ETH_INTERFACE " down"); + sendCommand("0 interface setcfg " ETH_INTERFACE " up"); + } else { + qWarning() << "QConnectivityDaemon: failed to connect to netd socket"; + } + } + + int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (serverFd != -1) { + m_serverSocket = new QLocalServer(this); + if (m_serverSocket->listen(serverFd)) + connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection())); + else + qWarning() << "QConnectivityDaemon: not able to listen on the server socket..."; + } else { + qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; + } +} + +void QConnectivityDaemon::setHostnamePropery(const char *interface) const +{ + // Setup our unique device name (used as a host name argument for dhcpcd call in + // dhcp_do_request). On Android device name is set in ConnectivityService.java and + // the id is generated with the help of SecureRandom.java class. We will use Mac + // address as a unique hostname. + char prop_value[PROPERTY_VALUE_MAX]; + property_get(UNIQUE_HOSTNAME, prop_value, NULL); + if ((prop_value[0] == '\0')) { + char hwaddr[6]; + memset(hwaddr, 0, sizeof(hwaddr)); + ifc_init(); + if (ifc_get_hwaddr(interface, (void *)hwaddr) == 0) { + QByteArray macAddress(hwaddr, sizeof(hwaddr)); + property_set(UNIQUE_HOSTNAME, macAddress.toHex().prepend("b2qt-").constData()); + } else { + qWarning() << "QConnectivityDaemon: failed to get MAC address"; + } + ifc_close(); + } +} + +void QConnectivityDaemon::sendCommand(const char *command) const +{ + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: sending command - " << command; + // netd expects "\0" terminated commands... + m_netdSocket->write(command, qstrlen(command) + 1); + m_netdSocket->flush(); +} + +void QConnectivityDaemon::handleInterfaceChange(const QList &message) +{ + // Format: "Code Iface linkstate " + if (message.size() < 5) { + qWarning() << "QConnectivityDaemon: broken command"; + return; + } + if (message.at(2) == "linkstate" && message.at(3) == ETH_INTERFACE) { + if (message.at(4) == "up") { + // ethernet cable has been plugged in + if (!m_linkUp) { + m_linkUp = true; + startDhcp(false, ETH_INTERFACE); + } + } else { + // .. plugged out + if (m_linkUp) { + m_linkUp = false; + stopDhcp(ETH_INTERFACE); + } + } + } +} + +bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) +{ + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: startDhcp [ renew" + << renew << "] " << "interface: " << interface; + setHostnamePropery(interface); + + int result = 0; + char ipaddr[PROPERTY_VALUE_MAX]; + quint32 prefixLength = 0; + char gateway[PROPERTY_VALUE_MAX]; + char dns1[PROPERTY_VALUE_MAX]; + char dns2[PROPERTY_VALUE_MAX]; + char server[PROPERTY_VALUE_MAX]; + quint32 lease = 0; + char vendorInfo[PROPERTY_VALUE_MAX]; + + if (renew) { + result = dhcp_do_request_renew(interface, ipaddr, gateway, &prefixLength, + dns1, dns2, server, &lease, vendorInfo); + } else { + // stop any existing DHCP daemon before starting new + dhcp_stop(interface); + // this uses "ctl.start.*" mechanism to start "dhcpcd" daemon as defined by + // the device init.rc. Android starts dhcpcd with argument -B which means that + // we are responsible for renewing a lease before it expires + ifc_clear_addresses(interface); + result = dhcp_do_request(interface, ipaddr, gateway, &prefixLength, + dns1, dns2, server, &lease, vendorInfo); + } + + bool success = (result == 0) ? true : false; + if (success) { + if (QT_CONNECTIVITY_DEBUG) qDebug() << "\nipaddr: " << ipaddr << "\nprefixLength: " << prefixLength + << "\ngateway: " << gateway << "\ndns1: " << dns1 << "\ndns2: " << dns2; + + if (!renew) { + in_addr _ipaddr, _gateway, _dns1, _dns2; + inet_aton(ipaddr, &_ipaddr); + inet_aton(gateway, &_gateway); + inet_aton(dns1, &_dns1); + inet_aton(dns2, &_dns2); + + ifc_configure(interface, _ipaddr.s_addr, prefixLength, + _gateway.s_addr, _dns1.s_addr, _dns2.s_addr); + + property_set("net.dns1", dns1); + property_set("net.dns2", dns2); + } + + if (lease >= 0) { + if (lease < MIN_RENEWAL_TIME_SECS) { + qWarning() << "QConnectivityDaemon: DHCP server proposes lease time " << lease + << "seconds. We will use" << MIN_RENEWAL_TIME_SECS << " seconds instead."; + lease = MIN_RENEWAL_TIME_SECS; + } + // update lease when 48% of lease time has elapsed + if (m_leaseTimer->isActive()) + m_leaseTimer->stop(); + m_leaseTimer->setInterface(interface); + m_leaseTimer->start(lease * 480); + } + } else { + qWarning("QConnectivityDaemon: DHCP request failed - %s", dhcp_get_errmsg()); + if (renew) { + // If it fails to renew a lease (faulty server, proxy?) we re-connect. + // Some users might prefer to use expired lease over having interrupt + // in network connection + if (QT_USE_EXPIRED_LEASE) + return true; + qDebug() << "QConnectivityDaemon: attempting to re-connect..."; + stopDhcp(interface); + startDhcp(false, interface); + } + } + return success; +} + +void QConnectivityDaemon::stopDhcp(const char *interface) +{ + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: stopDhcp: " << interface; + ifc_clear_addresses(interface); + dhcp_stop(interface); + if (m_leaseTimer->isActive()) + m_leaseTimer->stop(); +} + +bool QConnectivityDaemon::ethernetSupported() const +{ + // standard linux kernel path + return QDir().exists("/sys/class/net/" ETH_INTERFACE); +} + +void QConnectivityDaemon::handleNetdEvent() +{ + QByteArray data = m_netdSocket->readAll(); + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: netd event: " << data; + if (data.endsWith('\0')) + data.chop(1); + + QList message = data.split(' '); + int code = message.at(0).toInt(); + switch (code) { + case InterfaceChange: + handleInterfaceChange(message); + break; + default: + break; + } +} + +void QConnectivityDaemon::handleRequest() +{ + // Format: "interface " + QLocalSocket *requester = qobject_cast(QObject::sender()); + if (requester->canReadLine()) { + QByteArray request = requester->readLine(requester->bytesAvailable()); + + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: received a request: " << request; + QList cmd = request.split(' '); + if (cmd.size() < 2) + return; + + QByteArray interface = cmd.at(0); + if (cmd.at(1) == "connect") { + QByteArray reply; + if (startDhcp(false, interface.constData())) + reply = "success"; + else + reply = "failed"; + sendReply(requester, reply); + } else { + stopDhcp(interface.constData()); + } + } +} + +void QConnectivityDaemon::handleNewConnection() +{ + QLocalSocket *requester = m_serverSocket->nextPendingConnection(); + connect(requester, SIGNAL(readyRead()), this, SLOT(handleRequest())); + connect(requester, SIGNAL(disconnected()), requester, SLOT(deleteLater())); +} + +void QConnectivityDaemon::sendReply(QLocalSocket *requester, const QByteArray &reply) const +{ + QByteArray r = reply.left(reply.size()); + r.append("\n"); + requester->write(r.constData(), r.length()); + requester->flush(); + requester->disconnectFromServer(); +} + +void QConnectivityDaemon::updateLease() +{ + if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: updating lease"; + startDhcp(true, m_leaseTimer->interface().constData()); +} + +void QConnectivityDaemon::handleError(QLocalSocket::LocalSocketError /*socketError*/) const +{ + qWarning() << "QConnectivityDaemon: QLocalSocket::LocalSocketError"; +} + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + + QConnectivityDaemon connectivityDaemon; + + return a.exec(); +} + +#include "main.moc" diff --git a/src/qconnectivity/qconnectivity.pro b/src/qconnectivity/qconnectivity.pro new file mode 100644 index 0000000..df3b366 --- /dev/null +++ b/src/qconnectivity/qconnectivity.pro @@ -0,0 +1,13 @@ +QT += core network +QT -= gui + +TARGET = qconnectivity +CONFIG += console +CONFIG -= app_bundle + +TEMPLATE = app + +LIBS += -lcutils -lnetutils +SOURCES += main.cpp + +load(qt_tool) diff --git a/src/src.pro b/src/src.pro index 3670d42..fe2f463 100644 --- a/src/src.pro +++ b/src/src.pro @@ -7,4 +7,4 @@ SUBDIRS += \ plugins \ -android: SUBDIRS += doppelganger qt_hw_init +android: SUBDIRS += doppelganger qt_hw_init qconnectivity -- cgit v1.2.3 From 696510db8f43427a9bb6ff249f688851f531cd12 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 2 Jan 2014 15:57:14 +0100 Subject: Fix dhcp issues and improve public API - Use qconnectivity daemon for dhcp requests. Since dhcp requests are executed in other process we don't block gui thread for this lengthy operation. - Why not to use "do_dhcp_request" - it is a legacy implementation of a dhcp client and is not used anywhere in the Android source code itself. It appears that do_dhcp_request was not removed from the libhardware_legacy to keep compatibility for others, whose code might still depend on it. - Differnet changes to the internal implementation and the public API. - Add 'Interface' singleton type, installing a singleton type allows developers to provide arbitrary functionality to a client without requiring individual instances of the type to be instantiated by the client. We use this to determine if Android has wifi interface. Change-Id: I836f3a2a587b1ebf9f670ed08b10fe3483504b9e Reviewed-by: Eirik Aavitsland --- src/imports/imports.pro | 1 + src/imports/wifi/pluginmain.cpp | 35 +++- src/imports/wifi/qwifimanager.cpp | 328 ++++++++++++++++++++------------------ src/imports/wifi/qwifimanager.h | 65 ++++---- src/imports/wifi/qwifimodule.pro | 21 --- src/imports/wifi/wifi.pro | 21 +++ 6 files changed, 266 insertions(+), 205 deletions(-) delete mode 100644 src/imports/wifi/qwifimodule.pro create mode 100644 src/imports/wifi/wifi.pro diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 92eddcd..0a5ccf5 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,2 +1,3 @@ TEMPLATE = subdirs SUBDIRS = utils +android:SUBDIRS += wifi diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 58aa590..0eeff78 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -21,6 +21,36 @@ #include #include +#include +#include + +class QWifiGlobal : public QObject +{ + Q_OBJECT +public: + explicit QWifiGlobal(QObject *parent = 0) + : QObject(parent) {} + ~QWifiGlobal() {} + + Q_INVOKABLE bool wifiSupported() const + { + char interface[PROPERTY_VALUE_MAX]; + property_get("wifi.interface", interface, NULL); + // standard linux kernel path + QByteArray path; + path.append("/sys/class/net/").append(interface); + bool interfaceFound = QDir().exists(path.constData()); + if (!interfaceFound) + qWarning() << "QWifiGlobal: could not find wifi interface in " << path; + return interfaceFound; + } +}; + +static QObject *global_object_wifi(QQmlEngine *, QJSEngine *) +{ + return new QWifiGlobal; +} + class QWifiPlugin : public QQmlExtensionPlugin { Q_OBJECT @@ -31,11 +61,10 @@ public: { Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.wifi")); - qmlRegisterType(uri, 0, 1, "QWifiManager"); + qmlRegisterType(uri, 0, 1, "WifiManager"); qmlRegisterType(); + qmlRegisterSingletonType(uri, 0, 1, "Interface", global_object_wifi); } }; #include "pluginmain.moc" - - diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index b2b9363..e5ed67e 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -21,54 +21,48 @@ #include #include -#include +#include #include -#define WLAN_INTERFACE "wlan0" +static const char SUPPLICANT_SVC[] = "init.svc.wpa_supplicant"; +static const char WIFI_INTERFACE[] = "wifi.interface"; +static const char QT_WIFI_BACKEND[] = "qt.wifi"; static bool QT_WIFI_DEBUG = !qgetenv("QT_WIFI_DEBUG").isEmpty(); const QEvent::Type WIFI_SCAN_RESULTS = (QEvent::Type) (QEvent::User + 2001); const QEvent::Type WIFI_CONNECTED = (QEvent::Type) (QEvent::User + 2002); -static int q_wifi_start_supplicant() +/* + * This function is borrowed from /system/core/libnetutils/dhcp_utils.c + * + * Wait for a system property to be assigned a specified value. + * If desired_value is NULL, then just wait for the property to + * be created with any value. maxwait is the maximum amount of + * time in seconds to wait before giving up. + */ +static const int NAP_TIME = 200; // wait for 200ms at a time when polling for property values +static int wait_for_property(const char *name, const char *desired_value, int maxwait) { -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) - return wifi_start_supplicant(0); -#else - return wifi_start_supplicant(); -#endif -} - -static int q_wifi_connect_to_supplicant() -{ -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) - return wifi_connect_to_supplicant(WLAN_INTERFACE); -#else - return wifi_connect_to_supplicant(); -#endif -} - -static int q_wifi_command(const char *command, char *reply, size_t *reply_len) -{ -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) - return wifi_command(WLAN_INTERFACE, command, reply, reply_len); -#else - return wifi_command(command, reply, reply_len); -#endif + char value[PROPERTY_VALUE_MAX] = {'\0'}; + int maxnaps = (maxwait * 1000) / NAP_TIME; -} + if (maxnaps < 1) { + maxnaps = 1; + } -static int q_wifi_wait_for_event(char *buf, size_t len) -{ -#if Q_ANDROID_VERSION_MAJOR > 4 || (Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR >= 1) - return wifi_wait_for_event(WLAN_INTERFACE, buf, len); -#else - return wifi_wait_for_event(buf, len); -#endif + while (maxnaps-- > 0) { + usleep(NAP_TIME * 1000); + if (property_get(name, value, NULL)) { + if (desired_value == NULL || + strcmp(value, desired_value) == 0) { + return 0; + } + } + } + return -1; /* failure */ } - class QWifiManagerEvent : public QEvent { public: @@ -84,13 +78,12 @@ private: QByteArray m_data; }; - - class QWifiManagerEventThread : public QThread { public: - QWifiManagerEventThread(QWifiManager *manager) + QWifiManagerEventThread(QWifiManager *manager, const QByteArray &interface) : m_manager(manager) + , m_if(interface) { } @@ -99,7 +92,9 @@ public: if (QT_WIFI_DEBUG) qDebug("EventReceiver thread is running"); char buffer[2048]; while (1) { - int size = q_wifi_wait_for_event(buffer, sizeof(buffer) - 1); + if (m_manager->exiting()) + return; + int size = wifi_wait_for_event(m_if.constData(), buffer, sizeof(buffer) - 1); if (size > 0) { buffer[size] = 0; @@ -112,34 +107,149 @@ public: } else if (strstr(event, "CONNECTED")) { QWifiManagerEvent *e = new QWifiManagerEvent(WIFI_CONNECTED); QCoreApplication::postEvent(m_manager, e); + } else if (strstr(event, "TERMINATING")) { + // stop monitoring for events when supplicant is terminating + return; } } } } QWifiManager *m_manager; + QByteArray m_if; }; - - QWifiManager::QWifiManager() : m_networks(this) , m_eventThread(0) , m_scanTimer(0) - , m_internalState(IS_Uninitialized) , m_scanning(false) + , m_daemonClientSocket(0) + , m_exiting(false) +{ + char interface[PROPERTY_VALUE_MAX]; + property_get(WIFI_INTERFACE, interface, NULL); + m_interface = interface; + if (QT_WIFI_DEBUG) qDebug("QWifiManager: using wifi interface: %s", m_interface.constData()); + m_eventThread = new QWifiManagerEventThread(this, m_interface); + + m_daemonClientSocket = new QLocalSocket; + int qconnFd = socket_local_client("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (qconnFd != -1) { + m_daemonClientSocket->setSocketDescriptor(qconnFd); + QObject::connect(m_daemonClientSocket, SIGNAL(readyRead()), this, SLOT(handleDhcpReply())); + QObject::connect(m_daemonClientSocket, SIGNAL(connected()), this, SLOT(connectedToDaemon())); + } else { + qWarning() << "QWifiManager: failed to connect to qconnectivity socket"; + } + + // check if backend has already been initialized + char backend_status[PROPERTY_VALUE_MAX]; + if (property_get(QT_WIFI_BACKEND, backend_status, NULL) + && strcmp(backend_status, "running") == 0) { + // let it re-connect, in most cases this will see that everything is working properly + // and will do nothing. Special case is when process has crashed or was killed by a system + // signal in previous execution, which results in broken connection to a supplicant, + // connectToBackend will fix it.. + connectToBackend(); + } else { + // same here, cleans up the state + disconnectFromBackend(); + } +} + +QWifiManager::~QWifiManager() +{ + m_exiting = true; + m_eventThread->wait(); +} + +void QWifiManager::handleDhcpReply() { + if (m_daemonClientSocket->canReadLine()) { + QByteArray receivedMessage; + receivedMessage = m_daemonClientSocket->readLine(m_daemonClientSocket->bytesAvailable()); + if (QT_WIFI_DEBUG) qDebug() << "QWifiManager: reply from qconnectivity: " << receivedMessage; + if (receivedMessage == "success") { + m_state = Connected; + emit networkStateChanged(); + emit connectedSSIDChanged(m_connectedSSID); + // Store settings of a working wifi connection + call("SAVE_CONFIG"); + } else if (receivedMessage == "failed") { + m_state = DhcpRequestFailed; + emit networkStateChanged(); + } else { + qWarning() << "QWifiManager: unknown message: " << receivedMessage; + } + } } +void QWifiManager::sendDhcpRequest(const QByteArray &request) +{ + if (QT_WIFI_DEBUG) qDebug() << "QWifiManager: sending request - " << request; + m_request = request; + m_request.append("\n"); + m_daemonClientSocket->abort(); + // path where android stores "reserved" sockets + m_daemonClientSocket->connectToServer(ANDROID_SOCKET_DIR "/qconnectivity"); +} +void QWifiManager::connectedToDaemon() +{ + m_daemonClientSocket->write(m_request.constData(), m_request.length()); + m_daemonClientSocket->flush(); +} void QWifiManager::start() { - if (QT_WIFI_DEBUG) qDebug("QWifiManager: start"); + if (QT_WIFI_DEBUG) qDebug("QWifiManager: connecting to the backend"); connectToBackend(); } +void QWifiManager::stop() +{ + if (QT_WIFI_DEBUG) qDebug("QWifiManager: shutting down"); + disconnectFromBackend(); +} + +void QWifiManager::connectToBackend() +{ + if (!(is_wifi_driver_loaded() || wifi_load_driver() == 0)) { + qWarning("QWifiManager: failed to load a driver"); + return; + } + if (wifi_start_supplicant(0) != 0) { + qWarning("QWifiManager: failed to start a supplicant"); + return; + } + if (wait_for_property(SUPPLICANT_SVC, "running", 5) < 0) { + qWarning("QWifiManager: Timed out waiting for supplicant to start"); + return; + } + if (wifi_connect_to_supplicant(m_interface.constData()) == 0) { + m_backendReady = true; + emit backendReadyChanged(); + property_set(QT_WIFI_BACKEND, "running"); + } else { + qWarning("QWifiManager: failed to connect to a supplicant"); + return; + } + if (QT_WIFI_DEBUG) qDebug("QWifiManager: started successfully"); + m_eventThread->start(); + handleConnected(); +} +void QWifiManager::disconnectFromBackend() +{ + m_eventThread->quit(); + if (wifi_stop_supplicant(0) < 0) + qWarning("QWifiManager: failed to stop supplicant"); + wifi_close_supplicant_connection(m_interface.constData()); + property_set(QT_WIFI_BACKEND, "stopped"); + m_backendReady = false; + emit backendReadyChanged(); +} void QWifiManager::setScanning(bool scanning) { @@ -147,70 +257,23 @@ void QWifiManager::setScanning(bool scanning) return; m_scanning = scanning; - emit scanningChanged(scanning); + emit scanningChanged(m_scanning); if (m_scanning) { if (QT_WIFI_DEBUG) qDebug("QWifiManager: scanning"); call("SCAN"); - m_scanTimer = startTimer(5000); + m_scanTimer = startTimer(5000); // ### todo - this could be a qml property } else { if (QT_WIFI_DEBUG) qDebug("QWifiManager: stop scanning"); killTimer(m_scanTimer); } } - - -QByteArray int_to_ip(int i) { - QByteArray ip; - - ip.append(QByteArray::number(i & 0x000000ff)); - ip.append('.'); - ip.append(QByteArray::number((i & 0x0000ff00) >> 8)); - ip.append('.'); - ip.append(QByteArray::number((i & 0x00ff0000) >> 16)); - ip.append('.'); - ip.append(QByteArray::number(i >> 24)); - - return ip; -} - - -void QWifiManager::connectToBackend() -{ - if (m_internalState == IS_Uninitialized) - m_internalState = IS_LoadDriver; - - if (m_internalState == IS_LoadDriver && (is_wifi_driver_loaded() || wifi_load_driver() >= 0)) - m_internalState = IS_StartBackend; - - if (m_internalState == IS_StartBackend && q_wifi_start_supplicant() >= 0) { - m_internalState = IS_ConnectToBackend; - sleep(3); //### - } - - if (m_internalState == IS_ConnectToBackend && q_wifi_connect_to_supplicant() >= 0) - m_internalState = IS_UpAndRunning; - - if (m_internalState == IS_UpAndRunning) { - qDebug("QWifiManager: started successfully"); - - emit readyChanged(true); - m_eventThread = new QWifiManagerEventThread(this); - m_eventThread->start(); - - handleConnected(); - } else { - qWarning("QWifiManager: stuck at internal state level: %d", m_internalState); - } -} - - -QByteArray QWifiManager::call(const char *command) +QByteArray QWifiManager::call(const char *command) const { char data[2048]; size_t len = sizeof(data) - 1; // -1: room to add a 0-terminator - if (q_wifi_command(command, data, &len) < 0) { + if (wifi_command(m_interface.constData(), command, data, &len) < 0) { qWarning("QWifiManager: call failed: %s", command); return QByteArray(); } @@ -221,13 +284,11 @@ QByteArray QWifiManager::call(const char *command) return result; } - -bool QWifiManager::checkedCall(const char *command) +bool QWifiManager::checkedCall(const char *command) const { return call(command).trimmed().toUpper() == "OK"; } - bool QWifiManager::event(QEvent *e) { switch ((int) e->type()) { @@ -261,9 +322,10 @@ void QWifiManager::connect(QWifiNetwork *network, const QString &passphrase) if (!m_connectedSSID.isEmpty()) { m_connectedSSID.clear(); emit connectedSSIDChanged(m_connectedSSID); - //also possibly change online state } + m_state = ObtainingIPAddress; + emit networkStateChanged(); bool networkKnown = false; QByteArray id; QByteArray listResult = call("LIST_NETWORKS"); @@ -295,7 +357,7 @@ void QWifiManager::connect(QWifiNetwork *network, const QString &passphrase) QByteArray key_mgmt; if (network->supportsWPA() || network->supportsWPA2()) { ok = ok && checkedCall(setNetworkCommand + QByteArray(" psk ") + '"' + passphrase.toLatin1() + '"'); - key_mgmt = "WPA_PSK"; + key_mgmt = "WPA-PSK"; } else if (network->supportsWEP()) { ok = ok && checkedCall(setNetworkCommand + QByteArray(" wep_key0 ") + '"' + passphrase.toLatin1() + '"'); ok = ok && checkedCall(setNetworkCommand + QByteArray(" auth_alg OPEN SHARED")); @@ -317,19 +379,16 @@ void QWifiManager::connect(QWifiNetwork *network, const QString &passphrase) call("RECONNECT"); } - -class ProcessRunner : public QThread { -public: - void run() { - QStringList args; - args << QStringLiteral("-A") - << QStringLiteral("-h") << QStringLiteral("KAON") //### hardcoded hostname, for testing - << QStringLiteral("wlan0"); - QProcess::execute(QStringLiteral("dhcpcd"), args); - deleteLater(); - } -}; - +void QWifiManager::disconnect() +{ + call("DISCONNECT"); + QByteArray req = m_interface; + sendDhcpRequest(req.append(" disconnect")); + m_state = Disconnected; + m_connectedSSID.clear(); + emit networkStateChanged(); + emit connectedSSIDChanged(m_connectedSSID); +} void QWifiManager::handleConnected() { @@ -344,49 +403,16 @@ void QWifiManager::handleConnected() if (connectedNetwork.isEmpty()) { if (QT_WIFI_DEBUG) qDebug("QWifiManager::handleConnected: not connected to a network..."); - m_online = false; - onlineChanged(m_online); + m_state = Disconnected; + emit networkStateChanged(); return; - } else { - if (QT_WIFI_DEBUG) qDebug("QWifiManager::handleConnected: current is %s", connectedNetwork.constData()); } + if (QT_WIFI_DEBUG) qDebug("QWifiManager::handleConnected: current is %s", connectedNetwork.constData()); + QList info = connectedNetwork.split('\t'); m_connectedSSID = info.at(1); - emit connectedSSIDChanged(m_connectedSSID); - - if (QT_WIFI_DEBUG) qDebug("QWifiManager::handleConnected: starting dhcpcd..."); - QThread *t = new ProcessRunner(); - t->start(); - - int ipaddr, gateway, mask, dns1, dns2, server, lease; - if (do_dhcp_request(&ipaddr, &gateway, &mask, &dns1, &dns2, &server, &lease) == 0) { - if (QT_WIFI_DEBUG) { - printf("ip ........: %s\n" - "gateway ...: %s\n" - "mask ......: %s\n" - "dns1 ......: %s\n" - "dns2 ......: %s\n" - "lease .....: %d\n", - int_to_ip(ipaddr).constData(), - int_to_ip(gateway).constData(), - int_to_ip(mask).constData(), - int_to_ip(dns1).constData(), - int_to_ip(dns2).constData(), - lease); - } - - // Updating dns values.. - property_set("net.dns1", int_to_ip(dns1).constData()); - property_set("net.dns2", int_to_ip(dns2).constData()); - - // Store (possibly updated) settings - call("SAVE_CONFIG"); - - m_online = true; - onlineChanged(m_online); - } else { - if (QT_WIFI_DEBUG) qDebug("QWifiManager::handleConnected: dhcp request failed..."); - } + QByteArray req = m_interface; + sendDhcpRequest(req.append(" connect")); } diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h index 59f2b44..85384cc 100644 --- a/src/imports/wifi/qwifimanager.h +++ b/src/imports/wifi/qwifimanager.h @@ -21,6 +21,9 @@ #include #include +#include + +#include #include "qwifinetworklist.h" @@ -29,71 +32,73 @@ class QWifiManagerEventThread; class QWifiManager : public QObject { Q_OBJECT - - Q_PROPERTY(bool ready READ isReady NOTIFY readyChanged) - Q_PROPERTY(bool online READ isOnline NOTIFY onlineChanged) + Q_ENUMS(NetworkState) + Q_PROPERTY(NetworkState networkState READ networkState NOTIFY networkStateChanged) + Q_PROPERTY(bool backendReady READ isbackendReady NOTIFY backendReadyChanged) Q_PROPERTY(bool scanning READ scanning WRITE setScanning NOTIFY scanningChanged) - Q_PROPERTY(QString connectedSSID READ connectedSSID NOTIFY connectedSSIDChanged) Q_PROPERTY(QWifiNetworkList *networks READ networks CONSTANT) public: - enum InternalState { - IS_Uninitialized, - IS_LoadDriver, - IS_StartBackend, - IS_ConnectToBackend, - IS_UpAndRunning + enum NetworkState { + Disconnected, + ObtainingIPAddress, + DhcpRequestFailed, + Connected }; QWifiManager(); + ~QWifiManager(); QWifiNetworkList *networks() { return &m_networks; } - QString connectedSSID() const { return m_connectedSSID; } - bool scanning() const { return m_scanning; } void setScanning(bool scanning); - - bool isReady() const { return m_internalState == IS_UpAndRunning; } - bool isOnline() const { return m_online; } - + NetworkState networkState() const { return m_state; } + bool isbackendReady() const { return m_backendReady; } + bool exiting() const { return m_exiting; } public slots: void start(); - + void stop(); void connect(QWifiNetwork *network, const QString &passphrase); + void disconnect(); signals: void scanningChanged(bool arg); - void readyChanged(bool ready); - void onlineChanged(bool online); + void networkStateChanged(); + void backendReadyChanged(); void connectedSSIDChanged(const QString &); protected: bool event(QEvent *); + void sendDhcpRequest(const QByteArray &request); + void handleConnected(); + void connectToBackend(); + void disconnectFromBackend(); + QByteArray call(const char *command) const; + bool checkedCall(const char *command) const; + +protected slots: + void connectedToDaemon(); + void handleDhcpReply(); private: friend class QWifiManagerEventThread; - void handleConnected(); - void parseScanResults(); - void connectToBackend(); - QByteArray call(const char *command); - bool checkedCall(const char *command); - QString m_connectedSSID; QWifiNetworkList m_networks; - QWifiManagerEventThread *m_eventThread; int m_scanTimer; - - InternalState m_internalState; - bool m_scanning; - bool m_online; + bool m_backendReady; + QByteArray m_interface; + NetworkState m_state; + QLocalSocket *m_daemonClientSocket; + QByteArray m_request; + bool m_exiting; }; #endif // QWIFIMANAGER_H diff --git a/src/imports/wifi/qwifimodule.pro b/src/imports/wifi/qwifimodule.pro deleted file mode 100644 index 449617f..0000000 --- a/src/imports/wifi/qwifimodule.pro +++ /dev/null @@ -1,21 +0,0 @@ -CXX_MODULE = qml -QT += qml quick -TARGET = qwifimodule -TARGETPATH = Qt/labs/wifi -IMPORT_VERSION = 0.1 - -SOURCES += \ - pluginmain.cpp \ - qwifimanager.cpp \ - qwifinetwork.cpp \ - qwifinetworklist.cpp - -HEADERS += \ - qwifimanager.h \ - qwifinetwork.h \ - qwifinetworklist.h - -LIBS += -lhardware_legacy -lcutils - -load(qml_plugin) - diff --git a/src/imports/wifi/wifi.pro b/src/imports/wifi/wifi.pro new file mode 100644 index 0000000..0231479 --- /dev/null +++ b/src/imports/wifi/wifi.pro @@ -0,0 +1,21 @@ +CXX_MODULE = qml +QT += qml quick network +TARGET = qwifimodule +TARGETPATH = Qt/labs/wifi +IMPORT_VERSION = 0.1 + +SOURCES += \ + pluginmain.cpp \ + qwifimanager.cpp \ + qwifinetwork.cpp \ + qwifinetworklist.cpp + +HEADERS += \ + qwifimanager.h \ + qwifinetwork.h \ + qwifinetworklist.h + +LIBS += -lhardware_legacy -lcutils + +load(qml_plugin) + -- cgit v1.2.3 From 5055a8b531cee74ccf3bd4b82d7024f93e5f7d28 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 28 Jan 2014 11:45:54 +0100 Subject: Disable building of wifi library Change-Id: I3f8c2183f9bb0a620bad8128bdceda1bcb00ebd4 Reviewed-by: Eirik Aavitsland --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 0a5ccf5..6284883 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs SUBDIRS = utils -android:SUBDIRS += wifi +#android:SUBDIRS += wifi -- cgit v1.2.3 From 6873ff8924ff9adcb065bddfd772eb71054b5b73 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 21 Jan 2014 10:37:56 +0100 Subject: Doc: Bump B2Qt version in the docs to 2.0.0 Set the b2qt version in the docs to 2.0.0. Also add dependencies to other doc modules, which may be useful in the future. Change-Id: I2034c893a3cce7d19c4a7198a34ebfc532aecddb Reviewed-by: Eirik Aavitsland --- src/doc/config/b2qt.qdocconf | 7 +++++-- src/doc/src/b2qt.qdoc | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 830d44b..7c97275 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -6,17 +6,20 @@ sourceencoding = UTF-8 project = QtEnterpriseEmbedded description = Qt Enterprise Embedded Documentation -version = 1.0.0 +version = 2.0.0 sourcedirs = ../src imagedirs += ../images sources.fileextensions = "*.qdoc" +indexes = $QT_INSTALL_DOCS/qtquick/qtquick.index \ + $QT_INSTALL_DOCS/emulator/emulator.index + qhp.projects = B2Qt qhp.B2Qt.file = b2qt.qhp -qhp.B2Qt.namespace = com.digia.b2qt.100 +qhp.B2Qt.namespace = com.digia.b2qt.200 qhp.B2Qt.virtualFolder = b2qt qhp.B2Qt.indexTitle = Qt Enterprise Embedded Documentation qhp.B2Qt.indexRoot = diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e7ef357..34ae33d 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -335,9 +335,9 @@ \code cd - sudo ./Tools/b2qt/fastboot flash boot Boot2Qt-1.0/nexus7-eAndroid/images/boot.img - sudo ./Tools/b2qt/fastboot flash system Boot2Qt-1.0/nexus7-eAndroid/images/system.img - sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-1.0/nexus7-eAndroid/images/data.img + sudo ./Tools/b2qt/fastboot flash boot Boot2Qt-2.x/nexus7-eAndroid/images/boot.img + sudo ./Tools/b2qt/fastboot flash system Boot2Qt-2.x/nexus7-eAndroid/images/system.img + sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-2.x/nexus7-eAndroid/images/data.img \endcode \li Once the flashing is completed successfully, reboot the device: @@ -359,7 +359,7 @@ {https://developers.google.com/android/nexus/drivers#grouperjdq39} \code cd - ./Boot2Qt-1.0/nexus7-eAndroid/images/download.sh + ./Boot2Qt-2.x/nexus7-eAndroid/images/download.sh \endcode \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" works with the @@ -372,7 +372,7 @@ Also check that the device is \e{not} in fastboot mode. \li Run the driver extractors: \code - cd Boot2Qt-1.0/nexus7-eAndroid/images/drivers + cd Boot2Qt-2.x/nexus7-eAndroid/images/drivers ./extract-nvidia-grouper.sh ./extract-asus-grouper.sh ./extract-invensense-grouper.sh @@ -386,7 +386,7 @@ \endcode \li Deploy the drivers to your device: \code - ./Boot2Qt-1.0/nexus7-eAndroid/images/deploy.sh + ./Boot2Qt-2.x/nexus7-eAndroid/images/deploy.sh \endcode \endlist @@ -440,12 +440,12 @@ \li \b{\B2QA} \code cd - sudo dd if=Boot2Qt-1.0/beagleboard-eAndroid/images/sdcard.img of=/dev/ bs=1M + sudo dd if=Boot2Qt-2.x/beagleboard-eAndroid/images/sdcard.img of=/dev/ bs=1M \endcode \li \b{\B2QL} \code cd - sudo Boot2Qt-1.0/beagleboard-eLinux/images/deploy.sh /dev/ + sudo Boot2Qt-2.x/beagleboard-eLinux/images/deploy.sh /dev/ \endcode \endlist @@ -528,12 +528,12 @@ \li \b{\B2QA} \code cd - Boot2Qt-1.0/iMX6-eAndroid/images/deploy.sh /dev/ + Boot2Qt-2.x/iMX6-eAndroid/images/deploy.sh /dev/ \endcode \li \b{\B2QL} \code cd - Boot2Qt-1.0/iMX6-eLinux/images/deploy.sh /dev/ + Boot2Qt-2.x/iMX6-eLinux/images/deploy.sh /dev/ \endcode \endlist @@ -585,7 +585,7 @@ \code cd - sudo Boot2Qt-1.0/raspberrypi-eLinux/images/deploy.sh /dev/ + sudo Boot2Qt-2.x/raspberrypi-eLinux/images/deploy.sh /dev/ \endcode After the image has been deployed, power on the device and check that -- cgit v1.2.3 From 30bf9ea54024a75c4bfdf6e6da11315658318363 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 27 Jan 2014 14:10:01 +0100 Subject: Re-connect if netd is not ready There is a delay from the time when netd service is started and when it is actually ready to listen for commands. Change-Id: I92a21639921682457f8d5ccf1124a0d310a7a41c Reviewed-by: Eirik Aavitsland --- src/qconnectivity/main.cpp | 51 +++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp index a02658a..4095c45 100644 --- a/src/qconnectivity/main.cpp +++ b/src/qconnectivity/main.cpp @@ -69,6 +69,7 @@ protected: bool ethernetSupported() const; protected slots: + void initNetdConnection(); void handleNetdEvent(); void handleRequest(); void handleNewConnection(); @@ -116,15 +117,32 @@ private: QConnectivityDaemon::QConnectivityDaemon() : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0) { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "starting QConnectivityDaemon..."; + qDebug() << "starting QConnectivityDaemon..."; + initNetdConnection(); m_leaseTimer = new LeaseTimer(this); m_leaseTimer->setSingleShot(true); connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease())); + int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (serverFd != -1) { + m_serverSocket = new QLocalServer(this); + if (m_serverSocket->listen(serverFd)) + connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection())); + else + qWarning() << "QConnectivityDaemon: not able to listen on the server socket..."; + } else { + qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; + } +} + +void QConnectivityDaemon::initNetdConnection() +{ + static int attemptCount = 12; if (ethernetSupported()) { int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); if (netdFd != -1) { + qDebug() << "QConnectivityDaemon: connected to netd socket"; m_netdSocket = new QLocalSocket(this); m_netdSocket->setSocketDescriptor(netdFd); connect(m_netdSocket, SIGNAL(readyRead()), this, SLOT(handleNetdEvent())); @@ -137,19 +155,10 @@ QConnectivityDaemon::QConnectivityDaemon() sendCommand("0 interface setcfg " ETH_INTERFACE " up"); } else { qWarning() << "QConnectivityDaemon: failed to connect to netd socket"; + if (--attemptCount != 0) + QTimer::singleShot(2000, this, SLOT(initNetdConnection())); } } - - int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); - if (serverFd != -1) { - m_serverSocket = new QLocalServer(this); - if (m_serverSocket->listen(serverFd)) - connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection())); - else - qWarning() << "QConnectivityDaemon: not able to listen on the server socket..."; - } else { - qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; - } } void QConnectivityDaemon::setHostnamePropery(const char *interface) const @@ -176,7 +185,7 @@ void QConnectivityDaemon::setHostnamePropery(const char *interface) const void QConnectivityDaemon::sendCommand(const char *command) const { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: sending command - " << command; + qDebug() << "QConnectivityDaemon: sending command - " << command; // netd expects "\0" terminated commands... m_netdSocket->write(command, qstrlen(command) + 1); m_netdSocket->flush(); @@ -208,8 +217,8 @@ void QConnectivityDaemon::handleInterfaceChange(const QList &message bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: startDhcp [ renew" - << renew << "] " << "interface: " << interface; + qDebug() << "QConnectivityDaemon: startDhcp [ renew" << renew << "] " + << "interface: " << interface; setHostnamePropery(interface); int result = 0; @@ -238,8 +247,8 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) bool success = (result == 0) ? true : false; if (success) { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "\nipaddr: " << ipaddr << "\nprefixLength: " << prefixLength - << "\ngateway: " << gateway << "\ndns1: " << dns1 << "\ndns2: " << dns2; + qDebug() << "\nipaddr: " << ipaddr << "\nprefixLength: " << prefixLength + << "\ngateway: " << gateway << "\ndns1: " << dns1 << "\ndns2: " << dns2; if (!renew) { in_addr _ipaddr, _gateway, _dns1, _dns2; @@ -285,7 +294,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) void QConnectivityDaemon::stopDhcp(const char *interface) { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: stopDhcp: " << interface; + qDebug() << "QConnectivityDaemon: stopDhcp: " << interface; ifc_clear_addresses(interface); dhcp_stop(interface); if (m_leaseTimer->isActive()) @@ -323,7 +332,7 @@ void QConnectivityDaemon::handleRequest() if (requester->canReadLine()) { QByteArray request = requester->readLine(requester->bytesAvailable()); - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: received a request: " << request; + qDebug() << "QConnectivityDaemon: received a request: " << request; QList cmd = request.split(' '); if (cmd.size() < 2) return; @@ -351,7 +360,7 @@ void QConnectivityDaemon::handleNewConnection() void QConnectivityDaemon::sendReply(QLocalSocket *requester, const QByteArray &reply) const { - QByteArray r = reply.left(reply.size()); + QByteArray r = reply; r.append("\n"); requester->write(r.constData(), r.length()); requester->flush(); @@ -360,7 +369,7 @@ void QConnectivityDaemon::sendReply(QLocalSocket *requester, const QByteArray &r void QConnectivityDaemon::updateLease() { - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: updating lease"; + qDebug() << "QConnectivityDaemon: updating lease"; startDhcp(true, m_leaseTimer->interface().constData()); } -- cgit v1.2.3 From efafdf26f8ab2a0619b7d211246a1a1e7e15f688 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 29 Jan 2014 17:15:01 +0100 Subject: Exclude some experimental, unused code from source distro Change-Id: Ib2cb363b2be45226efd5a7257a18f6be718477bc Reviewed-by: Samuli Piippo --- .exclude | 1 + 1 file changed, 1 insertion(+) create mode 100644 .exclude diff --git a/.exclude b/.exclude new file mode 100644 index 0000000..34ed1e1 --- /dev/null +++ b/.exclude @@ -0,0 +1 @@ +src/imports/nativemedia -- cgit v1.2.3 From eb7f5c21121d7a5fe86b52ec04337d77bc9f3cf4 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 29 Jan 2014 19:07:20 +0100 Subject: Make sure that wifi event thread doesn't block on exit After setting m_exitEventThread to True we need to generate wifi event, otherwise there might be cases that we block in wifi_wait_for_event and wifi event thread never exits. Change-Id: I699ca0c25e23abc7045c1850bf773443bac897e8 Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 22 ++++++++++++++++------ src/imports/wifi/qwifimanager.h | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index e5ed67e..9139242 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -92,8 +92,6 @@ public: if (QT_WIFI_DEBUG) qDebug("EventReceiver thread is running"); char buffer[2048]; while (1) { - if (m_manager->exiting()) - return; int size = wifi_wait_for_event(m_if.constData(), buffer, sizeof(buffer) - 1); if (size > 0) { buffer[size] = 0; @@ -102,6 +100,8 @@ public: char *event = &buffer[11]; if (strstr(event, "SCAN-RESULTS")) { + if (m_manager->exitingEventThread()) + return; QWifiManagerEvent *e = new QWifiManagerEvent(WIFI_SCAN_RESULTS); QCoreApplication::postEvent(m_manager, e); } else if (strstr(event, "CONNECTED")) { @@ -125,7 +125,7 @@ QWifiManager::QWifiManager() , m_scanTimer(0) , m_scanning(false) , m_daemonClientSocket(0) - , m_exiting(false) + , m_exitingEventThread(false) { char interface[PROPERTY_VALUE_MAX]; property_get(WIFI_INTERFACE, interface, NULL); @@ -160,8 +160,14 @@ QWifiManager::QWifiManager() QWifiManager::~QWifiManager() { - m_exiting = true; - m_eventThread->wait(); + // exit event thread if it is running + if (m_eventThread->isRunning()) { + m_exitingEventThread = true; + call("SCAN"); + m_eventThread->wait(); + } + delete m_eventThread; + delete m_daemonClientSocket; } void QWifiManager::handleDhcpReply() @@ -236,13 +242,17 @@ void QWifiManager::connectToBackend() return; } if (QT_WIFI_DEBUG) qDebug("QWifiManager: started successfully"); + m_exitingEventThread = false; m_eventThread->start(); handleConnected(); } void QWifiManager::disconnectFromBackend() { - m_eventThread->quit(); + m_exitingEventThread = true; + call("SCAN"); + m_eventThread->wait(); + if (wifi_stop_supplicant(0) < 0) qWarning("QWifiManager: failed to stop supplicant"); wifi_close_supplicant_connection(m_interface.constData()); diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h index 85384cc..c9ba2ef 100644 --- a/src/imports/wifi/qwifimanager.h +++ b/src/imports/wifi/qwifimanager.h @@ -56,7 +56,7 @@ public: void setScanning(bool scanning); NetworkState networkState() const { return m_state; } bool isbackendReady() const { return m_backendReady; } - bool exiting() const { return m_exiting; } + bool exitingEventThread() const { return m_exitingEventThread; } public slots: void start(); @@ -98,7 +98,7 @@ private: NetworkState m_state; QLocalSocket *m_daemonClientSocket; QByteArray m_request; - bool m_exiting; + bool m_exitingEventThread; }; #endif // QWIFIMANAGER_H -- cgit v1.2.3 From 2ad3a8b8121cc1a4f2d1fa291b7f63a8fc7d34d3 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 29 Jan 2014 17:22:59 +0100 Subject: Re-enable the wifi plguin now that toolchains have been updated Change-Id: I87efe6b020b3c8b13491a1611b7992e8f697cb46 Reviewed-by: Gatis Paeglis --- src/imports/imports.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imports/imports.pro b/src/imports/imports.pro index 6284883..0a5ccf5 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs SUBDIRS = utils -#android:SUBDIRS += wifi +android:SUBDIRS += wifi -- cgit v1.2.3 From 0e71a8a6df15433715fb9c6b54ad5962527f3126 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 30 Jan 2014 12:16:05 +0100 Subject: Doc: Remove embedded Android support for Beagleboard B2Qt 2.0 will support only embedded Linux on Beagleboard. Task-number: QTEE-303 Change-Id: Id9b0058a929ab7f441bcb17795ff5c562facb89f Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 34ae33d..5c8ea7e 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -45,7 +45,7 @@ \list \li \l{Preparing Nexus 7}{Nexus 7 (2012) (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android and Linux)} - \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Android and Linux)} + \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} \endlist \li \l{Building and Running an Example} @@ -278,7 +278,7 @@ \list \li \l{Nexus 7 (2012) (embedded Android)} \li \l{Sabre Lite i.MX 6 (embedded Android and Linux)} - \li \l{BeagleBoard-xM (embedded Android and Linux)} + \li \l{BeagleBoard-xM (embedded Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} \endlist @@ -406,7 +406,7 @@ */ /*! - \target BeagleBoard-xM (embedded Android and Linux) + \target BeagleBoard-xM (embedded Linux) \page qtee-preparing-hardware-beagleboard.html \title Preparing BeagleBoard-xM \previouspage qtee-installation-guide.html @@ -419,35 +419,23 @@ \note It is important that you repeat the steps in this section after you update \SDK. - The images containing \B2Q stack for BeagleBoard-xM are included in \SDK, + The image containing \B2Q stack for BeagleBoard-xM are included in \SDK, ready to be copied to an SD card. \section1 Preparing an SD Card - For \B2QA, an SD card of at least 2 GB capacity is needed. For \B2QL, - a card of at least 512 MB capacity is sufficient. + An SD card of at least 512 MB capacity is needed. \include detect-sd-card-device-name.qdocinc instructions \section1 Installing the \B2Q Image - The commands used in this step vary depending on whether you are developing - for embedded Android or embedded Linux. - To write the image to the SD card: - \list - \li \b{\B2QA} - \code - cd - sudo dd if=Boot2Qt-2.x/beagleboard-eAndroid/images/sdcard.img of=/dev/ bs=1M - \endcode - \li \b{\B2QL} - \code - cd - sudo Boot2Qt-2.x/beagleboard-eLinux/images/deploy.sh /dev/ - \endcode - \endlist + \code + cd + sudo Boot2Qt-2.x/beagleboard-eLinux/images/deploy.sh /dev/ + \endcode After the image has been deployed, power on the device and check that the \B2Q welcome screen and/or demo appear. -- cgit v1.2.3 From ca32a427ba15ddcf410e84069416757d366612f4 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 31 Jan 2014 11:24:35 +0100 Subject: Doc: Remove comment about Yocto compliance Task-number: QTEE-311 Change-Id: Ibf4052919e6235c569345d96c4244743a843b758 Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 5c8ea7e..e2322de 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -101,11 +101,10 @@ \li \b{\B2QL} where the software stack is using the traditional embedded Linux kernel built with the Yocto Poky reference system (Yocto 1.4 - \e Dylan release). Because of its Yocto compliance, the Embedded - Linux variant is designed for great customization possibilities. - It contains only components required in the embedded device, - resulting in smaller image sizes while keeping valuable development - tools available. + \e Dylan release). The Embedded Linux variant is designed for great + customization possibilities. It contains only components required in + the embedded device, resulting in smaller image sizes while keeping + valuable development tools available. \endlist Both versions have been tested and verified on a number of different -- cgit v1.2.3 From 711bfedc706f609cce586406647cfb4ef4547f15 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 31 Jan 2014 11:06:52 +0100 Subject: Improve QDroidUtils IP address retrieval Instead of returning the first IP address from eth0, return a comma-separated list. This ensures that the IPv4 address is shown in Launcher Settings demo, important as it's required for setting up the connection to Raspberry Pi in Qt Creator (sometimes, IPv6 address is shown as first entry). Also, cleans up the garbage (trailing %eth0) returned for IPv6 addresses. Change-Id: Ibced367ba443ac76c2ad2a4f2589c9edcbc74b7f Reviewed-by: Eirik Aavitsland --- src/utils/qdroidutils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 67d8d29..0952345 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -229,22 +229,22 @@ bool QDroidUtils::setDisplayBrightness(quint8 value) /*! - * Gets the current IP address of the device + * Gets the current IP address(es) of the device */ QString QDroidUtils::getIPAddress() { - QString address; + QStringList addresses; #ifdef Q_OS_ANDROID_NO_SDK qDebug("QDroidUtils::getIPAddress()"); #else QNetworkInterface interface = QNetworkInterface::interfaceFromName("eth0"); QList entries; entries = interface.addressEntries(); - if ( !entries.empty() ) { - address = entries.first().ip().toString(); + foreach (const QNetworkAddressEntry &entry, entries) { + addresses.append(entry.ip().toString().split('%').first()); } #endif - return address; + return addresses.join(QStringLiteral(", ")); } /*! -- cgit v1.2.3 From 5be3cb521cdd67eeeac18e7f252fe89e2050e6b8 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 31 Jan 2014 10:21:21 +0100 Subject: Doc: Add BeagleBone Black Task-number: QTEE-302 Change-Id: I1c608ea0934a69244077a87de0f843993a3fc8d0 Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 86 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e2322de..1b29b5a 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -45,6 +45,7 @@ \list \li \l{Preparing Nexus 7}{Nexus 7 (2012) (embedded Android)} \li \l{Preparing Sabre Lite i.MX 6}{Sabre Lite i.MX 6 (embedded Android and Linux)} + \li \l{Preparing BeagleBone Black}{BeagleBone Black (embedded Android and Linux)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} \endlist @@ -277,6 +278,7 @@ \list \li \l{Nexus 7 (2012) (embedded Android)} \li \l{Sabre Lite i.MX 6 (embedded Android and Linux)} + \li \l{BeagleBone Black (embedded Android and Linux)} \li \l{BeagleBoard-xM (embedded Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} \endlist @@ -524,7 +526,7 @@ \endcode \endlist - After the installation is complete, power on the device and check that + After the installation is complete, insert the SD card, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Setting up USB Access @@ -575,7 +577,7 @@ sudo Boot2Qt-2.x/raspberrypi-eLinux/images/deploy.sh /dev/ \endcode - After the image has been deployed, power on the device and check that + After the image has been deployed, insert the SD card, power on the device and check that the \B2Q welcome screen and/or demo appear. \section1 Configuring a Device Kit in Qt Creator @@ -586,6 +588,85 @@ see \l{Building and Running an Example}. */ +/*! + \target BeagleBone Black (embedded Android and Linux) + \page qtee-preparing-hardware-beaglebone.html + \title Preparing BeagleBone Black + \previouspage qtee-installation-guide.html + + Take the following steps to prepare a + \l{http://beagleboard.org/products/beaglebone%20black}{BeagleBone Black} for \B2Q. + + \note It is important that you repeat the steps in this section after you + update \SDK. + + The images containing the \B2Q stack for BeagleBone Black are included + in \SDK, ready to be copied to an SD card. + + \section1 Preparing an SD Card + + For \B2QA, an SD card of at least 2 GB capacity is needed. For \B2QL, + a card of at least 512 MB capacity is sufficient. + + \include detect-sd-card-device-name.qdocinc instructions + + \section1 Installing the Android image + + \e{If installing} \B2QL, \e{you can skip this step and proceed to} + \l{Installing the Boot to Qt Image}. + + Download the package \e{TI_Android_JB_4.2.2_DevKit_4.1.1_beagleboneblack.tar.gz} from + \l{http://downloads.ti.com/sitara_android/esd/TI_Android_DevKit/TI_Android_JB_4_2_2_DevKit_4_1_1/index_FDS.html} + {Texas Instruments} (search for \e {BeagleBone Black} in the list of download packages). + + Use the following commands to create an SD card containing the + downloaded image: + + \list 1 + \li Extract the downloaded package: + \code + ~$ tar zxvf ~/Downloads/TI_Android_JB_4.2.2_DevKit_4.1.1_beagleboneblack.tar.gz + \endcode + \li Run beagleboneblack/mkmmc-android.sh: + \code + ~$ cd beagleboneblack + ~/beagleboneblack$ sudo ./mkmmc-android.sh /dev/ + \endcode + \endlist + + \section1 Installing the \B2Q Image + + Then, upgrade the SD card with \B2Q. Use one of the commands below, + depending on whether you are developing for embedded Android or Linux: + + \list + \li \b{\B2QA} + \code + cd + ./Boot2Qt-2.x/beaglebone-eAndroid/images/deploy.sh /dev/ + \endcode + \li \b{\B2QL} + \code + cd + sudo ./Boot2Qt-2.x/beaglebone-eLinux/images/deploy.sh /dev/ + \endcode + \endlist + + After the installation is complete, insert the SD card, power on the device and check that + the \B2Q welcome screen and/or demo appear. + + \section1 Setting up USB Access + + \include b2qt-post-install-setup.qdocinc setting up usb access + + \section1 Configuring a Device Kit in Qt Creator + + \include b2qt-post-install-setup.qdocinc configuring device kit + + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. +*/ + /*! \page qtee-building-and-running.html \title Building and Running an Example @@ -756,6 +837,7 @@ \list \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7 (2012)} \li \l{http://beagleboard.org/hardware-xM}{BeagleBoard-xM} + \li \l{http://beagleboard.org/products/beaglebone%20black}{BeagleBone Black} \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)} \li \l{http://www.raspberrypi.org/faqs}{Raspberry Pi Model B} \endlist -- cgit v1.2.3 From 7d7611c59bb762632de26408306afd4d9201e8a4 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 4 Feb 2014 12:57:26 +0100 Subject: Remove unnecessary sudo Change-Id: I8f02a214a328f2bc7010b1e2b7ddec7a4417abf2 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 1b29b5a..4627d38 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -493,7 +493,7 @@ \code ~/$ mkdir bd-android ~/$ cd bd-android - ~/bd-android$ sudo tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz + ~/bd-android$ tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz \endcode \li Run device/boundary/mksdcard.sh: \code -- cgit v1.2.3 From daece6e6a90095fd99bf7b9b98c7e9ea955b1c3e Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 4 Feb 2014 15:55:49 +0100 Subject: Update version numbers of B2Qt utils Change-Id: Ia5fde905e9232424a9504a24f1ac8b2a05a8cb59 Reviewed-by: Samuli Piippo --- .qmake.conf | 2 +- src/utils/utils.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.qmake.conf b/.qmake.conf index 53aeb41..d253d07 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,2 +1,2 @@ load(qt_build_config) -MODULE_VERSION=1.0.0 +MODULE_VERSION=2.0.0 diff --git a/src/utils/utils.pro b/src/utils/utils.pro index a15231f..e28b111 100644 --- a/src/utils/utils.pro +++ b/src/utils/utils.pro @@ -1,5 +1,5 @@ TARGET = QtDroidUtils -VERSION = 5 +VERSION = 5.2 CONFIG += dll warn_on QT = core network -- cgit v1.2.3 From a7fe929aae9d5f71a776b4fc8d250b4fd304299f Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 4 Feb 2014 14:50:50 +0100 Subject: Fixes: get/set hostname & ipadress on eandroid And generally simplify by sharing implementation between linux and android when possible. Change-Id: I572f1076cd5f9df7f7a3ab94b9b30d575a962915 Reviewed-by: Samuli Piippo Reviewed-by: Gatis Paeglis --- src/utils/qdroidutils.cpp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 0952345..52b9fb3 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -20,16 +20,15 @@ #include #include #include - -#ifdef Q_OS_ANDROID_NO_SDK -#include -#include -#include -#else #include #include #include #include + +#ifdef Q_OS_ANDROID_NO_SDK +#include +#include +#include #endif /*! @@ -40,11 +39,7 @@ void QDroidUtils::rebootSystem() { sync(); -#ifdef Q_OS_ANDROID_NO_SDK - (void)android_reboot(ANDROID_RB_RESTART, 0, 0); -#else reboot(RB_AUTOBOOT); -#endif qWarning("reboot returned"); } @@ -56,11 +51,7 @@ void QDroidUtils::rebootSystem() void QDroidUtils::powerOffSystem() { sync(); -#ifdef Q_OS_ANDROID_NO_SDK - (void)android_reboot(ANDROID_RB_POWEROFF, 0, 0); -#else reboot(RB_POWER_OFF); -#endif qWarning("powerOff returned"); } @@ -234,16 +225,12 @@ bool QDroidUtils::setDisplayBrightness(quint8 value) QString QDroidUtils::getIPAddress() { QStringList addresses; -#ifdef Q_OS_ANDROID_NO_SDK - qDebug("QDroidUtils::getIPAddress()"); -#else QNetworkInterface interface = QNetworkInterface::interfaceFromName("eth0"); QList entries; entries = interface.addressEntries(); foreach (const QNetworkAddressEntry &entry, entries) { addresses.append(entry.ip().toString().split('%').first()); } -#endif return addresses.join(QStringLiteral(", ")); } @@ -254,7 +241,10 @@ QString QDroidUtils::getHostname() { QString hostname; #ifdef Q_OS_ANDROID_NO_SDK - qDebug("QDroidUtils::getHostname()"); + char prop_value[PROPERTY_VALUE_MAX]; + int len = property_get("net.hostname", prop_value, 0); + if (len) + hostname = QString::fromLocal8Bit(prop_value, len); #else hostname = QHostInfo::localHostName(); #endif @@ -267,7 +257,7 @@ QString QDroidUtils::getHostname() bool QDroidUtils::setHostname(QString hostname) { #ifdef Q_OS_ANDROID_NO_SDK - qDebug("QDroidUtils::setHostname()"); + property_set("net.hostname", hostname.toLocal8Bit().constData()); #else QFile file("/etc/hostname"); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { -- cgit v1.2.3 From 50772bc6a8ea0780735de1c36e62ff4c167a5fcf Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 5 Feb 2014 10:03:06 +0200 Subject: Fix udev rule for newer versions of ubuntu uaccess is used instead of udev-acl in Ubuntu 13.04 and later. More info: https://wiki.archlinux.org/index.php/Talk:Udev Change-Id: I353fb8b873eff83288c6a01daadb46f17012255f Reviewed-by: Rainer Keller --- src/doc/src/b2qt-post-install-setup.qdocinc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index d5c55cf..983b958 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -27,7 +27,7 @@ \li Run the following command in a shell: \code - echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="udev-acl"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules + echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", TAG+="udev-acl", TAG+="uaccess"' | sudo tee -a /etc/udev/rules.d/70-boot2qt.rules \endcode \li Connect the running device to the development host with a USB -- cgit v1.2.3 From bd7d57e8d1729f5fb749f857d9d739ba0a1877d8 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 5 Feb 2014 14:15:52 +0100 Subject: Doc: Fix external links Fix links to external pages and separate them as their own qdoc file. Change-Id: Ia41b53f7480b9a9d76d8785d478d3e07c384670e Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt-external-pages.qdoc | 43 ++++++++++++++++++++++++++++++++++++ src/doc/src/b2qt.qdoc | 13 +++++------ 2 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 src/doc/src/b2qt-external-pages.qdoc diff --git a/src/doc/src/b2qt-external-pages.qdoc b/src/doc/src/b2qt-external-pages.qdoc new file mode 100644 index 0000000..f6e6e4c --- /dev/null +++ b/src/doc/src/b2qt-external-pages.qdoc @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use the contact form at +** http://qt.digia.com/ +** +** This file is part of Qt Enterprise Embedded. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** the contact form at http://qt.digia.com/ +** +****************************************************************************/ + +/*! + \externalpage http://qt.digia.com/Product/Qt-for-Embedded-Development/Qt-Enterprise-Embedded/Supported-Modules-and-Known-Issues/ + \title Known Issues +*/ + +/*! + \externalpage http://qt.digia.com/Product/Qt-for-Embedded-Development/Qt-Enterprise-Embedded/ + \title product page +*/ + +/*! + \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Qt-Quick-Enterprise-Controls/ + \title Qt Quick Enterprise Controls +*/ + +/*! + \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Qt-Virtual-Keyboard/ + \title Qt Virtual Keyboard +*/ + +/*! + \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Charts/ + \title Qt Charts +*/ diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4627d38..3fcf594 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -87,8 +87,8 @@ \e{\b{\B2Q}} is a light-weight, Qt-optimized, full software stack for embedded systems that is installed into the actual target device. This is - done by flashing the device’s memory card or device's internal memory - directly with a pre-built image that comes with the development environment. + done by flashing the device's memory card or internal memory directly with a + pre-built image that comes with the development environment. \B2Q supports two different operating systems: @@ -162,8 +162,7 @@ this section and perform all the described tasks. In case of problems, see the \l{Troubleshooting} information and the - \e {Known Issues} on the Qt Enterprise Embedded product page in the Digia customer - portal. + \l {Known Issues} in \SDK \l {product page}. \target Requirements for Development Host \section1 Requirements for Development Host @@ -859,7 +858,7 @@ \SDK is licensed under the Qt Enterprise commercial license. For more information, see \l {http://qt.digia.com/licensing}. Evaluation licenses are also available, - see \l {http://qt.digia.com/Products/Qt-Enterprise-Embedded}. + see \l {product page}{\SDK} on qt.digia.com. \section1 3rd Party Software Licenses @@ -880,8 +879,8 @@ \previouspage qtee-customization.html \nextpage qtee-licenses.html - \note An updated version of this information may be available in the Digia - customer portal, in the \e{Known Issues} section on the \SDK product page. + \note An updated version of this information may be available in Digia customer portal, + see \l {Known Issues} in \SDK \l {product page}. \section1 General Issues -- cgit v1.2.3 From ee9274a7de9a48d02c4a160499510a79dec2e658 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 5 Feb 2014 14:19:27 +0100 Subject: Doc: Bump Yocto release version in documentation Change-Id: I50cde4aa039fcbf800e4a24f984a62dc377fa01c Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 3fcf594..e6676c2 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -101,8 +101,8 @@ forefront. \li \b{\B2QL} where the software stack is using the traditional embedded - Linux kernel built with the Yocto Poky reference system (Yocto 1.4 - \e Dylan release). The Embedded Linux variant is designed for great + Linux kernel built with the Yocto Poky reference system (Yocto 1.5 + \e Dora release). The Embedded Linux variant is designed for great customization possibilities. It contains only components required in the embedded device, resulting in smaller image sizes while keeping valuable development tools available. -- cgit v1.2.3 From 1b6fd6de76b4491902f519438ca0b8ed7582daa9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 4 Feb 2014 14:15:49 +0100 Subject: Doc: Add Android GCC run-time licensing information Add license information specific to the libstdc++ library used in the embedded Android images to the documentation. Task-number: QTEE-306 Change-Id: I31cf6c1667a1af1638ff1d1b984321712d50ab26 Reviewed-by: Samuli Piippo Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e6676c2..c85513b 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -865,12 +865,28 @@ The third-party licenses used in \SDK are listed in the file \c {/Licenses/ThirdPartySoftware_Listing.txt}. - \section2 Embedded Android Images + \section1 Embedded Android Images The embedded Android platform is built from the \e {Android Open Source Project}, source code available at \l {http://android.googlesource.com/}. The open source licenses and notices are collected into the file \c {/etc/NOTICE.html.gz} in the target images. + + \section1 Android GNU C++ Run-time Licensing + + The Android platform does not provide a full implementation of the C++ run-time. Instead, + apps that depend on features such as STL, exceptions, or RTTI, must include an additional + native run-time library that provides the features they need. + + \B2QA uses the GNU libstdc++ library distributed as part of the \e {Android Open Source Project}. + This library is included in the images for \B2QA, and will be loaded by the application + on start-up to meet the run-time requirements of Qt. + + The GNU C++ run-time is licensed under the + \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_gpl.html}{GNU General Public License version 3} with + an exception which grants permission for run-time linking and usage of the library by an application which + would otherwise violate the terms of the main license. For more information about this exception, see + \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html}{the official license page}. */ /*! -- cgit v1.2.3 From 2b81193fa8837116942aed19ed68c00e20cc8ece Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 7 Feb 2014 11:33:40 +0100 Subject: Disable QConnectivity daemon on emulator Once we will know how, we can use this daemon to enable internet on emulator as well. Change-Id: I01eaa9a56cecfc92dfc5bc0cfb3ce6c3b482e610 Reviewed-by: Eirik Aavitsland --- src/qconnectivity/main.cpp | 46 +++++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp index 4095c45..fb8b857 100644 --- a/src/qconnectivity/main.cpp +++ b/src/qconnectivity/main.cpp @@ -76,6 +76,7 @@ protected slots: void sendReply(QLocalSocket *requester, const QByteArray &reply) const; void updateLease(); void handleError(QLocalSocket::LocalSocketError /*socketError*/) const; + bool isEmulator() const; private: friend class LeaseTimer; @@ -118,22 +119,41 @@ QConnectivityDaemon::QConnectivityDaemon() : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0) { qDebug() << "starting QConnectivityDaemon..."; + if (isEmulator()) { + // ### TODO - init Internet setup on emulator + } else { + initNetdConnection(); + m_leaseTimer = new LeaseTimer(this); + m_leaseTimer->setSingleShot(true); + connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease())); + + int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (serverFd != -1) { + m_serverSocket = new QLocalServer(this); + if (m_serverSocket->listen(serverFd)) + connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection())); + else + qWarning() << "QConnectivityDaemon: not able to listen on the server socket..."; + } else { + qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; + } + } +} - initNetdConnection(); - m_leaseTimer = new LeaseTimer(this); - m_leaseTimer->setSingleShot(true); - connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease())); - - int serverFd = socket_local_server("qconnectivity", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); - if (serverFd != -1) { - m_serverSocket = new QLocalServer(this); - if (m_serverSocket->listen(serverFd)) - connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection())); - else - qWarning() << "QConnectivityDaemon: not able to listen on the server socket..."; +bool QConnectivityDaemon::isEmulator() const +{ + bool isEmulator = false; + QString content; + QFile conf("/system/bin/appcontroller.conf"); + if (conf.open(QIODevice::ReadOnly)) { + QTextStream stream(&conf); + content = stream.readAll(); + isEmulator = content.contains("platform=emulator"); } else { - qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; + qWarning() << "Failed to read appcontroller.conf"; } + conf.close(); + return isEmulator; } void QConnectivityDaemon::initNetdConnection() -- cgit v1.2.3 From 94a21c6ea25c6d363cfc7d5a402638de40e9b254 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 5 Feb 2014 14:21:13 +0100 Subject: Doc: Add changelog Change-Id: Iba235b61d96981765fb2e94be572e46a31a93b82 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 84 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index c85513b..4bbc5f5 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -51,6 +51,7 @@ \endlist \li \l{Building and Running an Example} \li \l{Customization} + \li \l{ChangeLog} \li \l{Troubleshooting} \li \l{License Information} \endlist @@ -722,7 +723,7 @@ \page qtee-customization.html \title Customization \previouspage qtee-building-and-running.html - \nextpage qtee-troubleshooting.html + \nextpage qtee-changelog.html \section1 Environment and Input @@ -816,7 +817,7 @@ \page qtee-supported-platforms.html \title Supported Platforms \previouspage qtee-installation-guide.html - \nextpage qtee-preparing-hardware.html + \nextpage qtee-changelog.html \section1 Supported Target Devices @@ -889,10 +890,87 @@ \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html}{the official license page}. */ +/*! + \page qtee-changelog.html + \title ChangeLog + \previouspage qtee-customization.html + \nextpage qtee-troubleshooting.html + + \section1 \B2Q 2.0.0 + + \list + \li Release date: February 2014 + \endlist + + \section2 Changes + \b {New Features}: + \list + \li \B2Q stack was updated to use Qt 5.2.1 on embedded Android and Linux + \li Building your own \B2Q embedded Linux stack was enabled + \li Emulator graphics performance and quality was improved (GL-streaming) + \li BeagleBone Black was added as a reference device + \li \l {Qt Virtual Keyboard} was integrated into \B2Q + \li \l {Qt Quick Enterprise Controls} was added to the \B2Q stack + \li \l {Qt Charts} was added to the \B2Q stack + \li \B2Q source code was made available via online installer + \li WiFi networking support/configuration were implemented on embedded Android + \li Ethernet connectivity was enabled on embedded Android + \endlist + + \b {Improvements}: + \list + \li Updated GDB for embedded Android toolchain + \li Enterprise demos (Charts, Enterprise Controls) were added + \li Embedded Linux: Moved to use Yocto 1.5 (Dora) + \li Demos available as examples in Qt Creator + \li Embedded Android emulator updated to Android 4.2.2 + \endlist + + \b {Fixed Bugs}: + \list + \li Embedded Android emulator: Missing Mesa headers + \li Embedded Linux emulator: Black screen in camera demo + \li Emulator tries to load host plugins + \li Sensors not working in emulators + \li Empty \c HOME environment variable in processes launched by appcontroller + \li Black screen after exiting the last Qt application on Nexus 7 + \li Embedded Android emulator: C++ debugging fails + \li Qt add-ons not installed to host + \endlist + + \b {Fixed Known Issues}: + \list + \li Qt SQL: QML LocalStorage Fails to Connect to Database on Embedded Android + \li Qt XML Patterns: Module not Available on embedded Android + \li Qt Multimedia: Audio is Muted on Nexus 7 + \li Unnecessary Warnings Displayed by the Installer + \li Virtual Keyboard: Backspace Removes Two Characters + \endlist + + \section1 \B2Q 1.0.1 + + \list + \li Release date: Dec. 5, 2013 + \endlist + + \section2 Changes + \list + \li Emulator: Remote control widget version shown together with emulator version + \li Emulator: Mouse events are sent instead of touch events + \li Emulator: Raster window support added + \li Emulator: emulatorproxyd shows its version on startup + \li Emulator: Detect some network problems + \li Emulator: Fixed issues related to startup + \li Emulator: Updated source code license headers + \li Emulator: Show all VirtualBox errors + \li Emulator: Video playback support on embedded Linux + \endlist +*/ + /*! \page qtee-troubleshooting.html \title Troubleshooting - \previouspage qtee-customization.html + \previouspage qtee-changelog.html \nextpage qtee-licenses.html \note An updated version of this information may be available in Digia customer portal, -- cgit v1.2.3 From bfa2c071980d7e139ded0128f97118fef53bf9ea Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 7 Feb 2014 13:48:12 +0100 Subject: Doc: Use a global Qt documentation template Remove the local copy of the template and use a global Qt one instead. Also, bump the year used in the template footer and fix the link to privacy policy. Task-number: QTEE-272 Change-Id: Ied82bb046a8a6bb6159c0446cfac903adf72b622 Reviewed-by: Eirik Aavitsland --- src/doc/config/html-offline.qdocconf | 39 +- src/doc/config/template/images/arrow_bc.png | Bin 1071 -> 0 bytes src/doc/config/template/images/bgrContent.png | Bin 149 -> 0 bytes src/doc/config/template/images/blu_dot.png | Bin 168 -> 0 bytes src/doc/config/template/images/btn_next.png | Bin 689 -> 0 bytes src/doc/config/template/images/btn_prev.png | Bin 676 -> 0 bytes src/doc/config/template/images/home.png | Bin 1076 -> 0 bytes src/doc/config/template/images/ico_note.png | Bin 649 -> 0 bytes .../config/template/images/ico_note_attention.png | Bin 529 -> 0 bytes src/doc/config/template/images/ico_out.png | Bin 362 -> 0 bytes src/doc/config/template/style/offline.css | 628 --------------------- 11 files changed, 5 insertions(+), 662 deletions(-) delete mode 100644 src/doc/config/template/images/arrow_bc.png delete mode 100644 src/doc/config/template/images/bgrContent.png delete mode 100644 src/doc/config/template/images/blu_dot.png delete mode 100644 src/doc/config/template/images/btn_next.png delete mode 100644 src/doc/config/template/images/btn_prev.png delete mode 100644 src/doc/config/template/images/home.png delete mode 100644 src/doc/config/template/images/ico_note.png delete mode 100644 src/doc/config/template/images/ico_note_attention.png delete mode 100644 src/doc/config/template/images/ico_out.png delete mode 100644 src/doc/config/template/style/offline.css diff --git a/src/doc/config/html-offline.qdocconf b/src/doc/config/html-offline.qdocconf index cd95334..29a5613 100644 --- a/src/doc/config/html-offline.qdocconf +++ b/src/doc/config/html-offline.qdocconf @@ -1,36 +1,7 @@ -HTML.nobreadcrumbs = "true" - -HTML.stylesheets = template/style/offline.css - -# Copy images used by the template to images folder in output directory -HTML.extraimages = template/images/bgrContent.png \ - template/images/blu_dot.png \ - template/images/btn_next.png \ - template/images/btn_prev.png \ - template/images/ico_note.png \ - template/images/ico_note_attention.png \ - template/images/ico_out.png \ - template/images/arrow_bc.png \ - template/images/home.png +# use the global Qt template with modifications to the html footer +include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) -# Add style-related files into qch package -qhp.extraFiles += style/offline.css \ - images/bgrContent.png \ - images/blu_dot.png \ - images/btn_next.png \ - images/btn_prev.png \ - images/ico_note.png \ - images/ico_note_attention.png \ - images/ico_out.png \ - images/home.png \ - images/arrow_bc.png - -HTML.headerstyles = \ - " \n" - -HTML.endheader = \ - "\n" \ - "\n" +HTML.nobreadcrumbs = "true" HTML.footer = \ "
\n" \ @@ -39,7 +10,7 @@ HTML.footer = \ "
\n" \ "
\n" \ "

\n" \ - " © 2013 Digia Plc and/or its\n" \ + " © 2014 Digia Plc and/or its\n" \ " subsidiaries.

\n" \ "

\n" \ " Licensees holding valid Qt Commercial licenses may use this document in\n" \ @@ -50,5 +21,5 @@ HTML.footer = \ " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \ " in Finland and/or other countries worldwide. All other trademarks are property\n" \ " of their respective owners. Privacy Policy

\n" \ + " href=\"http://qt.digia.com/Digia-Legal-Notice--Privacy-Policy/\">Privacy Policy

\n" \ "
\n" diff --git a/src/doc/config/template/images/arrow_bc.png b/src/doc/config/template/images/arrow_bc.png deleted file mode 100644 index f2a83a5..0000000 Binary files a/src/doc/config/template/images/arrow_bc.png and /dev/null differ diff --git a/src/doc/config/template/images/bgrContent.png b/src/doc/config/template/images/bgrContent.png deleted file mode 100644 index 1a81b03..0000000 Binary files a/src/doc/config/template/images/bgrContent.png and /dev/null differ diff --git a/src/doc/config/template/images/blu_dot.png b/src/doc/config/template/images/blu_dot.png deleted file mode 100644 index c332148..0000000 Binary files a/src/doc/config/template/images/blu_dot.png and /dev/null differ diff --git a/src/doc/config/template/images/btn_next.png b/src/doc/config/template/images/btn_next.png deleted file mode 100644 index f7bc2b7..0000000 Binary files a/src/doc/config/template/images/btn_next.png and /dev/null differ diff --git a/src/doc/config/template/images/btn_prev.png b/src/doc/config/template/images/btn_prev.png deleted file mode 100644 index 10a620c..0000000 Binary files a/src/doc/config/template/images/btn_prev.png and /dev/null differ diff --git a/src/doc/config/template/images/home.png b/src/doc/config/template/images/home.png deleted file mode 100644 index 8de6d0c..0000000 Binary files a/src/doc/config/template/images/home.png and /dev/null differ diff --git a/src/doc/config/template/images/ico_note.png b/src/doc/config/template/images/ico_note.png deleted file mode 100644 index 1379404..0000000 Binary files a/src/doc/config/template/images/ico_note.png and /dev/null differ diff --git a/src/doc/config/template/images/ico_note_attention.png b/src/doc/config/template/images/ico_note_attention.png deleted file mode 100644 index b85b696..0000000 Binary files a/src/doc/config/template/images/ico_note_attention.png and /dev/null differ diff --git a/src/doc/config/template/images/ico_out.png b/src/doc/config/template/images/ico_out.png deleted file mode 100644 index ff6e458..0000000 Binary files a/src/doc/config/template/images/ico_out.png and /dev/null differ diff --git a/src/doc/config/template/style/offline.css b/src/doc/config/template/style/offline.css deleted file mode 100644 index 3bab27b..0000000 --- a/src/doc/config/template/style/offline.css +++ /dev/null @@ -1,628 +0,0 @@ -body{ -font: normal 400 14px/1.2 Arial; -margin-top:85px; -font-family: Arial, Helvetica; -color:#313131; -text-align:justify; -margin-left:5px; -margin-right:5px; -} - -img{ --moz-box-shadow: 3px 3px 3px #ccc; --webkit-box-shadow: 3px 3px 3px #ccc; -box-shadow: 3px 3px 3px #ccc; -border:#8E8D8D 2px solid; -margin-left:0px; -max-width: 800px; -height: auto -} - -b{ -font-weight:600; -} - -.content{} - -.descr{ -margin-top:35px; -/*max-width: 75%;*/ -margin-left:5px; -text-align:justify; -min-height:700px; -vertical-align:top; -} - -.name{ -max-width: 75%; -font-weight:100; -} - -tt{ -text-align:left;} - -/* ------------ -links ------------ -*/ - -a:link{ -color: #2C418D; -text-decoration: none; -text-align:left; -} - -a:hover{ -color: #869CD1; -text-decoration:underline; -text-align:left; -} - -a:visited{ -color: #869CD1; -text-decoration: none; -text-align:left; -} - -a:visited:hover{ -text-decoration:underline; -text-align:left; -} - -a[href*="http://"], a[href*="ftp://"],a[href*="https://"] -{ -text-decoration: none; -background-image:url(../images/ico_out.png); -background-repeat:no-repeat; -background-position:left; -padding-left:20px; -text-align:left; -} - -.flags{ -text-decoration:none; -text-height:24px; -} - -/* -------------------------------- -NOTE styles -------------------------------- -*/ -.notetitle, .tiptitle, .fastpathtitle{ -font-weight:bold; -} - -.attentiontitle,.cautiontitle,.dangertitle,.importanttitle,.remembertitle,.restrictiontitle{ -font-weight:bold; -} - -.note,.tip,.fastpath{ -background: #F2F2F2 url(../images/ico_note.png); -background-repeat: no-repeat; -background-position: top left; -padding:5px; -padding-left:40px; -padding-bottom:10px; -border:#999 1px dotted; -color:#666666; -margin:5px; -} - -.attention,.caution,.danger,.important,.remember,.restriction{ -background: #F2F2F2 url(../images/ico_note_attention.png); -background-repeat:no-repeat; -background-position:top left; -padding:5px; -padding-left:40px; -padding-bottom:10px; -border:#999 1px dotted; -color:#666666; -margin:5px; -} - -/* -------------------------------- -Top navigation -------------------------------- -*/ - -.header{ - -height:1px; -padding:0px; -margin:0px; -} - -.qtref{ -display: block; -position: relative; -top: -76px; -height:15px; -z-index: 1; -font-size:11px; -padding-right:10px; -float:right; -} - -.naviNextPrevious{ -display: block; -position: relative; -text-align: right; -top: -53px; -float:right; -height:20px; -z-index:1; -padding-right:10px; -padding-top:2px; -vertical-align:top; -margin:0px; -} - - -.naviNextPrevious > a.prevPage { -background-image:url(../images/btn_prev.png); -background-repeat:no-repeat; -background-position:left; -padding-left:20px; -height:20px; -padding-left:20px; -} - -.naviNextPrevious > a.nextPage { -background-image:url(../images/btn_next.png); -background-repeat:no-repeat; -background-position:right; -padding-right:20px; -height:20px; -margin-left:30px; -} - -.breadcrumb{ -display: block; -position: relative; -top:-20px; -/*border-top:2px solid #ffffff;*/ -border-bottom: 1px solid #cecece; -background-color:#F2F2F2; -z-index:1; -height:20px; -padding:0px; -margin:0px; -padding-left:10px; -padding-top:2px; -margin-left:-5px; -margin-right:-5px; -} - -.breadcrumb ul{ - margin:0px; - padding:0px; -} - -.breadcrumb ul li{ -background-color:#F2F2F2; -list-style-type:none; -padding:0; -margin:0; -height:20px; -} - -.breadcrumb li{ -float:left; -} - -.breadcrumb .first { -background:url(../images/home.png); -background-position:left; -background-repeat:no-repeat; -padding-left:20px; -} - - -.breadcrumb li a{ -color:#2C418D; -display:block; -text-decoration:none; -background:url(../images/arrow_bc.png); -background-repeat:no-repeat; -background-position:right; -padding-right:25px; -padding-left:10px; -} - -.breadcrumb li a:hover{ -color:#909090; -display:block; -text-decoration:none; -background:url(../images/arrow.png); -background-repeat:no-repeat; -background-position:right; -padding-right:20px; -padding-left:10px; -} - - -/* table of content -no display -*/ - -/* ------------ -headers ------------ -*/ - - -@media screen{ -.title{ -color:#313131; -font-size: 18px; -font-weight: normal; -left: 0; -padding-bottom: 20px; -padding-left: 10px; -padding-top: 20px; -position: absolute; -right: 0; -top: 0; -background-color:#E6E6E6; -border-bottom: 1px #CCC solid; -border-top: 2px #CCC solid; -font-weight:bold; -margin-left:0px; -margin-right:0px; -} -} - -h1 { -margin: 0; -} - -h2, p.h2 { -font: 500 16px/1.2 Arial; -font-weight:100; -background-color:#F2F3F4; -padding:4px; -padding-left: 14px; -margin-bottom:30px; -margin-top:30px; -margin-left: -10px; -margin-right: -5px; -border-top:#E0E0DE 1px solid; -border-bottom: #E0E0DE 1px solid; -} - -h3{ - -font: 500 14px/1.2 Arial; -font-weight:100; -text-decoration:underline; -margin-bottom:30px; -margin-top:30px; -} - -h3.fn,span.fn{ -border-width: 1px; -border-style: solid; -border-color: #E6E6E6; --moz-border-radius: 7px 7px 7px 7px; --webkit-border-radius: 7px 7px 7px 7px; -border-radius: 7px 7px 7px 7px; -background-color: #F6F6F6; -word-spacing: 3px; -padding: 5px 5px; -text-decoration:none; -font-weight:bold; -max-width:75%; -font-size:14px; -margin:0px; -margin-top:30px; - -} - -.name{ -color:#1A1A1A; -} -.type{ -color:#808080; -} - - - -@media print { -.title { -color:#0066CB; -font-family:Arial, Helvetica; -font-size: 32px; -font-weight: normal; -left: 0; -position: absolute; -right: 0; -top: 0; -} -} - - -/* ------------------ -table styles ------------------ -*/ -.table img { -border:none; -margin-left:0px; --moz-box-shadow:0px 0px 0px #fff; --webkit-box-shadow: 0px 0px 0px #fff; -box-shadow: 0px 0px 0px #fff; -} - -/* table with border alternative colors*/ - - table,pre{ --moz-border-radius: 7px 7px 7px 7px; --webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; -background-color: #F6F6F6; -border: 1px solid #E6E6E6; -border-collapse: separate; -font-size: 12px; -line-height: 1.2; -margin-bottom: 25px; -margin-left: 15px; -font-size: 12px; -line-height: 1.2; -margin-bottom: 25px; -margin-left: 15px; -} - - -table th{ -text-align:left; -padding-left:20px; -} - -table td { -padding: 3px 15px 3px 20px; -border-bottom:#CCC dotted 1px; -} -table p { margin:0px;} - -table tr.even { -background-color: white; -color: #66666E; -} - -table tr.odd { -background-color: #F6F6F6; -color: #66666E; -} - - -table thead { -text-align:left; -padding-left:20px; -background-color:#e1e0e0; -border-left:none; -border-right:none; -} - -table thead th { -padding-top:5px; -padding-left:10px; -padding-bottom:5px; -border-bottom: 2px solid #D1D1D1; -padding-right:10px; -} - - -/* table bodless & white*/ - -.borderless { -border-radius: 0px 0px 0px 0px; -background-color: #fff; -border: 1px solid #fff; -} - -.borderless tr { -background-color: #FFF; -color: #66666E; -} - -.borderless td { -border:none; -border-bottom:#fff dotted 1px; -} - -/* ------------ -List ------------ -*/ - -ul{ -padding-bottom:2px; -} - -li { -margin-bottom: 10px; -padding-left: 8px; -list-style:outside; -list-style-type:square; -text-align:left; -} - - -ol{ -margin:10px; -padding:0; -} - -ol > li{ -margin-left: 30px; -padding-left:8px; -list-style:decimal; -} - -.centerAlign{ -text-align: left; -} - -.cpp{ -display: block; -margin: 10; -overflow: hidden; -overflow-x: hidden; -overflow-y: hidden; -padding: 20px 0 20px 0; -} - -.footer{ -margin-top: 50px; -padding-left:5px; -margin-bottom: 10px; -font-size:10px; -border-top: 1px solid #999; -padding-top:11px; -} - -.footer a[href*="http://"], a[href*="ftp://"],a[href*="https://"]{ -background-size: 13px 11px; -padding-left: 16px; -} - -.footerNavi{ -width:auto; -text-align:right; -margin-top:50px; -z-index:1; -} - -.memItemLeft{ -padding-right: 3px; -} - -.memItemRight{ -padding: 3px 15px 3px 0; -} - -.qml{ -display: block; -margin: 10; -overflow: hidden; -overflow-x: hidden; -overflow-y: hidden; -padding: 20px 0 20px 0; -} - -.qmldefault{ -padding-left: 5px; -float: right; -color: red; -} - -.qmlreadonly{ -padding-left: 5px; -float: right; -color: #254117; -} - -.rightAlign{ -padding: 3px 5px 3px 10px; -text-align: right; -} - -/* ------------ -Content table ------------ -*/ - -@media print{ -.toc { -float: right; -padding-bottom: 10px; -padding-top: 50px; -width: 100%; -background-image:url(../images/bgrContent.png); -background-position:top; -background-repeat:no-repeat; -} -} - -@media screen{ -.toc{ -clear:both; -float:right; -vertical-align:top; --moz-border-radius: 7px 7px 7px 7px; --webkit-border-radius: 7px 7px 7px 7px; -border-radius: 7px 7px 7px 7px; - background:#FFF url(../images/bgrContent.png); -background-position:top; -background-repeat:repeat-x; -border: 1px solid #E6E6E6; -padding-left:5px; -padding-bottom:10px; -height: auto; -width: 200px; -text-align:left; -z-index:2; -margin-left:20px; -margin-right:20px; -margin-top:0px; -padding-top:0px; -} -} - -.toc h3{ -text-decoration:none; -} - -.toc h3{font: 500 14px/1.2 Arial; -font-weight:100; -padding:0px; -margin:0px; -padding-top:5px; -padding-left:5px; -} - - -.toc ul{ -width:160px; -padding-left:10px; -padding-right:5px; -padding-top:10px; -} - -.toc ul li{ -margin-left:20px; -list-style-image:url(../images/blu_dot.png); -list-style:outside; - -} - - -.toc ul li a:link{ -color: #2C418D; -text-decoration: none; -} - -.toc ul li a:hover{ -color: #869CD1; -text-decoration:underline; - -} - -.toc ul li a:visited{ -color: #869CD1; -font-weight: bold; -} - -.level1{ -border:none;} - -.clearfix{ -clear:both;} - -- cgit v1.2.3 From b3eff1babcc6d45e10c80078c0c27ce7782c9695 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 10 Feb 2014 13:50:08 +0100 Subject: Doc: ChangeLog: Remove 'black screen after exit' from bugfixes This bug still exists for 2.0 Change-Id: I6703e247a9d890276163dfed7ecc99c59bee4592 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4bbc5f5..39c9f95 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -933,7 +933,6 @@ \li Emulator tries to load host plugins \li Sensors not working in emulators \li Empty \c HOME environment variable in processes launched by appcontroller - \li Black screen after exiting the last Qt application on Nexus 7 \li Embedded Android emulator: C++ debugging fails \li Qt add-ons not installed to host \endlist -- cgit v1.2.3 From 0aa007f78b412ca5591b8d8c07039166055037d9 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 12 Feb 2014 11:00:18 +0100 Subject: Doc: Fix the 2.0 release date Change-Id: I329ce97d32a1d1745fc5da1a939603c500940b00 Reviewed-by: Kalle Viironen --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 39c9f95..4e14b8c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -899,7 +899,7 @@ \section1 \B2Q 2.0.0 \list - \li Release date: February 2014 + \li Release date: Feb. 25, 2014 \endlist \section2 Changes -- cgit v1.2.3 From b7347b14ba53a3d847ec783855a2c46101fafac3 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 11 Feb 2014 13:48:34 +0100 Subject: Update copyright year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic818e79d7bfca04bd8a8d8aa12b3ff70ea26a7a3 Reviewed-by: Topi Reiniö --- src/doc/src/b2qt-external-pages.qdoc | 2 +- src/doc/src/b2qt-post-install-setup.qdocinc | 2 +- src/doc/src/b2qt.qdoc | 2 +- src/doc/src/detect-sd-card-device-name.qdocinc | 2 +- src/doppelganger/main.cpp | 2 +- src/doppelganger/permissioncontroller.cpp | 2 +- src/doppelganger/permissioncontroller.h | 2 +- src/doppelganger/schedulingpolicyservice.cpp | 2 +- src/doppelganger/schedulingpolicyservice.h | 2 +- src/imports/nativemedia/SurfaceTexture.cpp | 2 +- src/imports/nativemedia/SurfaceTexture.h | 2 +- src/imports/nativemedia/main.cpp | 2 +- src/imports/nativemedia/omx.cpp | 2 +- src/imports/nativemedia/omxmodule.cpp | 2 +- src/imports/nativemedia/omxnode.cpp | 2 +- src/imports/nativemedia/omxnode.h | 2 +- src/imports/nativemedia/omxplayer.h | 2 +- src/imports/nativemedia/test.qml | 2 +- src/imports/utils/plugin.cpp | 2 +- src/imports/wifi/pluginmain.cpp | 2 +- src/imports/wifi/qwifimanager.cpp | 2 +- src/imports/wifi/qwifimanager.h | 2 +- src/imports/wifi/qwifinetwork.cpp | 2 +- src/imports/wifi/qwifinetwork.h | 2 +- src/imports/wifi/qwifinetworklist.cpp | 2 +- src/imports/wifi/qwifinetworklist.h | 2 +- src/plugins/sensors/eandroid/eandroidaccelerometer.cpp | 2 +- src/plugins/sensors/eandroid/eandroidaccelerometer.h | 2 +- src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp | 2 +- src/plugins/sensors/eandroid/eandroidambientlightsensor.h | 2 +- src/plugins/sensors/eandroid/eandroidbasesensor.cpp | 2 +- src/plugins/sensors/eandroid/eandroidbasesensor.h | 2 +- src/plugins/sensors/eandroid/eandroidgyroscope.cpp | 2 +- src/plugins/sensors/eandroid/eandroidgyroscope.h | 2 +- src/plugins/sensors/eandroid/eandroidlight.cpp | 2 +- src/plugins/sensors/eandroid/eandroidlight.h | 2 +- src/plugins/sensors/eandroid/eandroidmagnetometer.cpp | 2 +- src/plugins/sensors/eandroid/eandroidmagnetometer.h | 2 +- src/plugins/sensors/eandroid/eandroidrotationsensor.cpp | 2 +- src/plugins/sensors/eandroid/eandroidrotationsensor.h | 2 +- src/plugins/sensors/eandroid/eandroidsensordevice.cpp | 2 +- src/plugins/sensors/eandroid/eandroidsensordevice.h | 2 +- src/qt_hw_init/main.cpp | 2 +- src/utils/qdroidutils.cpp | 2 +- src/utils/qdroidutils.h | 2 +- 45 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/doc/src/b2qt-external-pages.qdoc b/src/doc/src/b2qt-external-pages.qdoc index f6e6e4c..cce32e8 100644 --- a/src/doc/src/b2qt-external-pages.qdoc +++ b/src/doc/src/b2qt-external-pages.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index 983b958..7fac266 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4e14b8c..3ee3a0a 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doc/src/detect-sd-card-device-name.qdocinc b/src/doc/src/detect-sd-card-device-name.qdocinc index 40d7f51..5f9803b 100644 --- a/src/doc/src/detect-sd-card-device-name.qdocinc +++ b/src/doc/src/detect-sd-card-device-name.qdocinc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doppelganger/main.cpp b/src/doppelganger/main.cpp index 6813b75..e4a06c8 100644 --- a/src/doppelganger/main.cpp +++ b/src/doppelganger/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doppelganger/permissioncontroller.cpp b/src/doppelganger/permissioncontroller.cpp index 15f2313..a759dd7 100644 --- a/src/doppelganger/permissioncontroller.cpp +++ b/src/doppelganger/permissioncontroller.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doppelganger/permissioncontroller.h b/src/doppelganger/permissioncontroller.h index 2e95f79..7feb4b6 100644 --- a/src/doppelganger/permissioncontroller.h +++ b/src/doppelganger/permissioncontroller.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doppelganger/schedulingpolicyservice.cpp b/src/doppelganger/schedulingpolicyservice.cpp index 4b80739..a7a3f17 100644 --- a/src/doppelganger/schedulingpolicyservice.cpp +++ b/src/doppelganger/schedulingpolicyservice.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/doppelganger/schedulingpolicyservice.h b/src/doppelganger/schedulingpolicyservice.h index 6ea12d9..ef56dcd 100644 --- a/src/doppelganger/schedulingpolicyservice.h +++ b/src/doppelganger/schedulingpolicyservice.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/SurfaceTexture.cpp b/src/imports/nativemedia/SurfaceTexture.cpp index 0d1cc00..2f4eb57 100644 --- a/src/imports/nativemedia/SurfaceTexture.cpp +++ b/src/imports/nativemedia/SurfaceTexture.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/SurfaceTexture.h b/src/imports/nativemedia/SurfaceTexture.h index 2df4391..9c72362 100644 --- a/src/imports/nativemedia/SurfaceTexture.h +++ b/src/imports/nativemedia/SurfaceTexture.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/main.cpp b/src/imports/nativemedia/main.cpp index a0727cf..f78c12b 100644 --- a/src/imports/nativemedia/main.cpp +++ b/src/imports/nativemedia/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/omx.cpp b/src/imports/nativemedia/omx.cpp index 72d6eaa..9c68d57 100644 --- a/src/imports/nativemedia/omx.cpp +++ b/src/imports/nativemedia/omx.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/omxmodule.cpp b/src/imports/nativemedia/omxmodule.cpp index 1a5637f..a6e6f4d 100644 --- a/src/imports/nativemedia/omxmodule.cpp +++ b/src/imports/nativemedia/omxmodule.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/omxnode.cpp b/src/imports/nativemedia/omxnode.cpp index 60fbb44..b7ad101 100644 --- a/src/imports/nativemedia/omxnode.cpp +++ b/src/imports/nativemedia/omxnode.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/omxnode.h b/src/imports/nativemedia/omxnode.h index d83b8fc..433f9ec 100644 --- a/src/imports/nativemedia/omxnode.h +++ b/src/imports/nativemedia/omxnode.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/omxplayer.h b/src/imports/nativemedia/omxplayer.h index 827cb79..9127dfc 100644 --- a/src/imports/nativemedia/omxplayer.h +++ b/src/imports/nativemedia/omxplayer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/nativemedia/test.qml b/src/imports/nativemedia/test.qml index 2db3256..ad6a7f2 100644 --- a/src/imports/nativemedia/test.qml +++ b/src/imports/nativemedia/test.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/utils/plugin.cpp b/src/imports/utils/plugin.cpp index 6e53aee..5431061 100644 --- a/src/imports/utils/plugin.cpp +++ b/src/imports/utils/plugin.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index 0eeff78..b1f1bed 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 9139242..8fb8b66 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifimanager.h b/src/imports/wifi/qwifimanager.h index c9ba2ef..432f411 100644 --- a/src/imports/wifi/qwifimanager.h +++ b/src/imports/wifi/qwifimanager.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifinetwork.cpp b/src/imports/wifi/qwifinetwork.cpp index 5b74301..a159e59 100644 --- a/src/imports/wifi/qwifinetwork.cpp +++ b/src/imports/wifi/qwifinetwork.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifinetwork.h b/src/imports/wifi/qwifinetwork.h index e287d7e..780fc87 100644 --- a/src/imports/wifi/qwifinetwork.h +++ b/src/imports/wifi/qwifinetwork.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifinetworklist.cpp b/src/imports/wifi/qwifinetworklist.cpp index 432a07c..60fdc53 100644 --- a/src/imports/wifi/qwifinetworklist.cpp +++ b/src/imports/wifi/qwifinetworklist.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/imports/wifi/qwifinetworklist.h b/src/imports/wifi/qwifinetworklist.h index 9c269b3..84e78fc 100644 --- a/src/imports/wifi/qwifinetworklist.h +++ b/src/imports/wifi/qwifinetworklist.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp index b73b9b6..dea6bbd 100644 --- a/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp +++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidaccelerometer.h b/src/plugins/sensors/eandroid/eandroidaccelerometer.h index 1eaa8f9..fd55a06 100644 --- a/src/plugins/sensors/eandroid/eandroidaccelerometer.h +++ b/src/plugins/sensors/eandroid/eandroidaccelerometer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp index e1f285f..fc26f93 100644 --- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h index 55aacba..4123363 100644 --- a/src/plugins/sensors/eandroid/eandroidambientlightsensor.h +++ b/src/plugins/sensors/eandroid/eandroidambientlightsensor.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp index 005759b..7363234 100644 --- a/src/plugins/sensors/eandroid/eandroidbasesensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidbasesensor.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidbasesensor.h b/src/plugins/sensors/eandroid/eandroidbasesensor.h index af3d6ea..40e48a2 100644 --- a/src/plugins/sensors/eandroid/eandroidbasesensor.h +++ b/src/plugins/sensors/eandroid/eandroidbasesensor.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp index c3b838e..8e303c6 100644 --- a/src/plugins/sensors/eandroid/eandroidgyroscope.cpp +++ b/src/plugins/sensors/eandroid/eandroidgyroscope.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidgyroscope.h b/src/plugins/sensors/eandroid/eandroidgyroscope.h index 5ee53b8..14aa492 100644 --- a/src/plugins/sensors/eandroid/eandroidgyroscope.h +++ b/src/plugins/sensors/eandroid/eandroidgyroscope.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidlight.cpp b/src/plugins/sensors/eandroid/eandroidlight.cpp index 3f292e8..99a8663 100644 --- a/src/plugins/sensors/eandroid/eandroidlight.cpp +++ b/src/plugins/sensors/eandroid/eandroidlight.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidlight.h b/src/plugins/sensors/eandroid/eandroidlight.h index 7317763..d8d3b8b 100644 --- a/src/plugins/sensors/eandroid/eandroidlight.h +++ b/src/plugins/sensors/eandroid/eandroidlight.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp index 6f14e7e..6fd9100 100644 --- a/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp +++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidmagnetometer.h b/src/plugins/sensors/eandroid/eandroidmagnetometer.h index 3cc1715..5feaa13 100644 --- a/src/plugins/sensors/eandroid/eandroidmagnetometer.h +++ b/src/plugins/sensors/eandroid/eandroidmagnetometer.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp index 93d520a..7be52d7 100644 --- a/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp +++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidrotationsensor.h b/src/plugins/sensors/eandroid/eandroidrotationsensor.h index 9499ae2..b94d2e5 100644 --- a/src/plugins/sensors/eandroid/eandroidrotationsensor.h +++ b/src/plugins/sensors/eandroid/eandroidrotationsensor.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp index c8e5912..5570fc6 100644 --- a/src/plugins/sensors/eandroid/eandroidsensordevice.cpp +++ b/src/plugins/sensors/eandroid/eandroidsensordevice.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/plugins/sensors/eandroid/eandroidsensordevice.h b/src/plugins/sensors/eandroid/eandroidsensordevice.h index fcf022a..ed4fbbb 100644 --- a/src/plugins/sensors/eandroid/eandroidsensordevice.h +++ b/src/plugins/sensors/eandroid/eandroidsensordevice.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/qt_hw_init/main.cpp b/src/qt_hw_init/main.cpp index ba9f49b..554004c 100644 --- a/src/qt_hw_init/main.cpp +++ b/src/qt_hw_init/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index 52b9fb3..7ab2098 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ diff --git a/src/utils/qdroidutils.h b/src/utils/qdroidutils.h index 9d833bb..8e70f19 100644 --- a/src/utils/qdroidutils.h +++ b/src/utils/qdroidutils.h @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc +** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use the contact form at ** http://qt.digia.com/ -- cgit v1.2.3 From 7a67c281301590b0f6305fc2cf118d28216b5362 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 12 Feb 2014 11:01:17 +0100 Subject: Doc: Document building your own embedded linux stack Task-number: QTEE-176 Change-Id: I9641ea529f651fe5a19cfa0f0abff48096b26381 Reviewed-by: Eirik Aavitsland Reviewed-by: Samuli Piippo --- src/doc/src/b2qt-external-pages.qdoc | 5 +++ src/doc/src/b2qt.qdoc | 66 ++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/src/doc/src/b2qt-external-pages.qdoc b/src/doc/src/b2qt-external-pages.qdoc index cce32e8..5196095 100644 --- a/src/doc/src/b2qt-external-pages.qdoc +++ b/src/doc/src/b2qt-external-pages.qdoc @@ -41,3 +41,8 @@ \externalpage http://qt.digia.com/Product/Qt-Enterprise-Features/Charts/ \title Qt Charts */ + +/*! + \externalpage https://www.yoctoproject.org/ + \title Yocto Project +*/ diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 3ee3a0a..41e3065 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -811,6 +811,72 @@ } } \endcode + + \section1 Building Your Own Embedded Linux Image + + \B2QL is built using the tools and resources from the \l {Yocto Project}, + and is based on Yocto's reference distribution (\e Poky). You can + use the same tools to build custom \B2Q images, and have control over + which packages are included in the build and how the software stack + is configured. + + \section2 Requirements + + You should be familiar with the Yocto tools and the concept of + \e {recipes}. For more information, see Yocto Project + \l{https://www.yoctoproject.org/documentation/current}{documentation}. + + To get started, you need the following: + + \list + \li Install the \B2Q \e source packages. You can + find these by running the \e MaintenanceTool application + located in the \SDK installation directory and selecting + \e {Package Manager}. The \e {Yocto meta layer} package + contains the additional recipes required to make the image + compatible with \B2Q. + \li Install the dependencies for the Yocto tools. In Ubuntu, + the following packages are required: + \code + sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ + build-essential chrpath libsdl1.2-dev xterm + \endcode + \endlist + + \section2 Setting Up Yocto Build Environment + + Run the setup script that initializes the Yocto environment: + + \code + cd + /Boot2Qt-2.x/sources/b2qt-yocto-meta/scripts/b2qt-init-build-env . + \endcode + + \section2 Building the Image and Toolchain + + After the Yocto environment is set up, you need to configure the + build environment for your target device. Using Raspberry Pi as + an example: + + \code + export TEMPLATECONF=meta-b2qt/conf + export MACHINE=raspberrypi + source poky/oe-init-build-env build-raspberrypi + \endcode + + Yocto recipes for \B2QL have two main targets to build: The target image, + and the external toolchain that is used for building the Qt framework and + applications. + + \code + bitbake b2qt-embedded-image + bitbake meta-toolchain-b2qt-embedded-sdk + \endcode + + \note The generated target image does not yet include Qt libraries, + you need to build Qt and add it into the image yourself. The + file \c {embedded-linux/build_qt.sh} from the \e {Build scripts} source + package can be used as reference on how to configure and build Qt. */ /*! -- cgit v1.2.3 From 7ed76b3cf9388b71876cdcddb64f93ef226254e1 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Wed, 12 Feb 2014 16:00:54 +0100 Subject: Don't use wifi on Emulator Change-Id: I9ae1b5b68f3e3ec2c513ec5a6811ea5396425766 Reviewed-by: Eirik Aavitsland --- src/imports/wifi/pluginmain.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp index b1f1bed..3c560f9 100644 --- a/src/imports/wifi/pluginmain.cpp +++ b/src/imports/wifi/pluginmain.cpp @@ -18,11 +18,12 @@ ****************************************************************************/ #include "qwifimanager.h" +#include +#include #include #include -#include -#include +#include class QWifiGlobal : public QObject { @@ -34,15 +35,20 @@ public: Q_INVOKABLE bool wifiSupported() const { - char interface[PROPERTY_VALUE_MAX]; - property_get("wifi.interface", interface, NULL); - // standard linux kernel path - QByteArray path; - path.append("/sys/class/net/").append(interface); - bool interfaceFound = QDir().exists(path.constData()); - if (!interfaceFound) - qWarning() << "QWifiGlobal: could not find wifi interface in " << path; - return interfaceFound; + bool supported = false; + if (wifi_load_driver() == 0 && wifi_start_supplicant(0) == 0) { + char interface[PROPERTY_VALUE_MAX]; + property_get("wifi.interface", interface, NULL); + // standard linux kernel path + QByteArray path; + path.append("/sys/class/net/").append(interface); + supported = QDir().exists(path.constData()); + if (!supported) + qWarning() << "QWifiGlobal: could not find wifi interface in " << path; + } else { + qWarning() << "QWifiGlobal: wifi driver is not available"; + } + return supported; } }; -- cgit v1.2.3 From b0f603852172c5a1a1f0be62bb171cd1fa65d8ae Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 13 Feb 2014 10:04:41 +0100 Subject: Doc: Troubleshooting entry for BeagleBone Black HDMI issues Task-number: QTEE-329 Change-Id: If2d305c0e2b4165fca7c00910bb498124ade3abb Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 41e3065..b1a3e60 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1105,6 +1105,16 @@ Alternatively, press and hold the power button for 10 seconds. This will force a reboot. + \section2 How do I get HDMI output working properly on BeagleBone Black? + + Depending on the HDMI monitor, the cable, and the build variant of + the BeagleBone Black device, it may not be able to drive an HDMI display in a + stable way; the image may disappear or stutter. These issues are not caused by + the \B2Q stack. + + More details and possible solutions can be found + \l {http://www.elinux.org/Beagleboard:BeagleBoneBlack_HDMI}{here}. + \section2 Trying to build for the emulator target fails with error message \e{make: i686-android-linux-g++: Command not found} You need to install support libraries in order to run 32-bit programs in a -- cgit v1.2.3 From 69e4deb9dc7432d6c3cbff371f5fa3016d517c93 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 13 Feb 2014 10:41:11 +0100 Subject: Doc: Add instructions for building Boot2Qt demos Document where to find the demos in Qt Creator and fix the template name used in the example building instructions. Task-number: QTEE-350 Change-Id: I8b132920d3e63d9813c65338d50db4eb66c465de Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index b1a3e60..694dc7c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -681,7 +681,7 @@ \li Make sure that your device is powered on and connected to the development host. \li In Qt Creator, select \b{File > New File or Project} > - \b Applications > \b{Qt Quick 2 Application } > \b{Choose}. + \b Applications > \b{Qt Quick Application} > \b{Choose}. \li Choose a location for your new project. \li In the \b{Qt Quick Component Set} dialog, select \b{Qt Quick 2.0}. \li In the \b{Kit Selection} dialog, select the kits for your @@ -693,6 +693,19 @@ \li To build and run the project, click \inlineimage qtcreator-run.png \endlist + \section1 Building and Running \B2Q Demos + + You can find the \B2Q demo applications in Qt Creator. + + \list 1 + \li Go to \b Welcome > \b Examples. + \li Select a \e Boot2Qt Qt version from the drop-down list. + \li Select a demo you want to build. + \li In \b{Projects > Build & Run}, select the correct kit for your + connected device or emulator. + \li To build and run the project, click \inlineimage qtcreator-run.png + \endlist + \section1 Setting Up an Already Existing Project for Deployment The projects generated by Qt Creator always have the correct settings -- cgit v1.2.3 From 2ae4b46d8e117aa645a05dd150050bb851c2333e Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 11 Feb 2014 17:05:27 +0100 Subject: Enable internet on eAndroid emulator Change-Id: If357f7c1ea090165cb0a3738156a66f5961d66a6 Reviewed-by: Rainer Keller --- src/qconnectivity/main.cpp | 47 ++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp index fb8b857..046375e 100644 --- a/src/qconnectivity/main.cpp +++ b/src/qconnectivity/main.cpp @@ -38,7 +38,8 @@ static bool QT_USE_EXPIRED_LEASE = !qgetenv("QT_USE_EXPIRED_LEASE").isEmpty(); // this might indicate a badly configured DHCP server static int MIN_RENEWAL_TIME_SECS = 300; // 5 min -#define ETH_INTERFACE "eth0" +#define ETH_INTERFACE_HW "eth0" +#define ETH_INTERFACE_EMULATOR "eth1" // this function is defined in android/system/core/libnetutils/dhcp_utils.c extern "C" { @@ -67,6 +68,7 @@ protected: bool startDhcp(bool renew, const char *interface); void stopDhcp(const char *interface); bool ethernetSupported() const; + bool isEmulator() const; protected slots: void initNetdConnection(); @@ -76,7 +78,6 @@ protected slots: void sendReply(QLocalSocket *requester, const QByteArray &reply) const; void updateLease(); void handleError(QLocalSocket::LocalSocketError /*socketError*/) const; - bool isEmulator() const; private: friend class LeaseTimer; @@ -86,6 +87,8 @@ private: QLocalServer *m_serverSocket; bool m_linkUp; LeaseTimer *m_leaseTimer; + bool m_isEmulator; + QByteArray m_ethInterface; }; class LeaseTimer : public QTimer @@ -116,13 +119,11 @@ private: }; QConnectivityDaemon::QConnectivityDaemon() - : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0) + : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0), m_isEmulator(isEmulator()) { qDebug() << "starting QConnectivityDaemon..."; - if (isEmulator()) { - // ### TODO - init Internet setup on emulator - } else { - initNetdConnection(); + if (!m_isEmulator) { + m_ethInterface = ETH_INTERFACE_HW; m_leaseTimer = new LeaseTimer(this); m_leaseTimer->setSingleShot(true); connect(m_leaseTimer, SIGNAL(timeout()), this, SLOT(updateLease())); @@ -137,29 +138,30 @@ QConnectivityDaemon::QConnectivityDaemon() } else { qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket"; } + } else { + m_ethInterface = ETH_INTERFACE_EMULATOR; } + initNetdConnection(); } bool QConnectivityDaemon::isEmulator() const { bool isEmulator = false; - QString content; QFile conf("/system/bin/appcontroller.conf"); if (conf.open(QIODevice::ReadOnly)) { - QTextStream stream(&conf); - content = stream.readAll(); + QByteArray content = conf.readAll(); isEmulator = content.contains("platform=emulator"); + conf.close(); } else { qWarning() << "Failed to read appcontroller.conf"; } - conf.close(); return isEmulator; } void QConnectivityDaemon::initNetdConnection() { - static int attemptCount = 12; if (ethernetSupported()) { + static int attemptCount = 12; int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); if (netdFd != -1) { qDebug() << "QConnectivityDaemon: connected to netd socket"; @@ -170,9 +172,8 @@ void QConnectivityDaemon::initNetdConnection() this, SLOT(handleError(QLocalSocket::LocalSocketError))); // down-up sequence generates "linkstate" events, which we can use to setup // our daemon on initial startup or on daemon restarts - stopDhcp(ETH_INTERFACE); - sendCommand("0 interface setcfg " ETH_INTERFACE " down"); - sendCommand("0 interface setcfg " ETH_INTERFACE " up"); + sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" down").constData()); + sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" up").constData()); } else { qWarning() << "QConnectivityDaemon: failed to connect to netd socket"; if (--attemptCount != 0) @@ -218,18 +219,19 @@ void QConnectivityDaemon::handleInterfaceChange(const QList &message qWarning() << "QConnectivityDaemon: broken command"; return; } - if (message.at(2) == "linkstate" && message.at(3) == ETH_INTERFACE) { + + if (message.at(2) == "linkstate" && message.at(3) == m_ethInterface) { if (message.at(4) == "up") { // ethernet cable has been plugged in if (!m_linkUp) { m_linkUp = true; - startDhcp(false, ETH_INTERFACE); + startDhcp(false, m_ethInterface); } } else { // .. plugged out if (m_linkUp) { m_linkUp = false; - stopDhcp(ETH_INTERFACE); + stopDhcp(m_ethInterface); } } } @@ -284,7 +286,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) property_set("net.dns2", dns2); } - if (lease >= 0) { + if (!m_isEmulator && lease >= 0) { if (lease < MIN_RENEWAL_TIME_SECS) { qWarning() << "QConnectivityDaemon: DHCP server proposes lease time " << lease << "seconds. We will use" << MIN_RENEWAL_TIME_SECS << " seconds instead."; @@ -317,20 +319,21 @@ void QConnectivityDaemon::stopDhcp(const char *interface) qDebug() << "QConnectivityDaemon: stopDhcp: " << interface; ifc_clear_addresses(interface); dhcp_stop(interface); - if (m_leaseTimer->isActive()) + if (!m_isEmulator && m_leaseTimer->isActive()) m_leaseTimer->stop(); } bool QConnectivityDaemon::ethernetSupported() const { // standard linux kernel path - return QDir().exists("/sys/class/net/" ETH_INTERFACE); + return QDir().exists(QString("/sys/class/net/").append(m_ethInterface)); } void QConnectivityDaemon::handleNetdEvent() { QByteArray data = m_netdSocket->readAll(); - if (QT_CONNECTIVITY_DEBUG) qDebug() << "QConnectivityDaemon: netd event: " << data; + if (QT_CONNECTIVITY_DEBUG) + qDebug() << "QConnectivityDaemon: netd event: " << data; if (data.endsWith('\0')) data.chop(1); -- cgit v1.2.3 From 912758262e2036f55c4e36e43d4acc3564759e29 Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 17 Feb 2014 14:48:01 +0100 Subject: Doc: Explain about disabling surfaceflinger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib4dbfc3d5f62ba3792f44b191143039c63d880df Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 694dc7c..80be1d3 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -825,6 +825,23 @@ } \endcode + \section1 Disabling Screen Composer on Embedded Android + + By default, the \B2Q stack uses Android's screen composer, \e + Surfaceflinger. It is required for Qt Multimedia functionality, + i.e. video playback and camera. If that functionality is not + required, Surfaceflinger may be disabled. This can in some + situations improve performance. + + \list 1 + \li Edit \c {/system/bin/appcontroller.conf} to set the value of + the environment variable \c QT_QPA_EGLFS_NO_SURFACEFLINGER to \c + 1 instead of \c 0. + \li Disable the startup of \c surfaceflinger at boot-up. Either + change \c /init.rc, or simply rename the \c + {/system/bin/surfaceflinger} executable. + \endlist + \section1 Building Your Own Embedded Linux Image \B2QL is built using the tools and resources from the \l {Yocto Project}, -- cgit v1.2.3 From facedd95835540ab5040361bd7100d1908e2ec98 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Tue, 18 Feb 2014 16:23:19 +0100 Subject: [Wifi] Fix initialization code Bug was that on freshly deployed Boot2Qt image (Nexus) the current code caused a device to restart when trying to launch "launcher settings". Change-Id: I3cc55488a1993c2c74567fccf39edd189b356bac Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 8fb8b66..7d6683b 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -142,19 +142,19 @@ QWifiManager::QWifiManager() } else { qWarning() << "QWifiManager: failed to connect to qconnectivity socket"; } - // check if backend has already been initialized char backend_status[PROPERTY_VALUE_MAX]; - if (property_get(QT_WIFI_BACKEND, backend_status, NULL) - && strcmp(backend_status, "running") == 0) { - // let it re-connect, in most cases this will see that everything is working properly - // and will do nothing. Special case is when process has crashed or was killed by a system - // signal in previous execution, which results in broken connection to a supplicant, - // connectToBackend will fix it.. - connectToBackend(); - } else { - // same here, cleans up the state - disconnectFromBackend(); + if (property_get(QT_WIFI_BACKEND, backend_status, NULL)) { + if (strcmp(backend_status, "running") == 0) { + // let it re-connect, in most cases this will see that everything is working properly + // and will do nothing. Special case is when process has crashed or was killed by a system + // signal in previous execution, which results in broken connection to a supplicant, + // connectToBackend will fix it.. + connectToBackend(); + } else if (strcmp(backend_status, "stopped") == 0) { + // same here, cleans up the state + disconnectFromBackend(); + } } } -- cgit v1.2.3 From f80e4d4811e4c4f38c65fa7bbc2ec6df9c0283c0 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 18 Feb 2014 14:29:12 +0100 Subject: Doc: Add instructions how to install newer VirtualBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I54899c905d334215c40a9dcb4a4035d173cc625b Reviewed-by: Kalle Viironen Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 80be1d3..0107d7e 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -190,10 +190,21 @@ The \B2Q emulator in \SDK relies on VirtualBox virtualization software. You can download it from \l{https://www.virtualbox.org/wiki/Linux_Downloads} or - install it from the command line with the following command: + install it via distribution tools. + If you have older Ubuntu versions such as 12.04 you have to install a newer + version of VirtualBox than your distribution does provide. + You have to add a foreign package source: + + \code + wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - + echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list + sudo apt-get update + \endcode + + Now install VirtualBox on your computer \code - sudo apt-get install virtualbox + sudo apt-get install virtualbox-4.3 \endcode To configure VirtualBox: -- cgit v1.2.3 From f6d8f83364c013da0dfeb7247a17271b56a69491 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 19 Feb 2014 15:14:51 +0200 Subject: doc: add quide how to use b2qt_build_scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I08cc79fe34cc45a96c3387370a78060541cd3d1d Reviewed-by: Andy Nichols Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 0107d7e..9416260 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -915,9 +915,35 @@ \endcode \note The generated target image does not yet include Qt libraries, - you need to build Qt and add it into the image yourself. The - file \c {embedded-linux/build_qt.sh} from the \e {Build scripts} source - package can be used as reference on how to configure and build Qt. + you need to build Qt and add it into the image yourself. + + \section2 Building Qt and addons + + \e {Build scripts} source package contains scripts that can be used to + build Qt and all additional Qt addons that are part of \B2QL image. + To setup build environment for your target hardware, create new build + directory and run the initialization script. Using Raspberry Pi as + an example: + + \code + cd + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-common/init_build_env.sh \ + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + \endcode + + You can use following scripts to build different parts of the \B2Q stack. + + \code + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_qt.sh \ + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_extras.sh \ + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_image.sh \ + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + \endcode + + After \e {embedded-linux/build_image.sh} has finished, you can flash the devices with + the updated image located in the build folder. */ /*! -- cgit v1.2.3 From 385333ee85fd336d610861017b4c180ba0e60c39 Mon Sep 17 00:00:00 2001 From: aavit Date: Thu, 20 Feb 2014 10:47:18 +0100 Subject: Doc: Fixed 32bit package install command for newer ubuntu versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QTEE-414 Change-Id: I79e0e2f2191d02bf5859338ba1583567eb430284 Reviewed-by: Laszlo Agocs Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 9416260..a85ecf8 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -177,9 +177,15 @@ \section1 1. Installing 32-bit Support Libraries Some of the build tools in \SDK are 32-bit programs, and on 64-bit - systems they require support libraries for running 32-bit code. To install - the required packages - in Ubuntu, use the following command in a terminal: + systems they require support libraries for running 32-bit code. To + install the required packages in recent versions of Ubuntu, use + the following command in a terminal: + + \code + sudo apt-get install g++-multilib zlib1g:i386 + \endcode + + For older Ubuntu versions such as 12.04, instead do: \code sudo apt-get install g++-multilib ia32-libs -- cgit v1.2.3 From 788e5c1b3526dd6ad5c26a9918a733564764392d Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 10:46:51 +0100 Subject: Doc: Fix missing sudo for i.MX6 embedded Linux deployment Task-number: QTEE-406 Change-Id: I146c189ba2996fe8c7b79ea4aef5c8c2716bb7bf Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index a85ecf8..5c1d81c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -534,12 +534,12 @@ \li \b{\B2QA} \code cd - Boot2Qt-2.x/iMX6-eAndroid/images/deploy.sh /dev/ + ./Boot2Qt-2.x/iMX6-eAndroid/images/deploy.sh /dev/ \endcode \li \b{\B2QL} \code cd - Boot2Qt-2.x/iMX6-eLinux/images/deploy.sh /dev/ + sudo ./Boot2Qt-2.x/iMX6-eLinux/images/deploy.sh /dev/ \endcode \endlist -- cgit v1.2.3 From f5abf901305804a64516a5ec9ebc3c151ab0c51b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 20 Feb 2014 12:40:44 +0100 Subject: Doc: Clarify which Qt Creator templates work out of the box A quick fix for QTEE-399 - we'll need better instructions what changes are needed for example Qt Widgets projects. Task-number: QTEE-399 Change-Id: I5d4999d2d5d5a3af5a4966e7253094966f387410 Reviewed-by: Kalle Viironen --- src/doc/src/b2qt.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 5c1d81c..4150b23 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -725,8 +725,8 @@ \section1 Setting Up an Already Existing Project for Deployment - The projects generated by Qt Creator always have the correct settings - for deployment on the device or emulator. However, existing projects may + New Qt Quick application projects generated by Qt Creator always have the correct + settings for deployment on the device or emulator. However, other projects may need some changes. As a general rule, application binaries and resources (such as QML files and -- cgit v1.2.3 From 6dd8882f595fb6545badcf735e371c77a47906f8 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Fri, 21 Feb 2014 10:02:46 +0200 Subject: doc: minor changes to customization inline code blocks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit formatting changes and one path correction. Change-Id: I7a358f7dd210d84d67ea10257bfa2a91cd97bb1f Reviewed-by: Topi Reiniö --- src/doc/src/b2qt.qdoc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 4150b23..d589020 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -885,8 +885,7 @@ \li Install the dependencies for the Yocto tools. In Ubuntu, the following packages are required: \code - sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ - build-essential chrpath libsdl1.2-dev xterm + sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath libsdl1.2-dev xterm \endcode \endlist @@ -896,7 +895,7 @@ \code cd - /Boot2Qt-2.x/sources/b2qt-yocto-meta/scripts/b2qt-init-build-env . + /Boot2Qt-2.x/sources/b2qt-yocto-meta/b2qt-init-build-env . \endcode \section2 Building the Image and Toolchain @@ -933,22 +932,18 @@ \code cd - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-common/init_build_env.sh \ - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-common/init_build_env.sh /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi \endcode You can use following scripts to build different parts of the \B2Q stack. \code - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_qt.sh \ - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_extras.sh \ - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_image.sh \ - /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_qt.sh /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_extras.sh /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi + /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/build_image.sh /Boot2Qt-2.x/sources/b2qt-build-scripts/embedded-linux/config.raspberrypi \endcode - After \e {embedded-linux/build_image.sh} has finished, you can flash the devices with + After \e {embedded-linux/build_image.sh} has finished, you can flash the device with the updated image located in the build folder. */ -- cgit v1.2.3 From 4738811e35a559d238ba20703eb792fca8f5756b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 21 Feb 2014 10:10:10 +0100 Subject: Doc: Document support services for Yocto recipes Task-number: QTEE-427 Change-Id: I1f10fed48cbca8144b866cd50d3d7eaeb8caf2ac Reviewed-by: Kalle Viironen Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index d589020..6f2d44c 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -922,7 +922,7 @@ \note The generated target image does not yet include Qt libraries, you need to build Qt and add it into the image yourself. - \section2 Building Qt and addons + \section2 Building Qt and Addons \e {Build scripts} source package contains scripts that can be used to build Qt and all additional Qt addons that are part of \B2QL image. @@ -945,6 +945,14 @@ After \e {embedded-linux/build_image.sh} has finished, you can flash the device with the updated image located in the build folder. + + \section2 Note About Support Services for Yocto Tools + + By default, Digia will only provide customer support for the Yocto + recipes on the reference platforms, as delivered with \SDK, and + setting up the development environment for them. Receiving support + for any other configuration requires a separate service agreement + between a customer and Digia. */ /*! -- cgit v1.2.3