1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the designer application of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
29
#ifndef ABSTRACTWIDGETDATABASE_H
30
#define ABSTRACTWIDGETDATABASE_H
32
#include <QtDesigner/sdk_global.h>
34
#include <QtCore/QObject>
35
#include <QtCore/QList>
39
class QDesignerFormEditorInterface;
41
class QDesignerWidgetDataBaseItemInterface
44
virtual ~QDesignerWidgetDataBaseItemInterface() {}
46
virtual QString name() const = 0;
47
virtual void setName(const QString &name) = 0;
49
virtual QString group() const = 0;
50
virtual void setGroup(const QString &group) = 0;
52
virtual QString toolTip() const = 0;
53
virtual void setToolTip(const QString &toolTip) = 0;
55
virtual QString whatsThis() const = 0;
56
virtual void setWhatsThis(const QString &whatsThis) = 0;
58
virtual QString includeFile() const = 0;
59
virtual void setIncludeFile(const QString &includeFile) = 0;
61
virtual QIcon icon() const = 0;
62
virtual void setIcon(const QIcon &icon) = 0;
64
virtual bool isCompat() const = 0;
65
virtual void setCompat(bool compat) = 0;
67
virtual bool isContainer() const = 0;
68
virtual void setContainer(bool container) = 0;
70
virtual bool isCustom() const = 0;
71
virtual void setCustom(bool custom) = 0;
73
virtual QString pluginPath() const = 0;
74
virtual void setPluginPath(const QString &path) = 0;
76
virtual bool isPromoted() const = 0;
77
virtual void setPromoted(bool b) = 0;
79
virtual QString extends() const = 0;
80
virtual void setExtends(const QString &s) = 0;
82
virtual void setDefaultPropertyValues(const QList<QVariant> &list) = 0;
83
virtual QList<QVariant> defaultPropertyValues() const = 0;
86
class QT_SDK_EXPORT QDesignerWidgetDataBaseInterface: public QObject
90
QDesignerWidgetDataBaseInterface(QObject *parent = 0);
91
virtual ~QDesignerWidgetDataBaseInterface();
93
virtual int count() const;
94
virtual QDesignerWidgetDataBaseItemInterface *item(int index) const;
96
virtual int indexOf(QDesignerWidgetDataBaseItemInterface *item) const;
97
virtual void insert(int index, QDesignerWidgetDataBaseItemInterface *item);
98
virtual void append(QDesignerWidgetDataBaseItemInterface *item);
100
virtual int indexOfObject(QObject *object, bool resolveName = true) const;
101
virtual int indexOfClassName(const QString &className, bool resolveName = true) const;
103
virtual QDesignerFormEditorInterface *core() const;
105
bool isContainer(QObject *object, bool resolveName = true) const;
106
bool isCustom(QObject *object, bool resolveName = true) const;
112
QList<QDesignerWidgetDataBaseItemInterface *> m_items;
115
#endif // ABSTRACTWIDGETDATABASE_H