remove useless function

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796939
This commit is contained in:
Alexis Ménard 2008-04-14 15:15:26 +00:00
parent 1b7a9a14e0
commit d91b8a94d4
4 changed files with 14 additions and 122 deletions

View File

@ -634,6 +634,11 @@ QString Applet::name() const
return d->appletDescription.name();
}
QFont Applet::font() const
{
return QApplication::font();
}
QString Applet::icon() const
{
if (!d->appletDescription.isValid()) {
@ -944,15 +949,6 @@ QPainterPath Applet::shape() const
return Plasma::roundedRectangle(boundingRect().adjusted(-2, -2, 2, 2), 10);
}
Qt::Orientations Applet::expandingDirections() const
{
if (d->square) {
return 0;
}
return Widget::expandingDirections();
}
QList<QAction*> Applet::contextActions()
{
//kDebug() << "empty context actions";

View File

@ -385,6 +385,11 @@ class PLASMA_EXPORT Applet : public Widget
**/
QString name() const;
/**
* @return the font currently set for this widget
**/
QFont font() const;
/**
* Returns the plugin name for the applet
*/
@ -540,11 +545,6 @@ class PLASMA_EXPORT Applet : public Widget
*/
void raise();
/**
* Reimplemented from Plasma::Widget
*/
Qt::Orientations expandingDirections() const;
/**
* Reimplemented from QGraphicsItem
**/

View File

@ -42,7 +42,6 @@
#include "plasma/plasma.h"
#include "plasma/view.h"
#include "plasma/containment.h"
#include "plasma/widgets/tooltip_p.h"
namespace Plasma
{
@ -54,13 +53,13 @@ class Widget::Private
: minimumSize(0,0),
maximumSize(std::numeric_limits<qreal>::infinity(),
std::numeric_limits<qreal>::infinity()),
wasMovable(false),
toolTip(0)
wasMovable(false)
//toolTip(0)
{ }
~Private()
{
delete toolTip;
//delete toolTip;
}
QSizeF minimumSize;
@ -69,14 +68,9 @@ class Widget::Private
bool wasMovable;
bool shouldPaint(QPainter *painter, const QTransform &transform);
ToolTipData *toolTip;
//ToolTipData *toolTip;
};
QGraphicsItem* Widget::graphicsItem()
{
return this;
}
bool Widget::Private::shouldPaint(QPainter *painter, const QTransform &transform)
{
Q_UNUSED(painter)
@ -109,50 +103,6 @@ Widget::~Widget()
delete d;
}
Qt::Orientations Widget::expandingDirections() const
{
return Qt::Horizontal | Qt::Vertical;
}
QFont Widget::font() const
{
return QApplication::font();
}
bool Widget::hasHeightForWidth() const
{
return false;
}
qreal Widget::heightForWidth(qreal w) const
{
Q_UNUSED(w);
return -1.0;
}
bool Widget::hasWidthForHeight() const
{
return false;
}
qreal Widget::widthForHeight(qreal h) const
{
Q_UNUSED(h);
return -1.0;
}
QRectF Widget::geometry() const
{
return QRectF(pos(), size());
}
void Widget::setSize(const QSizeF &s)
{
resize(s);
}
Widget *Widget::parent() const
{
return parent(this);

View File

@ -65,9 +65,6 @@ class Layout;
class PLASMA_EXPORT Widget : public QGraphicsWidget
{
Q_OBJECT
Q_PROPERTY( Qt::Orientations expandingDirections READ expandingDirections )
Q_PROPERTY( QRectF geometry READ geometry WRITE setGeometry )
Q_PROPERTY( QSizeF size READ size WRITE resize )
public:
/**
* Creates a new Plasma::Widget.
@ -80,53 +77,6 @@ public:
*/
virtual ~Widget();
/**
* This method is used by Plasma::Layout to determine which directions the
* widget naturally expands.
* @return bitmask with the directions that this Widget can be expanded.
*/
virtual Qt::Orientations expandingDirections() const;
/**
* This method is used by Plasma::Layout to determine whether this widget
* can provide a height value given a width value.
* @return whether or not this Widget has heightForWidth.
*/
virtual bool hasHeightForWidth() const;
/**
* This method is used by Plasma::Layout to determine a height value
* given a width value.
* @param width the width to use to determine height.
* @return height calculated using width given.
*/
virtual qreal heightForWidth(qreal width) const;
/**
* This method is used by Plasma::Layout to determine whether this widget
* can provide a width value given a height value.
* @return whether or not this Widget has widthForHeight.
*/
virtual bool hasWidthForHeight() const;
/**
* This method is used by Plasma::Layout to determine a width value
* given a height value.
* @param height the width to use to determine width.
* @return width calculated using height given.
*/
virtual qreal widthForHeight(qreal h) const;
/**
* @return geometry of this widget.
*/
QRectF geometry() const;
/**
* @return the font currently set for this widget
**/
QFont font() const;
/**
* @return this Plasma::Widget's parent, returns a null pointer if
* none exist.
@ -144,8 +94,6 @@ public:
*/
Q_INVOKABLE void addChild(Widget *widget);
virtual QGraphicsItem* graphicsItem();
#ifdef TOOLTIPMANAGER
/**
* The Data from the tooltip
@ -177,8 +125,6 @@ protected:
#endif
private:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
void setSize(const QSizeF &);
class Private;
Private *const d;