Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fingerterm
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mer-core
fingerterm
Commits
bf4b112a
Commit
bf4b112a
authored
Apr 29, 2016
by
Pekka Vuorela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fingerterm] remove QtComponents dependency. Contributes to JB#10224
parent
2d5f10df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
32 deletions
+39
-32
main.cpp
main.cpp
+1
-0
qml/Main.qml
qml/Main.qml
+38
-31
rpm/fingerterm.spec
rpm/fingerterm.spec
+0
-1
No files found.
main.cpp
View file @
bf4b112a
...
...
@@ -148,6 +148,7 @@ int main(int argc, char *argv[])
context
->
setContextProperty
(
"keyLoader"
,
&
keyLoader
);
view
.
setSource
(
QUrl
(
"qrc:/qml/Main.qml"
));
view
.
setResizeMode
(
QQuickView
::
SizeRootObjectToView
);
QObject
*
root
=
view
.
rootObject
();
if
(
!
root
)
...
...
qml/Main.qml
View file @
bf4b112a
...
...
@@ -20,24 +20,48 @@
import
QtQuick
2.0
import
TextRender
1.0
import
QtQuick
.
Window
2.0
import
com
.
nokia
.
meego
2.0
PageStackWindow
{
id
:
pageStackWindow
focus
:
true
Keys.onPressed
:
{
term
.
keyPress
(
event
.
key
,
event
.
modifiers
,
event
.
text
);
}
Item
{
id
:
root
property
string
windowTitle
:
util
.
currentWindowTitle
();
initialPage
:
Page
{
Item
{
id
:
page
anchors.fill
:
parent
orientationLock
:
window
.
getOrientationLockMode
()
property
bool
forceOrientation
property
int
forcedOrientation
property
bool
portrait
:
rotation
%
180
==
0
width
:
portrait
?
root
.
width
:
root
.
height
height
:
portrait
?
root
.
height
:
root
.
width
anchors.centerIn
:
parent
rotation
:
Screen
.
angleBetween
((
forceOrientation
?
forcedOrientation
:
Screen
.
orientation
),
Screen
.
primaryOrientation
)
focus
:
true
Keys.onPressed
:
{
term
.
keyPress
(
event
.
key
,
event
.
modifiers
,
event
.
text
);
}
Component
.
onCompleted
:
{
var
stringMode
=
util
.
settingsValue
(
"
ui/orientationLockMode
"
);
applyOrientationLock
(
stringMode
)
}
function
applyOrientationLock
(
stringMode
)
{
switch
(
stringMode
)
{
case
"
auto
"
:
page
.
forceOrientation
=
false
break
case
"
landscape
"
:
page
.
forceOrientation
=
true
page
.
forcedOrientation
=
Qt
.
LandscapeOrientation
break
case
"
portrait
"
:
page
.
forceOrientation
=
true
page
.
forcedOrientation
=
Qt
.
PortraitOrientation
}
}
Rectangle
{
property
string
fgcolor
:
"
black
"
...
...
@@ -46,7 +70,7 @@ PageStackWindow {
property
int
fadeOutTime
:
80
property
int
fadeInTime
:
350
property
real
pixelRatio
:
pageStackWindow
.
width
/
540
property
real
pixelRatio
:
root
.
width
/
540
// layout constants
property
int
buttonWidthSmall
:
60
*
pixelRatio
...
...
@@ -463,27 +487,10 @@ PageStackWindow {
util
.
allowGestures
=
true
;
}
function
lockModeStringToQtEnum
(
stringMode
)
{
switch
(
stringMode
)
{
case
"
auto
"
:
return
PageOrientation
.
Automatic
case
"
landscape
"
:
return
PageOrientation
.
LockLandscape
case
"
portrait
"
:
return
PageOrientation
.
LockPortrait
}
}
function
getOrientationLockMode
()
{
var
stringMode
=
util
.
settingsValue
(
"
ui/orientationLockMode
"
);
page
.
orientationLock
=
lockModeStringToQtEnum
(
stringMode
)
}
function
setOrientationLockMode
(
stringMode
)
{
util
.
setSettingsValue
(
"
ui/orientationLockMode
"
,
stringMode
);
page
.
orientationLock
=
lockModeStringToQtEnum
(
stringMode
)
page
.
applyOrientationLock
(
stringMode
)
}
}
}
...
...
rpm/fingerterm.spec
View file @
bf4b112a
...
...
@@ -15,7 +15,6 @@ BuildRequires: pkgconfig(Qt0Feedback)
BuildRequires: pkgconfig(nemonotifications-qt5) >= 1.0.4
Requires: qt5-qtdeclarative-import-xmllistmodel
Requires: qt5-qtdeclarative-import-window2
Requires: qt-components-qt5
Obsoletes: meego-terminal <= 0.2.2
Provides: meego-terminal > 0.2.2
...
...
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