Commit 54431a09 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.AbstractView: remove widget()

We use now widgetInfo() instead.

Change-Id: Icaea8f012b380368b6479fa81d370236ea5a6781
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent f2f0bf53
......@@ -186,11 +186,6 @@ public:
m_designerActionList = designerActionList;
}
QWidget *widget() QTC_OVERRIDE
{
return 0;
}
protected:
void setupContext()
{
......
......@@ -220,11 +220,6 @@ void DebugView::propertiesRemoved(const QList<AbstractProperty> &propertyList)
}
}
QWidget *DebugView::widget()
{
return 0;
}
void DebugView::auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data)
{
if (isDebugViewEnabled()) {
......
......@@ -67,8 +67,6 @@ public:
void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList) QTC_OVERRIDE;
void propertiesRemoved(const QList<AbstractProperty> &propertyList) QTC_OVERRIDE;
QWidget *widget() QTC_OVERRIDE;
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) QTC_OVERRIDE;
void rewriterBeginTransaction() QTC_OVERRIDE;
......
......@@ -310,7 +310,7 @@ void DragTool::dragEnterEvent(QGraphicsSceneDragDropEvent * event)
QList<Import> importToBeAddedList;
m_blockMove = false;
if (event->mimeData()->hasFormat("application/vnd.bauhaus.itemlibraryinfo")) {
view()->widget()->setFocus();
view()->widgetInfo().widget->setFocus();
m_Aborted = false;
Q_ASSERT(!event->mimeData()->data("application/vnd.bauhaus.itemlibraryinfo").isEmpty());
......
......@@ -274,11 +274,6 @@ void FormEditorView::bindingPropertiesChanged(const QList<BindingProperty>& prop
QmlModelView::bindingPropertiesChanged(propertyList, propertyChange);
}
QWidget *FormEditorView::widget()
{
return m_formEditorWidget.data();
}
WidgetInfo FormEditorView::widgetInfo()
{
return createWidgetInfo(m_formEditorWidget.data(), "FormEditor", WidgetInfo::CentralPane, 0, tr("Form Editor"));
......
......@@ -85,7 +85,6 @@ public:
void propertiesRemoved(const QList<AbstractProperty> &propertyList) QTC_OVERRIDE;
// FormEditorView
QWidget *widget() QTC_OVERRIDE;
WidgetInfo widgetInfo() QTC_OVERRIDE;
FormEditorWidget *formEditorWidget();
......
......@@ -73,11 +73,6 @@ void ComponentView::setComponentNode(const ModelNode &node)
m_componentAction->setCurrentIndex(indexForNode(node));
}
QWidget *ComponentView::widget()
{
return 0;
}
void ComponentView::removeSingleNodeFromList(const ModelNode &node)
{
for (int row = 0; row < m_standardItemModel->rowCount(); row++) {
......
......@@ -115,8 +115,6 @@ public:
void setComponentNode(const ModelNode &node);
QWidget *widget();
signals:
void componentListChanged(const QStringList &componentList);
......
......@@ -222,9 +222,4 @@ void DesignDocumentView::fromText(QString text)
}
}
QWidget *DesignDocumentView::widget()
{
return 0;
}
}// namespace QmlDesigner
......@@ -87,8 +87,6 @@ public:
QString toText() const;
void fromText(QString text);
QWidget *widget();
private:
ModelMerger m_modelMerger;
};
......
......@@ -43,14 +43,6 @@ ItemLibraryView::~ItemLibraryView()
}
QWidget *ItemLibraryView::widget()
{
if (m_widget.isNull())
m_widget = new ItemLibraryWidget;
return m_widget.data();
}
bool ItemLibraryView::hasWidget() const
{
return true;
......@@ -58,7 +50,10 @@ bool ItemLibraryView::hasWidget() const
WidgetInfo ItemLibraryView::widgetInfo()
{
return createWidgetInfo(widget(), QLatin1String("Library"), WidgetInfo::LeftPane, 0);
if (m_widget.isNull())
m_widget = new ItemLibraryWidget;
return createWidgetInfo(m_widget.data(), QLatin1String("Library"), WidgetInfo::LeftPane, 0);
}
void ItemLibraryView::modelAttached(Model *model)
......
......@@ -48,7 +48,6 @@ public:
ItemLibraryView(QObject* parent = 0);
~ItemLibraryView();
QWidget *widget() QTC_OVERRIDE;
bool hasWidget() const QTC_OVERRIDE;
WidgetInfo widgetInfo() QTC_OVERRIDE;
......
......@@ -99,11 +99,6 @@ NavigatorView::~NavigatorView()
delete m_widget.data();
}
QWidget *NavigatorView::widget()
{
return m_widget.data();
}
bool NavigatorView::hasWidget() const
{
return true;
......
......@@ -56,7 +56,6 @@ public:
NavigatorView(QObject* parent = 0);
~NavigatorView();
QWidget *widget();
bool hasWidget() const;
WidgetInfo widgetInfo();
......
......@@ -961,11 +961,6 @@ void PropertyEditor::select(const ModelNode &node)
delayedResetView();
}
QWidget *PropertyEditor::widget()
{
return m_stackedWidget;
}
bool PropertyEditor::hasWidget() const
{
return true;
......
......@@ -83,7 +83,6 @@ public:
void setQmlDir(const QString &qmlDirPath);
QWidget *widget();
bool hasWidget() const;
WidgetInfo widgetInfo();
......
......@@ -60,11 +60,6 @@ StatesEditorView::StatesEditorView(QObject *parent) :
// base state
}
QWidget *StatesEditorView::widget()
{
return m_statesEditorWidget.data();
}
WidgetInfo StatesEditorView::widgetInfo()
{
return createWidgetInfo(m_statesEditorWidget.data(), "StatesEditor", WidgetInfo::TopPane, 0, tr("States Editor"));
......
......@@ -74,7 +74,6 @@ public:
void instancesPreviewImageChanged(const QVector<ModelNode> &nodeList);
QWidget *widget();
WidgetInfo widgetInfo();
......
......@@ -199,7 +199,6 @@ public:
void resetView();
virtual bool hasWidget() const;
virtual QWidget *widget() = 0;
virtual WidgetInfo widgetInfo();
protected:
......
......@@ -149,8 +149,6 @@ public:
void sendToken(const QString &token, int number, const QVector<ModelNode> &nodeVector);
QWidget *widget();
signals:
void qmlPuppetCrashed();
......
......@@ -205,8 +205,6 @@ public:
QString pathForImport(const Import &import);
QWidget *widget();
signals:
void errorsChanged(const QList<RewriterView::Error> &errors);
......
......@@ -1244,9 +1244,4 @@ void NodeInstanceView::sendToken(const QString &token, int number, const QVector
nodeInstanceServer()->token(TokenCommand(token, number, instanceIdVector));
}
QWidget *NodeInstanceView::widget()
{
return 0;
}
}
......@@ -729,11 +729,6 @@ QString RewriterView::pathForImport(const Import &import)
return QString();
}
QWidget *RewriterView::widget()
{
return 0;
}
void RewriterView::qmlTextChanged()
{
if (inErrorState())
......
......@@ -287,9 +287,5 @@ void ViewLogger::actualStateChanged(const ModelNode &node)
m_output << time() << indent("actualStateChanged:") << node << endl;
}
QWidget *ViewLogger::widget()
{
return 0;
}
} // namespace Internal
} // namespace QmlDesigner
......@@ -87,8 +87,6 @@ public:
void actualStateChanged(const ModelNode &node);
QWidget *widget();
protected:
QString time() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment