Changeset View
Changeset View
Standalone View
Standalone View
libs/editor/widgets/settingwidget.cpp
Show All 20 Lines | |||||
21 | #include "settingwidget.h" | 21 | #include "settingwidget.h" | ||
22 | #include "bssidcombobox.h" | 22 | #include "bssidcombobox.h" | ||
23 | #include "hwaddrcombobox.h" | 23 | #include "hwaddrcombobox.h" | ||
24 | #include "ssidcombobox.h" | 24 | #include "ssidcombobox.h" | ||
25 | #include "passwordfield.h" | 25 | #include "passwordfield.h" | ||
26 | 26 | | |||
27 | #include <QComboBox> | 27 | #include <QComboBox> | ||
28 | #include <QCheckBox> | 28 | #include <QCheckBox> | ||
29 | #include <QGroupBox> | ||||
29 | #include <QLineEdit> | 30 | #include <QLineEdit> | ||
30 | #include <QPushButton> | 31 | #include <QPushButton> | ||
31 | #include <QSpinBox> | 32 | #include <QSpinBox> | ||
32 | #include <QTableView> | 33 | #include <QTableView> | ||
33 | 34 | | |||
34 | #include <KUrlRequester> | 35 | #include <KUrlRequester> | ||
35 | 36 | | |||
36 | SettingWidget::SettingWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent, Qt::WindowFlags f): | 37 | SettingWidget::SettingWidget(const NetworkManager::Setting::Ptr &setting, QWidget* parent, Qt::WindowFlags f): | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 58 | { | |||
99 | } | 100 | } | ||
100 | 101 | | |||
101 | // Connect all QTableView widgets | 102 | // Connect all QTableView widgets | ||
102 | QList<QTableView *> tableviews = findChildren<QTableView *>(); | 103 | QList<QTableView *> tableviews = findChildren<QTableView *>(); | ||
103 | for(QTableView *tableview : tableviews) { | 104 | for(QTableView *tableview : tableviews) { | ||
104 | connect(tableview, &QTableView::clicked, this, &SettingWidget::settingChanged); | 105 | connect(tableview, &QTableView::clicked, this, &SettingWidget::settingChanged); | ||
105 | } | 106 | } | ||
106 | 107 | | |||
108 | // Connect all QGroupBox widgets | ||||
109 | QList<QGroupBox *> groupBoxes = findChildren<QGroupBox *>(); | ||||
110 | for (QGroupBox *box : groupBoxes) { | ||||
111 | connect(box, &QGroupBox::toggled, this, &SettingWidget::settingChanged); | ||||
112 | } | ||||
113 | | ||||
107 | /********** OUR CUSTOM WIDGETS **********/ | 114 | /********** OUR CUSTOM WIDGETS **********/ | ||
108 | // Connect all PasswordField widgets | 115 | // Connect all PasswordField widgets | ||
109 | QList<PasswordField *> passwordfields = findChildren<PasswordField *>(); | 116 | QList<PasswordField *> passwordfields = findChildren<PasswordField *>(); | ||
110 | for (PasswordField *passwordfield : passwordfields) { | 117 | for (PasswordField *passwordfield : passwordfields) { | ||
111 | connect(passwordfield, &PasswordField::textChanged, this, &SettingWidget::settingChanged); | 118 | connect(passwordfield, &PasswordField::textChanged, this, &SettingWidget::settingChanged); | ||
112 | connect(passwordfield, &PasswordField::passwordOptionChanged, this, &SettingWidget::settingChanged); | 119 | connect(passwordfield, &PasswordField::passwordOptionChanged, this, &SettingWidget::settingChanged); | ||
113 | } | 120 | } | ||
114 | 121 | | |||
Show All 28 Lines |