Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The QTreeView class provides a default model/view implementation of a tree view. More...
Public Member Functions | |
QTreeView (QWidget parent=null) | |
More... | |
override void | CreateProxy () |
new void | Collapse (QModelIndex index) |
More... | |
new void | CollapseAll () |
More... | |
new int | ColumnAt (int x) |
More... | |
new int | ColumnViewportPosition (int column) |
More... | |
new int | ColumnWidth (int column) |
More... | |
override void | DoItemsLayout () |
new void | Expand (QModelIndex index) |
More... | |
new void | ExpandAll () |
More... | |
new void | ExpandToDepth (int depth) |
More... | |
new void | HideColumn (int column) |
More... | |
new QModelIndex | IndexAbove (QModelIndex index) |
More... | |
override QModelIndex | IndexAt (QPoint p) |
More... | |
new QModelIndex | IndexBelow (QModelIndex index) |
More... | |
new bool | IsColumnHidden (int column) |
More... | |
new bool | IsExpanded (QModelIndex index) |
More... | |
new bool | IsFirstColumnSpanned (int row, QModelIndex parent) |
More... | |
new bool | IsRowHidden (int row, QModelIndex parent) |
More... | |
override void | KeyboardSearch (string search) |
More... | |
override void | Reset () |
More... | |
new void | ResizeColumnToContents (int column) |
More... | |
override void | ScrollTo (QModelIndex index, QAbstractItemView.ScrollHint hint=QAbstractItemView.ScrollHint.EnsureVisible) |
More... | |
override void | SelectAll () |
More... | |
new void | SetColumnHidden (int column, bool hide) |
More... | |
new void | SetColumnWidth (int column, int width) |
More... | |
new void | SetExpanded (QModelIndex index, bool expand) |
More... | |
new void | SetFirstColumnSpanned (int row, QModelIndex parent, bool span) |
More... | |
new void | SetRowHidden (int row, QModelIndex parent, bool hide) |
More... | |
new void | ShowColumn (int column) |
More... | |
override int | SizeHintForColumn (int column) |
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... | |
new void | OpenPersistentEditor (QModelIndex index) |
More... | |
new void | ScrollToBottom () |
More... | |
new void | ScrollToTop () |
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... | |
virtual int | SizeHintForRow (int row) |
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 QTreeView class provides a default model/view implementation of a tree view.
A QTreeView implements a tree representation of items from a model. This class is used to provide standard hierarchical lists that were previously provided by the QListView class, but using the more flexible approach provided by Qt's model/view architecture.
The QTreeView class is one of the Model/View Classes and is part of Qt's model/view framework.
QTreeView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.
It is simple to construct a tree view displaying data from a model. In the following example, the contents of a directory are supplied by a QFileSystemModel and displayed as a tree:
QFileSystemModel *model = new QFileSystemModel;
model->setRootPath(QDir::currentPath());
QTreeView *tree = new QTreeView(splitter);
tree->setModel(model);
The model/view architecture ensures that the contents of the tree view are updated as the model changes.
Items that have children can be in an expanded (children are visible) or collapsed (children are hidden) state. When this state changes a collapsed() or expanded() signal is emitted with the model index of the relevant item.
The amount of indentation used to indicate levels of hierarchy is controlled by the indentation property.
Headers in tree views are constructed using the QHeaderView class and can be hidden using header()->hide(). Note that each header is configured with its stretchLastSection property set to true, ensuring that the view does not waste any of the space assigned to it for its header. If this value is set to true, this property will override the resize mode set on the last section in the header.
Key Bindings
QTreeView supports a set of key bindings that enable the user to navigate in the view and interact with the contents of items:
KeyAction
Up Moves the cursor to the item in the same column on the previous row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the last row of the sibling that precedes the parent.
Down Moves the cursor to the item in the same column on the next row. If the parent of the current item has no more rows to navigate to, the cursor moves to the relevant item in the first row of the sibling that follows the parent.
Left Hides the children of the current item (if present) by collapsing a branch.
Minus Same as LeftArrow.
Right Reveals the children of the current item (if present) by expanding a branch.
Plus Same as RightArrow.
Asterisk Expands all children of the current item (if present).
PageUp Moves the cursor up one page.
PageDown Moves the cursor down one page.
Home Moves the cursor to an item in the same column of the first row of the first top-level item in the model.
End Moves the cursor to an item in the same column of the last row of the last top-level item in the model.
F2 In editable models, this opens the current item for editing. The Escape key can be used to cancel the editing process and revert any changes to the data displayed.
A Windows XP style tree view. A Macintosh style tree view. A Plastique style tree view.
Improving Performance
It is possible to give the view hints about the data it is handling in order to improve its performance when displaying large numbers of items. One approach that can be taken for views that are intended to display items with equal heights is to set the uniformRowHeights property to true.
See also QListView, QTreeWidget, View Classes, QAbstractItemModel, QAbstractItemView, and Dir View Example.
|
protected |
QtGui.QTreeView.QTreeView | ( | QWidget | parent = null | ) |
Constructs a tree view with a parent to represent a model's data. Use setModel() to set the model.
See also QAbstractItemModel.
new void QtGui.QTreeView.Collapse | ( | QModelIndex | index | ) |
Collapses the model item specified by the index.
See also collapsed().
new void QtGui.QTreeView.CollapseAll | ( | ) |
Collapses all expanded items.
This function was introduced in Qt 4.2.
See also expandAll(), expand(), collapse(), and setExpanded().
new int QtGui.QTreeView.ColumnAt | ( | int | x | ) |
Returns the column in the tree view whose header covers the x coordinate given.
|
protected |
Informs the tree view that the number of columns in the tree view has changed from oldCount to newCount.
|
protected |
This slot is called whenever a column has been moved.
|
protected |
This function is called whenever column's size is changed in the header. oldSize and newSize give the previous size and the new size in pixels.
See also setColumnWidth().
new int QtGui.QTreeView.ColumnViewportPosition | ( | int | column | ) |
Returns the horizontal position of the column in the viewport.
new int QtGui.QTreeView.ColumnWidth | ( | int | column | ) |
Returns the width of the column.
See also resizeColumnToContents() and setColumnWidth().
|
virtual |
Reimplemented from QtGui.QAbstractItemView.
Reimplemented in QtGui.QTreeWidget.
|
protectedvirtual |
Reimplemented from QAbstractItemView::currentChanged().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractItemView::dataChanged().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTreeView.Dispose | ( | ) |
|
virtual |
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Draws the branches in the tree view on the same row as the model item index, using the painter given. The branches are drawn in the rectangle specified by rect.
|
protectedvirtual |
Draws the row in the tree view that contains the model item index, using the painter given. The option control how the item is displayed.
See also setAlternatingRowColors().
Draws the part of the tree intersecting the given region using the specified painter.
This function was introduced in Qt 4.2.
See also paintEvent().
new void QtGui.QTreeView.Expand | ( | QModelIndex | index | ) |
Expands the model item specified by the index.
See also expanded().
new void QtGui.QTreeView.ExpandAll | ( | ) |
Expands all expandable items.
Warning: if the model contains a large number of items, this function will take some time to execute.
This function was introduced in Qt 4.2.
See also collapseAll(), expand(), collapse(), and setExpanded().
new void QtGui.QTreeView.ExpandToDepth | ( | int | depth | ) |
Expands all expandable items to the given depth.
This function was introduced in Qt 4.3.
See also expandAll(), collapseAll(), expand(), collapse(), and setExpanded().
new void QtGui.QTreeView.HideColumn | ( | int | column | ) |
Hides the column given.
Note: This function should only be called after the model has been initialized, as the view needs to know the number of columns in order to hide column.
See also showColumn() and setColumnHidden().
|
protectedvirtual |
Reimplemented from QtGui.QAbstractItemView.
new QModelIndex QtGui.QTreeView.IndexAbove | ( | QModelIndex | index | ) |
Returns the model index of the item above index.
|
virtual |
Reimplemented from QAbstractItemView::indexAt().
Implements QtGui.QAbstractItemView.
new QModelIndex QtGui.QTreeView.IndexBelow | ( | QModelIndex | index | ) |
Returns the model index of the item below index.
|
protected |
Returns the size hint for the row indicated by index.
See also sizeHintForColumn() and uniformRowHeights().
new bool QtGui.QTreeView.IsColumnHidden | ( | int | column | ) |
Returns true if the column is hidden; otherwise returns false.
See also hideColumn() and isRowHidden().
new bool QtGui.QTreeView.IsExpanded | ( | QModelIndex | index | ) |
Returns true if the model item index is expanded; otherwise returns false.
See also expand(), expanded(), and setExpanded().
new bool QtGui.QTreeView.IsFirstColumnSpanned | ( | int | row, |
QModelIndex | parent | ||
) |
Returns true if the item in first column in the given row of the parent is spanning all the columns; otherwise returns false.
This function was introduced in Qt 4.3.
See also setFirstColumnSpanned().
|
protectedvirtual |
Reimplemented from QAbstractItemView::isIndexHidden().
Implements QtGui.QAbstractItemView.
new bool QtGui.QTreeView.IsRowHidden | ( | int | row, |
QModelIndex | parent | ||
) |
Returns true if the item in the given row of the parent is hidden; otherwise returns false.
See also setRowHidden() and isColumnHidden().
|
virtual |
Reimplemented from QAbstractItemView::keyboardSearch().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractItemView::moveCursor().
Move the cursor in the way described by cursorAction, using the information provided by the button modifiers.
Implements QtGui.QAbstractItemView.
|
protected |
This signal is emitted when the item specified by index is collapsed.
|
protectedvirtual |
Reimplemented from QWidget::dragMoveEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protected |
This signal is emitted when the item specified by index is expanded.
See also setExpanded().
|
protectedvirtual |
Reimplemented from QWidget::keyPressEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QWidget::mouseDoubleClickEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QWidget::mouseMoveEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QWidget::mousePressEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QWidget::mouseReleaseEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QWidget::paintEvent().
Reimplemented from QtGui.QAbstractScrollArea.
|
protectedvirtual |
Reimplemented from QObject::timerEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractScrollArea::viewportEvent().
Reimplemented from QtGui.QAbstractItemView.
|
protected |
|
virtual |
Reimplemented from QAbstractItemView::reset().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTreeView.ResizeColumnToContents | ( | int | column | ) |
Resizes the column given to the size of its contents.
See also columnWidth() and setColumnWidth().
|
protected |
Returns the height of the row indicated by the given index.
This function was introduced in Qt 4.3.
See also indexRowSizeHint().
|
protectedvirtual |
Reimplemented from QAbstractItemView::rowsAboutToBeRemoved().
Informs the view that the rows from the start row to the end row inclusive are about to removed from the given parent model item.
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractItemView::rowsInserted().
Informs the view that the rows from the start row to the end row inclusive have been inserted into the parent model item.
Reimplemented from QtGui.QAbstractItemView.
|
protected |
Informs the view that the rows from the start row to the end row inclusive have been removed from the given parent model item.
This function was introduced in Qt 4.1.
|
protectedvirtual |
Reimplemented from QAbstractScrollArea::scrollContentsBy().
Scrolls the contents of the tree view by (dx, dy).
Reimplemented from QtGui.QAbstractScrollArea.
|
virtual |
Reimplemented from QAbstractItemView::scrollTo().
Scroll the contents of the tree view until the given model item index is visible. The hint parameter specifies more precisely where the item should be located after the operation. If any of the parents of the model item are collapsed, they will be expanded to ensure that the model item is visible.
Implements QtGui.QAbstractItemView.
|
virtual |
Reimplemented from QAbstractItemView::selectAll().
Reimplemented from QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractItemView::selectionChanged().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTreeView.SetColumnHidden | ( | int | column, |
bool | hide | ||
) |
If hide is true the column is hidden, otherwise the column is shown.
See also isColumnHidden(), hideColumn(), and setRowHidden().
new void QtGui.QTreeView.SetColumnWidth | ( | int | column, |
int | width | ||
) |
Sets the width of the given column to the width specified.
This function was introduced in Qt 4.2.
See also columnWidth() and resizeColumnToContents().
new void QtGui.QTreeView.SetExpanded | ( | QModelIndex | index, |
bool | expand | ||
) |
Sets the item referred to by index to either collapse or expanded, depending on the value of expanded.
See also expanded(), expand(), and isExpanded().
new void QtGui.QTreeView.SetFirstColumnSpanned | ( | int | row, |
QModelIndex | parent, | ||
bool | span | ||
) |
If span is true the item in the first column in the row with the given parent is set to span all columns, otherwise all items on the row are shown.
This function was introduced in Qt 4.3.
See also isFirstColumnSpanned().
new void QtGui.QTreeView.SetRowHidden | ( | int | row, |
QModelIndex | parent, | ||
bool | hide | ||
) |
If hide is true the row with the given parent is hidden, otherwise the row is shown.
See also isRowHidden() and setColumnHidden().
|
protectedvirtual |
Reimplemented from QAbstractItemView::setSelection().
Applies the selection command to the items in or touched by the rectangle, rect.
See also selectionCommand().
Implements QtGui.QAbstractItemView.
new void QtGui.QTreeView.ShowColumn | ( | int | column | ) |
Shows the given column in the tree view.
See also hideColumn() and setColumnHidden().
|
virtual |
Reimplemented from QAbstractItemView::sizeHintForColumn().
Returns the size hint for the 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 view's header.
If you reimplement this function in a subclass, note that the value you return is only used when resizeColumnToContents() is called. In that case, if a larger column width is required by either the view's header or the item delegate, that width will be used instead.
See also QWidget::sizeHint and header().
Reimplemented from QtGui.QAbstractItemView.
new void QtGui.QTreeView.SortByColumn | ( | int | column | ) |
This is an overloaded function.
Sorts the model by the values in the given column.
new void QtGui.QTreeView.SortByColumn | ( | int | column, |
Qt.SortOrder | order | ||
) |
Sets the model up for sorting by the values in the given column and order.
column may be -1, in which case no sort indicator will be shown and the model will return to its natural, unsorted order. Note that not all models support this and may even crash in this case.
This function was introduced in Qt 4.2.
See also sortingEnabled.
|
static |
|
static |
|
static |
|
static |
|
protectedvirtual |
Reimplemented from QAbstractItemView::updateGeometries().
Reimplemented from QtGui.QAbstractItemView.
|
virtual |
Reimplemented from QAbstractItemView::visualRect().
Returns the rectangle on the viewport occupied by the item at index. If the index is not visible or explicitly hidden, the returned rectangle is invalid.
Implements QtGui.QAbstractItemView.
|
protectedvirtual |
Reimplemented from QAbstractItemView::visualRegionForSelection().
Returns the rectangle from the viewport of the items in the given selection.
Since 4.7, the returned region only contains rectangles intersecting (or included in) the viewport.
Implements QtGui.QAbstractItemView.
|
getset |
This property holds whether items should show keyboard focus using all columns.
If this property is true all columns will show focus, otherwise only one column will show focus.
The default is false.
This property was introduced in Qt 4.2.
|
getset |
This property holds whether animations are enabled.
If this property is true the treeview will animate expandsion and collasping of branches. If this property is false, the treeview will expand or collapse branches immediately without showing the animation.
By default, this property is false.
This property was introduced in Qt 4.2.
|
getset |
This property holds the delay time before items in a tree are opened during a drag and drop operation.
This property holds the amount of time in milliseconds that the user must wait over a node before that node will automatically open or close. If the time is set to less then 0 then it will not be activated.
By default, this property has a value of -1, meaning that auto-expansion is disabled.
This property was introduced in Qt 4.3.
|
addremove |
This signal is emitted when the item specified by index is collapsed.
|
getprotected |
|
addremove |
This signal is emitted when the item specified by index is expanded.
See also setExpanded().
|
getset |
This property holds whether the items can be expanded by double-clicking.
This property holds whether the user can expand and collapse items by double-clicking. The default value is true.
This property was introduced in Qt 4.4.
|
getset |
Returns the header for the tree view.
Sets the header for the tree view, to the given header.
The view takes ownership over the given header and deletes it when a new header is set.
|
getset |
This property holds whether the header is shown or not.
If this property is true, the header is not shown otherwise it is. The default value is false.
This property was introduced in Qt 4.4.
|
getset |
Reimplemented from QAbstractItemView::horizontalOffset().
Returns the horizontal offset of the items in the treeview.
Note that the tree view uses the horizontal header section positions to determine the positions of columns in the view.
See also verticalOffset().
|
getset |
This property holds indentation of the items in the tree view.
This property holds the indentation measured in pixels of the items for each level in the tree view. For top-level items, the indentation specifies the horizontal distance from the viewport edge to the items in the first column; for child items, it specifies their indentation from their parent items.
By default, this property has a value of 20.
|
getset |
This property holds whether the items are expandable by the user.
This property holds whether the user can expand and collapse items interactively.
By default, this property is true.
|
getset |
Reimplemented from QAbstractItemView::setModel().
|
getset |
Reimplemented from QAbstractItemView::setRootIndex().
|
getset |
This property holds whether to show controls for expanding and collapsing top-level items.
Items with children are typically shown with controls to expand and collapse them, allowing their children to be shown or hidden. If this property is false, these controls are not shown for top-level items. This can be used to make a single level tree structure appear like a simple list of items.
By default, this property is true.
|
get |
Reimplemented from QAbstractItemView::selectedIndexes().
|
getset |
Reimplemented from QAbstractItemView::setSelectionModel().
|
getset |
This property holds whether sorting is enabled.
If this property is true, sorting is enabled for the tree; if the property is false, sorting is not enabled. The default value is false.
Note: In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. Alternatively, you could also insert the items into a list before inserting the items into the tree.
This property was introduced in Qt 4.2.
|
staticget |
|
getset |
This property holds whether all items in the treeview have the same height.
This property should only be set to true if it is guaranteed that all items in the view has the same height. This enables the view to do some optimizations.
The height is obtained from the first item in the view. It is updated when the data changes on that item.
By default, this property is false.
|
getset |
Reimplemented from QAbstractItemView::verticalOffset().
Returns the vertical offset of the items in the tree view.
See also horizontalOffset().
|
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 false by default.
Note that even if 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.