aboutsummaryrefslogtreecommitdiffstats
path: root/HomeScreen/src
diff options
context:
space:
mode:
Diffstat (limited to 'HomeScreen/src')
-rw-r--r--HomeScreen/src/homescreencontrolinterface.cpp18
-rw-r--r--HomeScreen/src/homescreencontrolinterface.h11
-rw-r--r--HomeScreen/src/layouthandler.cpp9
-rw-r--r--HomeScreen/src/layouthandler.h4
-rw-r--r--HomeScreen/src/main.cpp2
-rw-r--r--HomeScreen/src/mainwindow.cpp5
6 files changed, 37 insertions, 12 deletions
diff --git a/HomeScreen/src/homescreencontrolinterface.cpp b/HomeScreen/src/homescreencontrolinterface.cpp
index 057e742..bc66e53 100644
--- a/HomeScreen/src/homescreencontrolinterface.cpp
+++ b/HomeScreen/src/homescreencontrolinterface.cpp
@@ -24,6 +24,12 @@ HomeScreenControlInterface::~HomeScreenControlInterface()
delete mp_homeScreenAdaptor;
}
+QRect HomeScreenControlInterface::getLayoutRenderAreaForSurfaceId(int surfaceId)
+{
+ qDebug("getLayoutRenderAreaForSurfaceId %d", surfaceId);
+ return newRequestGetLayoutRenderAreaForSurfaceId(surfaceId);
+}
+
void HomeScreenControlInterface::hardKeyPressed(int key)
{
int pid = -1;
@@ -42,8 +48,14 @@ void HomeScreenControlInterface::hardKeyPressed(int key)
}
}
-void HomeScreenControlInterface::toggleFullScreen()
+void HomeScreenControlInterface::renderSurfaceToArea(int surfaceId, const QRect &renderArea)
+{
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
+ newRequestRenderSurfaceToArea(surfaceId, renderArea);
+}
+
+void HomeScreenControlInterface::requestSurfaceIdToFullScreen(int surfaceId)
{
- qDebug("toggleFullScreen");
- newRequestsToggleFullscreen();
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
+ newRequestSurfaceIdToFullScreen(surfaceId);
}
diff --git a/HomeScreen/src/homescreencontrolinterface.h b/HomeScreen/src/homescreencontrolinterface.h
index e341758..3203088 100644
--- a/HomeScreen/src/homescreencontrolinterface.h
+++ b/HomeScreen/src/homescreencontrolinterface.h
@@ -15,15 +15,18 @@ public:
~HomeScreenControlInterface();
signals:
-
-signals:
void newRequestsToBeVisibleApp(int pid);
- void newRequestsToggleFullscreen();
+
+ QRect newRequestGetLayoutRenderAreaForSurfaceId(int surfaceId);
+ void newRequestRenderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void newRequestSurfaceIdToFullScreen(int surfaceId);
//from homescreen_adapter.h
public Q_SLOTS: // METHODS
+ QRect getLayoutRenderAreaForSurfaceId(int surfaceId);
void hardKeyPressed(int key);
- void toggleFullScreen();
+ void renderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
private:
HomescreenAdaptor *mp_homeScreenAdaptor;
diff --git a/HomeScreen/src/layouthandler.cpp b/HomeScreen/src/layouthandler.cpp
index 3bfe533..0dac24f 100644
--- a/HomeScreen/src/layouthandler.cpp
+++ b/HomeScreen/src/layouthandler.cpp
@@ -169,9 +169,14 @@ void LayoutHandler::makeMeVisible(int surfaceId)
}
}
-void LayoutHandler::toggleFullscreen()
+void LayoutHandler::requestRenderSurfaceToArea(int surfaceId, const QRect &renderArea)
{
- qDebug("toggleFullscreen");
+ qDebug("requestRenderSurfaceToArea %d %d,%d,%d,%d", surfaceId, renderArea.x(), renderArea.y(), renderArea.width(), renderArea.height());
+}
+
+void LayoutHandler::requestSurfaceIdToFullScreen(int surfaceId)
+{
+ qDebug("requestSurfaceIdToFullScreen %d", surfaceId);
}
void LayoutHandler::setLayoutByName(QString layoutName)
diff --git a/HomeScreen/src/layouthandler.h b/HomeScreen/src/layouthandler.h
index 5763d44..ee400b7 100644
--- a/HomeScreen/src/layouthandler.h
+++ b/HomeScreen/src/layouthandler.h
@@ -18,7 +18,9 @@ signals:
public slots:
void makeMeVisible(int surfaceId);
- void toggleFullscreen();
+
+ void requestRenderSurfaceToArea(int surfaceId, const QRect &renderArea);
+ void requestSurfaceIdToFullScreen(int surfaceId);
void setLayoutByName(QString layoutName);
private:
diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp
index a623fff..f1f5a22 100644
--- a/HomeScreen/src/main.cpp
+++ b/HomeScreen/src/main.cpp
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationDomain("LinuxFoundation");
QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
QCoreApplication::setApplicationName("HomeScreen");
- QCoreApplication::setApplicationVersion("0.3.4");
+ QCoreApplication::setApplicationVersion("0.4.0");
qDebug("%s, v%s", QCoreApplication::applicationName().toStdString().c_str(), QCoreApplication::applicationVersion().toStdString().c_str());
diff --git a/HomeScreen/src/mainwindow.cpp b/HomeScreen/src/mainwindow.cpp
index c15cca5..f8dfe89 100644
--- a/HomeScreen/src/mainwindow.cpp
+++ b/HomeScreen/src/mainwindow.cpp
@@ -89,6 +89,7 @@ MainWindow::MainWindow(QWidget *parent) :
QObject::connect(mp_applauncherwidget, SIGNAL(newRequestsToBeVisibleApp(int)), mp_layoutHandler, SLOT(makeMeVisible(int)));
+
// apply color scheme
updateColorScheme();
@@ -100,7 +101,9 @@ MainWindow::MainWindow(QWidget *parent) :
mp_homeScreenControlInterface = new HomeScreenControlInterface(this);
QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestsToBeVisibleApp(int)), mp_layoutHandler, SLOT(makeMeVisible(int)));
- QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestsToggleFullscreen()), mp_layoutHandler, SLOT(toggleFullscreen()));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestSurfaceIdToFullScreen(int)), mp_layoutHandler, SLOT(requestSurfaceIdToFullScreen(int)));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestRenderSurfaceToArea(int, QRect)), mp_layoutHandler, SLOT(requestRenderSurfaceToArea(int,QRect)));
+ QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestSurfaceIdToFullScreen(int)), mp_layoutHandler, SLOT(requestSurfaceIdToFullScreen(int)));
QObject::connect(mp_popupWidget, SIGNAL(comboBoxResult(QString)), mp_layoutHandler, SLOT(setLayoutByName(QString)));
}