summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.h
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-08-31 16:15:13 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-08-31 16:20:51 (GMT)
commit758f4735bcae034ac25730e53bb371df3b7d6e8a (patch)
tree7086950b36e5b46ab5a034839c1e489904e51fc1 /src/gui/kernel/qwidget.h
parente70980b2aacbc758a0cd1e2246633278f7c505ab (diff)
downloadQt-758f4735bcae034ac25730e53bb371df3b7d6e8a.zip
Qt-758f4735bcae034ac25730e53bb371df3b7d6e8a.tar.gz
Qt-758f4735bcae034ac25730e53bb371df3b7d6e8a.tar.bz2
Make QMargins a proper class
Since we need QMargins for other things then the CSS helper functions in drawutil, we have to make it more generic. It is already useful for QWidget::contentsMargins for example. This ensures we have some flexibility on how to use and modify it in the future. Reviewed-by: mbm
Diffstat (limited to 'src/gui/kernel/qwidget.h')
-rw-r--r--src/gui/kernel/qwidget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index 38650f0..f398dbd 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -44,6 +44,7 @@
#include <QtGui/qwindowdefs.h>
#include <QtCore/qobject.h>
+#include <QtCore/qmargins.h>
#include <QtGui/qpaintdevice.h>
#include <QtGui/qpalette.h>
#include <QtGui/qfont.h>
@@ -527,7 +528,10 @@ public:
QRegion visibleRegion() const;
void setContentsMargins(int left, int top, int right, int bottom);
+ void setContentsMargins(const QMargins &margins);
void getContentsMargins(int *left, int *top, int *right, int *bottom) const;
+ QMargins contentsMargins() const;
+
QRect contentsRect() const;
public: