Changeset 9872 in vbox for trunk/src/VBox/Frontends/VirtualBox4/include/QITreeWidget.h
- Timestamp:
- Jun 23, 2008 1:26:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/QITreeWidget.h
r9867 r9872 24 24 #define __QITreeWidget_h__ 25 25 26 /* Qt includes */27 26 #include <QTreeWidget> 28 27 28 /* 29 * QTreeWidget class which extends standard QTreeWidget's functionality. 30 */ 29 31 class QITreeWidget: public QTreeWidget 30 32 { … … 32 34 33 35 public: 36 37 /* 38 * There are two allowed QTreeWidgetItem types which may be used with 39 * QITreeWidget: basic and complex. 40 * Complex type used in every place where the particular item have to 41 * be separately repainted with it's own content. 42 * Basic are used in all other places. 43 */ 44 enum 45 { 46 BasicItemType = QTreeWidgetItem::UserType + 1, 47 ComplexItemType = QTreeWidgetItem::UserType + 2 48 }; 34 49 35 50 QITreeWidget (QWidget *aParent = 0); … … 41 56 virtual Qt::DropActions supportedDropActions () const; 42 57 58 void paintEvent (QPaintEvent *); 59 43 60 /* Protected member vars */ 44 61 Qt::DropActions mSupportedDropActions; 45 62 }; 46 63 64 /* 65 * Interface for more complex items which requires special repainting 66 * routine inside QITreeWidget's viewport. 67 */ 68 class ComplexTreeWidgetItem : public QTreeWidgetItem 69 { 70 public: 71 72 ComplexTreeWidgetItem (QTreeWidget *aParent) 73 : QTreeWidgetItem (aParent, QITreeWidget::ComplexItemType) {} 74 75 virtual void paintItem (QPainter *aPainter) = 0; 76 }; 77 47 78 #endif /* __QITreeWidget_h__ */ 48 79
Note:
See TracChangeset
for help on using the changeset viewer.