VR-Forces 4.1.1 Class Documentation
dtTreeWidget.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: dtTreeWidget.h,v $ $Revision: 1.7 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DTTREEWIDGET_H_
13 #define DTTREEWIDGET_H_
14 
15 #include "tmqt/tmqtDefines.h"
16 #include "symbolMapper/modelKey.h"
17 
18 #include <QtGui/QTreeWidget>
19 #include <QtGui/QKeyEvent>
20 
21 class QMimeData;
22 class DtModelData;
23 
26 {
27  Q_OBJECT
28 
29 public:
31  DtTreeWidget(QWidget* parent);
32 
34  virtual QTreeWidgetItem* lastItem() const;
35 
37  QTreeWidgetItem* itemFromIndex(const QModelIndex& idx) { return QTreeWidget::itemFromIndex(idx); };
38 
40  QModelIndex indexFromItem(QTreeWidgetItem *item, int column = 0) const
41  {
42  return QTreeWidget::indexFromItem(item, column);
43  }
44 
46  virtual int indexOfChild(QTreeWidgetItem*) const;
47 
49  unsigned int depth(QTreeWidgetItem*) const;
50 
52  QTreeWidgetItem* nextSibling(QTreeWidgetItem*) const;
53 
55  void setAllowEmptySelection(bool);
56 
58  bool allowEmptySelection() const;
59 
60 signals:
61 
64  void mouseLeftPressed(QTreeWidgetItem*, QMouseEvent*, int col);
65 
67  void rightClickOnItem(QTreeWidgetItem*, QMouseEvent*, int col);
68 
70  void contentsMoving(int, int);
71 
72 protected:
73 
75  virtual void mousePressEvent(QMouseEvent *event);
76 
78  virtual void mouseReleaseEvent(QMouseEvent *event);
79 
81  virtual void scrollContentsBy(int, int);
82 
84  virtual QSize sizeHint() const;
85 
87  virtual QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex &index,
88  const QEvent *event = 0) const;
89 
91  virtual QItemSelectionModel::SelectionFlags selectionBehaviorFlags() const;
92 
93 protected:
94 
97 };
98 
100 {
102 }
103 
105 {
106  return myAllowEmptySelection;
107 }
108 
109 #endif //OverlayListView_H

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)