From c4a29abc0c4ba5875916c4b65cf269e86a0e724f Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Wed, 31 Oct 2012 10:20:01 +0100 Subject: [PATCH] Add support for LCDNumber --- declarativeobjects.cpp | 8 ++++++++ declarativeobjects_p.h | 9 +++++++++ declarativewidgetdocument.cpp | 1 + gallery.qml | 4 ++++ qwidgets.list | 4 ---- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/declarativeobjects.cpp b/declarativeobjects.cpp index fd13166..93aa087 100644 --- a/declarativeobjects.cpp +++ b/declarativeobjects.cpp @@ -1313,6 +1313,14 @@ DeclarativeLabel::DeclarativeLabel(QObject *parent) : DeclarativeWidgetProxy(parent) +{ + connectAllSignals(m_proxiedObject, this); +} + +CUSTOM_METAOBJECT(DeclarativeLCDNumber, QLCDNumber) + // DeclarativeLineEdit DeclarativeLineEdit::DeclarativeLineEdit(QObject *parent) : DeclarativeWidgetProxy(parent) { diff --git a/declarativeobjects_p.h b/declarativeobjects_p.h index df5073f..cc19802 100644 --- a/declarativeobjects_p.h +++ b/declarativeobjects_p.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -785,6 +786,14 @@ class DeclarativeLabel : public DeclarativeWidgetProxy DeclarativeLabel(QObject *parent = 0); }; +class DeclarativeLCDNumber : public DeclarativeWidgetProxy +{ + DECLARATIVE_OBJECT + + public: + DeclarativeLCDNumber(QObject *parent = 0); +}; + class DeclarativeLineEdit : public DeclarativeWidgetProxy { DECLARATIVE_OBJECT diff --git a/declarativewidgetdocument.cpp b/declarativewidgetdocument.cpp index 441a805..7c9473e 100644 --- a/declarativewidgetdocument.cpp +++ b/declarativewidgetdocument.cpp @@ -66,6 +66,7 @@ DeclarativeWidgetDocument::DeclarativeWidgetDocument(const QUrl &url, QObject *p qmlRegisterType(); qmlRegisterType("QtGui", 1, 0, "InputDialog"); qmlRegisterType("QtGui", 1, 0, "Label"); + qmlRegisterType("QtGui", 1, 0, "LCDNumber"); qmlRegisterType("QtGui", 1, 0, "LineEdit"); qmlRegisterType("QtGui", 1, 0, "MainWindow"); qmlRegisterType("QtGui", 1, 0, "Menu"); diff --git a/gallery.qml b/gallery.qml index 54891e4..d41653a 100644 --- a/gallery.qml +++ b/gallery.qml @@ -117,6 +117,10 @@ TabWidget { CalendarWidget {} + LCDNumber { + value: 42 + } + ProgressBar { minimum: 0 maximum: 100 diff --git a/qwidgets.list b/qwidgets.list index bf54942..795240b 100644 --- a/qwidgets.list +++ b/qwidgets.list @@ -1,6 +1,3 @@ -// objects -qbuttongroup.h - // dialogs qpagesetupdialog.h qprintdialog.h @@ -16,7 +13,6 @@ qfontcombobox.h qgraphicsview.h qgraphicswidget.h qheaderview.h -qlcdnumber.h qlistview.h qlistwidget.h qmdiarea.h -- 1.7.2.5