OSDN Git Service

use proper type for written bytes count in QFileSystemEngine::copyFile()
[kde/Katie.git] / src / sql / models / qsqlrelationaldelegate.cpp
1 /****************************************************************************
2 **
3 ** Copyright (C) 2015 The Qt Company Ltd.
4 ** Copyright (C) 2016 Ivailo Monev
5 **
6 ** This file is part of the QtSql module of the Katie Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 **
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser
12 ** General Public License version 2.1 as published by the Free Software
13 ** Foundation and appearing in the file LICENSE.LGPL included in the
14 ** packaging of this file.  Please review the following information to
15 ** ensure the GNU Lesser General Public License version 2.1 requirements
16 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 **
18 ** $QT_END_LICENSE$
19 **
20 ****************************************************************************/
21
22 #include "qglobal.h"
23
24 QT_BEGIN_NAMESPACE
25
26 /*!
27     \class QSqlRelationalDelegate
28     \brief The QSqlRelationalDelegate class provides a delegate that is used to
29     display and edit data from a QSqlRelationalTableModel.
30
31     Unlike the default delegate, QSqlRelationalDelegate provides a
32     combobox for fields that are foreign keys into other tables. To
33     use the class, simply call QAbstractItemView::setItemDelegate()
34     on the view with an instance of QSqlRelationalDelegate:
35
36     \snippet examples/sql/relationaltablemodel/relationaltablemodel.cpp 4
37
38     The \l{sql/relationaltablemodel}{Relational Table Model} example
39     (shown below) illustrates how to use QSqlRelationalDelegate in
40     conjunction with QSqlRelationalTableModel to provide tables with
41     foreign key support.
42
43     \image relationaltable.png
44
45     \sa QSqlRelationalTableModel, {Model/View Programming}
46 */
47
48
49 /*!
50     \fn QSqlRelationalDelegate::QSqlRelationalDelegate(QObject *parent)
51
52     Constructs a QSqlRelationalDelegate object with the given \a
53     parent.
54 */
55
56 /*!
57     \fn QSqlRelationalDelegate::~QSqlRelationalDelegate()
58
59     Destroys the QSqlRelationalDelegate object and frees any
60     allocated resources.
61 */
62
63 /*!
64     \fn QWidget *QSqlRelationalDelegate::createEditor(QWidget *parent,
65                                                       const QStyleOptionViewItem &option,
66                                                       const QModelIndex &index) const
67     \reimp
68 */
69
70 /*!
71     \fn void QSqlRelationalDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
72     \reimp
73 */
74
75 /*!
76     \fn void QSqlRelationalDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
77                                                   const QModelIndex &index) const
78     \reimp
79 */
80
81 QT_END_NAMESPACE