From: Tobias Koenig Date: Sun, 28 Oct 2012 08:23:40 +0000 (+0100) Subject: Add support for CommandLinkButton X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=078d44b741d1b00b37f595d9f8a4da38a6ab67fb;p=web%2Fkonrad%2FDeclarativeWidgets.git Add support for CommandLinkButton --- diff --git a/declarativeobjects.cpp b/declarativeobjects.cpp index d546482..7c29ddf 100644 --- a/declarativeobjects.cpp +++ b/declarativeobjects.cpp @@ -694,6 +694,14 @@ DeclarativeColorDialogAttached *DeclarativeColorDialog::qmlAttachedProperties(QO CUSTOM_METAOBJECT(DeclarativeColorDialog, QColorDialog) +// DeclarativeCommandLinkButton +DeclarativeCommandLinkButton::DeclarativeCommandLinkButton(QObject *parent) : DeclarativeWidgetProxy(parent) +{ + connectAllSignals(m_proxiedObject, this); +} + +CUSTOM_METAOBJECT(DeclarativeCommandLinkButton, QCommandLinkButton) + // DeclarativeDateEdit DeclarativeDateEdit::DeclarativeDateEdit(QObject *parent) : DeclarativeWidgetProxy(parent) { diff --git a/declarativeobjects_p.h b/declarativeobjects_p.h index cbc125c..60fd0d7 100644 --- a/declarativeobjects_p.h +++ b/declarativeobjects_p.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -453,6 +454,14 @@ class DeclarativeColorDialog : public DeclarativeWidgetProxy QML_DECLARE_TYPEINFO(DeclarativeColorDialog, QML_HAS_ATTACHED_PROPERTIES) +class DeclarativeCommandLinkButton : public DeclarativeWidgetProxy +{ + DECLARATIVE_OBJECT + + public: + DeclarativeCommandLinkButton(QObject *parent = 0); +}; + class DeclarativeDateEdit : public DeclarativeWidgetProxy { DECLARATIVE_OBJECT diff --git a/declarativewidgetdocument.cpp b/declarativewidgetdocument.cpp index 82094e3..069f18b 100644 --- a/declarativewidgetdocument.cpp +++ b/declarativewidgetdocument.cpp @@ -49,6 +49,7 @@ DeclarativeWidgetDocument::DeclarativeWidgetDocument(const QUrl &url, QObject *p qmlRegisterType("QtGui", 1, 0, "CheckBox"); qmlRegisterType(); qmlRegisterType("QtGui", 1, 0, "ColorDialog"); + qmlRegisterType("QtGui", 1, 0, "CommandLinkButton"); qmlRegisterType("QtGui", 1, 0, "DateEdit"); qmlRegisterType("QtGui", 1, 0, "DateTimeEdit"); qmlRegisterType("QtGui", 1, 0, "Dialog"); diff --git a/gallery.qml b/gallery.qml index 4a3941a..c8cf24f 100644 --- a/gallery.qml +++ b/gallery.qml @@ -24,6 +24,11 @@ TabWidget { text: qsTr("CheckBox") } + CommandLinkButton { + text: qsTr("CommandLinkButton") + description: qsTr("A short description") + } + DialogButtonBox { standardButtons: DialogButtonBox.Save | DialogButtonBox.Cancel } diff --git a/qwidgets.list b/qwidgets.list index bf25c5d..890637e 100644 --- a/qwidgets.list +++ b/qwidgets.list @@ -10,7 +10,6 @@ qprogressdialog.h // widgets qcolumnview.h qcombobox.h -qcommandlinkbutton.h qdial.h qdockwidget.h qfocusframe.h @@ -23,7 +22,6 @@ qlistview.h qlistwidget.h qmdiarea.h qmdisubwindow.h -qmessagebox.h qprintpreviewwidget.h qprogressbar.h qscrollarea.h