diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-07-17 11:08:46 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-07-17 11:08:46 (GMT) |
commit | c112906daac96178d9d016a170fa863545a0b972 (patch) | |
tree | 464ea533e538e1303c7a1e0b73221b445ff51888 /src | |
parent | 6626a96b8fa00c5ebb1ed308b77c9cf046e78849 (diff) | |
download | Qt-c112906daac96178d9d016a170fa863545a0b972.zip Qt-c112906daac96178d9d016a170fa863545a0b972.tar.gz Qt-c112906daac96178d9d016a170fa863545a0b972.tar.bz2 |
Compile
Change 6626a9 broke compilation because several files indirectly
depended on a #include that was removed.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/extra/qfxparticles.cpp | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxgridview.cpp | 4 | ||||
-rw-r--r-- | src/declarative/fx/qfximage.cpp | 19 | ||||
-rw-r--r-- | src/declarative/fx/qfximage_p.h | 10 | ||||
-rw-r--r-- | src/declarative/fx/qfxlineedit.cpp | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxlistview.cpp | 3 | ||||
-rw-r--r-- | src/declarative/fx/qfxpainteditem.cpp | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxrect.cpp | 5 | ||||
-rw-r--r-- | src/declarative/fx/qfxtext.cpp | 32 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 16 |
10 files changed, 52 insertions, 41 deletions
diff --git a/src/declarative/extra/qfxparticles.cpp b/src/declarative/extra/qfxparticles.cpp index c31163c..08d38ba 100644 --- a/src/declarative/extra/qfxparticles.cpp +++ b/src/declarative/extra/qfxparticles.cpp @@ -55,7 +55,7 @@ #include <private/qmlanimation_p.h> #include "qfxparticles.h" - +#include <QPainter> QT_BEGIN_NAMESPACE #define PI_SQR 9.8696044 diff --git a/src/declarative/fx/qfxgridview.cpp b/src/declarative/fx/qfxgridview.cpp index 11b630a..905af3b 100644 --- a/src/declarative/fx/qfxgridview.cpp +++ b/src/declarative/fx/qfxgridview.cpp @@ -45,6 +45,8 @@ #include "private/qfxflickable_p.h" #include "qfxgridview.h" +#include <QKeyEvent> + QT_BEGIN_NAMESPACE class QFxGridViewAttached : public QObject @@ -811,7 +813,7 @@ QFxItem *QFxGridView::currentItem() Q_D(QFxGridView); if (!d->currentItem) { // Always return something valid - if (!d->tmpCurrent) + if (!d->tmpCurrent) d->tmpCurrent = new QFxItem(viewport()); return d->tmpCurrent; } diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index d19d620..027b22a 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -47,6 +47,9 @@ #include <QFile> #include <QtDeclarative/qmlengine.h> +#include <QKeyEvent> +#include <QPainter> + QT_BEGIN_NAMESPACE @@ -233,12 +236,12 @@ void QFxImage::componentComplete() \qmlproperty bool Image::smooth Set this property if you want the image to be smoothly filtered when scaled or - transformed. Smooth filtering gives better visual quality, but is slower. If - the Image is displayed at its natural size, this property has no visual or + transformed. Smooth filtering gives better visual quality, but is slower. If + the Image is displayed at its natural size, this property has no visual or performance effect. - \note Generally scaling artifacts are only visible if the image is stationary on - the screen. A common pattern when animating an image is to disable smooth + \note Generally scaling artifacts are only visible if the image is stationary on + the screen. A common pattern when animating an image is to disable smooth filtering at the beginning of the animation and reenable it at the conclusion. */ @@ -247,7 +250,7 @@ void QFxImage::componentComplete() \brief whether the image is smoothly transformed. This property is provided purely for the purpose of optimization. Turning - smooth transforms off is faster, but looks worse; turning smooth + smooth transforms off is faster, but looks worse; turning smooth transformations on is slower, but looks better. By default smooth transformations are off. @@ -348,7 +351,7 @@ void QFxImage::paintContents(QPainter &p) p.drawPixmap(QRect(sgl, 0, w - xSide, sgt), pix, QRect(sgl, 0, pix.width() - xSide, sgt)); // Upper right - if (sgt && pix.width() - sgr) + if (sgt && pix.width() - sgr) p.drawPixmap(QPoint(w-sgr, 0), pix, QRect(pix.width()-sgr, 0, sgr, sgt)); // Middle left @@ -359,13 +362,13 @@ void QFxImage::paintContents(QPainter &p) // Middle if (pix.width() - xSide && pix.height() - ySide) p.drawPixmap(QRect(sgl, sgt, w - xSide, h - ySide), - pix, + pix, QRect(sgl, sgt, pix.width() - xSide, pix.height() - ySide)); // Middle right if (sgr && pix.height() - ySide) p.drawPixmap(QRect(w-sgr, sgt, sgr, h - ySide), pix, QRect(pix.width()-sgr, sgt, sgr, pix.height() - ySide)); - // Lower left + // Lower left if (sgl && sgr) p.drawPixmap(QPoint(0, h - sgb), pix, QRect(0, pix.height() - sgb, sgl, sgb)); diff --git a/src/declarative/fx/qfximage_p.h b/src/declarative/fx/qfximage_p.h index de7ebe6..7792dbf 100644 --- a/src/declarative/fx/qfximage_p.h +++ b/src/declarative/fx/qfximage_p.h @@ -55,6 +55,8 @@ #include "qfxitem_p.h" +#include <QtCore/qpointer.h> + QT_BEGIN_NAMESPACE class QSvgRenderer; @@ -69,12 +71,12 @@ class QFxImagePrivate : public QFxItemPrivate public: QFxImagePrivate() : scaleGrid(0), tiled(false), smooth(false), opaque(false), - preserveAspect(false), status(QFxImage::Idle), sciReply(0), + preserveAspect(false), status(QFxImage::Idle), sciReply(0), progress(0.0) { } - ~QFxImagePrivate() + ~QFxImagePrivate() { delete scaleGrid; } @@ -83,11 +85,11 @@ public: QFxScaleGrid *getScaleGrid() { - if (!scaleGrid) + if (!scaleGrid) scaleGrid = new QFxScaleGrid; return scaleGrid; } - + QFxScaleGrid *scaleGrid; QPixmap pix; bool tiled : 1; diff --git a/src/declarative/fx/qfxlineedit.cpp b/src/declarative/fx/qfxlineedit.cpp index 24cf3fc..da79979 100644 --- a/src/declarative/fx/qfxlineedit.cpp +++ b/src/declarative/fx/qfxlineedit.cpp @@ -44,6 +44,7 @@ #include <QValidator> #include <QApplication> #include <QFontMetrics> +#include <QPainter> QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(QFxLineEdit,LineEdit); diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp index 889cfdd..351365d 100644 --- a/src/declarative/fx/qfxlistview.cpp +++ b/src/declarative/fx/qfxlistview.cpp @@ -46,6 +46,7 @@ #include "qfxlistview.h" #include <qmlexpression.h> +#include <QKeyEvent> QT_BEGIN_NAMESPACE class QFxListViewAttached : public QObject @@ -292,7 +293,7 @@ public: } return -1; // Not in visibleList } - + bool mapRangeFromModel(int &index, int &count) const { if (index + count < visibleIndex) return false; diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp index c79abbd..7ff3361 100644 --- a/src/declarative/fx/qfxpainteditem.cpp +++ b/src/declarative/fx/qfxpainteditem.cpp @@ -48,6 +48,7 @@ #include <QEvent> #include <QApplication> #include <QGraphicsSceneMouseEvent> +#include <QPainter> QT_BEGIN_NAMESPACE diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp index 2ad8536..32d3eb4 100644 --- a/src/declarative/fx/qfxrect.cpp +++ b/src/declarative/fx/qfxrect.cpp @@ -42,6 +42,7 @@ #include "qfxrect.h" #include "qfxrect_p.h" +#include <QPainter> QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(QFxPen,Pen) @@ -331,7 +332,7 @@ void QFxRect::setGradient(QFxGradient *gradient) This property holds the corner radius used to draw a rounded rect. If radius is non-zero, the rect will be painted as a rounded rectangle, otherwise it will be - painted as a normal rectangle. The same radius is used by all 4 corners; there is currently + painted as a normal rectangle. The same radius is used by all 4 corners; there is currently no way to specify different radii for different corners. */ @@ -591,7 +592,7 @@ void QFxRect::drawRect(QPainter &p) if (yMiddles) p.drawPixmap(QRect(width()-xOffset+pw/2, yOffset-pw/2, xOffset, height() - ySide + pw), d->rectImage, QRect(d->rectImage.width()-xOffset, d->rectImage.height()/2, xOffset, 1)); - // Lower left + // Lower left p.drawPixmap(QPoint(-pw/2, height() - yOffset + pw/2), d->rectImage, QRect(0, d->rectImage.height() - yOffset, xOffset, yOffset)); // Lower Middle diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 8618b87..2bae53f 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -49,7 +49,7 @@ #include <QTextDocument> #include <QTextCursor> #include <QGraphicsSceneMouseEvent> - +#include <QPainter> QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(QFxText,Text) @@ -68,7 +68,7 @@ QML_DEFINE_TYPE(QFxText,Text) \image declarative-text.png - If height and width are not explicitly set, Text will attempt to determine how + If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless \c wrap is set, it will always prefer width to height (all text will be placed on a single line). @@ -86,7 +86,7 @@ QML_DEFINE_TYPE(QFxText,Text) \brief The QFxText class provides a formatted text item that you can add to a QFxView. - Text was designed for read-only text; it does not allow for any text editing. + Text was designed for read-only text; it does not allow for any text editing. It can display both plain and rich text. For example: \qml @@ -96,7 +96,7 @@ QML_DEFINE_TYPE(QFxText,Text) \image text.png - If height and width are not explicitly set, Text will attempt to determine how + If height and width are not explicitly set, Text will attempt to determine how much room is needed and set it accordingly. Unless \c wrap is set, it will always prefer width to height (all text will be placed on a single line). @@ -161,9 +161,9 @@ void QFxText::setText(const QString &n) if (d->richText) { if (!d->doc) { - d->control = new QTextControl(this); + d->control = new QTextControl(this); d->control->setTextInteractionFlags(Qt::TextBrowserInteraction); - d->doc = d->control->document(); + d->doc = d->control->document(); d->doc->setDocumentMargin(0); } d->doc->setHtml(n); @@ -299,8 +299,8 @@ QColor QFxText::styleColor() const Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is top-left aligned. - The valid values for \c hAlign are \c AlignLeft, \c AlignRight and - \c AlignHCenter. The valid values for \c vAlign are \c AlignTop, \c AlignBottom + The valid values for \c hAlign are \c AlignLeft, \c AlignRight and + \c AlignHCenter. The valid values for \c vAlign are \c AlignTop, \c AlignBottom and \c AlignVCenter. */ @@ -479,7 +479,7 @@ QString QFxText::activeLink() const return d->activeLink; } -void QFxText::geometryChanged(const QRectF &newGeometry, +void QFxText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QFxText); @@ -516,7 +516,7 @@ void QFxTextPrivate::updateSize() QSize size(0, 0); //setup instance of QTextLayout for all cases other than richtext - if (!richText) + if (!richText) { tmp = text; tmp.replace(QLatin1Char('\n'), QChar::LineSeparator); @@ -545,7 +545,7 @@ void QFxTextPrivate::updateSize() dy -= (int)doc->size().height(); } else { dy -= size.height(); - } + } int yoff = 0; if (q->heightValid()) { @@ -555,7 +555,7 @@ void QFxTextPrivate::updateSize() yoff = dy/2; } q->setBaselineOffset(fm.ascent() + yoff); - + if (!q->widthValid()) { int newWidth = (richText ? (int)doc->idealWidth() : size.width()); q->setImplicitWidth(newWidth); @@ -645,7 +645,7 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout) QTextLine line = layout->createLine(); if (!line.isValid()) break; - + if ((wrap || elideMode != Qt::ElideNone) && q->widthValid()) line.setLineWidth(lineWidth); } @@ -686,7 +686,7 @@ QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle) if (drawStyle) { p.setPen(styleColor); } - else + else p.setPen(color); p.setFont(f); layout.draw(&p, QPointF(0, 0)); @@ -813,7 +813,7 @@ void QFxText::paintContents(QPainter &p) break; } - bool needClip = !clip() && (d->imgCache.width() > width() || + bool needClip = !clip() && (d->imgCache.width() > width() || d->imgCache.height() > height()); if (needClip) { @@ -862,7 +862,7 @@ void QFxText::mousePressEvent(QGraphicsSceneMouseEvent *event) if (!event->isAccepted()) QFxItem::mousePressEvent(event); - + } /*! diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 5a62727..f9cde7c 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -50,7 +50,7 @@ #include <QGraphicsSceneMouseEvent> #include <QDebug> - +#include <QPainter> QT_BEGIN_NAMESPACE QML_DEFINE_TYPE(QFxTextEdit, TextEdit) @@ -353,8 +353,8 @@ void QFxTextEdit::setHighlightedTextColor(const QColor &color) Sets the horizontal and vertical alignment of the text within the TextEdit items width and height. By default, the text is top-left aligned. - The valid values for \c hAlign are \c AlignLeft, \c AlignRight and - \c AlignHCenter. The valid values for \c vAlign are \c AlignTop, \c AlignBottom + The valid values for \c hAlign are \c AlignLeft, \c AlignRight and + \c AlignHCenter. The valid values for \c vAlign are \c AlignTop, \c AlignBottom and \c AlignVCenter. */ @@ -670,7 +670,7 @@ void QFxTextEdit::setTextMargin(qreal margin) d->document->setDocumentMargin(d->textMargin); } -void QFxTextEdit::geometryChanged(const QRectF &newGeometry, +void QFxTextEdit::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { if (newGeometry.width() != oldGeometry.width()) @@ -762,7 +762,7 @@ Qt::TextInteractionFlags QFxTextEdit::textInteractionFlags() const } /*! - Returns the cursor for the point at the given \a pos on the + Returns the cursor for the point at the given \a pos on the text edit. */ QTextCursor QFxTextEdit::cursorForPosition(const QPoint &pos) const @@ -1130,9 +1130,9 @@ void QFxTextEdit::updateSize() if (!heightValid()) { if (d->text.isEmpty()) { setImplicitHeight(fm.height()); - } else { + } else { setImplicitHeight((int)d->document->size().height()); - } + } } setContentsSize(QSize(width(), height())); } else { @@ -1146,7 +1146,7 @@ void QFxTextEditPrivate::updateDefaultTextOption() QTextOption opt = document->defaultTextOption(); int oldAlignment = opt.alignment(); opt.setAlignment((Qt::Alignment)(int)(hAlign | vAlign)); - + QTextOption::WrapMode oldWrapMode = opt.wrapMode(); if (wrap) |