VR-Forces 4.2 Class Documentation
qtTreeWidgetExtensions.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
13 
15 
16 #include <QtGui/QTreeWidget>
17 #include <QtGui/QKeyEvent>
18 
19 class QMimeData;
20 
21 namespace makVrf
22 {
24  {
25  Q_OBJECT
26 
27  public:
29  DtTreeWidget(QWidget* parent);
30 
32  virtual ~DtTreeWidget();
33 
35  virtual QTreeWidgetItem* lastItem() const;
36 
38  QTreeWidgetItem* itemFromIndex(const QModelIndex& idx) { return QTreeWidget::itemFromIndex(idx); };
39 
41  QModelIndex indexFromItem(QTreeWidgetItem *item, int column = 0) const
42  {
43  return QTreeWidget::indexFromItem(item, column);
44  }
45 
47  virtual int indexOfChild(QTreeWidgetItem*) const;
48 
50  unsigned int depth(QTreeWidgetItem*) const;
51 
53  QTreeWidgetItem* nextSibling(QTreeWidgetItem*) const;
54 
56  void setAllowEmptySelection(bool);
57 
59  bool allowEmptySelection() const;
60 
61  signals:
62 
65  void mouseLeftPressed(QTreeWidgetItem*, QMouseEvent*, int col);
66 
68  void rightClickOnItem(QTreeWidgetItem*, QMouseEvent*, int col);
69 
71  void contentsMoving(int, int);
72 
73  protected:
74 
76  virtual void mousePressEvent(QMouseEvent *event);
77 
79  virtual void mouseReleaseEvent(QMouseEvent *event);
80 
82  virtual void scrollContentsBy(int, int);
83 
85  virtual QSize sizeHint() const;
86 
88  virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex &index,
89  const QEvent *event = 0) const;
90 
92  virtual QItemSelectionModel::SelectionFlags selectionBehaviorFlags() const;
93 
94  protected:
95 
98  };
99 
101  {
103  }
104 
106  {
107  return myAllowEmptySelection;
108  }
109 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)