Commit 772e6698 authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add ImportsWidget



Change-Id: I0e7ba19c09c1477e9e0a1040e0b1ef731ef11424
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent b6ee336b
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "importlabel.h"
ImportLabel::ImportLabel(QWidget *parent) :
QWidget(parent)
{
}
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef IMPORTLABEL_H
#define IMPORTLABEL_H
#include <QWidget>
class ImportLabel : public QWidget
{
Q_OBJECT
public:
explicit ImportLabel(QWidget *parent = 0);
signals:
public slots:
};
#endif // IMPORTLABEL_H
VPATH += $$PWD
HEADERS += importmanagerview.h
HEADERS += importmanagerview.h \
components/importmanager/importlabel.h
HEADERS += importswidget.h
SOURCES += importmanagerview.cpp
SOURCES += importmanagerview.cpp \
components/importmanager/importlabel.cpp
SOURCES += components/importmanager/importswidget.cpp
......@@ -28,12 +28,29 @@
****************************************************************************/
#include "importmanagerview.h"
#include "importswidget.h"
namespace QmlDesigner {
ImportManagerView::ImportManagerView(QObject *parent) :
AbstractView(parent)
AbstractView(parent),
m_importsWidget(0)
{
}
ImportManagerView::~ImportManagerView()
{
}
WidgetInfo ImportManagerView::widgetInfo()
{
if (m_importsWidget == 0)
m_importsWidget = new ImportsWidget;
return createWidgetInfo(m_importsWidget, 0, "ImportManager", WidgetInfo::LeftPane, 1);
}
void ImportManagerView::modelAttached(Model *model)
......
......@@ -31,14 +31,20 @@
#define QMLDESIGNER_IMPORTMANAGERVIEW_H
#include <abstractview.h>
#include <QWeakPointer>
namespace QmlDesigner {
class ImportsWidget;
class ImportManagerView : public AbstractView
{
Q_OBJECT
public:
explicit ImportManagerView(QObject *parent = 0);
~ImportManagerView();
WidgetInfo widgetInfo();
void modelAttached(Model *model);
void modelAboutToBeDetached(Model *model);
......@@ -85,6 +91,9 @@ public:
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data);
void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList);
private:
ImportsWidget *m_importsWidget;
};
} // namespace QmlDesigner
......
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "importswidget.h"
namespace QmlDesigner {
ImportsWidget::ImportsWidget(QWidget *parent) :
QWidget(parent)
{
}
} // namespace QmlDesigner
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef QMLDESIGNER_IMPORTSWIDGET_H
#define QMLDESIGNER_IMPORTSWIDGET_H
#include <QWidget>
namespace QmlDesigner {
class ImportsWidget : public QWidget
{
Q_OBJECT
public:
explicit ImportsWidget(QWidget *parent = 0);
signals:
public slots:
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_IMPORTSWIDGET_H
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