| 1 | /****************************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 4 | ** Contact: Qt Software Information ([email protected])
|
|---|
| 5 | **
|
|---|
| 6 | ** This file is part of the Qt Designer of the Qt Toolkit.
|
|---|
| 7 | **
|
|---|
| 8 | ** $QT_BEGIN_LICENSE:LGPL$
|
|---|
| 9 | ** Commercial Usage
|
|---|
| 10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
|---|
| 11 | ** accordance with the Qt Commercial License Agreement provided with the
|
|---|
| 12 | ** Software or, alternatively, in accordance with the terms contained in
|
|---|
| 13 | ** a written agreement between you and Nokia.
|
|---|
| 14 | **
|
|---|
| 15 | ** GNU Lesser General Public License Usage
|
|---|
| 16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
|---|
| 17 | ** General Public License version 2.1 as published by the Free Software
|
|---|
| 18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
|---|
| 19 | ** packaging of this file. Please review the following information to
|
|---|
| 20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
|---|
| 21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|---|
| 22 | **
|
|---|
| 23 | ** In addition, as a special exception, Nokia gives you certain
|
|---|
| 24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
|---|
| 25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|---|
| 26 | ** 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 are unsure which license is appropriate for your use, please
|
|---|
| 37 | ** contact the sales department at [email protected].
|
|---|
| 38 | ** $QT_END_LICENSE$
|
|---|
| 39 | **
|
|---|
| 40 | ****************************************************************************/
|
|---|
| 41 |
|
|---|
| 42 | // sdk
|
|---|
| 43 | #include "abstractmetadatabase.h"
|
|---|
| 44 |
|
|---|
| 45 | QT_BEGIN_NAMESPACE
|
|---|
| 46 |
|
|---|
| 47 | /*!
|
|---|
| 48 | \class QDesignerMetaDataBaseInterface
|
|---|
| 49 | \brief The QDesignerMetaDataBaseInterface class provides an interface to Qt Designer's
|
|---|
| 50 | object meta database.
|
|---|
| 51 | \inmodule QtDesigner
|
|---|
| 52 | \internal
|
|---|
| 53 | */
|
|---|
| 54 |
|
|---|
| 55 | /*!
|
|---|
| 56 | Constructs an interface to the meta database with the given \a parent.
|
|---|
| 57 | */
|
|---|
| 58 | QDesignerMetaDataBaseInterface::QDesignerMetaDataBaseInterface(QObject *parent)
|
|---|
| 59 | : QObject(parent)
|
|---|
| 60 | {
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | /*!
|
|---|
| 64 | Destroys the interface to the meta database.
|
|---|
| 65 | */
|
|---|
| 66 | QDesignerMetaDataBaseInterface::~QDesignerMetaDataBaseInterface()
|
|---|
| 67 | {
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 | /*!
|
|---|
| 71 | \fn QDesignerMetaDataBaseItemInterface *QDesignerMetaDataBaseInterface::item(QObject *object) const
|
|---|
| 72 |
|
|---|
| 73 | Returns the item in the meta database associated with the given \a object.
|
|---|
| 74 | */
|
|---|
| 75 |
|
|---|
| 76 | /*!
|
|---|
| 77 | \fn void QDesignerMetaDataBaseInterface::add(QObject *object)
|
|---|
| 78 |
|
|---|
| 79 | Adds the specified \a object to the meta database.
|
|---|
| 80 | */
|
|---|
| 81 |
|
|---|
| 82 | /*!
|
|---|
| 83 | \fn void QDesignerMetaDataBaseInterface::remove(QObject *object)
|
|---|
| 84 |
|
|---|
| 85 | Removes the specified \a object from the meta database.
|
|---|
| 86 | */
|
|---|
| 87 |
|
|---|
| 88 | /*!
|
|---|
| 89 | \fn QList<QObject*> QDesignerMetaDataBaseInterface::objects() const
|
|---|
| 90 |
|
|---|
| 91 | Returns the list of objects that have corresponding items in the meta database.
|
|---|
| 92 | */
|
|---|
| 93 |
|
|---|
| 94 | /*!
|
|---|
| 95 | \fn QDesignerFormEditorInterface *QDesignerMetaDataBaseInterface::core() const
|
|---|
| 96 |
|
|---|
| 97 | Returns the core interface that is associated with the meta database.
|
|---|
| 98 | */
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | // Doc: Interface only
|
|---|
| 102 |
|
|---|
| 103 | /*!
|
|---|
| 104 | \class QDesignerMetaDataBaseItemInterface
|
|---|
| 105 | \brief The QDesignerMetaDataBaseItemInterface class provides an interface to individual
|
|---|
| 106 | items in Qt Designer's meta database.
|
|---|
| 107 | \inmodule QtDesigner
|
|---|
| 108 | \internal
|
|---|
| 109 |
|
|---|
| 110 | This class allows individual items in \QD's meta-data database to be accessed and modified.
|
|---|
| 111 | Use the QDesignerMetaDataBaseInterface class to change the properties of the database itself.
|
|---|
| 112 | */
|
|---|
| 113 |
|
|---|
| 114 | /*!
|
|---|
| 115 | \fn QDesignerMetaDataBaseItemInterface::~QDesignerMetaDataBaseItemInterface()
|
|---|
| 116 |
|
|---|
| 117 | Destroys the item interface to the meta-data database.
|
|---|
| 118 | */
|
|---|
| 119 |
|
|---|
| 120 | /*!
|
|---|
| 121 | \fn QString QDesignerMetaDataBaseItemInterface::name() const
|
|---|
| 122 |
|
|---|
| 123 | Returns the name of the item in the database.
|
|---|
| 124 |
|
|---|
| 125 | \sa setName()
|
|---|
| 126 | */
|
|---|
| 127 |
|
|---|
| 128 | /*!
|
|---|
| 129 | \fn void QDesignerMetaDataBaseItemInterface::setName(const QString &name)
|
|---|
| 130 |
|
|---|
| 131 | Sets the name of the item to the given \a name.
|
|---|
| 132 |
|
|---|
| 133 | \sa name()
|
|---|
| 134 | */
|
|---|
| 135 |
|
|---|
| 136 | /*!
|
|---|
| 137 | \fn QList<QWidget*> QDesignerMetaDataBaseItemInterface::tabOrder() const
|
|---|
| 138 |
|
|---|
| 139 | Returns a list of widgets in the order defined by the form's tab order.
|
|---|
| 140 |
|
|---|
| 141 | \sa setTabOrder()
|
|---|
| 142 | */
|
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 | /*!
|
|---|
| 146 | \fn void QDesignerMetaDataBaseItemInterface::setTabOrder(const QList<QWidget*> &tabOrder)
|
|---|
| 147 |
|
|---|
| 148 | Sets the tab order in the form using the list of widgets defined by \a tabOrder.
|
|---|
| 149 |
|
|---|
| 150 | \sa tabOrder()
|
|---|
| 151 | */
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 | /*!
|
|---|
| 155 | \fn bool QDesignerMetaDataBaseItemInterface::enabled() const
|
|---|
| 156 |
|
|---|
| 157 | Returns whether the item is enabled.
|
|---|
| 158 |
|
|---|
| 159 | \sa setEnabled()
|
|---|
| 160 | */
|
|---|
| 161 |
|
|---|
| 162 | /*!
|
|---|
| 163 | \fn void QDesignerMetaDataBaseItemInterface::setEnabled(bool enabled)
|
|---|
| 164 |
|
|---|
| 165 | If \a enabled is true, the item is enabled; otherwise it is disabled.
|
|---|
| 166 |
|
|---|
| 167 | \sa enabled()
|
|---|
| 168 | */
|
|---|
| 169 |
|
|---|
| 170 | QT_END_NAMESPACE
|
|---|