MCPcopy Create free account
hub / github.com/KDAB/GammaRay / setSelectionModel

Method setSelectionModel

plugins/modelinspector/modelcontentproxymodel.cpp:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void ModelContentProxyModel::setSelectionModel(QItemSelectionModel *selectionModel)
36{
37 Q_ASSERT(!selectionModel || selectionModel->model() == sourceModel());
38 if (m_selectionModel == selectionModel)
39 return;
40
41 if (m_selectionModel) {
42 disconnect(m_selectionModel.data(), &QItemSelectionModel::selectionChanged, this, &ModelContentProxyModel::selectionChanged);
43 emitDataChangedForSelection(m_selectionModel->selection());
44 }
45
46 m_selectionModel = selectionModel;
47
48 if (m_selectionModel) {
49 connect(m_selectionModel.data(), &QItemSelectionModel::selectionChanged, this, &ModelContentProxyModel::selectionChanged);
50 emitDataChangedForSelection(m_selectionModel->selection());
51 }
52}
53
54QVariant ModelContentProxyModel::data(const QModelIndex &proxyIndex, int role) const
55{

Callers 15

MainWindowMethod · 0.80
setBaseNameMethod · 0.80
ObjectInspectorWidgetMethod · 0.80
setObjectBaseNameMethod · 0.80
MessageHandlerWidgetMethod · 0.80
ResourceBrowserWidgetMethod · 0.80
InspectorWidgetMethod · 0.80
TimezoneTabMethod · 0.80
QuickInspectorWidgetMethod · 0.80
setObjectBaseNameMethod · 0.80

Calls 2

modelMethod · 0.45
dataMethod · 0.45

Tested by 11

ObjectInspectorWidgetMethod · 0.64
InspectorWidgetMethod · 0.64
QuickInspectorWidgetMethod · 0.64
ModelInspectorWidgetMethod · 0.64
WidgetInspectorWidgetMethod · 0.64
SceneInspectorWidgetMethod · 0.64
ActionInspectorWidgetMethod · 0.64
Qt3DInspectorWidgetMethod · 0.64