- Add setSize (needed by Applet)
- Delete white space from line ends svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=718077
This commit is contained in:
parent
c4f4f16048
commit
61fa701fc0
@ -66,7 +66,7 @@ class Widget::Private
|
||||
#if QT_VERSION >= 0x040400
|
||||
#warning Replace Plasma::Widget::CachePaintMode with QGraphicsItem::CacheMode
|
||||
#endif
|
||||
Widget::CachePaintMode cachePaintMode;
|
||||
Widget::CachePaintMode cachePaintMode;
|
||||
QSize cacheSize;
|
||||
QString cacheKey;
|
||||
QRectF cacheInvalidated;
|
||||
@ -222,6 +222,11 @@ void Widget::setGeometry(const QRectF& geometry)
|
||||
update();
|
||||
}
|
||||
|
||||
void Widget::setSize(const QSizeF& size)
|
||||
{
|
||||
d->size = size;
|
||||
}
|
||||
|
||||
void Widget::updateGeometry()
|
||||
{
|
||||
if ( managingLayout() ) {
|
||||
@ -256,7 +261,7 @@ void Widget::setFont(const QFront& font)
|
||||
|
||||
QRectF Widget::boundingRect() const
|
||||
{
|
||||
return QRectF(QPointF(0,0),geometry().size());
|
||||
return QRectF(QPointF(0,0),geometry().size());
|
||||
}
|
||||
|
||||
void Widget::resize(const QSizeF& size)
|
||||
|
@ -57,8 +57,8 @@ class PLASMA_EXPORT Widget : public QObject,
|
||||
Q_PROPERTY( QSizeF maximumSize READ maximumSize WRITE setMaximumSize )
|
||||
Q_PROPERTY( QRectF geometry READ geometry WRITE setGeometry )
|
||||
Q_PROPERTY( QSizeF sizeHint READ sizeHint )
|
||||
Q_PROPERTY( QSizeF size READ size WRITE resize )
|
||||
Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity )
|
||||
Q_PROPERTY( QSizeF size READ size WRITE resize )
|
||||
Q_PROPERTY( qreal opacity READ opacity WRITE setOpacity )
|
||||
|
||||
public:
|
||||
enum CachePaintMode {
|
||||
@ -255,6 +255,7 @@ protected:
|
||||
* @param widget the parent QWidget (most likely the Corona)
|
||||
*/
|
||||
virtual void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
void setSize(const QSizeF& size);
|
||||
|
||||
private:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
|
Loading…
Reference in New Issue
Block a user