summaryrefslogtreecommitdiffstats
path: root/src/qmlandroid/widget/qqmlandroidtextview_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-12-19 19:36:46 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-12-19 19:36:46 +0100
commit5c6ba7e2e76005b10b95022d531efed99c7f06b3 (patch)
tree0e51f55601764d961f903eecd7be6f934f53e134 /src/qmlandroid/widget/qqmlandroidtextview_p.h
parent801b93ddd5f55d40643e08204bb522bcebe5d7e4 (diff)
Proper Qt module - part V
Diffstat (limited to 'src/qmlandroid/widget/qqmlandroidtextview_p.h')
-rw-r--r--src/qmlandroid/widget/qqmlandroidtextview_p.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/qmlandroid/widget/qqmlandroidtextview_p.h b/src/qmlandroid/widget/qqmlandroidtextview_p.h
new file mode 100644
index 0000000..6c40ee4
--- /dev/null
+++ b/src/qmlandroid/widget/qqmlandroidtextview_p.h
@@ -0,0 +1,64 @@
+#ifndef QQMLANDROIDTEXTVIEW_P_H
+#define QQMLANDROIDTEXTVIEW_P_H
+
+#include "qqmlandroidview_p.h"
+#include "qqmlandroidoptional_p.h"
+#include <QtGui/qcolor.h>
+
+QT_BEGIN_NAMESPACE
+
+class QQmlAndroidTextView : public QQmlAndroidView
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(int textColor READ textColor WRITE setTextColor NOTIFY textColorChanged)
+ Q_PROPERTY(qreal textSize READ textSize WRITE setTextSize NOTIFY textSizeChanged)
+ Q_PROPERTY(QString hint READ hint WRITE setHint NOTIFY hintChanged)
+ Q_PROPERTY(bool singleLine READ isSingleLine WRITE setSingleLine NOTIFY singleLineChanged)
+ Q_PROPERTY(int inputType READ inputType WRITE setInputType NOTIFY inputTypeChanged)
+
+public:
+ explicit QQmlAndroidTextView(QQmlAndroidView *parent = 0);
+
+ QString text() const;
+ void setText(const QString &text);
+
+ int textColor() const;
+ void setTextColor(int color);
+
+ qreal textSize() const;
+ void setTextSize(qreal size);
+
+ QString hint() const;
+ void setHint(const QString &hint);
+
+ bool isSingleLine() const;
+ void setSingleLine(bool singleLine);
+
+ int inputType() const;
+ void setInputType(int type);
+
+Q_SIGNALS:
+ void textChanged();
+ void textColorChanged();
+ void textSizeChanged();
+ void hintChanged();
+ void singleLineChanged();
+ void inputTypeChanged();
+
+protected:
+ QAndroidJniObject onCreate() Q_DECL_OVERRIDE;
+ void onInflate(QAndroidJniObject &instance) Q_DECL_OVERRIDE;
+
+private:
+ QString m_text;
+ QString m_hint;
+ QQmlAndroidOptional<int> m_textColor;
+ QQmlAndroidOptional<qreal> m_textSize;
+ bool m_singleLine;
+ QQmlAndroidOptional<int> m_inputType;
+};
+
+QT_END_NAMESPACE
+
+#endif // QQMLANDROIDTEXTVIEW_P_H