forked from qt-creator/qt-creator
Get rid of QML_REGISTER_TYPE.
This commit is contained in:
@@ -71,8 +71,8 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
void BasicLayouts::registerDeclarativeTypes()
|
void BasicLayouts::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QBoxLayout,QBoxLayoutObject);
|
qmlRegisterType<QBoxLayoutObject>("Bauhaus",1,0,"QBoxLayout");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QHBoxLayout,QHBoxLayoutObject);
|
qmlRegisterType<QHBoxLayoutObject>("Bauhaus",1,0,"QHBoxLayout");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QVBoxLayout,QVBoxLayoutObject);
|
qmlRegisterType<QVBoxLayoutObject>("Bauhaus",1,0,"QVBoxLayout");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -977,8 +977,7 @@ void WidgetLoader::setSource(const QUrl &source)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(this));
|
QDeclarativeContext *ctxt = new QDeclarativeContext(qmlContext(this));
|
||||||
ctxt->addDefaultObject(this);
|
ctxt->addDefaultObject(this);
|
||||||
|
|
||||||
QObject *obj = m_component->create(ctxt);
|
QObject *obj = m_component->create(ctxt);
|
||||||
if (obj) {
|
if (obj) {
|
||||||
QWidget *widget = qobject_cast<QWidget *>(obj);
|
QWidget *widget = qobject_cast<QWidget *>(obj);
|
||||||
@@ -1256,64 +1255,64 @@ QML_DECLARE_TYPE(WidgetFrame);
|
|||||||
|
|
||||||
void BasicWidgets::registerDeclarativeTypes()
|
void BasicWidgets::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QWidget,QWidget,QWidgetDeclarativeUI);
|
qmlRegisterExtendedType<QWidget,QWidgetDeclarativeUI>("Bauhaus",1,0,"QWidget");
|
||||||
|
|
||||||
//display
|
//display
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QProgressBar,QProgressBar);
|
qmlRegisterType<QProgressBar>("Bauhaus",1,0,"QProgressBar");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QLCDNumber,QLCDNumber);
|
qmlRegisterType<QLCDNumber>("Bauhaus",1,0,"QLCDNumber");
|
||||||
|
|
||||||
//input
|
//input
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QLineEdit,QLineEdit);
|
qmlRegisterType<QLineEdit>("Bauhaus",1,0,"QLineEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QTextEdit,QTextEdit);
|
qmlRegisterType<QTextEdit>("Bauhaus",1,0,"QTextEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,ExpressionEdit,ExpressionEdit);
|
qmlRegisterType<ExpressionEdit>("Bauhaus",1,0,"ExpressionEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QPlainTextEdit,QPlainTextEdit);
|
qmlRegisterType<QPlainTextEdit>("Bauhaus",1,0,"QPlainTextEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QSpinBox,QSpinBox);
|
qmlRegisterType<QSpinBox>("Bauhaus",1,0,"QSpinBox");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QDoubleSpinBox,QDoubleSpinBox);
|
qmlRegisterType<QDoubleSpinBox>("Bauhaus",1,0,"QDoubleSpinBox");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QSlider,QSlider);
|
qmlRegisterType<QSlider>("Bauhaus",1,0,"QSlider");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QDateTimeEdit,QDateTimeEdit);
|
qmlRegisterType<QDateTimeEdit>("Bauhaus",1,0,"QDateTimeEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QDateEdit,QDateEdit);
|
qmlRegisterType<QDateEdit>("Bauhaus",1,0,"QDateEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QTimeEdit,QTimeEdit);
|
qmlRegisterType<QTimeEdit>("Bauhaus",1,0,"QTimeEdit");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QFontComboBox,QFontComboBox);
|
qmlRegisterType<QFontComboBox>("Bauhaus",1,0,"QFontComboBox");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QDial,QDial);
|
qmlRegisterType<QDial>("Bauhaus",1,0,"QDial");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QScrollBar,QScrollBar);
|
qmlRegisterType<QScrollBar>("Bauhaus",1,0,"QScrollBar");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QCalendarWidget, QCalendarWidget);
|
qmlRegisterType<QCalendarWidget>("Bauhaus",1,0,"QCalendarWidget");
|
||||||
|
|
||||||
|
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,QComboBox,QComboBox); //need a way to populate
|
//qmlRegisterType<>("Bauhaus",1,0,QComboBox,QComboBox); //need a way to populate
|
||||||
//QML_REGISTER_EXTENDED_TYPE(QComboBox,QComboBox, QComboBox); //need a way to populate
|
//QML_REGISTER_EXTENDED_TYPE(QComboBox,QComboBox, QComboBox); //need a way to populate
|
||||||
|
|
||||||
//buttons
|
//buttons
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,QPushButton,QPushButton);
|
//qmlRegisterType<>("Bauhaus",1,0,QPushButton,QPushButton);
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QCheckBox,QCheckBox);
|
qmlRegisterType<QCheckBox>("Bauhaus",1,0,"QCheckBox");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QGroupBox,QGroupBox);
|
qmlRegisterType<QGroupBox>("Bauhaus",1,0,"QGroupBox");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QAction,Action);
|
qmlRegisterType<Action>("Bauhaus",1,0,"QAction");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QRadioButton,QRadioButton);
|
qmlRegisterType<QRadioButton>("Bauhaus",1,0,"QRadioButton");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,FileWidget, FileWidget);
|
qmlRegisterType<FileWidget>("Bauhaus",1,0,"FileWidget");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,LayoutWidget, LayoutWidget);
|
qmlRegisterType<LayoutWidget>("Bauhaus",1,0,"LayoutWidget");
|
||||||
|
|
||||||
//containers
|
//containers
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QFrame,QFrame);
|
qmlRegisterType<QFrame>("Bauhaus",1,0,"QFrame");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,WidgetFrame,WidgetFrame);
|
qmlRegisterType<WidgetFrame>("Bauhaus",1,0,"WidgetFrame");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,WidgetLoader,WidgetLoader);
|
qmlRegisterType<WidgetLoader>("Bauhaus",1,0,"WidgetLoader");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QExtGroupBox,MyGroupBox,QGroupBoxDeclarativeUI);
|
qmlRegisterExtendedType<MyGroupBox,QGroupBoxDeclarativeUI>("Bauhaus",1,0,"QExtGroupBox");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QTabWidget,QTabWidget,QTabWidgetDeclarativeUI);
|
qmlRegisterExtendedType<QTabWidget,QTabWidgetDeclarativeUI>("Bauhaus",1,0,"QTabWidget");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QScrollArea,QScrollArea,QScrollAreaDeclarativeUI);
|
qmlRegisterExtendedType<QScrollArea,QScrollAreaDeclarativeUI>("Bauhaus",1,0,"QScrollArea");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QPushButton,QPushButton,QPushButtonDeclarativeUI);
|
qmlRegisterExtendedType<QPushButton,QPushButtonDeclarativeUI>("Bauhaus",1,0,"QPushButton");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QLabel,QLabel,QLabelDeclarativeUI);
|
qmlRegisterExtendedType<QLabel,QLabelDeclarativeUI>("Bauhaus",1,0,"QLabel");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QToolButton,QToolButton, QToolButtonDeclarativeUI);
|
qmlRegisterExtendedType<QToolButton, QToolButtonDeclarativeUI>("Bauhaus",1,0,"QToolButton");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QComboBox,QComboBox, QComboBoxDeclarativeUI);
|
qmlRegisterExtendedType<QComboBox, QComboBoxDeclarativeUI>("Bauhaus",1,0,"QComboBox");
|
||||||
QML_REGISTER_EXTENDED_TYPE(Bauhaus,1,0,QMenu,QMenu, QMenuDeclarativeUI);
|
qmlRegisterExtendedType<QMenu, QMenuDeclarativeUI>("Bauhaus",1,0,"QMenu");
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,BauhausoolBox,BauhausoolBox);
|
//qmlRegisterType<>("Bauhaus",1,0,BauhausoolBox,BauhausoolBox);
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,QScrollArea,QScrollArea);
|
//qmlRegisterType<>("Bauhaus",1,0,QScrollArea,QScrollArea);
|
||||||
|
|
||||||
//QML_REGISTER_EXTENDED_TYPE(BauhausColorButton,BauhausColorButton,BauhausColorButtonDeclarativeUI);
|
//QML_REGISTER_EXTENDED_TYPE(BauhausColorButton,BauhausColorButton,BauhausColorButtonDeclarativeUI);
|
||||||
|
|
||||||
//itemviews
|
//itemviews
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,QListView,QListView);
|
//qmlRegisterType<>("Bauhaus",1,0,QListView,QListView);
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,BauhausreeView,BauhausreeView);
|
//qmlRegisterType<>("Bauhaus",1,0,BauhausreeView,BauhausreeView);
|
||||||
//QML_REGISTER_TYPE(Bauhaus,1,0,BauhausableView,BauhausableView);
|
//qmlRegisterType<>("Bauhaus",1,0,BauhausableView,BauhausableView);
|
||||||
|
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QTabObject,QTabObject); //### with namespacing, this should just be 'Tab'
|
qmlRegisterType<QTabObject>("Bauhaus",1,0,"QTabObject"); //### with namespacing, this should just be 'Tab'
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "basicwidgets.moc"
|
#include "basicwidgets.moc"
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace QmlDesigner {
|
|||||||
|
|
||||||
void BehaviorDialog::registerDeclarativeType()
|
void BehaviorDialog::registerDeclarativeType()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,BehaviorWidget,QmlDesigner::BehaviorWidget);
|
qmlRegisterType<QmlDesigner::BehaviorWidget>("Bauhaus",1,0,"BehaviorWidget");
|
||||||
}
|
}
|
||||||
|
|
||||||
BehaviorWidget::BehaviorWidget() : QPushButton(), m_BehaviorDialog(new BehaviorDialog(0))
|
BehaviorWidget::BehaviorWidget() : QPushButton(), m_BehaviorDialog(new BehaviorDialog(0))
|
||||||
|
|||||||
@@ -44,9 +44,9 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
void ColorWidget::registerDeclarativeTypes() {
|
void ColorWidget::registerDeclarativeTypes() {
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,ColorButton,QmlDesigner::ColorButton);
|
qmlRegisterType<QmlDesigner::ColorButton>("Bauhaus",1,0,"ColorButton");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,HueControl,QmlDesigner::HueControl);
|
qmlRegisterType<QmlDesigner::HueControl>("Bauhaus",1,0,"HueControl");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,ColorBox,QmlDesigner::ColorBox);
|
qmlRegisterType<QmlDesigner::ColorBox>("Bauhaus",1,0,"ColorBox");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorButton::paintEvent(QPaintEvent *event)
|
void ColorButton::paintEvent(QPaintEvent *event)
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ void FontWidget::setFontSize(qreal size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FontWidget::registerDeclarativeTypes() {
|
void FontWidget::registerDeclarativeTypes() {
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,FontWidget,QmlDesigner::FontWidget);
|
qmlRegisterType<QmlDesigner::FontWidget>("Bauhaus",1,0,"FontWidget");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
@@ -188,9 +188,9 @@ void PropertyEditorValue::resetValue()
|
|||||||
|
|
||||||
void PropertyEditorValue::registerDeclarativeTypes()
|
void PropertyEditorValue::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,PropertyEditorValue,PropertyEditorValue);
|
qmlRegisterType<PropertyEditorValue>("Bauhaus",1,0,"PropertyEditorValue");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,PropertyEditorNodeWrapper,PropertyEditorNodeWrapper);
|
qmlRegisterType<PropertyEditorNodeWrapper>("Bauhaus",1,0,"PropertyEditorNodeWrapper");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QDeclarativePropertyMap,QDeclarativePropertyMap);
|
qmlRegisterType<QDeclarativePropertyMap>("Bauhaus",1,0,"QDeclarativePropertyMap");
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyEditorNodeWrapper::PropertyEditorNodeWrapper(PropertyEditorValue* parent) : m_valuesPropertyMap(this)
|
PropertyEditorNodeWrapper::PropertyEditorNodeWrapper(PropertyEditorValue* parent) : m_valuesPropertyMap(this)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
void QLayoutObject::registerDeclarativeType()
|
void QLayoutObject::registerDeclarativeType()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,QLayoutObject,QLayoutObject);
|
qmlRegisterType<QLayoutObject>("Bauhaus",1,0,"QLayoutObject");
|
||||||
}
|
}
|
||||||
|
|
||||||
QLayoutObject::QLayoutObject(QObject *parent)
|
QLayoutObject::QLayoutObject(QObject *parent)
|
||||||
|
|||||||
@@ -160,8 +160,8 @@ QSizeF QProxyLayout::sizeHint(Qt::SizeHint which,
|
|||||||
|
|
||||||
void QProxyLayoutItem::registerDeclarativeTypes()
|
void QProxyLayoutItem::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,LayoutItem,QProxyLayoutItem);
|
qmlRegisterType<QProxyLayoutItem>("Bauhaus",1,0,"LayoutItem");
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,ProxyLayout,QProxyLayout);
|
qmlRegisterType<QProxyLayout>("Bauhaus",1,0,"ProxyLayout");
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ ResetWidget::ResetWidget(QWidget *parent) : QGroupBox(parent), m_backendObject(0
|
|||||||
|
|
||||||
void ResetWidget::registerDeclarativeType()
|
void ResetWidget::registerDeclarativeType()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus, 1, 0, ResetWidget, QmlDesigner::ResetWidget);
|
qmlRegisterType<QmlDesigner::ResetWidget>("Bauhaus", 1, 0, "ResetWidget");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResetWidget::resetView()
|
void ResetWidget::resetView()
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ void SiblingComboBox::setItemNode(const QVariant &itemNode)
|
|||||||
|
|
||||||
void SiblingComboBox::registerDeclarativeTypes()
|
void SiblingComboBox::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_TYPE(Bauhaus,1,0,SiblingComboBox,SiblingComboBox);
|
qmlRegisterType<SiblingComboBox>("Bauhaus",1,0,"SiblingComboBox");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SiblingComboBox::setSelectedItemNode(const QVariant &itemNode)
|
void SiblingComboBox::setSelectedItemNode(const QVariant &itemNode)
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ void NodeInstance::refreshState()
|
|||||||
*/
|
*/
|
||||||
void NodeInstance::registerDeclarativeTypes()
|
void NodeInstance::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_NOCREATE_TYPE(QmlDesigner::Internal::QmlPropertyChangesObject);
|
qmlRegisterType<QmlDesigner::Internal::QmlPropertyChangesObject>();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ namespace QmlProjectManager {
|
|||||||
|
|
||||||
void QmlProjectFileFormat::registerDeclarativeTypes()
|
void QmlProjectFileFormat::registerDeclarativeTypes()
|
||||||
{
|
{
|
||||||
QML_REGISTER_NOCREATE_TYPE(QmlProjectManager::QmlProjectContentItem);
|
qmlRegisterType<QmlProjectManager::QmlProjectContentItem>();
|
||||||
QML_REGISTER_TYPE(QmlProject,1,0,Project,QmlProjectManager::QmlProjectItem);
|
qmlRegisterType<QmlProjectManager::QmlProjectItem>("QmlProject",1,0,"Project");
|
||||||
|
|
||||||
QML_REGISTER_TYPE(QmlProject,1,0,QmlFiles,QmlProjectManager::QmlFileFilterItem);
|
qmlRegisterType<QmlProjectManager::QmlFileFilterItem>("QmlProject",1,0,"QmlFiles");
|
||||||
QML_REGISTER_TYPE(QmlProject,1,0,JavaScriptFiles,QmlProjectManager::JsFileFilterItem);
|
qmlRegisterType<QmlProjectManager::JsFileFilterItem>("QmlProject",1,0,"JavaScriptFiles");
|
||||||
QML_REGISTER_TYPE(QmlProject,1,0,ImageFiles,QmlProjectManager::ImageFileFilterItem);
|
qmlRegisterType<QmlProjectManager::ImageFileFilterItem>("QmlProject",1,0,"ImageFiles");
|
||||||
QML_REGISTER_TYPE(QmlProject,1,0,CssFiles,QmlProjectManager::CssFileFilterItem);
|
qmlRegisterType<QmlProjectManager::CssFileFilterItem>("QmlProject",1,0,"CssFiles");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace QmlProjectManager
|
} // namespace QmlProjectManager
|
||||||
|
|||||||
Reference in New Issue
Block a user