+contentSizeHint -> died

+contextActions -> contextualActions 

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801150
This commit is contained in:
Alexis Ménard 2008-04-25 19:55:24 +00:00
parent 9316dbd0d5
commit 13f4fae5f3
5 changed files with 9 additions and 20 deletions

View File

@ -958,10 +958,10 @@ QPainterPath Applet::shape() const
return Plasma::roundedRectangle(boundingRect().adjusted(-2, -2, 2, 2), 10);
}
QList<QAction*> Applet::contextActions()
QList<QAction*> Applet::contextualActions()
{
//kDebug() << "empty context actions";
return d->script ? d->script->contextActions() : QList<QAction*>();
return d->script ? d->script->contextualActions() : QList<QAction*>();
}
QColor Applet::color() const

View File

@ -472,7 +472,7 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
* @return A list of actions. The default implementation returns an
* empty list.
**/
virtual QList<QAction*> contextActions();
virtual QList<QAction*> contextualActions();
/**
* Sets shadow for the given applet.

View File

@ -267,7 +267,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
if (applet) {
bool hasEntries = false;
QList<QAction*> actions = applet->contextActions();
QList<QAction*> actions = applet->contextualActions();
if (!actions.isEmpty()) {
foreach(QAction* action, actions) {
desktopMenu.addAction(action);
@ -284,7 +284,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
hasEntries = true;
}
QList<QAction*> containmentActions = contextActions();
QList<QAction*> containmentActions = contextualActions();
if (!containmentActions.isEmpty()) {
if (hasEntries) {
desktopMenu.addSeparator();
@ -329,7 +329,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
return;
}
QList<QAction*> actions = contextActions();
QList<QAction*> actions = contextualActions();
if (actions.count() < 1) {
//kDebug() << "no applet, but no actions";

View File

@ -61,15 +61,10 @@ void AppletScript::paintInterface(QPainter* painter, const QStyleOptionGraphicsI
Q_UNUSED(contentsRect)
}
QSizeF AppletScript::contentSizeHint() const
{
return applet()->boundingRect().size();
}
QSizeF AppletScript::size() const
{
if (applet()) {
return applet()->boundingRect().size();
return applet()->size();
}
return QSizeF();
@ -80,7 +75,7 @@ void AppletScript::constraintsUpdated(Plasma::Constraints constraints)
Q_UNUSED(constraints);
}
QList<QAction*> AppletScript::contextActions()
QList<QAction*> AppletScript::contextualActions()
{
return QList<QAction*>();
}

View File

@ -72,12 +72,6 @@ public:
const QStyleOptionGraphicsItem* option,
const QRect &contentsRect);
/**
* Called to discover the content size hint for the item.
* The default implementation simply returns the Applet's contentSizeHint
*/
virtual QSizeF contentSizeHint() const;
/**
* Returns the area within which contents can be painted.
**/
@ -102,7 +96,7 @@ public:
* @return A list of actions. The default implementation returns an
* empty list.
*/
virtual QList<QAction*> contextActions();
virtual QList<QAction*> contextualActions();
public Q_SLOTS: