Changeset View
Changeset View
Standalone View
Standalone View
sidepanel.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 36 | { | |||
---|---|---|---|---|---|
43 | m_proxyModel = new InfoKcmProxyModel(this); | 43 | m_proxyModel = new InfoKcmProxyModel(this); | ||
44 | m_proxyModel->setSourceModel(m_model); | 44 | m_proxyModel->setSourceModel(m_model); | ||
45 | 45 | | |||
46 | createMenuActions(); | 46 | createMenuActions(); | ||
47 | 47 | | |||
48 | setMouseTracking(true); | 48 | setMouseTracking(true); | ||
49 | setModel(m_proxyModel); | 49 | setModel(m_proxyModel); | ||
50 | connect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); | 50 | connect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); | ||
51 | connect(this,SIGNAL(clicked(QModelIndex)),this,SLOT(clickedSlot(QModelIndex))); | | |||
52 | } | 51 | } | ||
53 | 52 | | |||
54 | SidePanel::~SidePanel() | 53 | SidePanel::~SidePanel() | ||
55 | { | 54 | { | ||
56 | disconnect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); | 55 | disconnect(this,&QAbstractItemView::activated,this,&SidePanel::clickedSlot); | ||
57 | disconnect(this,SIGNAL(clicked(QModelIndex)),this,SLOT(clickedSlot(QModelIndex))); | | |||
58 | 56 | | |||
59 | delete m_proxyModel; | 57 | delete m_proxyModel; | ||
60 | delete m_model; | 58 | delete m_model; | ||
61 | } | 59 | } | ||
62 | 60 | | |||
63 | void SidePanel::clickedSlot(const QModelIndex &index) | 61 | void SidePanel::clickedSlot(const QModelIndex &index) | ||
64 | { | 62 | { | ||
65 | if(index.isValid() == false) { | 63 | if(index.isValid() == false) { | ||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |