Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The QTableView class provides a default model/view implementation of a table view. More...
Public Member Functions | |
QTableView (QWidget parent=null) | |
More... | |
override void | CreateProxy () |
new void | ClearSpans () |
More... | |
new int | ColumnAt (int x) |
More... | |
new int | ColumnSpan (int row, int column) |
More... | |
new int | ColumnViewportPosition (int column) |
More... | |
new int | ColumnWidth (int column) |
More... | |
override void | DoItemsLayout () |
new void | HideColumn (int column) |
More... | |
new void | HideRow (int row) |
More... | |
override QModelIndex | IndexAt (QPoint p) |
More... | |
new bool | IsColumnHidden (int column) |
More... | |
new bool | IsRowHidden (int row) |
More... | |
new void | ResizeColumnToContents (int column) |
More... | |
new void | ResizeColumnsToContents () |
More... | |
new void | ResizeRowToContents (int row) |
More... | |
new void | ResizeRowsToContents () |
More... | |
new int | RowAt (int y) |
More... | |
new int | RowHeight (int row) |
More... | |
new int | RowSpan (int row, int column) |
More... | |
new int | RowViewportPosition (int row) |
More... | |
override void | ScrollTo (QModelIndex index, QAbstractItemView.ScrollHint hint=QAbstractItemView.ScrollHint.EnsureVisible) |
More... | |
new void | SelectColumn (int column) |
More... | |
new void | SelectRow (int row) |
More... | |
new void | SetColumnHidden (int column, bool hide) |
More... | |
new void | SetColumnWidth (int column, int width) |
More... | |
new void | SetRowHeight (int row, int height) |
More... | |
new void | SetRowHidden (int row, bool hide) |
More... | |
new void | SetSpan (int row, int column, int rowSpan, int columnSpan) |
More... | |
new void | ShowColumn (int column) |
More... | |
new void | ShowRow (int row) |
More... | |
override int | SizeHintForColumn (int column) |
More... | |
override int | SizeHintForRow (int row) |
More... | |
new void | SortByColumn (int column) |
More... | |
new void | SortByColumn (int column, Qt.SortOrder order) |
More... | |
override QRect | VisualRect (QModelIndex index) |
More... | |
new void | Dispose () |
![]() | |
QAbstractItemView (QWidget parent=null) | |
More... | |
new void | ClearSelection () |
More... | |
new void | ClosePersistentEditor (QModelIndex index) |
More... | |
new void | Edit (QModelIndex index) |
More... | |
override bool | OnEvent (QEvent @event) |
More... | |
new QWidget | IndexWidget (QModelIndex index) |
More... | |
override object | InputMethodQuery (Qt.InputMethodQuery query) |
More... | |
new QAbstractItemDelegate | ItemDelegate () |
More... | |
new QAbstractItemDelegate | ItemDelegate (QModelIndex index) |
More... | |
new QAbstractItemDelegate | ItemDelegateForColumn (int column) |
More... | |
new QAbstractItemDelegate | ItemDelegateForRow (int row) |
More... | |
virtual void | KeyboardSearch (string search) |
More... | |
new void | OpenPersistentEditor (QModelIndex index) |
More... | |
virtual void | Reset () |
More... | |
new void | ScrollToBottom () |
More... | |
new void | ScrollToTop () |
More... | |
virtual void | SelectAll () |
More... | |
new void | SetIndexWidget (QModelIndex index, QWidget widget) |
More... | |
new void | SetItemDelegate (QAbstractItemDelegate @delegate) |
More... | |
new void | SetItemDelegateForColumn (int column, QAbstractItemDelegate @delegate) |
More... | |
new void | SetItemDelegateForRow (int row, QAbstractItemDelegate @delegate) |
More... | |
new QSize | SizeHintForIndex (QModelIndex index) |
More... | |
new void | Update (QModelIndex index) |
More... | |
new void | Dispose () |
![]() | |
QAbstractScrollArea (QWidget parent=null) | |
More... | |
new void | AddScrollBarWidget (QWidget widget, Qt.AlignmentFlag alignment) |
More... | |
override bool | OnEvent (QEvent @event) |
More... | |
new System.Collections.Generic.List < QWidget > | ScrollBarWidgets (Qt.AlignmentFlag alignment) |
More... | |
new void | Dispose () |
![]() | |
QFrame (QWidget parent=null, Qt.WindowType f=0) | |
More... | |
override bool | OnEvent (QEvent e) |
More... | |
new void | Dispose () |
![]() | |
QWidget (QWidget parent=null, Qt.WindowType f=0) | |
More... | |
override void | CreateProxy () |
new void | ActivateWindow () |
More... | |
new void | AddAction (QAction action) |
More... | |
new void | AddActions (System.Collections.Generic.List< QAction > actions) |
More... | |
new void | AdjustSize () |
More... | |
new QWidget | ChildAt (QPoint p) |
More... | |
new QWidget | ChildAt (int x, int y) |
More... | |
new void | ClearFocus () |
More... | |
new void | ClearMask () |
More... | |
new bool | Close () |
More... | |
new void | CreateWinId () |
new void | EnsurePolished () |
More... | |
override bool | OnEvent (QEvent @event) |
More... | |
new QWidget | FocusWidget () |
More... | |
new void | GetContentsMargins (ref int left, ref int top, ref int right, ref int bottom) |
More... | |
virtual System.IntPtr | GetDC () |
More... | |
new void | GrabGesture (Qt.GestureType type, Qt.GestureFlag flags=0) |
More... | |
new void | GrabKeyboard () |
More... | |
new void | GrabMouse () |
More... | |
new void | GrabMouse (QCursor cursor) |
More... | |
new int | GrabShortcut (QKeySequence key, Qt.ShortcutContext context=Qt.ShortcutContext.WindowShortcut) |
More... | |
virtual int | HeightForWidth (int w) |
More... | |
new void | Hide () |
More... | |
new void | InsertAction (QAction before, QAction action) |
More... | |
new void | InsertActions (QAction before, System.Collections.Generic.List< QAction > actions) |
More... | |
new bool | IsAncestorOf (QWidget child) |
More... | |
new bool | IsEnabledTo (QWidget ancestor) |
More... | |
new bool | IsVisibleTo (QWidget ancestor) |
More... | |
new void | Lower () |
More... | |
new QPoint | MapFrom (QWidget parent, QPoint pos) |
More... | |
new QPoint | MapFromGlobal (QPoint pos) |
More... | |
new QPoint | MapFromParent (QPoint pos) |
More... | |
new QPoint | MapTo (QWidget parent, QPoint pos) |
More... | |
new QPoint | MapToGlobal (QPoint pos) |
More... | |
new QPoint | MapToParent (QPoint pos) |
More... | |
new void | Move (int x, int y) |
new void | OverrideWindowFlags (Qt.WindowType type) |
More... | |
new void | OverrideWindowState (Qt.WindowState state) |
new void | Raise () |
More... | |
virtual void | ReleaseDC (System.IntPtr hdc) |
More... | |
new void | ReleaseKeyboard () |
More... | |
new void | ReleaseMouse () |
More... | |
new void | ReleaseShortcut (int id) |
More... | |
new void | RemoveAction (QAction action) |
More... | |
new void | Render (IQPaintDevice target) |
More... | |
new void | Render (QPainter painter) |
More... | |
new void | Render (IQPaintDevice target, QPoint targetOffset) |
More... | |
new void | Render (QPainter painter, QPoint targetOffset) |
More... | |
new void | Render (IQPaintDevice target, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren) |
More... | |
new void | Render (QPainter painter, QPoint targetOffset, QRegion sourceRegion, QWidget.RenderFlag renderFlags=QWidget.RenderFlag.DrawWindowBackground|QWidget.RenderFlag.DrawChildren) |
More... | |
new void | Repaint () |
More... | |
new void | Repaint (QRect rect) |
More... | |
new void | Repaint (QRegion rgn) |
More... | |
new void | Repaint (int x, int y, int w, int h) |
More... | |
new void | Resize (int w, int h) |
new bool | RestoreGeometry (QByteArray geometry) |
More... | |
new QByteArray | SaveGeometry () |
More... | |
new void | Scroll (int dx, int dy) |
More... | |
new void | Scroll (int dx, int dy, QRect r) |
More... | |
new void | SetAttribute (Qt.WidgetAttribute attribute, bool on=true) |
More... | |
new void | SetBaseSize (int basew, int baseh) |
new void | SetContentsMargins (int left, int top, int right, int bottom) |
More... | |
new void | SetDisabled (bool disable) |
More... | |
new void | SetFixedHeight (int h) |
More... | |
new void | SetFixedSize (QSize s) |
More... | |
new void | SetFixedSize (int w, int h) |
More... | |
new void | SetFixedWidth (int w) |
More... | |
new void | SetFocus () |
More... | |
new void | SetFocus (Qt.FocusReason reason) |
More... | |
new void | SetGeometry (int x, int y, int w, int h) |
new void | SetHidden (bool hidden) |
More... | |
new void | SetMask (QBitmap bitmap) |
More... | |
new void | SetMaximumSize (int maxw, int maxh) |
new void | SetMinimumSize (int minw, int minh) |
new void | SetParent (QWidget parent) |
More... | |
new void | SetParent (QWidget parent, Qt.WindowType f) |
More... | |
new void | SetShortcutAutoRepeat (int id, bool enable=true) |
More... | |
new void | SetShortcutEnabled (int id, bool enable=true) |
More... | |
new void | SetShown (bool shown) |
More... | |
new void | SetSizeIncrement (int w, int h) |
new void | SetSizePolicy (QSizePolicy.Policy horizontal, QSizePolicy.Policy vertical) |
new void | Show () |
More... | |
new void | ShowFullScreen () |
More... | |
new void | ShowMaximized () |
More... | |
new void | ShowMinimized () |
More... | |
new void | ShowNormal () |
More... | |
new void | StackUnder (QWidget w) |
More... | |
new bool | TestAttribute (Qt.WidgetAttribute attribute) |
More... | |
new void | UngrabGesture (Qt.GestureType type) |
More... | |
new void | UnsetCursor () |
new void | UnsetLayoutDirection () |
new void | UnsetLocale () |
new void | Update () |
More... | |
new void | Update (QRect rect) |
More... | |
new void | Update (QRegion rgn) |
More... | |
new void | Update (int x, int y, int w, int h) |
More... | |
new void | UpdateGeometry () |
More... | |
new void | Dispose () |
![]() | |
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 | 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 () |
![]() | |
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) |
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 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 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 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 QWidget | Find (NativeULong id) |
More... | |
static void | SetTabOrder (QWidget first, QWidget second) |
More... | |
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 bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
More... | |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
More... | |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
More... | |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
More... | |
static string | Tr (string s, string c=null) |
More... | |
static string | Tr (string s, string c, int n) |
More... | |
static string | TrUtf8 (string s, string c=null) |
More... | |
static string | TrUtf8 (string s, string c, int n) |
More... | |
![]() | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream stream, QSizeF size) |
More... | |
static QDataStream | Write (QDataStream stream, QPoint point) |
More... | |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream stream, QLineF line) |
More... | |
static QDataStream | Write (QDataStream stream, QPointF point) |
More... | |
static QDataStream | Write (QDataStream @out, QChar chr) |
More... | |
static QDataStream | Write (QDataStream @out, QByteArray ba) |
More... | |
static QDataStream | Write (QDataStream stream, QEasingCurve easing) |
More... | |
static QDataStream | Write (QDataStream stream, QRectF rectangle) |
More... | |
static QDataStream | Write (QDataStream @out, QDateTime dateTime) |
More... | |
static QDataStream | Write (QDataStream @out, QUrl url) |
More... | |
static QDataStream | Write (QDataStream @out, QTime time) |
More... | |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream @out, QBitArray ba) |
More... | |
static QDataStream | Write (QDataStream s, QUuid id) |
More... | |
static QDataStream | Write (QDataStream stream, QLine line) |
More... | |
static QDataStream | Write (QDataStream @out, QDate date) |
More... | |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
More... | |
static QDataStream | Write (QDataStream stream, QRect rectangle) |
More... | |
static QDataStream | Write (QDataStream stream, QSize size) |
More... | |
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) |
More... | |
static QDataStream | Read (QDataStream @in, QChar chr) |
More... | |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream stream, QRect rectangle) |
More... | |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream @in, QDate date) |
More... | |
static QDataStream | Read (QDataStream @in, QUrl url) |
More... | |
static QDataStream | Read (QDataStream s, QUuid id) |
More... | |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream stream, QLineF line) |
More... | |
static QDataStream | Read (QDataStream stream, QRectF rectangle) |
More... | |
static QDataStream | Read (QDataStream stream, QPointF point) |
More... | |
static QDataStream | Read (QDataStream stream, QLine line) |
More... | |
static QDataStream | Read (QDataStream @in, QBitArray ba) |
More... | |
static QDataStream | Read (QDataStream stream, QSize size) |
More... | |
static QDataStream | Read (QDataStream @in, QDateTime dateTime) |
More... | |
static QDataStream | Read (QDataStream @in, QTime time) |
More... | |
static QDataStream | Read (QDataStream stream, QPoint point) |
More... | |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
More... | |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream @in, QByteArray ba) |
More... | |
static QDataStream | Read (QDataStream stream, QSizeF size) |
More... | |
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) |
More... | |
static double | QAcos (double v) |
More... | |
static void | QAddPostRoutine (System.Action ptr) |
More... | |
static double | QAsin (double v) |
More... | |
static double | QAtan (double v) |
More... | |
static double | QAtan2 (double x, double y) |
More... | |
static void | QBadAlloc () |
static int | QCeil (double v) |
More... | |
static ushort | QChecksum (string s, uint len) |
More... | |
static QByteArray | QCompress (QByteArray data, int compressionLevel=-1) |
More... | |
static QByteArray | QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
More... | |
static double | QCos (double v) |
More... | |
static double | QExp (double v) |
More... | |
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) |
More... | |
static bool | QFuzzyCompare (double p1, double p2) |
More... | |
static bool | QFuzzyCompare (float p1, float p2) |
More... | |
static bool | QFuzzyIsNull (double d) |
static bool | QFuzzyIsNull (float f) |
static uint | QHash (QBitArray key) |
More... | |
static uint | QHash (QChar key) |
More... | |
static uint | QHash (QStringRef key) |
static uint | QHash (QUrl url) |
More... | |
static uint | QHash (QPersistentModelIndex index) |
static uint | QHash (QByteArray key) |
More... | |
static uint | QHash (QModelIndex index) |
static uint | QHash (uint key) |
More... | |
static uint | QHash (char key) |
More... | |
static uint | QHash (byte key) |
More... | |
static uint | QHash (short key) |
More... | |
static uint | QHash (NativeLong key) |
More... | |
static uint | QHash (ushort key) |
More... | |
static uint | QHash (long key) |
More... | |
static uint | QHash (ulong key) |
More... | |
static uint | QHash (int key) |
More... | |
static uint | QHash (string key) |
More... | |
static uint | QHash (NativeULong key) |
More... | |
static Qt.ActionQtMsgTypeString | QInstallMsgHandler (Qt.ActionQtMsgTypeString handler) |
More... | |
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) |
More... | |
static double | QPow (double x, double y) |
More... | |
static void | QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
More... | |
static void | QRemovePostRoutine (System.Action arg1) |
static int | QRound (double d) |
More... | |
static long | QRound64 (double d) |
More... | |
static double | QSin (double v) |
More... | |
static double | QSqrt (double v) |
More... | |
static bool | QStringComparisonHelper (QStringRef s1, string s2) |
static double | QTan (double v) |
More... | |
static QByteArray | QUncompress (QByteArray data) |
More... | |
static QByteArray | QUncompress (Pointer< byte > data, int nbytes) |
More... | |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
More... | |
static bool | Qputenv (string varName, QByteArray value) |
More... | |
static void | Qsrand (uint seed) |
More... | |
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) |
More... | |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
More... | |
static Pointer< sbyte > | Qstrdup (string src) |
More... | |
static int | Qstricmp (string str1, string str2) |
More... | |
static uint | Qstrlen (string str) |
More... | |
static int | Qstrncmp (string str1, string str2, uint len) |
More... | |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
More... | |
static int | Qstrnicmp (string str1, string str2, uint len) |
More... | |
static uint | Qstrnlen (string str, uint maxlen) |
More... | |
The QTableView class provides a default model/view implementation of a table view.
A QTableView implements a table view that displays items from a model. This class is used to provide standard tables that were previously provided by the QTable class, but using the more flexible approach provided by Qt's model/view architecture.
The QTableView class is one of the Model/View Classes and is part of Qt's model/view framework.
QTableView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.
Navigation
You can navigate the cells in the table by clicking on a cell with the mouse, or by using the arrow keys. Because QTableView enables tabKeyNavigation by default, you can also hit Tab and Backtab to move from cell to cell.
Visual Appearance
The table has a vertical header that can be obtained using the verticalHeader() function, and a horizontal header that is available through the horizontalHeader() function. The height of each row in the table can be found by using rowHeight(); similarly, the width of columns can be found using columnWidth(). Since both of these are plain widgets, you can hide either of them using their hide() functions.
Rows and columns can be hidden and shown with hideRow(), hideColumn(), showRow(), and showColumn(). They can be selected with selectRow() and selectColumn(). The table will show a grid depending on the showGrid property.
The items shown in a table view, like those in the other item views, are rendered and edited using standard delegates. However, for some tasks it is sometimes useful to be able to insert widgets in a table instead. Widgets are set for particular indexes with the setIndexWidget() function, and later retrieved with indexWidget().
By default, the cells in a table do not expand to fill the available space.You can make the cells fill the available space by stretching the last header section. Access the relevant header using horizontalHeader() or verticalHeader() and set the header's stretchLastSection property.
To distribute the available space according to the space requirement of each column or row, call the view's resizeColumnsToContents() or resizeRowsToContents() functions.
Coordinate Systems
For some specialized forms of tables it is useful to be able to convert between row and column indexes and widget coordinates. The rowAt() function provides the y-coordinate within the view of the specified row; the row index can be used to obtain a corresponding y-coordinate with rowViewportPosition(). The columnAt() and columnViewportPosition() functions provide the equivalent conversion operations between x-coordinates and column indexes.
Styles
QTableView is styled appropriately for each platform. The following images show how it looks on three different platforms. Go to the Qt Widget Gallery to see its appearance in other styles.
A Windows XP style table view. A Macintosh style table view. A Plastique style table view.
See also QTableWidget, View Classes, QAbstractItemModel, QAbstractItemView, Chart Example, Pixelator Example, and Table Model Example.
|
protected |
QtGui.QTableView.QTableView | ( | QWidget | parent = null | ) |
Constructs a table view with a parent to represent the data.
See also QAbstractItemModel.
new void QtGui.QTableView.ClearSpans | ( | ) |
Removes all row and column spans in the table view.
This function was introduced in Qt 4.4.
See also setSpan().
new int QtGui.QTableView.ColumnAt | ( | int | x | ) |
Returns the column in which the given x-coordinate, x, in contents coordinates is located.
Note: This function returns -1 if the given coordinate is not valid (has no column).
See also rowAt().
|
protected |
This slot is called whenever columns are added or deleted. The previous number of columns is specified by oldCount, and the new number of columns is specified by newCount.
|
protected |
This slot is called to change the index of the given column in the table view. The old index is specified by oldIndex, and the new index by newIndex.
See also rowMoved().
|
protected |
This slot is called to change the width of the given column. The old width is specified by oldWidth, and the new width by newWidth.
See also rowResized().
new int QtGui.QTableView.ColumnSpan | ( | int | row, |
int | column | ||
) |
Returns the column span of the table element at (row, column). The default is 1.
This function was introduced in Qt 4.2.
See also setSpan() and rowSpan().
new int QtGui.QTableView.ColumnViewportPosition | ( | int | column | ) |
Returns the x-coordinate in contents coordinates of the given column.
new int QtGui.QTableView.ColumnWidth | ( | int | column | ) |
Returns the width of the given column.
See also setColumnWidth(), resizeColumnToContents(), and rowHeight().
|
virtual |
Reimplemented from QtGui.QAbstractItemView.
Reimplemented in QtGui.QTableWidget.
|
protectedvirtual |
Reimplemented from QAbstractItemView::currentChanged().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTableView.Dispose | ( | ) |
|
virtual |
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTableView.HideColumn | ( | int | column | ) |
Hide the given column.
See also showColumn() and hideRow().
new void QtGui.QTableView.HideRow | ( | int | row | ) |
Hide the given row.
See also showRow() and hideColumn().
|
protectedvirtual |
Reimplemented from QtGui.QAbstractItemView.
|
virtual |
Reimplemented from QAbstractItemView::indexAt().
Returns the index position of the model item corresponding to the table item at position pos in contents coordinates.
Implements QtGui.QAbstractItemView.
new bool QtGui.QTableView.IsColumnHidden | ( | int | column | ) |
Returns true if the given column is hidden; otherwise returns false.
See also isRowHidden().
|
protectedvirtual |
Reimplemented from QAbstractItemView::isIndexHidden().
Implements QtGui.QAbstractItemView.
new bool QtGui.QTableView.IsRowHidden | ( | int | row | ) |
Returns true if the given row is hidden; otherwise returns false.
See also isColumnHidden().
|
protectedvirtual |
Reimplemented from QAbstractItemView::moveCursor().
Moves the cursor in accordance with the given cursorAction, using the information provided by the modifiers.
See also QAbstractItemView::CursorAction.
Implements QtGui.QAbstractItemView.
|
protected |
Reimplemented from QWidget::paintEvent().
Paints the table on receipt of the given paint event event.
|
protectedvirtual |
Reimplemented from QObject::timerEvent().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTableView.ResizeColumnsToContents | ( | ) |
Resizes all columns based on the size hints of the delegate used to render each item in the columns.
new void QtGui.QTableView.ResizeColumnToContents | ( | int | column | ) |
Resizes the given column based on the size hints of the delegate used to render each item in the column.
Note: Only visible columns will be resized. Reimplement sizeHintForColumn() to resize hidden columns as well.
new void QtGui.QTableView.ResizeRowsToContents | ( | ) |
Resizes all rows based on the size hints of the delegate used to render each item in the rows.
new void QtGui.QTableView.ResizeRowToContents | ( | int | row | ) |
Resizes the given row based on the size hints of the delegate used to render each item in the row.
new int QtGui.QTableView.RowAt | ( | int | y | ) |
Returns the row in which the given y-coordinate, y, in contents coordinates is located.
Note: This function returns -1 if the given coordinate is not valid (has no row).
See also columnAt().
|
protected |
This slot is called whenever rows are added or deleted. The previous number of rows is specified by oldCount, and the new number of rows is specified by newCount.
new int QtGui.QTableView.RowHeight | ( | int | row | ) |
Returns the height of the given row.
See also setRowHeight(), resizeRowToContents(), and columnWidth().
|
protected |
This slot is called to change the index of the given row in the table view. The old index is specified by oldIndex, and the new index by newIndex.
See also columnMoved().
|
protected |
This slot is called to change the height of the given row. The old height is specified by oldHeight, and the new height by newHeight.
See also columnResized().
new int QtGui.QTableView.RowSpan | ( | int | row, |
int | column | ||
) |
Returns the row span of the table element at (row, column). The default is 1.
This function was introduced in Qt 4.2.
See also setSpan() and columnSpan().
new int QtGui.QTableView.RowViewportPosition | ( | int | row | ) |
Returns the y-coordinate in contents coordinates of the given row.
|
protectedvirtual |
This virtual handler is called when the scroll bars are moved by dx, dy, and consequently the viewport's contents should be scrolled accordingly.
The default implementation simply calls update() on the entire viewport(), subclasses can reimplement this handler for optimization purposes, or - like QScrollArea - to move a contents widget. The parameters dx and dy are there for convenience, so that the class knows how much should be scrolled (useful e.g. when doing pixel-shifts). You may just as well ignore these values and scroll directly to the position the scroll bars indicate.
Calling this function in order to scroll programmatically is an error, use the scroll bars instead (e.g. by calling QScrollBar::setValue() directly).
Reimplemented from QtGui.QAbstractScrollArea.
|
virtual |
Scrolls the view if necessary to ensure that the item at index is visible. The view will try to position the item according to the given hint.
In the base class this is a pure virtual function.
Implements QtGui.QAbstractItemView.
new void QtGui.QTableView.SelectColumn | ( | int | column | ) |
Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.
See also selectRow().
|
protectedvirtual |
Reimplemented from QAbstractItemView::selectionChanged().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTableView.SelectRow | ( | int | row | ) |
Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.
See also selectColumn().
new void QtGui.QTableView.SetColumnHidden | ( | int | column, |
bool | hide | ||
) |
If hide is true the given column will be hidden; otherwise it will be shown.
See also isColumnHidden() and setRowHidden().
new void QtGui.QTableView.SetColumnWidth | ( | int | column, |
int | width | ||
) |
Sets the width of the given column to be width.
This function was introduced in Qt 4.1.
See also columnWidth().
new void QtGui.QTableView.SetRowHeight | ( | int | row, |
int | height | ||
) |
Sets the height of the given row to be height.
This function was introduced in Qt 4.1.
See also rowHeight().
new void QtGui.QTableView.SetRowHidden | ( | int | row, |
bool | hide | ||
) |
If hide is true row will be hidden, otherwise it will be shown.
See also isRowHidden() and setColumnHidden().
|
protectedvirtual |
Reimplemented from QAbstractItemView::setSelection().
Selects the items within the given rect and in accordance with the specified selection flags.
Implements QtGui.QAbstractItemView.
new void QtGui.QTableView.SetSpan | ( | int | row, |
int | column, | ||
int | rowSpan, | ||
int | columnSpan | ||
) |
Sets the span of the table element at (row, column) to the number of rows and columns specified by (rowSpanCount, columnSpanCount).
This function was introduced in Qt 4.2.
See also rowSpan() and columnSpan().
new void QtGui.QTableView.ShowColumn | ( | int | column | ) |
Show the given column.
See also hideColumn() and showRow().
new void QtGui.QTableView.ShowRow | ( | int | row | ) |
Show the given row.
See also hideRow() and showColumn().
|
virtual |
Reimplemented from QAbstractItemView::sizeHintForColumn().
Returns the size hint for the given column's width or -1 if there is no model.
If you need to set the width of a given column to a fixed value, call QHeaderView::resizeSection() on the table's horizontal header.
If you reimplement this function in a subclass, note that the value you return will be used when resizeColumnToContents() or QHeaderView::resizeSections() is called. If a larger column width is required by either the horizontal header or the item delegate, the larger width will be used instead.
See also QWidget::sizeHint and horizontalHeader().
Reimplemented from QtGui.QAbstractItemView.
|
virtual |
Reimplemented from QAbstractItemView::sizeHintForRow().
Returns the size hint for the given row's height or -1 if there is no model.
If you need to set the height of a given row to a fixed value, call QHeaderView::resizeSection() on the table's vertical header.
If you reimplement this function in a subclass, note that the value you return is only used when resizeRowToContents() is called. In that case, if a larger row height is required by either the vertical header or the item delegate, that width will be used instead.
See also QWidget::sizeHint and verticalHeader().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTableView.SortByColumn | ( | int | column | ) |
This is an overloaded function.
Sorts the model by the values in the given column.
new void QtGui.QTableView.SortByColumn | ( | int | column, |
Qt.SortOrder | order | ||
) |
Sorts the model by the values in the given column in the given order.
This function was introduced in Qt 4.2.
See also sortingEnabled.
|
static |
|
static |
|
static |
|
static |
|
protectedvirtual |
Reimplemented from QAbstractItemView::updateGeometries().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QtGui.QAbstractItemView.
|
virtual |
Returns the rectangle on the viewport occupied by the item at index.
If your item is displayed in several areas then visualRect should return the primary area that contains index and not the complete area that index might encompasses, touch or cause drawing.
In the base class this is a pure virtual function.
See also indexAt() and visualRegionForSelection().
Implements QtGui.QAbstractItemView.
|
protectedvirtual |
Returns the region from the viewport of the items in the given selection.
In the base class this is a pure virtual function.
See also visualRect() and selectedIndexes().
Implements QtGui.QAbstractItemView.
|
getset |
This property holds whether the button in the top-left corner is enabled.
If this property is true then button in the top-left corner of the table view is enabled. Clicking on this button will select all the cells in the table view.
This property is true by default.
This property was introduced in Qt 4.3.
|
getprotected |
|
getset |
This property holds the pen style used to draw the grid.
This property holds the style used when drawing the grid (see showGrid).
|
getset |
Returns the table view's horizontal header.
Sets the widget to use for the horizontal header to header.
|
getset |
Reimplemented from QAbstractItemView::horizontalOffset().
Returns the horizontal offset of the items in the table view.
Note that the table view uses the horizontal header section positions to determine the positions of columns in the view.
See also verticalOffset().
|
getset |
Reimplemented from QAbstractItemView::setModel().
|
getset |
Reimplemented from QAbstractItemView::setRootIndex().
|
get |
Reimplemented from QAbstractItemView::selectedIndexes().
|
getset |
Reimplemented from QAbstractItemView::setSelectionModel().
|
getset |
This property holds whether the grid is shown.
If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.
|
getset |
This property holds whether sorting is enabled.
If this property is true, sorting is enabled for the table. If this property is false, sorting is not enabled. The default value is false.
Note:. Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order.
This property was introduced in Qt 4.2.
|
staticget |
|
getset |
Returns the table view's vertical header.
Sets the widget to use for the vertical header to header.
|
getset |
Reimplemented from QAbstractItemView::verticalOffset().
Returns the vertical offset of the items in the table view.
Note that the table view uses the vertical header section positions to determine the positions of rows in the view.
See also horizontalOffset().
|
get |
Reimplemented from QAbstractItemView::viewOptions().
|
getset |
This property holds the item text word-wrapping policy.
If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is true by default.
Note that even of wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.
This property was introduced in Qt 4.3.