summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-08-14 02:56:13 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-08-14 02:56:13 (GMT)
commitc7aef9c3a3a9c4b2fcebb9f55ae11fc0b590a9ed (patch)
treee2618da2b6ce8c4d3ceeecfe66d7fb133068be01 /src
parentda56f50eb640823e2d48c1308c09626a428a50f5 (diff)
downloadQt-c7aef9c3a3a9c4b2fcebb9f55ae11fc0b590a9ed.zip
Qt-c7aef9c3a3a9c4b2fcebb9f55ae11fc0b590a9ed.tar.gz
Qt-c7aef9c3a3a9c4b2fcebb9f55ae11fc0b590a9ed.tar.bz2
Get rid of QmlFont and use the QFont value type instead.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxlineedit.cpp22
-rw-r--r--src/declarative/fx/qfxlineedit.h6
-rw-r--r--src/declarative/fx/qfxlineedit_p.h4
-rw-r--r--src/declarative/fx/qfxtext.cpp38
-rw-r--r--src/declarative/fx/qfxtext.h11
-rw-r--r--src/declarative/fx/qfxtext_p.h23
-rw-r--r--src/declarative/fx/qfxtextedit.cpp43
-rw-r--r--src/declarative/fx/qfxtextedit.h9
-rw-r--r--src/declarative/fx/qfxtextedit_p.h4
-rw-r--r--src/declarative/util/qmlfont.cpp148
-rw-r--r--src/declarative/util/qmlfont.h93
-rw-r--r--src/declarative/util/util.pri2
12 files changed, 61 insertions, 342 deletions
diff --git a/src/declarative/fx/qfxlineedit.cpp b/src/declarative/fx/qfxlineedit.cpp
index 6f2f079..de850f8 100644
--- a/src/declarative/fx/qfxlineedit.cpp
+++ b/src/declarative/fx/qfxlineedit.cpp
@@ -101,26 +101,25 @@ void QFxLineEdit::setText(const QString &s)
Set the LineEdit's font attributes. \c font.size sets the font's point size.
*/
-QmlFont *QFxLineEdit::font()
+QFont QFxLineEdit::font() const
{
- Q_D(QFxLineEdit);
+ Q_D(const QFxLineEdit);
return d->font;
}
-/*!
-This signal is emitted when the font of the item changes.
-*/
-void QFxLineEdit::fontChanged()
+void QFxLineEdit::setFont(const QFont &font)
{
Q_D(QFxLineEdit);
- d->control->setFont(d->font->font());
+ d->font = font;
+
+ d->control->setFont(d->font);
if(d->cursorItem){
- d->cursorItem->setHeight(QFontMetrics(d->font->font()).height());
+ d->cursorItem->setHeight(QFontMetrics(d->font).height());
moveCursor();
}
//updateSize();
updateAll();//TODO: Only necessary updates
- emit update();
+ update();
}
/*!
@@ -564,9 +563,6 @@ void QFxLineEditPrivate::init()
q, SLOT(updateAll()));
q->connect(control, SIGNAL(selectionChanged()),
q, SLOT(updateAll()));
- if(!font)
- font = new QmlFont();
- q->connect(font, SIGNAL(updated()), q, SLOT(fontChanged()));
q->updateSize();
oldValidity = control->hasAcceptableInput();
lastSelectionStart = 0;
@@ -633,7 +629,7 @@ void QFxLineEdit::updateSize()
Q_D(QFxLineEdit);
setImplicitHeight(d->control->height());
//d->control->width() is max width, not current width
- QFontMetrics fm = QFontMetrics(d->font->font());
+ QFontMetrics fm = QFontMetrics(d->font);
setImplicitWidth(fm.boundingRect(d->control->text()).width()+1);
setContentsSize(QSize(width(), height()));
}
diff --git a/src/declarative/fx/qfxlineedit.h b/src/declarative/fx/qfxlineedit.h
index f78dbfc..0218fb0 100644
--- a/src/declarative/fx/qfxlineedit.h
+++ b/src/declarative/fx/qfxlineedit.h
@@ -64,7 +64,7 @@ class Q_DECLARATIVE_EXPORT QFxLineEdit : public QFxPaintedItem
Q_PROPERTY(QColor color READ color WRITE setColor)
Q_PROPERTY(QColor highlightColor READ highlightColor WRITE setHighlightColor)
Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor WRITE setHighlightedTextColor)
- Q_PROPERTY(QmlFont *font READ font CONSTANT)
+ Q_PROPERTY(QFont font READ font WRITE setFont)
Q_PROPERTY(HAlignment hAlign READ hAlign WRITE setHAlign)
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly)
@@ -98,7 +98,8 @@ public:
QString text() const;
void setText(const QString &);
- QmlFont *font();
+ QFont font() const;
+ void setFont(const QFont &font);
QColor color() const;
void setColor(const QColor &c);
@@ -169,7 +170,6 @@ protected:
private Q_SLOTS:
void updateSize();
- void fontChanged();
void q_textChanged();
void selectionChanged();
void updateAll();
diff --git a/src/declarative/fx/qfxlineedit_p.h b/src/declarative/fx/qfxlineedit_p.h
index a087a32..369669f 100644
--- a/src/declarative/fx/qfxlineedit_p.h
+++ b/src/declarative/fx/qfxlineedit_p.h
@@ -64,7 +64,7 @@ class QFxLineEditPrivate : public QFxPaintedItemPrivate
Q_DECLARE_PUBLIC(QFxLineEdit);
public:
QFxLineEditPrivate() : control(new QLineControl(QString())),
- font(0), color((QRgb)0), style(QFxText::Normal),
+ color((QRgb)0), style(QFxText::Normal),
styleColor((QRgb)0), hAlign(QFxLineEdit::AlignLeft),
hscroll(0), oldScroll(0), focused(false), cursorVisible(false)
{
@@ -79,7 +79,7 @@ public:
QLineControl* control;
- QmlFont *font;
+ QFont font;
QColor color;
QColor highlightColor;
QColor highlightedTextColor;
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index 0315a75..11fef69 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -108,7 +108,6 @@ QFxText::QFxText(QFxItem *parent)
: QFxItem(*(new QFxTextPrivate), parent)
{
Q_D(QFxText);
- d->init();
setAcceptedMouseButtons(Qt::LeftButton);
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
@@ -117,7 +116,6 @@ QFxText::QFxText(QFxTextPrivate &dd, QFxItem *parent)
: QFxItem(dd, parent)
{
Q_D(QFxText);
- d->init();
setAcceptedMouseButtons(Qt::LeftButton);
setFlag(QGraphicsItem::ItemHasNoContents, false);
}
@@ -142,10 +140,20 @@ QFxText::~QFxText()
\brief the font used to display the text.
*/
-QmlFont *QFxText::font()
+QFont QFxText::font() const
+{
+ Q_D(const QFxText);
+ return d->font;
+}
+
+void QFxText::setFont(const QFont &font)
{
Q_D(QFxText);
- return d->font();
+ d->font = font;
+
+ d->imgDirty = true;
+ d->updateSize();
+ update();
}
void QFxText::setText(const QString &n)
@@ -492,15 +500,6 @@ void QFxText::geometryChanged(const QRectF &newGeometry,
QFxItem::geometryChanged(newGeometry, oldGeometry);
}
-
-void QFxText::fontChanged()
-{
- Q_D(QFxText);
- d->imgDirty = true;
- d->updateSize();
- emit update();
-}
-
void QFxTextPrivate::updateSize()
{
Q_Q(QFxText);
@@ -508,8 +507,7 @@ void QFxTextPrivate::updateSize()
if (text.isEmpty()) {
return;
}
- QFont f; if (_font) f = _font->font();
- QFontMetrics fm(f);
+ QFontMetrics fm(font);
int dy = q->height();
QString tmp;
@@ -524,14 +522,14 @@ void QFxTextPrivate::updateSize()
if (singleline && elideMode != Qt::ElideNone && q->widthValid())
tmp = fm.elidedText(tmp,elideMode,q->width()); // XXX still worth layout...?
layout.clearLayout();
- layout.setFont(f);
+ layout.setFont(font);
layout.setText(tmp);
size = setupTextLayout(&layout);
cachedLayoutSize = size;
}
if (richText) {
singleline = false; // richtext can't elide or be optimized for single-line case
- doc->setDefaultFont(f);
+ doc->setDefaultFont(font);
QTextOption option((Qt::Alignment)int(hAlign | vAlign));
if (wrap)
option.setWrapMode(QTextOption::WordWrap);
@@ -622,8 +620,7 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
Q_Q(QFxText);
layout->setCacheEnabled(true);
- QFont f; if (_font) f = _font->font();
- QFontMetrics fm = QFontMetrics(f);
+ QFontMetrics fm = QFontMetrics(font);
int height = 0;
qreal widthUsed = 0;
@@ -657,7 +654,6 @@ QSize QFxTextPrivate::setupTextLayout(QTextLayout *layout)
QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle)
{
//do layout
- QFont f; if (_font) f = _font->font();
QSize size = cachedLayoutSize;
int x = 0;
@@ -682,7 +678,7 @@ QPixmap QFxTextPrivate::wrappedTextImage(bool drawStyle)
}
else
p.setPen(color);
- p.setFont(f);
+ p.setFont(font);
layout.draw(&p, QPointF(0, 0));
return img;
}
diff --git a/src/declarative/fx/qfxtext.h b/src/declarative/fx/qfxtext.h
index 3665ac6..edf6031 100644
--- a/src/declarative/fx/qfxtext.h
+++ b/src/declarative/fx/qfxtext.h
@@ -43,8 +43,6 @@
#define QFXTEXT_H
#include <QtDeclarative/qfxitem.h>
-#include <QtDeclarative/qmlfont.h>
-
QT_BEGIN_HEADER
@@ -61,7 +59,7 @@ class Q_DECLARATIVE_EXPORT QFxText : public QFxItem
Q_ENUMS(TextFormat)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
- Q_PROPERTY(QmlFont *font READ font CONSTANT)
+ Q_PROPERTY(QFont font READ font WRITE setFont)
Q_PROPERTY(QColor color READ color WRITE setColor)
Q_PROPERTY(TextStyle style READ style WRITE setStyle)
Q_PROPERTY(QColor styleColor READ styleColor WRITE setStyleColor)
@@ -93,7 +91,8 @@ public:
QString text() const;
void setText(const QString &);
- QmlFont *font();
+ QFont font() const;
+ void setFont(const QFont &font);
QColor color() const;
void setColor(const QColor &c);
@@ -129,10 +128,6 @@ Q_SIGNALS:
void textChanged(const QString &text);
void linkActivated(const QString &link);
-private Q_SLOTS:
- //### should be in QFxTextPrivate?
- void fontChanged();
-
protected:
QFxText(QFxTextPrivate &dd, QFxItem *parent);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
diff --git a/src/declarative/fx/qfxtext_p.h b/src/declarative/fx/qfxtext_p.h
index bbb54a3..95b566c 100644
--- a/src/declarative/fx/qfxtext_p.h
+++ b/src/declarative/fx/qfxtext_p.h
@@ -69,22 +69,13 @@ class QFxTextPrivate : public QFxItemPrivate
Q_DECLARE_PUBLIC(QFxText)
public:
QFxTextPrivate()
- : _font(0), color((QRgb)0), style(QFxText::Normal), imgDirty(true),
+ : color((QRgb)0), style(QFxText::Normal), imgDirty(true),
hAlign(QFxText::AlignLeft), vAlign(QFxText::AlignTop), elideMode(Qt::ElideNone),
dirty(false), wrap(false), richText(false), singleline(false), control(0), doc(0),
format(QFxText::AutoText)
{
}
- ~QFxTextPrivate()
- {
- delete _font;
- }
-
- void init()
- {
- }
-
void updateSize();
void checkImgCache();
@@ -96,17 +87,7 @@ public:
QSize setupTextLayout(QTextLayout *layout);
QString text;
- QmlFont *font()
- {
- if (!_font) {
- Q_Q(QFxText);
- _font = new QmlFont;
- QObject::connect(_font, SIGNAL(updated()), q, SLOT(fontChanged()));
- }
- return _font;
- }
-
- QmlFont *_font;
+ QFont font;
QColor color;
QFxText::TextStyle style;
QColor styleColor;
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index 1391490..628d49b 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -242,10 +242,25 @@ void QFxTextEdit::setTextFormat(TextFormat format)
\brief the text edit's default font
*/
-QmlFont *QFxTextEdit::font()
+QFont QFxTextEdit::font() const
+{
+ Q_D(const QFxTextEdit);
+ return d->font;
+}
+
+void QFxTextEdit::setFont(const QFont &font)
{
Q_D(QFxTextEdit);
- return &(d->font);
+ d->font = font;
+
+ clearCache();
+ d->document->setDefaultFont(d->font);
+ if(d->cursor){
+ d->cursor->setHeight(QFontMetrics(d->font).height());
+ moveCursorDelegate();
+ }
+ updateSize();
+ update();
}
/*!
@@ -532,7 +547,7 @@ void QFxTextEdit::loadCursorDelegate()
d->control->setCursorWidth(0);
dirtyCache(cursorRect());
d->cursor->setParentItem(this);
- d->cursor->setHeight(QFontMetrics(d->font.font()).height());
+ d->cursor->setHeight(QFontMetrics(d->font).height());
moveCursorDelegate();
}else{
qWarning() << QLatin1String("Error loading cursor delegate for TextEdit:") + objectName();
@@ -980,22 +995,6 @@ void QFxTextEdit::drawContents(QPainter *painter, const QRect &bounds)
d->control->drawContents(painter, bounds);
}
-/*!
-This signal is emitted when the font of the item changes.
-*/
-void QFxTextEdit::fontChanged()
-{
- Q_D(QFxTextEdit);
- clearCache();
- d->document->setDefaultFont(d->font.font());
- if(d->cursor){
- d->cursor->setHeight(QFontMetrics(d->font.font()).height());
- moveCursorDelegate();
- }
- updateSize();
- emit update();
-}
-
void QFxTextEdit::updateImgCache(const QRectF &r)
{
dirtyCache(r.toRect());
@@ -1024,8 +1023,6 @@ void QFxTextEditPrivate::init()
q->setFlag(QGraphicsItem::ItemHasNoContents, false);
q->setFlag(QGraphicsItem::ItemAcceptsInputMethod);
- QObject::connect(&font, SIGNAL(updated()), q, SLOT(fontChanged()));
-
control = new QTextControl(q);
QObject::connect(control, SIGNAL(updateRequest(QRectF)), q, SLOT(updateImgCache(QRectF)));
@@ -1037,7 +1034,7 @@ void QFxTextEditPrivate::init()
QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged()));
document = control->document();
- document->setDefaultFont(font.font());
+ document->setDefaultFont(font);
document->setDocumentMargin(textMargin);
document->setUndoRedoEnabled(false); // flush undo buffer.
document->setUndoRedoEnabled(true);
@@ -1102,7 +1099,7 @@ void QFxTextEdit::updateSize()
{
Q_D(QFxTextEdit);
if (isComponentComplete()) {
- QFontMetrics fm = QFontMetrics(d->font.font());
+ QFontMetrics fm = QFontMetrics(d->font);
int dy = height();
// ### assumes that if the width is set, the text will fill to edges
// ### (unless wrap is false, then clipping will occur)
diff --git a/src/declarative/fx/qfxtextedit.h b/src/declarative/fx/qfxtextedit.h
index 132b474..f2f163b 100644
--- a/src/declarative/fx/qfxtextedit.h
+++ b/src/declarative/fx/qfxtextedit.h
@@ -71,7 +71,7 @@ class Q_DECLARATIVE_EXPORT QFxTextEdit : public QFxPaintedItem
Q_PROPERTY(QColor color READ color WRITE setColor)
Q_PROPERTY(QColor highlightColor READ highlightColor WRITE setHighlightColor)
Q_PROPERTY(QColor highlightedTextColor READ highlightedTextColor WRITE setHighlightedTextColor)
- Q_PROPERTY(QmlFont * font READ font)
+ Q_PROPERTY(QFont font READ font WRITE setFont)
Q_PROPERTY(HAlignment hAlign READ hAlign WRITE setHAlign)
Q_PROPERTY(VAlignment vAlign READ vAlign WRITE setVAlign)
Q_PROPERTY(bool wrap READ wrap WRITE setWrap)
@@ -114,8 +114,8 @@ public:
TextFormat textFormat() const;
void setTextFormat(TextFormat format);
- // leave in, have affect the default text
- QmlFont *font();
+ QFont font() const;
+ void setFont(const QFont &font);
QColor color() const;
void setColor(const QColor &c);
@@ -192,7 +192,6 @@ public Q_SLOTS:
void selectAll();
private Q_SLOTS:
- void fontChanged();
void updateImgCache(const QRectF &rect);
void q_textChanged();
void updateSelectionMarkers();
@@ -223,8 +222,6 @@ protected:
void drawContents(QPainter *, const QRect &);
private:
-
- friend class QmlFont;
Q_DISABLE_COPY(QFxTextEdit)
Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr, QFxTextEdit)
};
diff --git a/src/declarative/fx/qfxtextedit_p.h b/src/declarative/fx/qfxtextedit_p.h
index 45a8a60..fb757de 100644
--- a/src/declarative/fx/qfxtextedit_p.h
+++ b/src/declarative/fx/qfxtextedit_p.h
@@ -68,7 +68,7 @@ class QFxTextEditPrivate : public QFxPaintedItemPrivate
public:
QFxTextEditPrivate()
- : font(0), color("black"), imgDirty(true), hAlign(QFxTextEdit::AlignLeft), vAlign(QFxTextEdit::AlignTop),
+ : color("black"), imgDirty(true), hAlign(QFxTextEdit::AlignLeft), vAlign(QFxTextEdit::AlignTop),
dirty(false), wrap(false), richText(false), cursorVisible(false), focusOnPress(false),
preserveSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0),
cursorComponent(0), cursor(0), format(QFxTextEdit::AutoText), document(0)
@@ -82,7 +82,7 @@ public:
void updateSelection();
QString text;
- QmlFont font;
+ QFont font;
QColor color;
QColor highlightColor;
QColor highlightedTextColor;
diff --git a/src/declarative/util/qmlfont.cpp b/src/declarative/util/qmlfont.cpp
deleted file mode 100644
index 06e8769..0000000
--- a/src/declarative/util/qmlfont.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "private/qobject_p.h"
-#include "qfont.h"
-#include "qmlfont.h"
-
-QT_BEGIN_NAMESPACE
-
-class QmlFontPrivate : public QObjectPrivate
-{
-public:
- QFont font;
-};
-
-QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Font,QmlFont)
-
-/*!
- \internal
- \class QmlFont
- \ingroup group_utility
- \brief The QmlFont class provides a font used for drawing text on a QFxView.
-*/
-QmlFont::QmlFont(QObject *parent)
- : QObject(*(new QmlFontPrivate), parent)
-{
-}
-
-QmlFont::~QmlFont()
-{
-}
-
-/*!
- \property QmlFont::family
- \brief the family of the font.
-*/
-QString QmlFont::family() const
-{
- Q_D(const QmlFont);
- return d->font.family();
-}
-
-void QmlFont::setFamily(const QString &family)
-{
- Q_D(QmlFont);
- d->font.setFamily(family);
- emit updated();
-}
-
-/*!
- \property QmlFont::bold
- \brief whether the font should be bold.
-*/
-bool QmlFont::bold() const
-{
- Q_D(const QmlFont);
- return d->font.bold();
-}
-
-void QmlFont::setBold(bool b)
-{
- Q_D(QmlFont);
- d->font.setBold(b);
- emit updated();
-}
-
-/*!
- \property QmlFont::italic
- \brief whether the font should be italic.
-*/
-bool QmlFont::italic() const
-{
- Q_D(const QmlFont);
- return d->font.italic();
-}
-
-void QmlFont::setItalic(bool b)
-{
- Q_D(QmlFont);
- d->font.setItalic(b);
- emit updated();
-}
-
-/*!
- \property QmlFont::size
- \brief the size of the font in points.
-*/
-qreal QmlFont::size() const
-{
- Q_D(const QmlFont);
- return d->font.pointSizeF();
-}
-
-void QmlFont::setSize(qreal size)
-{
- Q_D(QmlFont);
- d->font.setPointSizeF(size);
- emit updated();
-}
-
-/*!
- \brief Returns a QFont representation of the font.
-*/
-QFont QmlFont::font() const
-{
- Q_D(const QmlFont);
- return d->font;
-}
-
-QT_END_NAMESPACE
diff --git a/src/declarative/util/qmlfont.h b/src/declarative/util/qmlfont.h
deleted file mode 100644
index e85b8d3..0000000
--- a/src/declarative/util/qmlfont.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the QtDeclarative module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLFONT_H
-#define QMLFONT_H
-
-#include <QtCore/qobject.h>
-#include <QtDeclarative/qml.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Declarative)
-
-class QmlFontPrivate;
-class Q_DECLARATIVE_EXPORT QmlFont : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QmlFont)
-
- Q_PROPERTY(QString family READ family WRITE setFamily)
- Q_PROPERTY(bool bold READ bold WRITE setBold)
- Q_PROPERTY(bool italic READ italic WRITE setItalic)
- Q_PROPERTY(qreal size READ size WRITE setSize)
-
-public:
- QmlFont(QObject *parent=0);
- ~QmlFont();
-
- QString family() const;
- void setFamily(const QString &);
-
- bool bold() const;
- void setBold(bool b);
-
- bool italic() const;
- void setItalic(bool b);
-
- qreal size() const;
- void setSize(qreal size);
-
- QFont font() const;
-
-Q_SIGNALS:
- void updated();
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QmlFont)
-
-QT_END_HEADER
-
-#endif // QMLFONT_H
diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri
index 59e3695..9374f00 100644
--- a/src/declarative/util/util.pri
+++ b/src/declarative/util/util.pri
@@ -6,7 +6,6 @@ SOURCES += \
util/qmlpackage.cpp \
util/qmlscript.cpp \
util/qmlanimation.cpp \
- util/qmlfont.cpp \
util/qmlpalette.cpp \
util/qmlfollow.cpp \
util/qmlstate.cpp\
@@ -32,7 +31,6 @@ HEADERS += \
util/qmlscript.h \
util/qmlanimation.h \
util/qmlanimation_p.h \
- util/qmlfont.h \
util/qmlpalette.h \
util/qmlfollow.h \
util/qmlstate.h\