Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QItemSelectionModel class keeps track of a view's selected items. More...
Public Types | |
enum | SelectionFlag { Clear = 1, ClearAndSelect = 3, Columns = 64, Current = 16, Deselect = 4, NoUpdate = 0, Rows = 32, Select = 2, SelectCurrent = 18, Toggle = 8, ToggleCurrent = 24 } |
More... | |
Public Member Functions | |
QItemSelectionModel (QAbstractItemModel model) | |
| |
QItemSelectionModel (QAbstractItemModel model, QObject parent) | |
| |
override void | CreateProxy () |
virtual void | Clear () |
| |
new void | ClearSelection () |
| |
new bool | ColumnIntersectsSelection (int column, QModelIndex parent) |
| |
new bool | HasSelection () |
| |
new bool | IsColumnSelected (int column, QModelIndex parent) |
| |
new bool | IsRowSelected (int row, QModelIndex parent) |
| |
new bool | IsSelected (QModelIndex index) |
| |
new QAbstractItemModel | Model () |
| |
virtual void | Reset () |
| |
new bool | RowIntersectsSelection (int row, QModelIndex parent) |
| |
virtual void | Select (QModelIndex index, QItemSelectionModel.SelectionFlag command) |
| |
virtual void | Select (QItemSelection selection, QItemSelectionModel.SelectionFlag command) |
| |
new System.Collections.Generic.List < QModelIndex > | SelectedColumns (int row=0) |
| |
new System.Collections.Generic.List < QModelIndex > | SelectedIndexes () |
| |
new System.Collections.Generic.List < QModelIndex > | SelectedRows (int column=0) |
| |
new QItemSelection | Selection () |
| |
new void | SetCurrentIndex (QModelIndex index, QItemSelectionModel.SelectionFlag command) |
| |
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 () |
Static Public Member Functions | |
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 Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
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 Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QItemSelectionModel (System.Type dummy) | |
new void | OnCurrentChanged (QModelIndex current, QModelIndex previous) |
| |
new void | OnCurrentColumnChanged (QModelIndex current, QModelIndex previous) |
| |
new void | OnCurrentRowChanged (QModelIndex current, QModelIndex previous) |
| |
new void | EmitSelectionChanged (QItemSelection newSelection, QItemSelection oldSelection) |
| |
new void | OnSelectionChanged (QItemSelection selected, QItemSelection deselected) |
| |
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 | |
Slot< QItemSelection, QItemSelection > | SelectionChanged |
| |
Slot< QModelIndex, QModelIndex > | CurrentChanged |
| |
Slot< QModelIndex, QModelIndex > | CurrentRowChanged |
| |
Slot< QModelIndex, QModelIndex > | CurrentColumnChanged |
| |
new QModelIndex | CurrentIndex [get] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQItemSelectionModelSignals | 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< QObject > | DestroyedQObject |
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 | |
Protected Attributes inherited from QtCore.QObject | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QItemSelectionModel class keeps track of a view's selected items.
A QItemSelectionModel keeps track of the selected items in a view, or in several views onto the same model. It also keeps track of the currently selected item in a view.
The QItemSelectionModel class is one of the Model/View Classes and is part of Qt's model/view framework.
The selected items are stored using ranges. Whenever you want to modify the selected items use select() and provide either a QItemSelection, or a QModelIndex and a QItemSelectionModel::SelectionFlag.
The QItemSelectionModel takes a two layer approach to selection management, dealing with both selected items that have been committed and items that are part of the current selection. The current selected items are part of the current interactive selection (for example with rubber-band selection or keyboard-shift selections).
To update the currently selected items, use the bitwise OR of QItemSelectionModel::Current and any of the other SelectionFlags. If you omit the QItemSelectionModel::Current command, a new current selection will be created, and the previous one added to the whole selection. All functions operate on both layers; for example, selectedItems() will return items from both layers.
See also Model/View Programming, QAbstractItemModel, and Chart Example.
This enum describes the way the selection model will be updated.
|
protected |
QtGui.QItemSelectionModel.QItemSelectionModel | ( | QAbstractItemModel | model | ) |
Constructs a selection model that operates on the specified item model.
QtGui.QItemSelectionModel.QItemSelectionModel | ( | QAbstractItemModel | model, |
QObject | parent | ||
) |
Constructs a selection model that operates on the specified item model with parent.
|
virtual |
Clears the selection model. Emits selectionChanged() and currentChanged().
new void QtGui.QItemSelectionModel.ClearSelection | ( | ) |
Clears the selection in the selection model. Emits selectionChanged().
This function was introduced in Qt 4.2.
new bool QtGui.QItemSelectionModel.ColumnIntersectsSelection | ( | int | column, |
QModelIndex | parent | ||
) |
Returns true if there are any items selected in the column with the given parent.
|
virtual |
Reimplemented from QtCore.QObject.
new void QtGui.QItemSelectionModel.Dispose | ( | ) |
|
protected |
Compares the two selections newSelection and oldSelection and emits selectionChanged() with the deselected and selected items.
new bool QtGui.QItemSelectionModel.HasSelection | ( | ) |
Returns true if the selection model contains any selection ranges; otherwise returns false.
This function was introduced in Qt 4.2.
new bool QtGui.QItemSelectionModel.IsColumnSelected | ( | int | column, |
QModelIndex | parent | ||
) |
Returns true if all items are selected in the column with the given parent.
Note that this function is usually faster than calling isSelected() on all items in the same column and that unselectable items are ignored.
new bool QtGui.QItemSelectionModel.IsRowSelected | ( | int | row, |
QModelIndex | parent | ||
) |
Returns true if all items are selected in the row with the given parent.
Note that this function is usually faster than calling isSelected() on all items in the same row and that unselectable items are ignored.
new bool QtGui.QItemSelectionModel.IsSelected | ( | QModelIndex | index | ) |
Returns true if the given model item index is selected.
new QAbstractItemModel QtGui.QItemSelectionModel.Model | ( | ) |
Returns the item model operated on by the selection model.
|
protected |
This signal is emitted whenever the current item changes. The previous model item index is replaced by the current index as the selection's current item.
Note that this signal will not be emitted when the item model is reset.
See also currentIndex(), setCurrentIndex(), and selectionChanged().
|
protected |
This signal is emitted if the current item changes and its column is different to the column of the previous current item.
Note that this signal will not be emitted when the item model is reset.
See also currentChanged(), currentRowChanged(), currentIndex(), and setCurrentIndex().
|
protected |
This signal is emitted if the current item changes and its row is different to the row of the previous current item.
Note that this signal will not be emitted when the item model is reset.
See also currentChanged(), currentColumnChanged(), currentIndex(), and setCurrentIndex().
|
protected |
This signal is emitted whenever the selection changes. The change in the selection is represented as an item selection of deselected items and an item selection of selected items.
Note the that the current index changes independently from the selection. Also note that this signal will not be emitted when the item model is reset.
See also select() and currentChanged().
|
virtual |
Clears the selection model. Does not emit any signals.
new bool QtGui.QItemSelectionModel.RowIntersectsSelection | ( | int | row, |
QModelIndex | parent | ||
) |
Returns true if there are any items selected in the row with the given parent.
|
virtual |
Selects the model item index using the specified command, and emits selectionChanged().
See also QItemSelectionModel::SelectionFlags.
|
virtual |
Selects the model item index using the specified command, and emits selectionChanged().
See also QItemSelectionModel::SelectionFlags.
new System.Collections.Generic.List<QModelIndex> QtGui.QItemSelectionModel.SelectedColumns | ( | int | row = 0 | ) |
Returns the indexes in the given row for columns where all rows are selected.
This function was introduced in Qt 4.2.
See also selectedIndexes() and selectedRows().
new System.Collections.Generic.List<QModelIndex> QtGui.QItemSelectionModel.SelectedIndexes | ( | ) |
Returns a list of all selected model item indexes. The list contains no duplicates, and is not sorted.
new System.Collections.Generic.List<QModelIndex> QtGui.QItemSelectionModel.SelectedRows | ( | int | column = 0 | ) |
Returns the indexes in the given column for the rows where all columns are selected.
This function was introduced in Qt 4.2.
See also selectedIndexes() and selectedColumns().
new QItemSelection QtGui.QItemSelectionModel.Selection | ( | ) |
Returns the selection ranges stored in the selection model.
new void QtGui.QItemSelectionModel.SetCurrentIndex | ( | QModelIndex | index, |
QItemSelectionModel.SelectionFlag | command | ||
) |
Sets the model item index to be the current item, and emits currentChanged(). The current item is used for keyboard navigation and focus indication; it is independent of any selected items, although a selected item can also be the current item.
Depending on the specified command, the index can also become part of the current selection.
See also currentIndex() and select().
|
static |
|
static |
|
static |
|
static |
|
addremove |
This signal is emitted whenever the current item changes. The previous model item index is replaced by the current index as the selection's current item.
Note that this signal will not be emitted when the item model is reset.
See also currentIndex(), setCurrentIndex(), and selectionChanged().
|
addremove |
This signal is emitted if the current item changes and its column is different to the column of the previous current item.
Note that this signal will not be emitted when the item model is reset.
See also currentChanged(), currentRowChanged(), currentIndex(), and setCurrentIndex().
|
get |
Returns the model item index for the current item, or an invalid index if there is no current item.
See also setCurrentIndex().
|
addremove |
This signal is emitted if the current item changes and its row is different to the row of the previous current item.
Note that this signal will not be emitted when the item model is reset.
See also currentChanged(), currentColumnChanged(), currentIndex(), and setCurrentIndex().
|
getprotected |
|
addremove |
This signal is emitted whenever the selection changes. The change in the selection is represented as an item selection of deselected items and an item selection of selected items.
Note the that the current index changes independently from the selection. Also note that this signal will not be emitted when the item model is reset.
See also select() and currentChanged().
|
staticget |