Remove "All rights reserved" line from license headers.
[profile/ivi/qtdeclarative.git] / src / quick / items / qquicktextinput_p.h
index eadd0cc..3f3e926 100644 (file)
@@ -2,8 +2,7 @@
 /****************************************************************************
 **
 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
 **
 ** This file is part of the QtDeclarative module of the Qt Toolkit.
 **
@@ -36,6 +35,7 @@
 **
 **
 **
+**
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
@@ -99,6 +99,8 @@ class Q_AUTOTEST_EXPORT QQuickTextInput : public QQuickImplicitSizeItem
     Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
     Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged)
     Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged)
+    Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged)
+    Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged)
     Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged)
 
 public:
@@ -238,6 +240,9 @@ public:
     QRectF boundingRect() const;
     bool canPaste() const;
 
+    bool canUndo() const;
+    bool canRedo() const;
+
     bool isInputMethodComposing() const;
 
     Qt::InputMethodHints imHints() const;
@@ -275,6 +280,8 @@ Q_SIGNALS:
     void selectByMouseChanged(bool selectByMouse);
     void mouseSelectionModeChanged(SelectionMode mode);
     void canPasteChanged();
+    void canUndoChanged();
+    void canRedoChanged();
     void inputMethodComposingChanged();
     void effectiveHorizontalAlignmentChanged();
 
@@ -306,6 +313,8 @@ public Q_SLOTS:
     void copy();
     void paste();
 #endif
+    void undo();
+    void redo();
     void insert(int position, const QString &text);
     void remove(int start, int end);
 
@@ -314,18 +323,52 @@ private Q_SLOTS:
     void createCursor();
     void updateCursorRectangle();
     void q_canPasteChanged();
+    void q_updateAlignment();
+    void triggerPreprocess();
 
 private:
     Q_DECLARE_PRIVATE(QQuickTextInput)
 };
 
+#ifndef QT_NO_VALIDATOR
+class Q_AUTOTEST_EXPORT QQuickIntValidator : public QIntValidator
+{
+    Q_OBJECT
+    Q_PROPERTY(QString locale READ localeName WRITE setLocaleName RESET resetLocaleName NOTIFY localeNameChanged)
+public:
+    QQuickIntValidator(QObject *parent = 0);
+
+    QString localeName() const;
+    void setLocaleName(const QString &name);
+    void resetLocaleName();
+
+Q_SIGNALS:
+    void localeNameChanged();
+};
+
+class Q_AUTOTEST_EXPORT QQuickDoubleValidator : public QDoubleValidator
+{
+    Q_OBJECT
+    Q_PROPERTY(QString locale READ localeName WRITE setLocaleName RESET resetLocaleName NOTIFY localeNameChanged)
+public:
+    QQuickDoubleValidator(QObject *parent = 0);
+
+    QString localeName() const;
+    void setLocaleName(const QString &name);
+    void resetLocaleName();
+
+Q_SIGNALS:
+    void localeNameChanged();
+};
+#endif
+
 QT_END_NAMESPACE
 
 QML_DECLARE_TYPE(QQuickTextInput)
 #ifndef QT_NO_VALIDATOR
 QML_DECLARE_TYPE(QValidator)
-QML_DECLARE_TYPE(QIntValidator)
-QML_DECLARE_TYPE(QDoubleValidator)
+QML_DECLARE_TYPE(QQuickIntValidator)
+QML_DECLARE_TYPE(QQuickDoubleValidator)
 QML_DECLARE_TYPE(QRegExpValidator)
 #endif