add int Screens::intersecting(QRect)

REVIEW: 112910
This commit is contained in:
Thomas Lübking 2013-09-23 23:04:17 +02:00
parent 05bc5bfc0b
commit c6580ce696
2 changed files with 13 additions and 0 deletions

View file

@ -117,6 +117,17 @@ int Screens::current() const
return m_current;
}
int Screens::intersecting(const QRect &r) const
{
int cnt = 0;
for (int i = 0; i < count(); ++i) {
if (geometry(i).intersects(r)) {
++cnt;
}
}
return cnt;
}
DesktopWidgetScreens::DesktopWidgetScreens(QObject *parent)
: Screens(parent)
, m_desktop(QApplication::desktop())

View file

@ -68,6 +68,8 @@ public:
inline bool isChanging() { return m_changedTimer->isActive(); }
int intersecting(const QRect &r) const;
public Q_SLOTS:
void reconfigure();