Commit 8879c6c6 authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann
Browse files

QmlDesigner.Plugin: Add experimental custom style plugin

Change-Id: Ia98b8f61988a1a817fda022d4298f1ad4e6942e2
Reviewed-on: http://codereview.qt.nokia.com/577

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 47b5947a
<metainfo>
<node name="Qt.labs.components.custom.Button" icon=":/customstyleplugin/images/button16.png">
<itemlibraryentry name="Button" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/button.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="30"/>
<property name="text" type="QString" value="Button"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.BasicButton" icon=":/customstyleplugin/images/button16.png">
<itemlibraryentry name="BasicButton" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/button.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.BusyIndicator" icon=":/customstyleplugin/images/busyindicator16.png">
<itemlibraryentry name="BusyIndicator" category="ComponentsCustom Style" libraryIcon=":/customstyleplugin/images/busyindicator.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="180"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.CheckBox" icon=":/customstyleplugin/images/checkbox16.png">
<itemlibraryentry name="CheckBox" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/checkbox.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="30"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.ChoiceList" icon=":/customstyleplugin/images/choicelist16.png">
<itemlibraryentry name="ChoiceList" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/choicelist.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="180"/>
<property name="height" type="int" value="40"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.ProgressBar" icon=":/customstyleplugin/images/progressbar16.png">
<itemlibraryentry name="ProgressBar" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/progressbar.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.SpinBox">
<itemlibraryentry name="SpinBox" category="Components Custom Style" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="100"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.RadioButton" icon=":/customstyleplugin/images/radiobutton16.png">
<itemlibraryentry name="RadioButton" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/radiobutton.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="30"/>
<property name="height" type="int" value="30"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.TextArea" icon=":/customstyleplugin/images/textarea16.png">
<itemlibraryentry name="TextArea" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/textarea.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="180"/>
<property name="height" type="int" value="180"/>
<property name="text" type="QString" value="TextArea"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.ButtonRow" icon=":/customstyleplugin/images/buttonrow16.png">
<itemlibraryentry name="ButtonRow" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/buttonrow.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="120"/>
<property name="height" type="int" value="20"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.ButtonColumn" icon=":/customstyleplugin/images/buttoncolumn16.png">
<itemlibraryentry name="ButtonColumn" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/buttoncolumn.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="120"/>
<property name="height" type="int" value="20"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.Slider" icon=":/customstyleplugin/images/slider16.png">
<itemlibraryentry name="Slider (horizontal)" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/slider.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="180"/>
<property name="height" type="int" value="30"/>
<property name="orientation" type="int" value="1"/>
</itemlibraryentry>
<itemlibraryentry name="Slider (vertical)" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/sliderh.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="30"/>
<property name="height" type="int" value="180"/>
<property name="orientation" type="int" value="2"/>
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.Switch" icon=":/customstyleplugin/images/switchbutton16.png">
<itemlibraryentry name="Switch" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/switchbutton.png" version="1.0" requiredImport="Qt.labs.components.custom">
</itemlibraryentry>
</node>
<node name="Qt.labs.components.custom.TextField" icon=":/customstyleplugin/images/textfield16.png">
<itemlibraryentry name="TextField" category="Components Custom Style" libraryIcon=":/customstyleplugin/images/textfield.png" version="1.0" requiredImport="Qt.labs.components.custom">
<property name="width" type="int" value="180"/>
<property name="height" type="int" value="50"/>
<property name="text" type="QString" value="TextField"/>
</itemlibraryentry>
</node>
</metainfo>
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#include "customstyleplugin.h"
#include <widgetplugin_helper.h>
#include <QtCore/QtPlugin>
namespace QmlDesigner {
CustomStylePlugin::CustomStylePlugin()
{
}
QString CustomStylePlugin::pluginName() const
{
return ("CustomStylePlugin");
}
QString CustomStylePlugin::metaInfo() const
{
return QString(":/customstyleplugin/customstyle.metainfo");
}
}
Q_EXPORT_PLUGIN(QmlDesigner::CustomStylePlugin)
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** GNU Lesser General Public License Usage
**
** 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, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
** If you have questions regarding the use of this file, please contact
** Nokia at info@qt.nokia.com.
**
**************************************************************************/
#ifndef CUSTOMSTYLEPLUGIN_H
#define CUSTOMSTYLEPLUGIN_H
#include <iwidgetplugin.h>
#include <QtDeclarative/qdeclarative.h>
QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
namespace QmlDesigner {
class CustomStylePlugin : public QObject, QmlDesigner::IWidgetPlugin
{
Q_OBJECT
Q_DISABLE_COPY(CustomStylePlugin)
Q_INTERFACES(QmlDesigner::IWidgetPlugin)
public:
CustomStylePlugin();
~CustomStylePlugin() {}
QString metaInfo() const;
QString pluginName() const;
};
} // namespace QmlDesigner
#endif // CUSTOMSTYLEPLUGIN_H
TARGET = customstyleplugin
TEMPLATE = lib
CONFIG += plugin
QT += script \
declarative
include (../designercore/iwidgetplugin.pri)
DEFINES += SYMBIAN_LIBRARY
SOURCES += $$PWD/customstyleplugin.cpp
HEADERS += $$PWD/customstyleplugin.h $$PWD/../designercore/include/iwidgetplugin.h
RESOURCES += $$PWD/customstyleplugin.qrc
OTHER_FILES += $$PWD/customstyle.metainfo
include(../../../../qtcreator.pri)
include(../../../private_headers.pri)
include(customstyleplugin.pri)
include(plugindestdir.pri)
<RCC>
<qresource prefix="/customstyleplugin">
<file>customstyle.metainfo</file>
<file>images/item-icon16.png</file>
<file>images/item-icon.png</file>
<file>images/button.png</file>
<file>images/button16.png</file>
<file>images/checkbox16.png</file>
<file>images/checkbox.png</file>
<file>images/choicelist16.png</file>
<file>images/choicelist.png</file>
<file>images/progressbar.png</file>
<file>images/progressbar16.png</file>
<file>images/radiobutton.png</file>
<file>images/radiobutton16.png</file>
<file>images/slider.png</file>
<file>images/slider16.png</file>
<file>images/textarea16.png</file>
<file>images/textarea.png</file>
<file>images/textfield16.png</file>
<file>images/textfield.png</file>
<file>images/window16.png</file>
<file>images/window.png</file>
<file>images/tabbutton16.png</file>
<file>images/tabbutton.png</file>
<file>images/busyindicator16.png</file>
<file>images/busyindicator.png</file>
<file>images/sliderh16.png</file>
<file>images/sliderh.png</file>
<file>images/switchbutton16.png</file>
<file>images/switchbutton.png</file>
<file>images/buttonrow.png</file>
<file>images/buttonrow16.png</file>
<file>images/tabbar.png</file>
<file>images/tabbar16.png</file>
<file>images/toolbar.png</file>
<file>images/toolbar16.png</file>
<file>images/buttoncolumn.png</file>
<file>images/buttoncolumn16.png</file>
</qresource>
</RCC>
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