MCPcopy Create free account
hub / github.com/Robotips/uConfig / ComponentLibTreeView

Method ComponentLibTreeView

src/kicad/itemmodel/componentlibtreeview.cpp:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include <QMessageBox>
25
26ComponentLibTreeView::ComponentLibTreeView(Lib *lib, QWidget *parent) :
27 QTreeView(parent)
28{
29 if (lib)
30 _model = new ComponentLibItemModel(lib);
31 else
32 _model = new ComponentLibItemModel(new Lib());
33
34 setSelectionMode(QAbstractItemView::ExtendedSelection);
35 _editMode = false;
36
37 _sortProxy = new NumericalSortFilterProxyModel();
38 _sortProxy->setSourceModel(_model);
39 setModel(_sortProxy);
40
41 sortByColumn(0, Qt::AscendingOrder);
42
43 setSortingEnabled(true);
44 createActions();
45}
46
47Lib *ComponentLibTreeView::lib() const
48{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected