MCPcopy Create free account
hub / github.com/KDE/kdevelop / setCheckSetSelectionManager

Method setCheckSetSelectionManager

plugins/clazy/config/checksetmanagewidget.cpp:138–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void CheckSetManageWidget::setCheckSetSelectionManager(CheckSetSelectionManager* checkSetSelectionManager,
139 const QSharedPointer<const ChecksDB>& db)
140{
141 m_ui.enabledChecks->setChecksDb(db);
142 m_checkSetSelectionListModel = new CheckSetSelectionListModel(checkSetSelectionManager, this);
143 m_ui.checkSetSelect->setModel(m_checkSetSelectionListModel);
144
145 const auto defaultIndex = m_checkSetSelectionListModel->defaultCheckSetSelectionRow();
146 m_ui.checkSetSelect->setCurrentIndex(defaultIndex);
147 onSelectedCheckSetSelectionChanged(defaultIndex);
148
149 connect(m_ui.cloneCheckSetSelectionButton, &QPushButton::clicked,
150 this, &CheckSetManageWidget::cloneSelectedCheckSetSelection);
151 connect(m_ui.addCheckSetSelectionButton, &QPushButton::clicked,
152 this, &CheckSetManageWidget::addCheckSetSelection);
153 connect(m_ui.removeCheckSetSelectionButton, &QPushButton::clicked,
154 this, &CheckSetManageWidget::removeSelectedCheckSetSelection);
155 connect(m_ui.setAsDefaultCheckSetSelectionButton, &QPushButton::clicked,
156 this, &CheckSetManageWidget::setSelectedCheckSetSelectionAsDefault);
157 connect(m_ui.editCheckSetSelectionNameButton, &QPushButton::clicked,
158 this, &CheckSetManageWidget::editSelectedCheckSetSelectionName);
159 connect(m_ui.checkSetSelect, QOverload<int>::of(&KComboBox::currentIndexChanged),
160 this, &CheckSetManageWidget::onSelectedCheckSetSelectionChanged);
161
162 connect(m_checkSetSelectionListModel, &CheckSetSelectionListModel::defaultCheckSetSelectionChanged,
163 this, &CheckSetManageWidget::onDefaultCheckSetSelectionChanged);
164
165 connect(m_checkSetSelectionListModel, &CheckSetSelectionListModel::rowsInserted,
166 this, &CheckSetManageWidget::changed);
167 connect(m_checkSetSelectionListModel, &CheckSetSelectionListModel::rowsRemoved,
168 this, &CheckSetManageWidget::changed);
169 connect(m_checkSetSelectionListModel, &CheckSetSelectionListModel::checkSetSelectionChanged,
170 this, &CheckSetManageWidget::changed);
171 connect(m_checkSetSelectionListModel, &CheckSetSelectionListModel::defaultCheckSetSelectionChanged,
172 this, &CheckSetManageWidget::changed);
173
174 connect(m_ui.enabledChecks, &ChecksWidget::checksChanged,
175 this, &CheckSetManageWidget::onEnabledChecksChanged);
176}
177
178void CheckSetManageWidget::setSelectedCheckSetSelectionAsDefault()
179{

Callers 1

GlobalConfigPageMethod · 0.45

Calls 4

setChecksDbMethod · 0.80
setCurrentIndexMethod · 0.80
setModelMethod · 0.45

Tested by

no test coverage detected