Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtquickcontrols-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
qtquickcontrols-nemo
Commits
b03a72d2
Commit
b03a72d2
authored
Sep 24, 2017
by
eekkelund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Keyboard] Make Maliit to respect ApplicationWindow.allowedOrientations
parent
e38bf17b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
TextInputPage.qml
examples/touch/content/TextInputPage.qml
+1
-0
glacier-components.qml
examples/touch/glacier-components.qml
+1
-0
main.cpp
examples/touch/src/main.cpp
+10
-0
ApplicationWindow.qml
src/controls/qml/ApplicationWindow.qml
+7
-1
No files found.
examples/touch/content/TextInputPage.qml
View file @
b03a72d2
...
@@ -46,6 +46,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
...
@@ -46,6 +46,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
Page
{
Page
{
id
:
root
id
:
root
allowedOrientations
:
Qt
.
PortraitOrientation
|
Qt
.
LandscapeOrientation
property
real
progress
:
0
property
real
progress
:
0
SequentialAnimation
on
progress
{
SequentialAnimation
on
progress
{
loops
:
Animation
.
Infinite
loops
:
Animation
.
Infinite
...
...
examples/touch/glacier-components.qml
View file @
b03a72d2
...
@@ -51,6 +51,7 @@ ApplicationWindow {
...
@@ -51,6 +51,7 @@ ApplicationWindow {
id
:
appWindow
id
:
appWindow
contentOrientation
:
Screen
.
orientation
contentOrientation
:
Screen
.
orientation
allowedOrientations
:
Qt
.
PortraitOrientation
|
Qt
.
LandscapeOrientation
|
Qt
.
InvertedLandscapeOrientation
|
Qt
.
InvertedPortraitOrientation
// Implements back key navigation
// Implements back key navigation
Keys.onReleased
:
{
Keys.onReleased
:
{
...
...
examples/touch/src/main.cpp
View file @
b03a72d2
...
@@ -41,15 +41,25 @@
...
@@ -41,15 +41,25 @@
#include <QtGui/QGuiApplication>
#include <QtGui/QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlApplicationEngine>
#include <QtQuick/QQuickView>
#include <QtQuick/QQuickView>
#include <QScreen>
#include <glacierapp.h>
#include <glacierapp.h>
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
setenv
(
"QT_QUICK_CONTROLS_STYLE"
,
"Nemo"
,
1
);
setenv
(
"QT_QUICK_CONTROLS_STYLE"
,
"Nemo"
,
1
);
QGuiApplication
*
app
=
GlacierApp
::
app
(
argc
,
argv
);
QGuiApplication
*
app
=
GlacierApp
::
app
(
argc
,
argv
);
app
->
setOrganizationName
(
"NemoMobile"
);
app
->
setOrganizationName
(
"NemoMobile"
);
QScreen
*
sc
=
app
->
primaryScreen
();
if
(
sc
){
sc
->
setOrientationUpdateMask
(
Qt
::
LandscapeOrientation
|
Qt
::
PortraitOrientation
|
Qt
::
InvertedLandscapeOrientation
|
Qt
::
InvertedPortraitOrientation
);
}
QQuickWindow
*
window
=
GlacierApp
::
showWindow
();
QQuickWindow
*
window
=
GlacierApp
::
showWindow
();
window
->
setTitle
(
QObject
::
tr
(
"Glacier components"
));
window
->
setTitle
(
QObject
::
tr
(
"Glacier components"
));
...
...
src/controls/qml/ApplicationWindow.qml
View file @
b03a72d2
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
* Boston, MA 02110-1301, USA.
*/
*/
import
QtQuick
.
Window
2.
0
import
QtQuick
.
Window
2.
2
import
QtQuick
2.6
import
QtQuick
2.6
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Controls
1.0
import
QtQuick
.
Layouts
1.0
import
QtQuick
.
Layouts
1.0
...
@@ -47,6 +47,12 @@ NemoWindow {
...
@@ -47,6 +47,12 @@ NemoWindow {
readonly
property
var
_bgColor
:
Theme
.
backgroundColor
readonly
property
var
_bgColor
:
Theme
.
backgroundColor
color
:
_bgColor
color
:
_bgColor
//Handles orientation of keyboard, MInputMethodQuick.appOrientation.
contentOrientation
:
orientation
onOrientationChanged
:
{
contentOrientation
=
orientation
}
//README: allowedOrientations' default value is set in NemoWindow's c++ implementation
//README: allowedOrientations' default value is set in NemoWindow's c++ implementation
//The app developer can overwrite it from QML
//The app developer can overwrite it from QML
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment