summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/fx')
-rw-r--r--src/declarative/fx/qfxgridview.h1
-rw-r--r--src/declarative/fx/qfxitem.cpp1
-rw-r--r--src/declarative/fx/qfxlistview.cpp2
-rw-r--r--src/declarative/fx/qfxlistview.h1
-rw-r--r--src/declarative/fx/qfxmouseregion.cpp1
-rw-r--r--src/declarative/fx/qfxpathview.h2
-rw-r--r--src/declarative/fx/qfxtext.cpp8
-rw-r--r--src/declarative/fx/qfxtextinput.cpp26
-rw-r--r--src/declarative/fx/qfxtextinput.h2
-rw-r--r--src/declarative/fx/qfxtextinput_p.h2
-rw-r--r--src/declarative/fx/qfxvisualitemmodel.h1
-rw-r--r--src/declarative/fx/qfxwebview.h1
12 files changed, 37 insertions, 11 deletions
diff --git a/src/declarative/fx/qfxgridview.h b/src/declarative/fx/qfxgridview.h
index 7f30f03..1c0a700 100644
--- a/src/declarative/fx/qfxgridview.h
+++ b/src/declarative/fx/qfxgridview.h
@@ -150,6 +150,7 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QFxGridView)
+QML_DECLARE_TYPEINFO(QFxGridView, QML_HAS_ATTACHED_PROPERTIES)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp
index 903fad7..bd94b8c 100644
--- a/src/declarative/fx/qfxitem.cpp
+++ b/src/declarative/fx/qfxitem.cpp
@@ -2860,6 +2860,7 @@ int QFxItemPrivate::restart(QTime &t)
QT_END_NAMESPACE
QML_DECLARE_TYPE(QFxKeysAttached)
+QML_DECLARE_TYPEINFO(QFxKeysAttached, QML_HAS_ATTACHED_PROPERTIES)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Keys,QFxKeysAttached)
QML_DECLARE_TYPE(QFxKeyNavigationAttached)
QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,KeyNavigation,QFxKeyNavigationAttached)
diff --git a/src/declarative/fx/qfxlistview.cpp b/src/declarative/fx/qfxlistview.cpp
index 604d16b..4fb0ec1 100644
--- a/src/declarative/fx/qfxlistview.cpp
+++ b/src/declarative/fx/qfxlistview.cpp
@@ -166,7 +166,7 @@ public:
class QFxListViewPrivate : public QFxFlickablePrivate
{
- Q_DECLARE_PUBLIC(QFxListView);
+ Q_DECLARE_PUBLIC(QFxListView)
public:
QFxListViewPrivate()
diff --git a/src/declarative/fx/qfxlistview.h b/src/declarative/fx/qfxlistview.h
index 5a83604..1ff0e27 100644
--- a/src/declarative/fx/qfxlistview.h
+++ b/src/declarative/fx/qfxlistview.h
@@ -174,6 +174,7 @@ private Q_SLOTS:
QT_END_NAMESPACE
+QML_DECLARE_TYPEINFO(QFxListView, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QFxListView)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxmouseregion.cpp b/src/declarative/fx/qfxmouseregion.cpp
index d3c776f..4b31fd4 100644
--- a/src/declarative/fx/qfxmouseregion.cpp
+++ b/src/declarative/fx/qfxmouseregion.cpp
@@ -440,6 +440,7 @@ void QFxMouseRegion::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
// If we don't accept hover, we need to reset containsMouse.
if (!acceptHoverEvents())
setHovered(false);
+ setKeepMouseGrab(false);
}
}
diff --git a/src/declarative/fx/qfxpathview.h b/src/declarative/fx/qfxpathview.h
index 3ee352a..c8c0ac0 100644
--- a/src/declarative/fx/qfxpathview.h
+++ b/src/declarative/fx/qfxpathview.h
@@ -132,7 +132,7 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QFxPathView)
-
+QML_DECLARE_TYPEINFO(QFxPathView, QML_HAS_ATTACHED_PROPERTIES)
QT_END_HEADER
#endif // QFXPATHVIEW_H
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index c26ed2c..4d02f0d 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -427,9 +427,13 @@ void QFxText::setTextFormat(TextFormat format)
This property cannot be used with wrap enabled or with rich text.
- Eliding can be ElideNone, ElideLeft, ElideMiddle, or ElideRight.
+ Eliding can be ElideNone (the default), ElideLeft, ElideMiddle, or ElideRight.
- ElideNone is the default.
+ If the text is a multi-length string, and the mode is not ElideNone,
+ the first string that fits will be used, otherwise the last will be elided.
+
+ Multi-length strings are ordered from longest to shortest, separated by the
+ Unicode "String Terminator" character U009C (write this in QML with "\\x9C").
*/
Qt::TextElideMode QFxText::elideMode() const
{
diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp
index f5bf911..e9ddd3f 100644
--- a/src/declarative/fx/qfxtextinput.cpp
+++ b/src/declarative/fx/qfxtextinput.cpp
@@ -289,6 +289,18 @@ void QFxTextInput::setCursorPosition(int cp)
}
/*!
+ \internal
+
+ Returns a Rect which encompasses the cursor, but which may be larger than is
+ required. Ignores custom cursor delegates.
+*/
+QRect QFxTextInput::cursorRect() const
+{
+ Q_D(const QFxTextInput);
+ return d->control->cursorRect();
+}
+
+/*!
\qmlproperty int TextInput::selectionStart
The cursor position before the first character in the current selection.
@@ -489,17 +501,19 @@ void QFxTextInput::setCursorDelegate(QmlComponent* c)
{
Q_D(QFxTextInput);
d->cursorComponent = c;
- d->startCreatingCursor();
+ if(!c){
+ //note that the components are owned by something else
+ disconnect(d->control, SIGNAL(cursorPositionChanged(int, int)),
+ this, SLOT(moveCursor()));
+ delete d->cursorItem;
+ }else{
+ d->startCreatingCursor();
+ }
}
void QFxTextInputPrivate::startCreatingCursor()
{
Q_Q(QFxTextInput);
- if(!cursorComponent){
- q->disconnect(control, SIGNAL(cursorPositionChanged(int, int)),
- q, SLOT(moveCursor()));
- return;
- }
q->connect(control, SIGNAL(cursorPositionChanged(int, int)),
q, SLOT(moveCursor()));
if(cursorComponent->isReady()){
diff --git a/src/declarative/fx/qfxtextinput.h b/src/declarative/fx/qfxtextinput.h
index d5d0450..2540d41 100644
--- a/src/declarative/fx/qfxtextinput.h
+++ b/src/declarative/fx/qfxtextinput.h
@@ -131,6 +131,8 @@ public:
int cursorPosition() const;
void setCursorPosition(int cp);
+ QRect cursorRect() const;
+
int selectionStart() const;
void setSelectionStart(int);
diff --git a/src/declarative/fx/qfxtextinput_p.h b/src/declarative/fx/qfxtextinput_p.h
index a2b45bb..3978be4 100644
--- a/src/declarative/fx/qfxtextinput_p.h
+++ b/src/declarative/fx/qfxtextinput_p.h
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
class QFxTextInputPrivate : public QFxPaintedItemPrivate
{
- Q_DECLARE_PUBLIC(QFxTextInput);
+ Q_DECLARE_PUBLIC(QFxTextInput)
public:
QFxTextInputPrivate() : control(new QLineControl(QString())),
color((QRgb)0), style(QFxText::Normal),
diff --git a/src/declarative/fx/qfxvisualitemmodel.h b/src/declarative/fx/qfxvisualitemmodel.h
index f519a9e..5b613d8 100644
--- a/src/declarative/fx/qfxvisualitemmodel.h
+++ b/src/declarative/fx/qfxvisualitemmodel.h
@@ -192,6 +192,7 @@ QT_END_NAMESPACE
QML_DECLARE_TYPE(QFxVisualModel)
QML_DECLARE_TYPE(QFxVisualItemModel)
+QML_DECLARE_TYPEINFO(QFxVisualItemModel, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QFxVisualDataModel)
QT_END_HEADER
diff --git a/src/declarative/fx/qfxwebview.h b/src/declarative/fx/qfxwebview.h
index f136e2d..a31b2b0 100644
--- a/src/declarative/fx/qfxwebview.h
+++ b/src/declarative/fx/qfxwebview.h
@@ -243,6 +243,7 @@ private:
QT_END_NAMESPACE
QML_DECLARE_TYPE(QFxWebView)
+QML_DECLARE_TYPEINFO(QFxWebView, QML_HAS_ATTACHED_PROPERTIES)
QML_DECLARE_TYPE(QAction)
QT_END_HEADER