- Timestamp:
- 01/20/10 23:04:12 (13 years ago)
- Branches:
- master, qt5
- Children:
- be9c036
- Parents:
- 4693fa6
- Location:
- src/mvc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mvc/treeview.cpp
r4693fa6 r8fe9bd2 15 15 : QTreeView(aParent) 16 16 { 17 connect(this, SIGNAL(clicked(QModelIndex)), SLOT(handleItemClicked(QModelIndex))); 17 18 } 18 19 … … 124 125 } 125 126 127 void TreeView::handleItemClicked(const QModelIndex &index) 128 { 129 if(!index.parent().isValid()) // time-group 130 { 131 if(isExpanded(index)) 132 setExpanded(index, false); 133 else 134 setExpanded(index, true); 135 } 136 } 137 -
src/mvc/treeview.h
r4693fa6 r8fe9bd2 13 13 void mouseReleaseEvent(QMouseEvent *aEvent); 14 14 bool testForControlClicked(const QModelIndex &aIndex, const QPoint &aPoint); 15 private slots: 16 void handleItemClicked(const QModelIndex &index); 15 17 signals: 16 18 void requestForMap(const QModelIndex &aIndex);
Note: See TracChangeset
for help on using the changeset viewer.