Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtSql.QSqlRelationalDelegate Class Reference

The QSqlRelationalDelegate class provides a delegate that is used to display and edit data from a QSqlRelationalTableModel. More...

Inheritance diagram for QtSql.QSqlRelationalDelegate:
Collaboration diagram for QtSql.QSqlRelationalDelegate:

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 ()
 

Protected Member Functions

 QSqlRelationalDelegate (System.Type dummy)
 
- Protected Member Functions inherited from QtGui.QItemDelegate
 QItemDelegate (System.Type dummy)
 
new QRect Check (QStyleOptionViewItem option, QRect bounding, object variant)
 
new QPixmap Decoration (QStyleOptionViewItem option, object variant)
 
new void DoLayout (QStyleOptionViewItem option, QRect checkRect, QRect iconRect, QRect textRect, bool hint)
 
new void DrawBackground (QPainter painter, QStyleOptionViewItem option, QModelIndex index)
 
 
virtual void DrawCheck (QPainter painter, QStyleOptionViewItem option, QRect rect, Qt.CheckState state)
 
 
virtual void DrawDecoration (QPainter painter, QStyleOptionViewItem option, QRect rect, QPixmap pixmap)
 
 
virtual void DrawDisplay (QPainter painter, QStyleOptionViewItem option, QRect rect, string text)
 
 
virtual void DrawFocus (QPainter painter, QStyleOptionViewItem option, QRect rect)
 
 
new QRect Rect (QStyleOptionViewItem option, QModelIndex index, int role)
 
new QPixmap Selected (QPixmap pixmap, QPalette palette, bool enabled)
 
new QStyleOptionViewItem SetOptions (QModelIndex index, QStyleOptionViewItem option)
 
new QRect TextRectangle (QPainter painter, QRect rect, QFont font, string text)
 
- Protected Member Functions inherited from QtGui.QAbstractItemDelegate
 QAbstractItemDelegate (System.Type dummy)
 
new void OnCloseEditor (QWidget editor, QAbstractItemDelegate.EndEditHint hint=QAbstractItemDelegate.EndEditHint.NoHint)
 
 
new void OnCommitData (QWidget editor)
 
 
new void OnSizeHintChanged (QModelIndex arg1)
 
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent arg1)
 
 
virtual void ConnectNotify (string signal)
 
 
virtual void OnCustomEvent (QEvent arg1)
 
 
new void OnDestroyed (QObject arg1=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
new QObject Sender ()
 
 
new int SenderSignalIndex ()
 
 
virtual void OnTimerEvent (QTimerEvent arg1)
 
 

Properties

new IQSqlRelationalDelegateSignals Emit [get]
 
- Properties inherited from QtGui.QItemDelegate
new QItemEditorFactory ItemEditorFactory [get, set]
 
 
new bool Clipping [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQItemDelegateSignals Emit [get]
 
- Properties inherited from QtGui.QAbstractItemDelegate
Slot< QWidgetCommitData
 
 
Slot< QWidget,
QAbstractItemDelegate.EndEditHint
CloseEditor
 
 
Slot< QWidgetCloseEditorEditor
 
Slot< QModelIndexSizeHintChanged
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQAbstractItemDelegateSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
 
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
 
 
Slot< QObjectDestroyedQObject
 
Slot Destroyed
 
 
new QObject Parent [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 

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>()
 

Detailed Description

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.

Constructor & Destructor Documentation

QtSql.QSqlRelationalDelegate.QSqlRelationalDelegate ( System.Type  dummy)
protected
QtSql.QSqlRelationalDelegate.QSqlRelationalDelegate ( QObject  aParent = null)

Constructs a QSqlRelationalDelegate object with the given parent.

Member Function Documentation

override QWidget QtSql.QSqlRelationalDelegate.CreateEditor ( QWidget  aParent,
QStyleOptionViewItem  option,
QModelIndex  index 
)
virtual

Reimplemented from QAbstractItemDelegate::createEditor().

Reimplemented from QtGui.QItemDelegate.

override void QtSql.QSqlRelationalDelegate.CreateProxy ( )
virtual

Reimplemented from QtGui.QItemDelegate.

new void QtSql.QSqlRelationalDelegate.Dispose ( )
override void QtSql.QSqlRelationalDelegate.SetEditorData ( QWidget  editor,
QModelIndex  index 
)
virtual

Reimplemented from QAbstractItemDelegate::setEditorData().

Reimplemented from QtGui.QItemDelegate.

override void QtSql.QSqlRelationalDelegate.SetModelData ( QWidget  editor,
QAbstractItemModel  model,
QModelIndex  index 
)
virtual

Reimplemented from QAbstractItemDelegate::setModelData().

Reimplemented from QtGui.QItemDelegate.

Property Documentation

new IQSqlRelationalDelegateSignals QtSql.QSqlRelationalDelegate.Emit
getprotected