diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.cpp b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp new file mode 100644 index 00000000000..2839492ab7f --- /dev/null +++ b/src/plugins/qmldesigner/components/importmanager/importlabel.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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) +{ +} diff --git a/src/plugins/qmldesigner/components/importmanager/importlabel.h b/src/plugins/qmldesigner/components/importmanager/importlabel.h new file mode 100644 index 00000000000..4eec82dfc16 --- /dev/null +++ b/src/plugins/qmldesigner/components/importmanager/importlabel.h @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 + +class ImportLabel : public QWidget +{ + Q_OBJECT +public: + explicit ImportLabel(QWidget *parent = 0); + +signals: + +public slots: + +}; + +#endif // IMPORTLABEL_H diff --git a/src/plugins/qmldesigner/components/importmanager/importmanager.pri b/src/plugins/qmldesigner/components/importmanager/importmanager.pri index 089e4282607..6f0a672cc36 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanager.pri +++ b/src/plugins/qmldesigner/components/importmanager/importmanager.pri @@ -1,7 +1,11 @@ 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 diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp index dff5da34d7d..875d2dae7da 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.cpp @@ -28,14 +28,31 @@ ****************************************************************************/ #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) { diff --git a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h index 45970a5ea87..b8d33a566ac 100644 --- a/src/plugins/qmldesigner/components/importmanager/importmanagerview.h +++ b/src/plugins/qmldesigner/components/importmanager/importmanagerview.h @@ -31,14 +31,20 @@ #define QMLDESIGNER_IMPORTMANAGERVIEW_H #include +#include 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 &nodeList, const QList &data); void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList); + +private: + ImportsWidget *m_importsWidget; }; } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp new file mode 100644 index 00000000000..8a0914c3314 --- /dev/null +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** 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 diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.h b/src/plugins/qmldesigner/components/importmanager/importswidget.h new file mode 100644 index 00000000000..ddc69a4b8a3 --- /dev/null +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** 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 + +namespace QmlDesigner { + +class ImportsWidget : public QWidget +{ + Q_OBJECT +public: + explicit ImportsWidget(QWidget *parent = 0); + +signals: + +public slots: + +}; + +} // namespace QmlDesigner + +#endif // QMLDESIGNER_IMPORTSWIDGET_H