[Kst] branches/work/kst/1.5/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Wed Sep 5 02:19:15 CEST 2007
SVN commit 708472 by arwalker:
make it easier to select a transparent ellipse in layout mode
M +5 -0 kstviewellipse.cpp
M +1 -0 kstviewellipse.h
M +6 -1 kstviewobject.cpp
M +1 -0 kstviewobject.h
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.cpp #708471:708472
@@ -125,6 +125,11 @@
}
+QRegion KstViewEllipse::region() {
+ return QRegion(geometry(), QRegion::Ellipse);
+}
+
+
void KstViewEllipse::save(QTextStream& ts, const QString& indent) {
ts << indent << "<" << type() << ">" << endl;
KstViewObject::save(ts, indent + " ");
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewellipse.h #708471:708472
@@ -46,6 +46,7 @@
virtual void save(QTextStream& ts, const QString& indent = QString::null);
virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const;
virtual signed int directionFor(const QPoint& pos);
+ virtual QRegion region();
// can't have Q_PROPERTY in KstViewObject?
virtual void setForegroundColor(const QColor& color);
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewobject.cpp #708471:708472
@@ -1012,7 +1012,7 @@
if ((*i)->transparent()) {
if (!(*i)->fallThroughTransparency() && (*i)->geometry().contains(pos)) {
obj = *i;
- } else if ((*i)->clipRegion().contains(pos)) {
+ } else if ((*i)->region().contains(pos)) {
obj = *i;
} else if (borderForTransparent && (*i)->geometry().contains(pos)) {
const QRect g((*i)->geometry());
@@ -1912,6 +1912,11 @@
}
+QRegion KstViewObject::region() {
+ return clipRegion();
+}
+
+
void KstViewObject::setFollowsFlow(bool follow) {
_followsFlow = follow;
}
--- branches/work/kst/1.5/kst/src/libkstapp/kstviewobject.h #708471:708472
@@ -73,6 +73,7 @@
virtual void invalidateClipRegion();
virtual QRegion clipRegion();
+ virtual QRegion region();
// If cols <= 0, optimal is chosen automatically
virtual void cleanup(int cols = -1);
More information about the Kst
mailing list