- connect(ui.styleComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
- connect(ui.languageComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
+#ifndef HAVE_WEBKIT
+ ui.showWebPreview->hide();
+ ui.showWebPreview->setEnabled(false);
+#endif
+
+ foreach(QComboBox *comboBox, findChildren<QComboBox *>()) {
+ connect(comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(widgetHasChanged()));
+ }
+ foreach(QCheckBox *checkBox, findChildren<QCheckBox *>()) {
+ connect(checkBox, SIGNAL(clicked()), this, SLOT(widgetHasChanged()));
+ }
+
+ mapper = new QSignalMapper(this);
+ connect(mapper, SIGNAL(mapped(QWidget *)), this, SLOT(chooseFont(QWidget *)));
+
+ connect(ui.chooseChatView, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseBufferView, SIGNAL(clicked()), mapper, SLOT(map()));
+ connect(ui.chooseInputLine, SIGNAL(clicked()), mapper, SLOT(map()));
+
+ mapper->setMapping(ui.chooseChatView, ui.demoChatView);
+ mapper->setMapping(ui.chooseBufferView, ui.demoBufferView);
+ mapper->setMapping(ui.chooseInputLine, ui.demoInputLine);