[2] | 1 | /****************************************************************************
|
---|
| 2 | **
|
---|
[846] | 3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
[561] | 4 | ** All rights reserved.
|
---|
| 5 | ** Contact: Nokia Corporation ([email protected])
|
---|
[2] | 6 | **
|
---|
| 7 | ** This file is part of the Qt Designer of the Qt Toolkit.
|
---|
| 8 | **
|
---|
| 9 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
| 10 | ** Commercial Usage
|
---|
| 11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
| 12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
| 13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
| 14 | ** a written agreement between you and Nokia.
|
---|
| 15 | **
|
---|
| 16 | ** GNU Lesser General Public License Usage
|
---|
| 17 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
| 18 | ** General Public License version 2.1 as published by the Free Software
|
---|
| 19 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
| 20 | ** packaging of this file. Please review the following information to
|
---|
| 21 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
| 22 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
| 23 | **
|
---|
[561] | 24 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
| 25 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
| 26 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
[2] | 27 | **
|
---|
| 28 | ** GNU General Public License Usage
|
---|
| 29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
| 30 | ** General Public License version 3.0 as published by the Free Software
|
---|
| 31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
| 32 | ** packaging of this file. Please review the following information to
|
---|
| 33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
| 34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
| 35 | **
|
---|
[561] | 36 | ** If you have questions regarding the use of this file, please contact
|
---|
| 37 | ** Nokia at [email protected].
|
---|
[2] | 38 | ** $QT_END_LICENSE$
|
---|
| 39 | **
|
---|
| 40 | ****************************************************************************/
|
---|
| 41 |
|
---|
| 42 | #include "q3toolbar/q3toolbar_plugin.h"
|
---|
| 43 | #include "q3iconview/q3iconview_plugin.h"
|
---|
| 44 | #include "q3wizard/q3wizard_plugin.h"
|
---|
| 45 | #include "q3mainwindow/q3mainwindow_plugin.h"
|
---|
| 46 | #include "q3widgetstack/q3widgetstack_plugin.h"
|
---|
| 47 | #include "q3listview/q3listview_plugin.h"
|
---|
| 48 | #include "q3table/q3table_plugin.h"
|
---|
| 49 | #include "q3listbox/q3listbox_plugin.h"
|
---|
| 50 | #include "q3listview/q3listview_plugin.h"
|
---|
| 51 | #include "q3textedit/q3textedit_plugin.h"
|
---|
| 52 | #include "q3widgets/q3widget_plugins.h"
|
---|
| 53 |
|
---|
| 54 | #include <QtDesigner/QDesignerCustomWidgetCollectionInterface>
|
---|
| 55 | #include <QtCore/qplugin.h>
|
---|
| 56 | #include <QtCore/qdebug.h>
|
---|
| 57 | #include <QtGui/QIcon>
|
---|
| 58 |
|
---|
| 59 | QT_BEGIN_NAMESPACE
|
---|
| 60 |
|
---|
| 61 | class Qt3SupportWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
|
---|
| 62 | {
|
---|
| 63 | Q_OBJECT
|
---|
| 64 | Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
---|
| 65 | public:
|
---|
| 66 | Qt3SupportWidgets(QObject *parent = 0);
|
---|
| 67 |
|
---|
| 68 | virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
|
---|
| 69 |
|
---|
| 70 | private:
|
---|
| 71 | QList<QDesignerCustomWidgetInterface*> m_plugins;
|
---|
| 72 | };
|
---|
| 73 |
|
---|
| 74 | Qt3SupportWidgets::Qt3SupportWidgets(QObject *parent)
|
---|
| 75 | : QObject(parent)
|
---|
| 76 | {
|
---|
| 77 | const QIcon qt3Icon(QLatin1String(":/trolltech/formeditor/images/qt3logo.png"));
|
---|
| 78 | m_plugins.append(new Q3ToolBarPlugin(qt3Icon, this));
|
---|
| 79 | m_plugins.append(new Q3IconViewPlugin(qt3Icon, this));
|
---|
| 80 | m_plugins.append(new Q3GroupBoxPlugin(qt3Icon, this));
|
---|
| 81 | m_plugins.append(new Q3FramePlugin(qt3Icon, this));
|
---|
| 82 | m_plugins.append(new Q3WizardPlugin(qt3Icon, this));
|
---|
| 83 | m_plugins.append(new Q3MainWindowPlugin(qt3Icon, this));
|
---|
| 84 | m_plugins.append(new Q3WidgetStackPlugin(qt3Icon, this));
|
---|
| 85 | m_plugins.append(new Q3ButtonGroupPlugin(qt3Icon, this));
|
---|
| 86 | m_plugins.append(new Q3TablePlugin(qt3Icon, this));
|
---|
| 87 | m_plugins.append(new Q3ListBoxPlugin(qt3Icon, this));
|
---|
| 88 | m_plugins.append(new Q3ListViewPlugin(qt3Icon, this));
|
---|
| 89 | m_plugins.append(new Q3ComboBoxPlugin(qt3Icon, this));
|
---|
| 90 | m_plugins.append(new Q3TextEditPlugin(qt3Icon, this));
|
---|
| 91 | m_plugins.append(new Q3DateEditPlugin(qt3Icon, this));
|
---|
| 92 | m_plugins.append(new Q3TimeEditPlugin(qt3Icon, this));
|
---|
| 93 | m_plugins.append(new Q3DateTimeEditPlugin(qt3Icon, this));
|
---|
| 94 | m_plugins.append(new Q3ProgressBarPlugin(qt3Icon, this));
|
---|
| 95 | m_plugins.append(new Q3TextBrowserPlugin(qt3Icon, this));
|
---|
| 96 | }
|
---|
| 97 |
|
---|
| 98 | QList<QDesignerCustomWidgetInterface*> Qt3SupportWidgets::customWidgets() const
|
---|
| 99 | {
|
---|
| 100 | return m_plugins;
|
---|
| 101 | }
|
---|
| 102 |
|
---|
| 103 | Q_EXPORT_PLUGIN(Qt3SupportWidgets)
|
---|
| 104 |
|
---|
| 105 | QT_END_NAMESPACE
|
---|
| 106 |
|
---|
| 107 | #include "qt3supportwidgets.moc"
|
---|