Changeset 64228 in vbox
- Timestamp:
- Oct 12, 2016 5:48:34 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111237
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITableView.h
r64178 r64228 22 22 #include <QTableView> 23 23 24 /* Forward declarations: */ 25 class QITableViewCell; 26 class QITableViewRow; 27 class QITableView; 28 29 30 /** OObject subclass used as cell for the QITableView. */ 31 class QITableViewCell : public QObject 32 { 33 Q_OBJECT; 34 35 public: 36 37 /** Constructs table-view cell for passed @a pParent. */ 38 QITableViewCell(QITableViewRow *pParent) 39 : m_pRow(pParent) 40 {} 41 42 /** Defines the parent @a pRow reference. */ 43 void setRow(QITableViewRow *pRow) { m_pRow = pRow; } 44 /** Returns the parent row reference. */ 45 QITableViewRow *row() const { return m_pRow; } 46 47 /** Returns the cell text. */ 48 virtual QString text() const = 0; 49 50 private: 51 52 /** Holds the parent row reference. */ 53 QITableViewRow *m_pRow; 54 }; 55 56 57 /** OObject subclass used as row for the QITableView. */ 58 class QITableViewRow : public QObject 59 { 60 Q_OBJECT; 61 62 public: 63 64 /** Constructs table-view row for passed @a pParent. */ 65 QITableViewRow(QITableView *pParent) 66 : m_pTable(pParent) 67 {} 68 69 /** Defines the parent @a pTable reference. */ 70 void setTable(QITableView *pTable) { m_pTable = pTable; } 71 /** Returns the parent table reference. */ 72 QITableView *table() const { return m_pTable; } 73 74 /** Returns the number of children. */ 75 virtual int childCount() const = 0; 76 /** Returns the child item with @a iIndex. */ 77 virtual QITableViewCell *childItem(int iIndex) const = 0; 78 79 private: 80 81 /** Holds the parent table reference. */ 82 QITableView *m_pTable; 83 }; 84 24 85 25 86 /** QTableView subclass extending standard functionality. */ … … 37 98 /** Constructs table-view passing @a pParent to the base-class. */ 38 99 QITableView(QWidget *pParent = 0); 100 101 /** Returns the number of children. */ 102 virtual int childCount() const { return 0; } 103 /** Returns the child item with @a iIndex. */ 104 virtual QITableViewRow *childItem(int iIndex) const { Q_UNUSED(iIndex); return 0; } 39 105 40 106 /** Makes sure current editor data committed. */
Note:
See TracChangeset
for help on using the changeset viewer.