API clean : bye bye cache mode wich is managed by qt
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796903
This commit is contained in:
parent
1b15d951a9
commit
1e8d0d6051
@ -125,8 +125,7 @@ Widget::Widget(QGraphicsItem *parent, QObject* parentObject)
|
||||
{
|
||||
setFlag(QGraphicsItem::ItemClipsToShape, true);
|
||||
setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
|
||||
setCacheMode(DeviceCoordinateCache);
|
||||
|
||||
|
||||
Widget *w = dynamic_cast<Widget *>(parent);
|
||||
if (w) {
|
||||
w->addChild(this);
|
||||
@ -141,21 +140,6 @@ Widget::~Widget()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void Widget::setCachePaintMode(CachePaintMode mode, const QSize &size)
|
||||
{
|
||||
setCacheMode(CacheMode(mode), size);
|
||||
}
|
||||
|
||||
Widget::CachePaintMode Widget::cachePaintMode() const
|
||||
{
|
||||
return CachePaintMode(cacheMode());
|
||||
}
|
||||
|
||||
void Widget::update(const QRectF &rect)
|
||||
{
|
||||
QGraphicsWidget::update(rect);
|
||||
}
|
||||
|
||||
Qt::Orientations Widget::expandingDirections() const
|
||||
{
|
||||
return Qt::Horizontal | Qt::Vertical;
|
||||
|
@ -69,13 +69,6 @@ class PLASMA_EXPORT Widget : public QGraphicsWidget
|
||||
Q_PROPERTY( QRectF geometry READ geometry WRITE setGeometry )
|
||||
Q_PROPERTY( QSizeF size READ size WRITE resize )
|
||||
public:
|
||||
enum CachePaintMode {
|
||||
NoCacheMode,
|
||||
ItemCoordinateCacheMode,
|
||||
DeviceCoordinateCacheMode
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new Plasma::Widget.
|
||||
* @param parent the QGraphicsItem this icon is parented to.
|
||||
@ -151,26 +144,6 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE void addChild(Widget *widget);
|
||||
|
||||
/**
|
||||
* Sets the widget's cache paint mode and cache size.
|
||||
* @param mode the new cache paint mode
|
||||
* @param size the new cache size, only applies to ItemCoordinateCacheMode
|
||||
*/
|
||||
void setCachePaintMode(CachePaintMode mode, const QSize &size = QSize());
|
||||
|
||||
/**
|
||||
* The current cache paint mode.
|
||||
*/
|
||||
CachePaintMode cachePaintMode() const;
|
||||
|
||||
/**
|
||||
* Invalidates the widget's cache paint mode for a given item rectangle.
|
||||
* @param rect the optional invalidated rectangle; if null, defaults to boundingRect().
|
||||
*/
|
||||
void update(const QRectF &rect = QRectF());
|
||||
inline void update(qreal _x, qreal _y, qreal w, qreal h)
|
||||
{ update(QRectF(_x, _y, w, h)); }
|
||||
|
||||
virtual QGraphicsItem* graphicsItem();
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user