| 1 | /****************************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 4 | ** All rights reserved.
|
|---|
| 5 | ** Contact: Nokia Corporation ([email protected])
|
|---|
| 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 | **
|
|---|
| 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.
|
|---|
| 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 | **
|
|---|
| 36 | ** If you have questions regarding the use of this file, please contact
|
|---|
| 37 | ** Nokia at [email protected].
|
|---|
| 38 | ** $QT_END_LICENSE$
|
|---|
| 39 | **
|
|---|
| 40 | ****************************************************************************/
|
|---|
| 41 |
|
|---|
| 42 | #ifndef ABSTRACTWIDGETDATABASE_H
|
|---|
| 43 | #define ABSTRACTWIDGETDATABASE_H
|
|---|
| 44 |
|
|---|
| 45 | #include <QtDesigner/sdk_global.h>
|
|---|
| 46 |
|
|---|
| 47 | #include <QtCore/QObject>
|
|---|
| 48 | #include <QtCore/QList>
|
|---|
| 49 |
|
|---|
| 50 | QT_BEGIN_HEADER
|
|---|
| 51 |
|
|---|
| 52 | QT_BEGIN_NAMESPACE
|
|---|
| 53 |
|
|---|
| 54 | class QIcon;
|
|---|
| 55 | class QString;
|
|---|
| 56 | class QDesignerFormEditorInterface;
|
|---|
| 57 | class QDebug;
|
|---|
| 58 |
|
|---|
| 59 | class QDesignerWidgetDataBaseItemInterface
|
|---|
| 60 | {
|
|---|
| 61 | public:
|
|---|
| 62 | virtual ~QDesignerWidgetDataBaseItemInterface() {}
|
|---|
| 63 |
|
|---|
| 64 | virtual QString name() const = 0;
|
|---|
| 65 | virtual void setName(const QString &name) = 0;
|
|---|
| 66 |
|
|---|
| 67 | virtual QString group() const = 0;
|
|---|
| 68 | virtual void setGroup(const QString &group) = 0;
|
|---|
| 69 |
|
|---|
| 70 | virtual QString toolTip() const = 0;
|
|---|
| 71 | virtual void setToolTip(const QString &toolTip) = 0;
|
|---|
| 72 |
|
|---|
| 73 | virtual QString whatsThis() const = 0;
|
|---|
| 74 | virtual void setWhatsThis(const QString &whatsThis) = 0;
|
|---|
| 75 |
|
|---|
| 76 | virtual QString includeFile() const = 0;
|
|---|
| 77 | virtual void setIncludeFile(const QString &includeFile) = 0;
|
|---|
| 78 |
|
|---|
| 79 | virtual QIcon icon() const = 0;
|
|---|
| 80 | virtual void setIcon(const QIcon &icon) = 0;
|
|---|
| 81 |
|
|---|
| 82 | virtual bool isCompat() const = 0;
|
|---|
| 83 | virtual void setCompat(bool compat) = 0;
|
|---|
| 84 |
|
|---|
| 85 | virtual bool isContainer() const = 0;
|
|---|
| 86 | virtual void setContainer(bool container) = 0;
|
|---|
| 87 |
|
|---|
| 88 | virtual bool isCustom() const = 0;
|
|---|
| 89 | virtual void setCustom(bool custom) = 0;
|
|---|
| 90 |
|
|---|
| 91 | virtual QString pluginPath() const = 0;
|
|---|
| 92 | virtual void setPluginPath(const QString &path) = 0;
|
|---|
| 93 |
|
|---|
| 94 | virtual bool isPromoted() const = 0;
|
|---|
| 95 | virtual void setPromoted(bool b) = 0;
|
|---|
| 96 |
|
|---|
| 97 | virtual QString extends() const = 0;
|
|---|
| 98 | virtual void setExtends(const QString &s) = 0;
|
|---|
| 99 |
|
|---|
| 100 | virtual void setDefaultPropertyValues(const QList<QVariant> &list) = 0;
|
|---|
| 101 | virtual QList<QVariant> defaultPropertyValues() const = 0;
|
|---|
| 102 | };
|
|---|
| 103 |
|
|---|
| 104 | class QDESIGNER_SDK_EXPORT QDesignerWidgetDataBaseInterface: public QObject
|
|---|
| 105 | {
|
|---|
| 106 | Q_OBJECT
|
|---|
| 107 | public:
|
|---|
| 108 | QDesignerWidgetDataBaseInterface(QObject *parent = 0);
|
|---|
| 109 | virtual ~QDesignerWidgetDataBaseInterface();
|
|---|
| 110 |
|
|---|
| 111 | virtual int count() const;
|
|---|
| 112 | virtual QDesignerWidgetDataBaseItemInterface *item(int index) const;
|
|---|
| 113 |
|
|---|
| 114 | virtual int indexOf(QDesignerWidgetDataBaseItemInterface *item) const;
|
|---|
| 115 | virtual void insert(int index, QDesignerWidgetDataBaseItemInterface *item);
|
|---|
| 116 | virtual void append(QDesignerWidgetDataBaseItemInterface *item);
|
|---|
| 117 |
|
|---|
| 118 | virtual int indexOfObject(QObject *object, bool resolveName = true) const;
|
|---|
| 119 | virtual int indexOfClassName(const QString &className, bool resolveName = true) const;
|
|---|
| 120 |
|
|---|
| 121 | virtual QDesignerFormEditorInterface *core() const;
|
|---|
| 122 |
|
|---|
| 123 | bool isContainer(QObject *object, bool resolveName = true) const;
|
|---|
| 124 | bool isCustom(QObject *object, bool resolveName = true) const;
|
|---|
| 125 |
|
|---|
| 126 | Q_SIGNALS:
|
|---|
| 127 | void changed();
|
|---|
| 128 |
|
|---|
| 129 | protected:
|
|---|
| 130 | QList<QDesignerWidgetDataBaseItemInterface *> m_items;
|
|---|
| 131 | };
|
|---|
| 132 |
|
|---|
| 133 | QT_END_NAMESPACE
|
|---|
| 134 |
|
|---|
| 135 | QT_END_HEADER
|
|---|
| 136 |
|
|---|
| 137 | #endif // ABSTRACTWIDGETDATABASE_H
|
|---|