Add support for PlainTextEdit
authorTobias Koenig <tobias.koenig@kdab.com>
Sun, 28 Oct 2012 07:18:54 +0000 (08:18 +0100)
committerTobias Koenig <tobias.koenig@kdab.com>
Sun, 28 Oct 2012 07:18:54 +0000 (08:18 +0100)
declarativeobjects.cpp
declarativeobjects_p.h
declarativewidgetdocument.cpp
gallery.qml
qwidgets.list

index 5ae5873..2b56b7f 100644 (file)
@@ -1161,6 +1161,14 @@ DeclarativeMessageBoxAttached *DeclarativeMessageBox::qmlAttachedProperties(QObj
 
 CUSTOM_METAOBJECT(DeclarativeMessageBox, QMessageBox)
 
+// DeclarativePlainTextEdit
+DeclarativePlainTextEdit::DeclarativePlainTextEdit(QObject *parent) : DeclarativeWidgetProxy<QPlainTextEdit>(parent)
+{
+  connectAllSignals(m_proxiedObject, this);
+}
+
+CUSTOM_METAOBJECT(DeclarativePlainTextEdit, QPlainTextEdit)
+
 // DeclarativePushButton
 DeclarativePushButton::DeclarativePushButton(QObject *parent) : DeclarativeWidgetProxy<QPushButton>(parent)
 {
index 030386b..7c45e11 100644 (file)
@@ -21,6 +21,7 @@
 #include <QtGui/QMenu>
 #include <QtGui/QMenuBar>
 #include <QtGui/QMessageBox>
+#include <QtGui/QPlainTextEdit>
 #include <QtGui/QPushButton>
 #include <QtGui/QSlider>
 #include <QtGui/QStatusBar>
@@ -673,6 +674,14 @@ class DeclarativeMessageBox : public DeclarativeObjectProxy<QMessageBox>
 
 QML_DECLARE_TYPEINFO(DeclarativeMessageBox, QML_HAS_ATTACHED_PROPERTIES)
 
+class DeclarativePlainTextEdit : public DeclarativeWidgetProxy<QPlainTextEdit>
+{
+  DECLARATIVE_OBJECT
+
+  public:
+    DeclarativePlainTextEdit(QObject *parent = 0);
+};
+
 class DeclarativePushButton : public DeclarativeWidgetProxy<QPushButton>
 {
   DECLARATIVE_OBJECT
index 315cafc..61d5887 100644 (file)
@@ -65,6 +65,7 @@ DeclarativeWidgetDocument::DeclarativeWidgetDocument(const QUrl &url, QObject *p
   qmlRegisterType<DeclarativeMenuBar>("QtGui", 1, 0, "MenuBar");
   qmlRegisterType<DeclarativeMessageBoxAttached>();
   qmlRegisterType<DeclarativeMessageBox>("QtGui", 1, 0, "MessageBox");
+  qmlRegisterType<DeclarativePlainTextEdit>("QtGui", 1, 0, "PlainTextEdit");
   qmlRegisterType<DeclarativePushButton>("QtGui", 1, 0, "PushButton");
   qmlRegisterType<DeclarativeSlider>("QtGui", 1, 0, "Slider");
   qmlRegisterType<DeclarativeStatusBarAttached>();
index ecf19b7..954e4f3 100644 (file)
@@ -18,5 +18,8 @@ Widget {
       minimumWidth: 100
       minimumHeight: 100
     }
+    PlainTextEdit {
+      plainText: qsTr("Hello World")
+    }
   }
 }
index 8a7c613..26af61d 100644 (file)
@@ -25,7 +25,6 @@ qlistwidget.h
 qmdiarea.h
 qmdisubwindow.h
 qmessagebox.h
-qplaintextedit.h
 qprintpreviewwidget.h
 qprogressbar.h
 qradiobutton.h