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
This commit is contained in:
Kevin Ottens 2008-05-24 18:33:40 +00:00
parent 402a4ed8b2
commit 8edc0b399f
3 changed files with 8 additions and 27 deletions

View File

@ -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) {

View File

@ -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

View File

@ -35,6 +35,7 @@
#include <math.h>
#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