Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator 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)
  More...
 
override void CreateProxy ()
 
override QWidget CreateEditor (QWidget aParent, QStyleOptionViewItem option, QModelIndex index)
  More...
 
override void SetEditorData (QWidget editor, QModelIndex index)
  More...
 
override void SetModelData (QWidget editor, QAbstractItemModel model, QModelIndex index)
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QItemDelegate
 QItemDelegate (QObject parent=null)
  More...
 
override bool OnEditorEvent (QEvent @event, QAbstractItemModel model, QStyleOptionViewItem option, QModelIndex index)
  More...
 
override bool EventFilter (QObject @object, QEvent @event)
  More...
 
override void Paint (QPainter painter, QStyleOptionViewItem option, QModelIndex index)
  More...
 
override QSize SizeHint (QStyleOptionViewItem option, QModelIndex index)
  More...
 
override void UpdateEditorGeometry (QWidget editor, QStyleOptionViewItem option, QModelIndex index)
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QAbstractItemDelegate
 QAbstractItemDelegate (QObject parent=null)
  More...
 
new bool OnHelpEvent (QHelpEvent @event, QAbstractItemView view, QStyleOptionViewItem option, QModelIndex index)
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
  More...
 
new bool BlockSignals (bool b)
  More...
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
new void DeleteLater ()
  More...
 
new bool Disconnect (QObject receiver, string member=null)
  More...
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
  More...
 
new void DumpObjectInfo ()
  More...
 
new void DumpObjectTree ()
  More...
 
virtual bool OnEvent (QEvent e)
  More...
 
virtual bool EventFilter (QObject watched, QEvent @event)
  More...
 
new bool Inherits (string classname)
  More...
 
new void InstallEventFilter (QObject filterObj)
  More...
 
new void KillTimer (int id)
  More...
 
new object Property (string name)
  More...
 
new void RemoveEventFilter (QObject obj)
  More...
 
new bool SetProperty (string name, object value)
  More...
 
new void SetUserData (uint id, QObjectUserData data)
 
new int StartTimer (int interval)
  More...
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 

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)
  More...
 
virtual void DrawCheck (QPainter painter, QStyleOptionViewItem option, QRect rect, Qt.CheckState state)
  More...
 
virtual void DrawDecoration (QPainter painter, QStyleOptionViewItem option, QRect rect, QPixmap pixmap)
  More...
 
virtual void DrawDisplay (QPainter painter, QStyleOptionViewItem option, QRect rect, string text)
  More...
 
virtual void DrawFocus (QPainter painter, QStyleOptionViewItem option, QRect rect)
  More...
 
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)
  More...
 
new void OnCommitData (QWidget editor)
  More...
 
new void OnSizeHintChanged (QModelIndex index)
  More...
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent @event)
  More...
 
virtual void ConnectNotify (string signal)
  More...
 
virtual void OnCustomEvent (QEvent @event)
  More...
 
new void OnDestroyed (QObject obj=null)
  More...
 
virtual void DisconnectNotify (string signal)
  More...
 
new int Receivers (string signal)
  More...
 
virtual void OnTimerEvent (QTimerEvent @event)
  More...
 

Properties

new IQSqlRelationalDelegateSignals Emit [get]
 
- Properties inherited from QtGui.QItemDelegate
QItemEditorFactory ItemEditorFactory [get, set]
  More...
 
new bool Clipping [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQItemDelegateSignals Emit [get]
 
- Properties inherited from QtGui.QAbstractItemDelegate
Slot< QWidgetCommitData
  More...
 
Slot< QWidget,
QAbstractItemDelegate.EndEditHint
CloseEditor
  More...
 
Slot< QWidgetCloseEditorEditor
  More...
 
Slot< QModelIndexSizeHintChanged
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQAbstractItemDelegateSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
  More...
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
  More...
 
Slot< QObjectDestroyedObj
  More...
 
Slot Destroyed
  More...
 
QObject Parent [get, set]
  More...
 
System.Collections.Generic.List
< QObject
Children [get]
  More...
 
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames [get]
  More...
 
bool IsWidgetType [get]
  More...
 
static uint RegisterUserData [get]
 
QObject Sender [get]
  More...
 
int SenderSignalIndex [get]
  More...
 
bool SignalsBlocked [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
  More...
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 
- Properties inherited from QtCore.Qt
static string QAppName [get]
 
static double QInf [get]
 
static double QQNaN [get]
 
static double QSNaN [get]
 
static bool QSharedBuild [get]
 
static string QVersion [get]
  More...
 
static int Qrand [get]
  More...
 

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)
 
- Static Public Attributes inherited from QtCore.Qt
</para > *< para > Creating QM
files suitable for use with
this[SmokeMethod("qtTrId(const
char*, int)")] static strin 
QtTrId )(string id, int n=-1)
 
- 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.

Here is the call graph for this function:

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.

Here is the caller graph for this function:

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