Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QSqlRelationalDelegate class provides a delegate that is used to display and edit data from a QSqlRelationalTableModel. More...
Public Member Functions | |
QSqlRelationalDelegate (QObject aParent=null) | |
| |
override void | CreateProxy () |
override QWidget | CreateEditor (QWidget aParent, QStyleOptionViewItem option, QModelIndex index) |
| |
override void | SetEditorData (QWidget editor, QModelIndex index) |
| |
override void | SetModelData (QWidget editor, QAbstractItemModel model, QModelIndex index) |
| |
new void | Dispose () |
Public Member Functions inherited from QtGui.QItemDelegate | |
QItemDelegate (QObject parent=null) | |
| |
override bool | OnEditorEvent (QEvent @event, QAbstractItemModel model, QStyleOptionViewItem option, QModelIndex index) |
| |
override bool | EventFilter (QObject @object, QEvent @event) |
| |
override void | Paint (QPainter painter, QStyleOptionViewItem option, QModelIndex index) |
| |
override QSize | SizeHint (QStyleOptionViewItem option, QModelIndex index) |
| |
override void | UpdateEditorGeometry (QWidget editor, QStyleOptionViewItem option, QModelIndex index) |
| |
new void | Dispose () |
Public Member Functions inherited from QtGui.QAbstractItemDelegate | |
QAbstractItemDelegate (QObject parent=null) | |
| |
new bool | OnHelpEvent (QHelpEvent @event, QAbstractItemView view, QStyleOptionViewItem option, QModelIndex index) |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Additional Inherited Members | |
Public Types inherited from QtGui.QAbstractItemDelegate | |
enum | EndEditHint { EditNextItem = 1, EditPreviousItem = 2, NoHint = 0, RevertModelCache = 4, SubmitModelCache = 3 } |
More... | |
Static Public Member Functions inherited from QtGui.QItemDelegate | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Protected Attributes inherited from QtCore.QObject | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QSqlRelationalDelegate class provides a delegate that is used to display and edit data from a QSqlRelationalTableModel.
Unlike the default delegate, QSqlRelationalDelegate provides a combobox for fields that are foreign keys into other tables. To use the class, simply call QAbstractItemView::setItemDelegate() on the view with an instance of QSqlRelationalDelegate:
QTableView *view = new QTableView;
view->setModel(model);
view->setItemDelegate(new QSqlRelationalDelegate(view));
The Relational Table Model example (shown below) illustrates how to use QSqlRelationalDelegate in conjunction with QSqlRelationalTableModel to provide tables with foreign key support.
See also QSqlRelationalTableModel and Model/View Programming.
|
protected |
QtSql.QSqlRelationalDelegate.QSqlRelationalDelegate | ( | QObject | aParent = null | ) |
Constructs a QSqlRelationalDelegate object with the given parent.
|
virtual |
Reimplemented from QAbstractItemDelegate::createEditor().
Reimplemented from QtGui.QItemDelegate.
|
virtual |
Reimplemented from QtGui.QItemDelegate.
new void QtSql.QSqlRelationalDelegate.Dispose | ( | ) |
|
virtual |
Reimplemented from QAbstractItemDelegate::setEditorData().
Reimplemented from QtGui.QItemDelegate.
|
virtual |
Reimplemented from QAbstractItemDelegate::setModelData().
Reimplemented from QtGui.QItemDelegate.
|
getprotected |