From 74f81afb4130d0388ee33ff4b38dd578201c2bb6 Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Mon, 21 Jan 2013 21:02:32 +0100 Subject: [PATCH] Ported plain text edit --- lib/declarativeplaintextedit.cpp | 29 ----------------------------- lib/declarativeplaintextedit_p.h | 36 ------------------------------------ lib/declarativewidgetsdocument.cpp | 4 ++-- lib/lib.pro | 2 -- 4 files changed, 2 insertions(+), 69 deletions(-) delete mode 100644 lib/declarativeplaintextedit.cpp delete mode 100644 lib/declarativeplaintextedit_p.h diff --git a/lib/declarativeplaintextedit.cpp b/lib/declarativeplaintextedit.cpp deleted file mode 100644 index f6cc06a..0000000 --- a/lib/declarativeplaintextedit.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com - Author: Kevin Krammer, krake@kdab.com - Author: Tobias Koenig, tokoe@kdab.com - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "declarativeplaintextedit_p.h" - -DeclarativePlainTextEdit::DeclarativePlainTextEdit(QObject *parent) - : DeclarativeWidgetProxy(parent) -{ - connectAllSignals(m_proxiedObject, this); -} - -CUSTOM_METAOBJECT(DeclarativePlainTextEdit, QPlainTextEdit) diff --git a/lib/declarativeplaintextedit_p.h b/lib/declarativeplaintextedit_p.h deleted file mode 100644 index 4e56d78..0000000 --- a/lib/declarativeplaintextedit_p.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com - Author: Kevin Krammer, krake@kdab.com - Author: Tobias Koenig, tokoe@kdab.com - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef DECLARATIVEPLAINTEXTEDIT_P_H -#define DECLARATIVEPLAINTEXTEDIT_P_H - -#include "declarativewidgetproxy_p.h" - -#include - -class DeclarativePlainTextEdit : public DeclarativeWidgetProxy -{ - DECLARATIVE_OBJECT - - public: - explicit DeclarativePlainTextEdit(QObject *parent = 0); -}; - -#endif diff --git a/lib/declarativewidgetsdocument.cpp b/lib/declarativewidgetsdocument.cpp index 0398735..68af892 100644 --- a/lib/declarativewidgetsdocument.cpp +++ b/lib/declarativewidgetsdocument.cpp @@ -44,7 +44,6 @@ #include "declarativemenubarextension_p.h" #include "declarativemenuextension_p.h" #include "declarativemessagebox_p.h" -#include "declarativeplaintextedit_p.h" #include "declarativeprogressbar_p.h" #include "declarativescrollareaextension_p.h" #include "declarativescrollbar_p.h" @@ -76,6 +75,7 @@ #include #include #include +#include #include #include #include @@ -118,7 +118,6 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject qmlRegisterType("QtGui", 1, 0, "DoubleSpinBox"); qmlRegisterType("QtGui", 1, 0, "Label"); qmlRegisterType("QtGui", 1, 0, "LCDNumber"); - qmlRegisterType("QtGui", 1, 0, "PlainTextEdit"); qmlRegisterType("QtGui", 1, 0, "ProgressBar"); qmlRegisterType("QtGui", 1, 0, "ScrollBar"); qmlRegisterType("QtGui", 1, 0, "SpinBox"); @@ -165,6 +164,7 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject qmlRegisterExtendedType("QtGui", 1, 0, "Menu"); qmlRegisterExtendedType("QtGui", 1, 0, "MenuBar"); qmlRegisterExtendedType("QtGui", 1, 0, "MessageBox"); + qmlRegisterExtendedType("QtGui", 1, 0, "PlainTextEdit"); qmlRegisterExtendedType("QtGui", 1, 0, "PushButton"); qmlRegisterExtendedType("QtGui", 1, 0, "RadioButton"); qmlRegisterExtendedType("QtGui", 1, 0, "ScrollArea"); diff --git a/lib/lib.pro b/lib/lib.pro index d58b165..32a6d71 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -34,7 +34,6 @@ HEADERS = \ declarativemessagebox_p.h \ declarativeobjectextension.h \ declarativeobjectproxy_p.h \ - declarativeplaintextedit_p.h \ declarativeprogressbar_p.h \ declarativescrollareaextension_p.h \ declarativescrollbar_p.h \ @@ -84,7 +83,6 @@ SOURCES = \ declarativemenuextension.cpp \ declarativemessagebox.cpp \ declarativeobjectextension.cpp \ - declarativeplaintextedit.cpp \ declarativeprogressbar.cpp \ declarativescrollareaextension.cpp \ declarativescrollbar.cpp \ -- 1.7.2.5