[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/plasma-desktoplayout/kdelibs-plasma (silent)
From: Ambroz Bizjak <ambro () b4ever ! net>
Date: 2008-12-21 11:37:32
Message-ID: 1229859452.900425.1868.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 899597 by abizjak:
SVN_SILENT merge changes from trunk
M +16 -0 corona.cpp
M +8 -0 corona.h
--- branches/work/plasma-desktoplayout/kdelibs-plasma/corona.cpp #899596:899597
@@ -550,6 +550,22 @@
requestConfigSync();
}
+QList<Plasma::Location> Corona::freeEdges(int screen) const
+{
+ QList<Plasma::Location> freeEdges;
+ freeEdges << Plasma::TopEdge << Plasma::BottomEdge
+ << Plasma::LeftEdge << Plasma::RightEdge;
+
+ foreach (Containment *containment, containments()) {
+ if (containment->screen() == screen &&
+ freeEdges.contains(containment->location())) {
+ freeEdges.removeAll(containment->location());
+ }
+ }
+
+ return freeEdges;
+}
+
} // namespace Plasma
#include "corona.moc"
--- branches/work/plasma-desktoplayout/kdelibs-plasma/corona.h #899596:899597
@@ -146,6 +146,14 @@
*/
QPoint popupPosition(const QGraphicsItem *item, const QSize &s);
+ /**
+ * This method is useful in order to retrieve the list of available
+ * screen edges for panel type containments.
+ * @param screen the id of the screen to look for free edges.
+ * @returns a list of free edges not filled with panel type containments.
+ */
+ QList<Plasma::Location> freeEdges(int screen) const;
+
public Q_SLOTS:
/**
* Initializes the layout from a config file. This will first clear any existing
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic