[-]
[+]
|
Changed |
_service:tar_git:harbour-ambience-tohkbd2.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-ambience-tohkbd2.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -6,7 +6,7 @@
<service name="tar_git">
<param name="url">https://github.com/kimmoli/tohkbd2.git</param>
<param name="branch">master</param>
- <param name="revision">b1b7ec2a124ce108085dbc7ba4b6cc08fc7bfadc</param>
+ <param name="revision">4acdd5c3553b0f8d72096b7aef41b0985fc9b41d</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-ambience-tohkbd2-0.2.2.tar.bz2/user-daemon/qml/taskswitcher.qml
^
|
@@ -1,5 +1,6 @@
import QtQuick 2.1
import Sailfish.Silica 1.0
+import QtSensors 5.0 as Sensors
Item
{
@@ -7,6 +8,7 @@
width: Screen.width
height: Screen.height
+ rotation: 0
property int currentApp: viewHelper.currentApp
property int numberOfApps: viewHelper.numberOfApps
@@ -27,6 +29,20 @@
taskSwitchBackground.height))
}
+ Sensors.OrientationSensor
+ {
+ id: rotationSensor
+ active: viewHelper.visible
+ property int angle: reading.orientation
+ onAngleChanged:
+ {
+ if (reading.orientation === 3) /* Landscape inverted */
+ root.rotation = 180
+ else if (reading.orientation === 4) /* Landscape */
+ root.rotation = 0
+ }
+ }
+
function updateAppsModel()
{
var i
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-ambience-tohkbd2-0.2.2.tar.bz2/user-daemon/src/viewhelper.cpp
^
|
@@ -13,12 +13,14 @@
{
m_currentApp = 0;
m_numberOfApps = 0;
+ m_visible = false;
apps.clear();
appsDesktopFiles.clear();
emit currentAppChanged();
emit numberOfAppsChanged();
+ emit visibleChanged();
}
void ViewHelper::detachWindow()
@@ -49,6 +51,8 @@
void ViewHelper::hideWindow()
{
+ m_visible = false;
+ emit visibleChanged();
launchApplication(m_currentApp);
}
@@ -151,7 +155,11 @@
emit numberOfAppsChanged();
if (m_numberOfApps > 1)
+ {
view->showFullScreen();
+ m_visible = true;
+ emit visibleChanged();
+ }
}
void ViewHelper::nextApp()
@@ -172,6 +180,11 @@
return m_numberOfApps;
}
+bool ViewHelper::getVisible()
+{
+ return m_visible;
+}
+
/* Testing */
void ViewHelper::setNumberOfApps(int n)
{
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-ambience-tohkbd2-0.2.2.tar.bz2/user-daemon/src/viewhelper.h
^
|
@@ -14,6 +14,7 @@
Q_OBJECT
Q_PROPERTY(int currentApp READ getCurrentApp NOTIFY currentAppChanged())
Q_PROPERTY(int numberOfApps READ getNumberOfApps NOTIFY numberOfAppsChanged())
+ Q_PROPERTY(bool visible READ getVisible NOTIFY visibleChanged)
public:
explicit ViewHelper(QQuickView *parent = 0);
@@ -27,6 +28,7 @@
signals:
void currentAppChanged();
void numberOfAppsChanged();
+ void visibleChanged();
public slots:
void detachWindow();
@@ -40,8 +42,12 @@
int getCurrentApp();
int getNumberOfApps();
+ bool getVisible();
+
int m_numberOfApps;
int m_currentApp;
+ bool m_visible;
+
QVariantList apps;
QStringList appsDesktopFiles;
|