~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to tools/designer/src/lib/sdk/abstractwidgetdatabase.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
 
4
**
 
5
** This file is part of the designer application of the Qt Toolkit.
 
6
**
 
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.
 
10
**
 
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.
 
15
**
 
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.
 
20
**
 
21
** Contact info@trolltech.com if any conditions of this licensing are
 
22
** not clear to you.
 
23
**
 
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.
 
26
**
 
27
****************************************************************************/
 
28
 
 
29
#ifndef ABSTRACTWIDGETDATABASE_H
 
30
#define ABSTRACTWIDGETDATABASE_H
 
31
 
 
32
#include <QtDesigner/sdk_global.h>
 
33
 
 
34
#include <QtCore/QObject>
 
35
#include <QtCore/QList>
 
36
 
 
37
class QIcon;
 
38
class QString;
 
39
class QDesignerFormEditorInterface;
 
40
 
 
41
class QDesignerWidgetDataBaseItemInterface
 
42
{
 
43
public:
 
44
    virtual ~QDesignerWidgetDataBaseItemInterface() {}
 
45
 
 
46
    virtual QString name() const = 0;
 
47
    virtual void setName(const QString &name) = 0;
 
48
 
 
49
    virtual QString group() const = 0;
 
50
    virtual void setGroup(const QString &group) = 0;
 
51
 
 
52
    virtual QString toolTip() const = 0;
 
53
    virtual void setToolTip(const QString &toolTip) = 0;
 
54
 
 
55
    virtual QString whatsThis() const = 0;
 
56
    virtual void setWhatsThis(const QString &whatsThis) = 0;
 
57
 
 
58
    virtual QString includeFile() const = 0;
 
59
    virtual void setIncludeFile(const QString &includeFile) = 0;
 
60
 
 
61
    virtual QIcon icon() const = 0;
 
62
    virtual void setIcon(const QIcon &icon) = 0;
 
63
 
 
64
    virtual bool isCompat() const = 0;
 
65
    virtual void setCompat(bool compat) = 0;
 
66
 
 
67
    virtual bool isContainer() const = 0;
 
68
    virtual void setContainer(bool container) = 0;
 
69
 
 
70
    virtual bool isCustom() const = 0;
 
71
    virtual void setCustom(bool custom) = 0;
 
72
 
 
73
    virtual QString pluginPath() const = 0;
 
74
    virtual void setPluginPath(const QString &path) = 0;
 
75
 
 
76
    virtual bool isPromoted() const = 0;
 
77
    virtual void setPromoted(bool b) = 0;
 
78
 
 
79
    virtual QString extends() const = 0;
 
80
    virtual void setExtends(const QString &s) = 0;
 
81
 
 
82
    virtual void setDefaultPropertyValues(const QList<QVariant> &list) = 0;
 
83
    virtual QList<QVariant> defaultPropertyValues() const = 0;
 
84
};
 
85
 
 
86
class QT_SDK_EXPORT QDesignerWidgetDataBaseInterface: public QObject
 
87
{
 
88
    Q_OBJECT
 
89
public:
 
90
    QDesignerWidgetDataBaseInterface(QObject *parent = 0);
 
91
    virtual ~QDesignerWidgetDataBaseInterface();
 
92
 
 
93
    virtual int count() const;
 
94
    virtual QDesignerWidgetDataBaseItemInterface *item(int index) const;
 
95
 
 
96
    virtual int indexOf(QDesignerWidgetDataBaseItemInterface *item) const;
 
97
    virtual void insert(int index, QDesignerWidgetDataBaseItemInterface *item);
 
98
    virtual void append(QDesignerWidgetDataBaseItemInterface *item);
 
99
 
 
100
    virtual int indexOfObject(QObject *object, bool resolveName = true) const;
 
101
    virtual int indexOfClassName(const QString &className, bool resolveName = true) const;
 
102
 
 
103
    virtual QDesignerFormEditorInterface *core() const;
 
104
 
 
105
    bool isContainer(QObject *object, bool resolveName = true) const;
 
106
    bool isCustom(QObject *object, bool resolveName = true) const;
 
107
 
 
108
signals:
 
109
    void changed();
 
110
 
 
111
protected:
 
112
    QList<QDesignerWidgetDataBaseItemInterface *> m_items;
 
113
};
 
114
 
 
115
#endif // ABSTRACTWIDGETDATABASE_H