[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kspread
From: Johannes Simon <johannes.simon () gmail ! com>
Date: 2008-05-03 8:19:23
Message-ID: 1209802763.512238.20105.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 803520 by jsimon:
Add Region::rects() method to convert a Region to a set of rectangles, much like what \
QRegion::rects() does
M +8 -0 Region.cpp
M +5 -1 Region.h
--- trunk/koffice/kspread/Region.cpp #803519:803520
@@ -219,6 +219,14 @@
qDeleteAll( d->cells );
}
+QVector<QRect> Region::rects() const
+{
+ QVector<QRect> cellRects;
+ foreach (Element *element, d->cells)
+ cellRects.append( element->rect() );
+ return cellRects;
+}
+
const Map* Region::map() const
{
Q_ASSERT(d->map);
--- trunk/koffice/kspread/Region.h #803519:803520
@@ -117,8 +117,12 @@
*/
virtual ~Region();
+
+ /**
+ * @return a QRegion that unifies all contained ranges
+ */
+ QVector<QRect> rects() const;
-
/**
* @param originSheet The name is created relative to this sheet.
* @return the name of the region (e.g. "A1:A2")
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic