From 8edc0b399f2fda6d8957449075594ef85f76205e Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Sat, 24 May 2008 18:33:40 +0000 Subject: [PATCH] Remove the "ghost view" from public API. It's completely internal and used nowhere. "ervin, fighting feature creep in APIs since 1980." (BTW, at this rate I'm less and less convinced that it'd be wise to not have a second round of API review post 4.1) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812172 --- applet.cpp | 11 ----------- applet.h | 14 +------------- applethandle.cpp | 10 +++++++--- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/applet.cpp b/applet.cpp index 68186e784..7767bdd21 100644 --- a/applet.cpp +++ b/applet.cpp @@ -899,17 +899,6 @@ void Applet::setAspectRatioMode(Plasma::AspectRatioMode mode) d->aspectRatioMode = mode; } -QGraphicsView * Applet::ghostView() -{ - return d->ghostView; -} - -void Applet::setGhostView( QGraphicsView * view ) -{ - d->ghostView = view; - update(); -} - void Applet::registerAsDragHandle( QGraphicsItem * item ) { if (!item) { diff --git a/applet.h b/applet.h index 0c674ed4a..53fa62065 100644 --- a/applet.h +++ b/applet.h @@ -232,19 +232,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ void setAspectRatioMode(Plasma::AspectRatioMode); - /** - * @return The view where the applet appears ghosted. - */ - QGraphicsView * ghostView(); - - /** - * Sets a view which displays the applet semi transparent. - * - * @param view The view where the applet should appear 'ghosted'. Set to - * 0 to don't ghost the applet anywhere. - */ - void setGhostView(QGraphicsView * view); - /** * Returns a list of all known applets. * @@ -728,6 +715,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget friend class Corona; friend class Containment; friend class AppletScript; + friend class AppletHandle; }; } // Plasma namespace diff --git a/applethandle.cpp b/applethandle.cpp index 56f858ee3..ea1237e4f 100644 --- a/applethandle.cpp +++ b/applethandle.cpp @@ -35,6 +35,7 @@ #include #include "applet.h" +#include "applet_p.h" #include "containment.h" #include "corona.h" #include "theme.h" @@ -382,7 +383,8 @@ void AppletHandle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_topview->hide(); delete m_topview; m_topview = 0; - m_applet->setGhostView(0); + m_applet->d->ghostView = 0; + m_applet->update(); } //find out if we were dropped on a panel or something @@ -486,7 +488,8 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) m_topview->hide(); delete m_topview; m_topview = 0; - m_applet->setGhostView(0); + m_applet->d->ghostView = 0; + m_applet->update(); } } else { if (!m_topview) { //create a new toplevel view @@ -523,7 +526,8 @@ void AppletHandle::mouseMoveEvent(QGraphicsSceneMouseEvent *event) m_topview->show(); - m_applet->setGhostView(m_containment->view()); + m_applet->d->ghostView = m_containment->view(); + m_applet->update(); //TODO: non compositing users are screwed: masking looks terrible. //Consider always enabling the applet background. Stuff like the analog clock