nothing actually used this, and it breaks with the whole view/model thing and brings one more dep on QDesktopWidget with it, so good riddence
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=873691
This commit is contained in:
parent
3fb4975896
commit
8005bf4a73
@ -796,43 +796,6 @@ int Containment::screen() const
|
|||||||
return d->screen;
|
return d->screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint Containment::effectiveScreenPos() const
|
|
||||||
{
|
|
||||||
if (d->screen < 0) {
|
|
||||||
return QPoint();
|
|
||||||
}
|
|
||||||
|
|
||||||
QRect r = QApplication::desktop()->screenGeometry(d->screen);
|
|
||||||
if (containmentType() == PanelContainment ||
|
|
||||||
containmentType() == CustomPanelContainment) {
|
|
||||||
QRectF p = geometry();
|
|
||||||
|
|
||||||
switch (d->location) {
|
|
||||||
case TopEdge:
|
|
||||||
return QPoint(r.left() + p.x(), r.top());
|
|
||||||
break;
|
|
||||||
case BottomEdge:
|
|
||||||
return QPoint(r.left() + p.x(), r.bottom() - p.height());
|
|
||||||
break;
|
|
||||||
case LeftEdge:
|
|
||||||
return QPoint(r.left(), r.top() + (p.bottom() + INTER_CONTAINMENT_MARGIN));
|
|
||||||
break;
|
|
||||||
case RightEdge:
|
|
||||||
return QPoint(r.right() - p.width(),
|
|
||||||
r.top() + (p.bottom() + INTER_CONTAINMENT_MARGIN));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//FIXME: implement properly for Floating!
|
|
||||||
return p.topLeft().toPoint();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//NOTE: if we ever support non-origin'd desktop containments
|
|
||||||
// this assumption here will have to change
|
|
||||||
return r.topLeft();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
KPluginInfo::List Containment::listContainments(const QString &category,
|
KPluginInfo::List Containment::listContainments(const QString &category,
|
||||||
const QString &parentApp)
|
const QString &parentApp)
|
||||||
{
|
{
|
||||||
|
@ -219,12 +219,6 @@ class PLASMA_EXPORT Containment : public Applet
|
|||||||
*/
|
*/
|
||||||
int screen() const;
|
int screen() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return where top left corner of the containment maps to for the currently
|
|
||||||
* set screen. If no screen is associated, it will return QPoint()
|
|
||||||
*/
|
|
||||||
QPoint effectiveScreenPos() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @reimplemented from Applet
|
* @reimplemented from Applet
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user