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