summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawutil.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/painting/qdrawutil.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/painting/qdrawutil.h')
-rw-r--r--src/gui/painting/qdrawutil.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 4135c19..38ef30e 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -44,8 +44,8 @@
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h> // char*->QString conversion
+#include <QtCore/qmargins.h>
#include <QtGui/qpixmap.h>
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -133,24 +133,6 @@ Q_GUI_EXPORT QT3_SUPPORT void qDrawArrow(QPainter *p, Qt::ArrowType type, Qt::GU
const QPalette &pal, bool enabled);
#endif
-struct QMargins
-{
- inline QMargins(int margin = 0)
- : top(margin),
- left(margin),
- bottom(margin),
- right(margin) {}
- inline QMargins(int topMargin, int leftMargin, int bottomMargin, int rightMargin)
- : top(topMargin),
- left(leftMargin),
- bottom(bottomMargin),
- right(rightMargin) {}
- int top;
- int left;
- int bottom;
- int right;
-};
-
struct QTileRules
{
inline QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule = Qt::Stretch)