diff options
author | 2016-11-02 16:23:58 +0100 | |
---|---|---|
committer | 2016-11-02 16:23:58 +0100 | |
commit | 9ca0a50d021a8d6e12cfb8f04671ba3dd389f92d (patch) | |
tree | c76ff30548eef6c6fdf49449c5917c8d3fab5589 /interfaces/src | |
parent | ca4026b34ab8cc32dbe49c3a6272aa01733baf12 (diff) |
New layer management in WindowManager. Three layers are created. One for the HomeScreen, one for apps, one for popups.
Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
Diffstat (limited to 'interfaces/src')
-rw-r--r-- | interfaces/src/windowmanager.cpp | 63 |
1 files changed, 51 insertions, 12 deletions
diff --git a/interfaces/src/windowmanager.cpp b/interfaces/src/windowmanager.cpp index 12f425e..77820ec 100644 --- a/interfaces/src/windowmanager.cpp +++ b/interfaces/src/windowmanager.cpp @@ -25,11 +25,30 @@ SimplePoint::~SimplePoint() } -SimpleRect::SimpleRect() +LayoutArea::LayoutArea() { } -SimpleRect::~SimpleRect() +LayoutArea::~LayoutArea() +{ +} + + +Layout::Layout(): + id(-1), + name("N/A"), + layoutAreas() +{ +} + +Layout::Layout(int layoutId, const QString &layoutName, const QList<LayoutArea> &surfaceAreas): + id(layoutId), + name(layoutName), + layoutAreas(surfaceAreas) +{ +} + +Layout::~Layout() { } @@ -52,26 +71,46 @@ const QDBusArgument &operator >>(const QDBusArgument &argument, SimplePoint &mSi return argument; } -QDBusArgument &operator <<(QDBusArgument &argument, const SimpleRect &mSimpleRect) +QDBusArgument &operator <<(QDBusArgument &argument, const LayoutArea &mLayoutArea) { argument.beginStructure(); - argument << mSimpleRect.x; - argument << mSimpleRect.y; - argument << mSimpleRect.width; - argument << mSimpleRect.height; + argument << mLayoutArea.x; + argument << mLayoutArea.y; + argument << mLayoutArea.width; + argument << mLayoutArea.height; argument.endStructure(); return argument; } -const QDBusArgument &operator >>(const QDBusArgument &argument, SimpleRect &mSimpleRect) +const QDBusArgument &operator >>(const QDBusArgument &argument, LayoutArea &mLayoutArea) { argument.beginStructure(); - argument >> mSimpleRect.x; - argument >> mSimpleRect.y; - argument >> mSimpleRect.width; - argument >> mSimpleRect.height; + argument >> mLayoutArea.x; + argument >> mLayoutArea.y; + argument >> mLayoutArea.width; + argument >> mLayoutArea.height; argument.endStructure(); return argument; } +QDBusArgument &operator <<(QDBusArgument &argument, const Layout &mLayout) +{ + argument.beginStructure(); + argument << mLayout.id; + argument << mLayout.name; + argument << mLayout.layoutAreas; + argument.endStructure(); + + return argument; +} + +const QDBusArgument &operator >>(const QDBusArgument &argument, Layout &mLayout) +{ + argument.beginStructure(); + argument >> mLayout.id; + argument >> mLayout.name; + argument >> mLayout.layoutAreas; + argument.endStructure(); + return argument; +} |