| 32 | #include "ui_ItemProperties.h" |
| 33 | |
| 34 | XcaTreeView::XcaTreeView(QWidget *parent) |
| 35 | :QTreeView(parent) |
| 36 | { |
| 37 | setHeader(new XcaHeaderView()); |
| 38 | setAlternatingRowColors(true); |
| 39 | setSelectionMode(QAbstractItemView::ExtendedSelection); |
| 40 | setEditTriggers(QAbstractItemView::EditKeyPressed); |
| 41 | setRootIsDecorated(false); |
| 42 | setUniformRowHeights(true); |
| 43 | setDragEnabled(true); |
| 44 | //setAnimated(true); |
| 45 | |
| 46 | proxy = new XcaProxyModel(this); |
| 47 | proxy->setDynamicSortFilter(true); |
| 48 | sortByColumn(0, Qt::AscendingOrder); |
| 49 | connect(header(), SIGNAL(sectionHandleDoubleClicked(int)), |
| 50 | this, SLOT(resizeColumnToContents(int))); |
| 51 | connect(this, SIGNAL(doubleClicked(const QModelIndex &)), |
| 52 | this, SLOT(doubleClick(const QModelIndex &))); |
| 53 | header()->setSectionsClickable(true); |
| 54 | throttle.setSingleShot(true); |
| 55 | connect(&throttle, SIGNAL(timeout()), this, SLOT(columnsResize())); |
| 56 | connect(&throttle, SIGNAL(timeout()), proxy, SLOT(invalidate())); |
| 57 | setFocusPolicy(Qt::StrongFocus); |
| 58 | setExpandsOnDoubleClick(false); |
| 59 | |
| 60 | setFont(XcaApplication::tableFont); |
| 61 | } |
| 62 | |
| 63 | XcaTreeView::~XcaTreeView() |
| 64 | { |
nothing calls this directly
no outgoing calls
no test coverage detected