MCPcopy Create free account
hub / github.com/chris2511/xca / XcaTreeView

Method XcaTreeView

widgets/XcaTreeView.cpp:34–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "ui_ItemProperties.h"
33
34XcaTreeView::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
63XcaTreeView::~XcaTreeView()
64{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected