VR-Forces 4.1.1 Class Documentation
qtTreeWidgetExtensions.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: qtTreeWidgetExtensions.h,v $ $Revision: 1.7 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #pragma once
13 
16 
18 
19 #include <QtGui/QTreeWidget>
20 #include <QtGui/QKeyEvent>
21 
22 class QMimeData;
23 
24 namespace makVrf
25 {
27  {
28  Q_OBJECT
29 
30  public:
32  DtTreeWidget(QWidget* parent);
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 Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)