Changeset View
Changeset View
Standalone View
Standalone View
solid-device-automounter/kcm/DeviceAutomounterKCM.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 44 | { | |||
---|---|---|---|---|---|
56 | 56 | | |||
57 | m_devices = new DeviceModel(this); | 57 | m_devices = new DeviceModel(this); | ||
58 | deviceView->setModel(m_devices); | 58 | deviceView->setModel(m_devices); | ||
59 | 59 | | |||
60 | deviceView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); | 60 | deviceView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); | ||
61 | deviceView->header()->setSectionResizeMode(0, QHeaderView::Stretch); | 61 | deviceView->header()->setSectionResizeMode(0, QHeaderView::Stretch); | ||
62 | 62 | | |||
63 | auto emitChanged = [this] { | 63 | auto emitChanged = [this] { | ||
64 | m_devices->setAutomaticMountOnLogin(automountOnLogin->isChecked()); | ||||
65 | m_devices->setAutomaticMountOnPlugin(automountOnPlugin->isChecked()); | ||||
64 | emit markAsChanged(); | 66 | emit markAsChanged(); | ||
65 | }; | 67 | }; | ||
66 | 68 | | |||
67 | connect(automountOnLogin, &QCheckBox::stateChanged, this, emitChanged); | 69 | connect(automountOnLogin, &QCheckBox::stateChanged, this, emitChanged); | ||
68 | connect(automountOnPlugin, &QCheckBox::stateChanged, this, emitChanged); | 70 | connect(automountOnPlugin, &QCheckBox::stateChanged, this, emitChanged); | ||
69 | connect(automountEnabled, &QCheckBox::stateChanged, this, emitChanged); | 71 | connect(automountEnabled, &QCheckBox::stateChanged, this, emitChanged); | ||
70 | connect(automountUnknownDevices, &QCheckBox::stateChanged, this, emitChanged); | 72 | connect(automountUnknownDevices, &QCheckBox::stateChanged, this, emitChanged); | ||
71 | connect(m_devices, &DeviceModel::dataChanged, this, emitChanged); | 73 | connect(m_devices, &DeviceModel::dataChanged, this, emitChanged); | ||
▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines |